/* CalcBench — dark moss + warm amber palette */
/* Fraunces (display) + Instrument Sans (body) */
/* Fonts loaded via <link> tags in html-start.ejs — not here — to avoid render-blocking @import */

:root {
  --bg:          #0f1410;
  --bg-1:        #161c18;
  --bg-2:        #1e2720;
  --border:      #2e3d30;
  --border-hi:   #3d5240;

  --text:        #e8ede6;
  --text-muted:  #8fa088;
  --text-dim:    #546b57;

  --amber:       #f0a500;
  --amber-hi:    #f7c34a;
  --amber-dim:   #7a5200;

  --green:       #4caf69;
  --green-hi:    #6fcf83;

  --danger:      #e05252;

  --radius:      6px;
  --radius-lg:   12px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Instrument Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-hi); }

/* ── Layout utilities ────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Nav ────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 16, 0.92);
  backdrop-filter: blur(8px);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--amber); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--amber);
  color: #0f1410;
}
.btn--primary:hover {
  background: var(--amber-hi);
  color: #0f1410;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(240, 165, 0, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.btn--full { width: 100%; justify-content: center; }
.btn--lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── Forms ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  outline: none;
}

input:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.12);
}

input::placeholder { color: var(--text-dim); }

.error-msg {
  background: rgba(224, 82, 82, 0.1);
  border: 1px solid rgba(224, 82, 82, 0.3);
  border-radius: var(--radius);
  color: #f08080;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-hi);
}

/* ── Auth pages ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.auth-box {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-box h1 {
  font-size: 1.75rem;
}

.auth-box form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}

/* ── Specialty picker ────────────────────────────── */
.specialty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.specialty-card {
  position: relative;
  cursor: pointer;
}

.specialty-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.specialty-card__inner {
  background: var(--bg-1);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.specialty-card input[type="radio"]:checked + .specialty-card__inner {
  border-color: var(--amber);
  background: rgba(240, 165, 0, 0.06);
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.12);
}

.specialty-card:hover .specialty-card__inner {
  border-color: var(--border-hi);
}

.specialty-card__emoji { font-size: 2rem; line-height: 1; }

.specialty-card__label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.specialty-card__desc {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ── Dashboard ───────────────────────────────────── */
.dashboard {
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.dashboard__header {
  margin-bottom: 2.5rem;
}

.dashboard__greeting {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.dashboard__title {
  font-size: 2rem;
}

.specialty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(240, 165, 0, 0.1);
  border: 1px solid rgba(240, 165, 0, 0.2);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  margin-top: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.calc-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s;
  position: relative;
}

.calc-card--available {
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.calc-card--available:hover {
  border-color: var(--amber-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  color: var(--text);
}

.calc-card--locked {
  opacity: 0.5;
}

.calc-card__emoji { font-size: 1.75rem; }

.calc-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.calc-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.calc-card__cta {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.coming-soon-tag {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Landing page ─────────────────────────────────── */
.hero {
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(240,165,0,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  border: 1px solid rgba(240,165,0,0.3);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 auto 1.25rem;
  color: var(--text);
}

.hero h1 em {
  font-style: italic;
  color: var(--amber);
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Features section ─────────────────────────────── */
.features {
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-item__icon {
  font-size: 1.75rem;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Specialties strip ────────────────────────────── */
.specialties {
  padding: 4rem 1.5rem;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.specialties__grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 860px;
  margin: 2rem auto 0;
}

.specialty-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.specialty-pill:hover {
  border-color: var(--amber-dim);
  color: var(--text);
}

/* ── CTA section ──────────────────────────────────── */
.cta-section {
  padding: 6rem 1.5rem;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 600px;
  margin: 0 auto 1rem;
}

.cta-section p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Footer ───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  .specialty-grid {
    grid-template-columns: 1fr;
  }

  .hero { padding: 4rem 1rem 3rem; }
  .hero h1 { font-size: 2.25rem; }

  .nav__links .btn--ghost { display: none; }

  .auth-box { padding: 1.75rem 1.25rem; }

  .dashboard { padding: 1.5rem 1rem; }
}
