/* ==========================================================
   TERA FE — Shared Design System
   Links from every page: <link rel="stylesheet" href="tera-fe-styles.css">
   ========================================================== */

:root {
  --forest: #1e3a8a;
  --forest-deep: #0c1e4a;
  --cream: #f6f1e6;
  --cream-light: #fbf8f1;
  --peach: #f2c3a4;
  --peach-soft: #f7ddc9;
  --gold: #b8864a;
  --gold-deep: #8d5f2d;
  --ink: #1a1a18;
  --ink-soft: #4a4a45;
  --line: #e6ddc9;
  --success: #2f6b3f;
  --danger: #a23b2b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream-light);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--forest-deep);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  font-weight: 600;
}
.display-italic { font-style: italic; color: var(--gold-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
}
.btn-primary { background: var(--forest); color: var(--cream-light); }
.btn-primary:hover { background: var(--forest-deep); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: transparent; color: var(--forest-deep); border-color: var(--forest); }
.btn-secondary:hover { background: var(--forest); color: var(--cream-light); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 10px 16px; }
.btn-ghost:hover { color: var(--forest-deep); }
.btn-lg { padding: 18px 38px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Nav ---------- */
/* Thin utility bar above main nav: social + phone */
.nav-utility {
  background: var(--forest-deep);
  color: rgba(246, 241, 230, 0.85);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.nav-utility-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-utility .nav-social { display: inline-flex; gap: 14px; align-items: center; }
.nav-utility .nav-social a {
  color: rgba(246, 241, 230, 0.7);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-utility .nav-social a:hover { color: var(--peach); }
.nav-utility .nav-social svg { width: 15px; height: 15px; display: block; }
.nav-utility-phone {
  color: rgba(246, 241, 230, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-utility-phone:hover { color: var(--peach); }
.nav-utility-phone .nav-utility-meta {
  color: rgba(246, 241, 230, 0.5);
  font-weight: 400;
  margin-right: 6px;
}
@media (max-width: 520px) {
  .nav-utility-inner { padding: 8px 20px; gap: 12px; }
  .nav-utility .nav-utility-meta { display: none; }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1240px;
  margin: 0 auto;
  gap: 32px;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  color: var(--forest-deep);
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--forest-deep);
  letter-spacing: 0.22em;
  white-space: nowrap;
  line-height: 1;
}
.logo-dot { color: var(--gold); }
.logo-rule {
  display: block;
  width: 32px;
  height: 3px;
  background: var(--gold);
  border-radius: 1px;
}
.logo-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold-deep);
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0.9;
}
@media (max-width: 720px) {
  .logo-rule { display: none; }
  .logo-tagline { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 1;
  min-width: 0;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--forest-deep); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
@media (max-width: 900px) { .nav-links { display: none; } }

/* ---------- Mobile hamburger + drawer ---------- */
.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  margin-left: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--forest-deep);
  border-radius: 1px;
}
@media (max-width: 900px) {
  .nav-hamburger { display: inline-flex; }
  .nav-cta > .btn { display: none; }
}
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile.open { opacity: 1; pointer-events: auto; }
.nav-mobile-inner {
  padding: 32px 28px 56px;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}
.nav-mobile-close {
  position: absolute;
  top: 20px; right: 22px;
  width: 44px; height: 44px;
  font-size: 32px; font-weight: 300; line-height: 1;
  background: none; border: none;
  color: var(--forest-deep);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nav-mobile-logo {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: 5px; line-height: 1;
  color: var(--forest-deep); text-decoration: none;
  margin: 8px 0 40px;
}
.nav-mobile-logo .logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--forest-deep);
  line-height: 1;
}
.nav-mobile-logo .logo-rule {
  display: block;
  width: 32px; height: 3px;
  background: var(--gold);
  border-radius: 1px;
}
.nav-mobile-logo .logo-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--gold-deep);
}
.nav-mobile-links { display: flex; flex-direction: column; margin-bottom: 32px; }
.nav-mobile-links a {
  display: block;
  padding: 18px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 500;
  color: var(--forest-deep);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.nav-mobile-links a:hover,
.nav-mobile-links a:active { color: var(--gold-deep); }
.nav-mobile-cta { margin-bottom: 28px; }
.nav-mobile-cta .btn { width: 100%; justify-content: center; }
.nav-mobile-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.nav-mobile-contact-phone {
  color: var(--forest-deep);
  text-decoration: none;
  font-weight: 600;
}
.nav-mobile-contact .nav-social {
  display: inline-flex !important;
  gap: 18px;
}
.nav-mobile-contact .nav-social a { color: var(--ink-soft); }
.nav-mobile-contact .nav-social a:hover { color: var(--gold-deep); }
.nav-mobile-contact .nav-social svg { width: 20px; height: 20px; display: block; }
body.nav-open { overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(36px, 4.5vw, 52px); margin: 14px 0 20px; }
.section-head .section-sub { font-size: 18px; color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

.bg-cream { background: var(--cream); }
.bg-cream-light { background: var(--cream-light); }
.bg-forest { background: var(--forest); color: var(--cream); }
.bg-forest-deep { background: var(--forest-deep); color: var(--cream); }
.bg-forest h1, .bg-forest h2, .bg-forest h3,
.bg-forest-deep h1, .bg-forest-deep h2, .bg-forest-deep h3 { color: var(--cream); }

/* ---------- Pills ---------- */
.service-pills { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(30, 58, 138, 0.08);
  border: 1px solid rgba(30, 58, 138, 0.15);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--forest-deep);
  letter-spacing: 0.02em;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Pillar Hero ---------- */
.pillar-hero {
  position: relative;
  padding: 72px 0 80px;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(242, 195, 164, 0.3), transparent 50%),
    radial-gradient(ellipse at 5% 80%, rgba(184, 134, 74, 0.12), transparent 45%),
    var(--cream);
  overflow: hidden;
}
.pillar-hero h1 {
  font-size: clamp(40px, 5.8vw, 64px);
  margin: 18px 0 20px;
  max-width: 820px;
}
.pillar-hero h1 em { font-style: italic; color: var(--gold-deep); }
.pillar-hero-sub {
  font-size: clamp(16px, 1.55vw, 19px);
  color: var(--ink-soft);
  max-width: 680px;
  margin-bottom: 32px;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(30, 58, 138, 0.08);
}
.card-dark {
  background: linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--cream);
  border-color: var(--forest-deep);
}
.card-dark h3 { color: var(--cream); }

/* ---------- Stat numerals ---------- */
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 64px;
  font-weight: 600;
  color: var(--forest-deep);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-num sup { font-size: 24px; margin-left: 2px; color: var(--gold); vertical-align: super; }
.stat-label { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.04em; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; }
.feature-list li {
  font-size: 15px;
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--ink);
  line-height: 1.5;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.feature-list.light li { color: rgba(246, 241, 230, 0.9); }
.feature-list.light li::before { color: var(--peach); }

/* ---------- Callout ---------- */
.callout {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 24px 28px;
  border-radius: 0 14px 14px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--forest-deep);
  line-height: 1.3;
}

/* ---------- Dr. Allen block (compact variant) ---------- */
.doctor-block {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.doctor-block::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 195, 164, 0.12), transparent 70%);
}
.doctor-block h2 { color: var(--cream); font-size: clamp(28px, 3.8vw, 40px); margin-bottom: 20px; }
.doctor-block h2 em { color: var(--peach); font-style: italic; }
.doctor-block p { color: rgba(246, 241, 230, 0.85); line-height: 1.6; font-size: 16px; }

.doctor-block-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .doctor-block-grid { grid-template-columns: minmax(280px, 380px) 1fr; gap: 56px; }
}
.doctor-block-img {
  aspect-ratio: 4 / 5;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(246, 241, 230, 0.15);
  background: linear-gradient(135deg, #2d4d9e, #1e3a8a);
  position: relative;
}
.doctor-block-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 85%;
  display: block;
}
.doctor-block-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 30, 74, 0.45) 100%);
  pointer-events: none;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--forest-deep);
  gap: 16px;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-toggle {
  font-size: 24px;
  font-weight: 300;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-toggle { transform: rotate(45deg); }
.faq-a {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  max-width: 780px;
}

/* ---------- Guarantee band ---------- */
.guarantee-band {
  background: var(--forest);
  color: var(--cream);
  padding: 64px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.guarantee-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(242, 195, 164, 0.1), transparent 70%);
}
.guarantee-band-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 0 24px; }
.guarantee-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--peach);
  padding: 6px 16px;
  background: rgba(242, 195, 164, 0.15);
  border-radius: 999px;
  margin-bottom: 20px;
}
.guarantee-band h2 { color: var(--cream); font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.guarantee-band p { color: rgba(246, 241, 230, 0.85); font-size: 17px; line-height: 1.55; }

/* ---------- Footer ---------- */
.footer {
  background: var(--forest-deep);
  color: rgba(246, 241, 230, 0.7);
  padding: 72px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--gold); }
.footer-about { color: rgba(246, 241, 230, 0.65); line-height: 1.6; font-size: 14px; max-width: 320px; }
.footer h5 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--peach);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-links a { color: rgba(246, 241, 230, 0.7); transition: color 0.15s; }
.footer-links a:hover { color: var(--cream); }
.footer-contact { color: rgba(246, 241, 230, 0.7); line-height: 1.7; }
.footer-contact strong { color: var(--cream); font-weight: 500; }
.footer-legal {
  border-top: 1px solid rgba(246, 241, 230, 0.12);
  padding-top: 28px;
  font-size: 12px;
  color: rgba(246, 241, 230, 0.5);
  line-height: 1.6;
}
.footer-legal p { margin-bottom: 10px; }
.footer-legal a { color: rgba(246, 241, 230, 0.7); text-decoration: underline; }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.mobile-cta .btn { width: 100%; }
@media (max-width: 600px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 70px; }
}

/* ---------- Utility ---------- */
.note { font-size: 12px; color: var(--ink-soft); opacity: 0.75; }
.text-center { text-align: center; }
.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 20px;
  display: block;
}
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Trust row ---------- */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  font-size: 13px;
  color: var(--ink-soft);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.trust-row .item { display: flex; align-items: center; gap: 8px; }
.trust-row strong { color: var(--forest-deep); font-weight: 600; }
