/* ============ Base ============ */
/* Life Coach Directory brand: navy #112f49, blue #0071bc, light blue #28abe1,
   off-white #eae9e7. Headings/body in Figtree (the directory website font). */
:root {
  --primary: #0071bc;        /* LCD brand blue */
  --primary-dark: #005f9f;
  --accent: #28abe1;         /* LCD light blue */
  --navy: #112f49;
  --ink: #112f49;
  --ink-soft: #4d6275;
  --paper: #eae9e7;          /* LCD off-white */
  --card: #ffffff;
  --line: #dcdad6;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(17, 47, 73, 0.10);
}

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

body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Decorative elements (orbit ring, floating chips) intentionally poke past
   the viewport edge; without this iOS Safari rescales the page to fit them */
html, body { overflow-x: hidden; overflow-x: clip; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; line-height: 1.3; }

a { color: var(--primary); }

/* ============ Header / footer ============ */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo-link { display: flex; align-items: center; gap: 10px; }
.brand-logo-link img { display: block; height: 24px; width: auto; }
.brand-logo-link .brand-icon { height: 28px; width: 28px; }
.header-divider { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
.brand { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 6px; }
.header-cta {
  flex-shrink: 0;
  background: var(--primary); color: #fff;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  padding: 8px 18px; border-radius: 999px;
  transition: background 0.12s ease;
}
.header-cta:hover { background: var(--primary-dark); }

/* Burger + dropdown menu */
.burger {
  width: 44px; height: 44px;
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px;
}
.burger span {
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* NB: .site-header is position:sticky (set above), which both keeps it pinned
   and anchors this absolutely-positioned menu — do not override its position */
.site-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: max(20px, calc((100% - 1060px) / 2));
  width: 280px;
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(17, 47, 73, 0.2);
  padding: 10px;
  z-index: 20;
  animation: menuIn 0.16s ease;
  transform-origin: top right;
}
@keyframes menuIn {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.menu-group + .menu-group { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.menu-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 14px 2px;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  color: var(--navy); text-decoration: none;
  border-radius: 10px;
  text-align: left;
}
.menu-item:hover { background: #ecf7fb; }
.menu-item.active { background: #d8eef7; }

.menu-label-row { display: flex; align-items: center; justify-content: space-between; }
.menu-empty {
  font-size: 0.85rem; color: var(--ink-soft);
  padding: 8px 14px 10px;
}
.menu-cog {
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  /* 44x44 tap target (Apple HIG); negative margin keeps the row compact */
  width: 44px; height: 44px;
  margin: -12px 0;
  border-radius: 50%;
}
.menu-cog svg { width: 15px; height: 15px; }
.menu-cog:hover { background: #ecf7fb; }
.menu-cog:hover, .menu-cog[aria-expanded="true"] { color: var(--primary); }

.mini-switch {
  margin-left: auto; flex-shrink: 0;
  width: 34px; height: 20px; border-radius: 999px;
  background: #cfd6dc;
  position: relative;
  transition: background 0.15s ease;
}
.mini-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 47, 73, 0.3);
  transition: transform 0.15s ease;
}
.mini-switch.on { background: var(--primary); }
.mini-switch.on::after { transform: translateX(14px); }
.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }

.site-footer {
  background: var(--navy);
  margin-top: 64px; padding: 40px 0 32px;
  font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); text-align: center;
}
.footer-logo { display: inline-block; margin-bottom: 18px; }
.footer-logo img { display: block; height: 20px; width: auto; opacity: 0.95; }
.footer-note {
  max-width: 62ch;
  margin: 0 auto 20px;
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 26px;
  margin-bottom: 22px;
}
.footer-links a {
  color: #fff; font-weight: 600; text-decoration: none;
  font-size: 0.88rem;
}
.footer-links a:hover { color: var(--accent); }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
  /* 0.6 alpha keeps small text comfortably above the 4.5:1 AA contrast ratio */
  font-size: 0.74rem; color: rgba(255, 255, 255, 0.6);
  max-width: 72ch; margin: 0 auto;
}

/* ============ Screens ============ */
.screen { display: none; padding: 48px 0 24px; }
.screen.active { display: block; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  border: none; cursor: pointer;
  font: inherit; font-weight: 600;
  border-radius: 999px;
  padding: 10px 22px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 113, 188, 0.35);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: #fff; color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 20px;
}
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 14px 34px; font-size: 1.05rem; }
.btn-ghost {
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-ghost:disabled { opacity: 0.4; cursor: default; }
.link-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--primary);
  text-decoration: underline;
}

/* ============ Intro (hero) ============ */
#screen-intro {
  padding: 64px 0 48px;
  background:
    radial-gradient(640px 420px at 78% 18%, rgba(184, 232, 248, 0.55), transparent 70%),
    radial-gradient(520px 380px at 8% 92%, rgba(168, 224, 248, 0.35), transparent 70%);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
  text-wrap: balance;
}
.hero-title {
  font-size: 2.9rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero-title em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic; font-weight: 600;
  color: var(--primary);
  letter-spacing: 0;
}
.lede { color: var(--ink-soft); max-width: 52ch; margin-bottom: 24px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-chip {
  font-size: 0.85rem; font-weight: 600;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.small-print { font-size: 0.82rem; color: var(--ink-soft); }

/* The example wheel, framed like a results card */
.hero-visual { position: relative; }
.wheel-card {
  position: relative;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(17, 47, 73, 0.16);
  padding: 26px;
}
.wheel-card::before {
  /* dotted orbit behind the card */
  content: "";
  position: absolute; inset: -34px;
  border: 2px dotted rgba(0, 113, 188, 0.25);
  border-radius: 50%;
  z-index: -1;
  animation: orbitSpin 90s linear infinite;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.wheel-card-tag {
  position: absolute; top: -13px; left: 26px;
  background: var(--navy); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px;
}
#example-wheel svg { width: 100%; height: auto; display: block; }

.hero-float {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(17, 47, 73, 0.18);
  font-size: 0.8rem; color: var(--navy);
  padding: 8px 14px;
  white-space: nowrap;
  animation: floatBob 5s ease-in-out infinite;
}
.hero-float strong { font-weight: 700; }
.hero-float-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hero-float-low  { bottom: 34px; left: -26px; }
.hero-float-high { top: 16px; right: -14px; animation-delay: 2.5s; }
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Staggered entrance */
.reveal { opacity: 0; animation: riseIn 0.6s ease forwards; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.15s; }
.r3 { animation-delay: 0.3s; }
.r4 { animation-delay: 0.45s; }
.r5 { animation-delay: 0.6s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  .hero-float, .wheel-card::before { animation: none; }
}

/* ============ Quiz ============ */
.progress-wrap { margin-bottom: 22px; }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px;
}
.progress-track {
  height: 8px; border-radius: 999px; background: var(--line); overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}
.card-enter { animation: cardIn 0.25s ease; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.segment-chip {
  display: inline-block;
  color: #fff; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.question-text { font-size: 1.45rem; margin-bottom: 10px; }
.scale-hint { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 22px; }

.scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 12px;
}
.scale-btn {
  font: inherit; font-weight: 600;
  padding: 12px 0;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: all 0.12s ease;
}
.scale-btn:hover { border-color: var(--primary); color: var(--primary); }
.scale-btn.selected {
  background: var(--primary); border-color: var(--primary); color: #fff;
  transform: scale(1.08);
}
.scale-labels {
  display: flex; justify-content: space-between;
  max-width: 560px; margin: 0 auto;
  font-size: 0.78rem; color: var(--ink-soft);
}

.quiz-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px;
}
.key-hint { font-size: 0.78rem; color: var(--ink-soft); }

/* ============ Milestones ============ */
.milestone-card {
  background: linear-gradient(135deg, var(--primary), var(--navy));
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 32px;
  text-align: center;
  animation: cardIn 0.3s ease;
}
.milestone-emblem {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
}
.milestone-title { font-size: 1.6rem; margin-bottom: 10px; }
.milestone-text {
  max-width: 46ch; margin: 0 auto 26px;
  opacity: 0.92;
}
.milestone-card .btn-primary {
  background: #fff; color: var(--primary-dark);
  box-shadow: none;
}
.milestone-card .btn-primary:hover { background: #d8eef7; }

/* ============ Results ============ */
.results-title { text-align: center; }
.results-sub {
  text-align: center; color: var(--ink-soft);
  max-width: 64ch; margin: 12px auto 36px;
}

.results-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}
.wheel-panel svg { width: 100%; height: auto; display: block; }
.wheel-label { font-size: 15px; font-weight: 600; }
.wheel-badge-text { font-size: 13px; font-weight: 700; }
.wheel-badge { transition: opacity 0.3s ease; }

.scores-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.scores-panel h2 { margin-bottom: 16px; }
.score-list { list-style: none; }
.score-list li {
  display: grid;
  grid-template-columns: 14px 1fr 90px 32px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.92rem;
}
.score-dot { width: 12px; height: 12px; border-radius: 50%; }
.score-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-bar-track {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.score-bar { display: block; height: 100%; border-radius: 999px; }
.score-value { font-weight: 700; text-align: right; }
.scores-cta { margin-top: 18px; width: 100%; text-align: center; }

.focus-section { margin-bottom: 48px; }
.focus-section > h2 { margin-bottom: 8px; }
.focus-section > p { color: var(--ink-soft); max-width: 72ch; margin-bottom: 24px; }
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.focus-card {
  background: var(--card);
  border-radius: var(--radius);
  border-top: 5px solid var(--primary);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex; flex-direction: column;
}
.focus-rank {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 8px;
}
.focus-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.focus-score { font-size: 0.95rem; }
.focus-card p { font-size: 0.92rem; color: var(--ink-soft); flex: 1; margin-bottom: 18px; }

.cta-band {
  background: linear-gradient(120deg, var(--primary), var(--navy));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  margin-bottom: 28px;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { max-width: 60ch; margin: 0 auto 22px; opacity: 0.92; }
.cta-band .btn-primary {
  background: #fff; color: var(--primary-dark);
  box-shadow: none;
}
.cta-band .btn-primary:hover { background: #d8eef7; }

.results-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.btn-action {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: 0 3px 12px rgba(17, 47, 73, 0.08);
}
.btn-action svg { width: 18px; height: 18px; color: var(--primary); }
.btn-action:hover { border-color: var(--primary); color: var(--primary); }

/* ============ Responsive ============ */
@media (max-width: 820px) {
  .results-layout { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
  .question-text { font-size: 1.2rem; }
  .question-card { padding: 28px 20px; }
  .scale { grid-template-columns: repeat(5, 1fr); }
  .key-hint { display: none; }

  /* Mobile hero: headline → wheel → CTA, so the wheel sits above the fold.
     Centre the heading block to match the wheel + CTA axis. Vertical spacing
     is deliberately tight: the CTA must clear the fold in Facebook's in-app
     browser (~390x645 visible), which is where most traffic arrives. */
  #screen-intro { padding: 12px 0 32px; }
  .hero { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .hero-copy { display: contents; }
  .hero-eyebrow { order: 1; margin-bottom: 8px; text-align: center; }
  .hero-title { order: 2; font-size: 1.85rem; margin-bottom: 14px; text-align: center; }
  .hero-visual {
    order: 3;
    max-width: 350px; width: 100%;
    margin: 6px auto 12px;  /* top clears the floating "Example wheel" tag */
  }
  .hero-actions {
    order: 4;
    flex-direction: column; align-items: center;
    gap: 8px; text-align: center;
    margin-bottom: 24px;
  }
  /* one callout is enough on a narrow screen — keep the "focus here" one */
  .hero-float-high { display: none; }
  .lede { order: 5; margin-bottom: 18px; }
  .hero-chips { order: 6; margin-bottom: 0; }

  .wheel-card { padding: 16px; border-radius: 20px; }
  .hero-float { font-size: 0.74rem; padding: 6px 11px; }
  .hero-float-low  { left: -6px; bottom: 18px; }
  .hero-float-high { right: -6px; top: 14px; }
}

@media (max-width: 560px) {
  .header-divider, .brand, .header-cta { display: none; }
  .brand-logo-link img { height: 20px; }
  .brand-logo-link .brand-icon { height: 24px; width: 24px; }
  .site-menu { left: 16px; right: 16px; width: auto; }
}
