:root {
  --purple-950: #210b32;
  --purple-900: #35134f;
  --purple-800: #4b1c69;
  --purple-700: #63307d;
  --purple-100: #f1e9f4;
  --gold-500: #c99b35;
  --gold-400: #d8b45c;
  --gold-200: #eedda8;
  --cream: #fffaf0;
  --paper: #fffdf8;
  --ink: #261b2d;
  --muted: #6d6171;
  --line: #ded2e3;
  --shadow: 0 24px 70px rgba(43, 15, 62, 0.13);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 180, 92, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--cream) 0 43rem, #f8f2f8 43rem 100%);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.55;
}
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  background: white;
  color: var(--purple-900);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--purple-900);
  text-decoration: none;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--gold-500);
  border-radius: 50%;
  display: grid;
  place-content: center;
  grid-template-columns: repeat(3, auto);
  gap: 1px;
  color: var(--gold-500);
  background: var(--purple-900);
  box-shadow: inset 0 0 0 3px var(--cream);
}
.brand-mark span { font: 700 12px/1 "Playfair Display", serif; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-family: "Playfair Display", serif; font-size: 20px; letter-spacing: 0.04em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(75, 28, 105, 0.16);
  border-radius: 999px;
  color: var(--purple-800);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}
.privacy-pill svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 84px 32px 124px;
  text-align: center;
  position: relative;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 8px rgba(216, 180, 92, 0.13);
}
.hero::before { left: 5%; top: 42%; }
.hero::after { right: 7%; top: 18%; }
.eyebrow, .kicker {
  color: var(--purple-700);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; }
.eyebrow span { width: 28px; height: 1px; background: var(--gold-500); }
.eyebrow em { font-style: normal; }
h1, h2, h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; line-height: 1.08; }
.hero h1 { max-width: 820px; margin: 24px auto 20px; color: var(--purple-950); font-size: clamp(48px, 8vw, 84px); letter-spacing: -0.045em; }
.hero h1 span { display: block; color: var(--purple-700); font-style: italic; font-weight: 600; }
.hero > p { max-width: 720px; margin: 0 auto 32px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero > p strong { color: var(--purple-700); }

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  background: linear-gradient(135deg, var(--purple-700), var(--purple-900));
  box-shadow: 0 12px 28px rgba(53, 19, 79, 0.24);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(53, 19, 79, 0.29); }
.primary-button:active { transform: translateY(0); }
.primary-button:focus-visible, .book-button:focus-visible, .text-button:focus-visible, .stressor-card:focus-visible, .cycle-node:focus-visible, .mini-tabs button:focus-visible, .copy-button:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.book-button {
  padding: 14px 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--gold-500);
  border-radius: 999px;
  color: var(--purple-900);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.book-button:hover { transform: translateY(-2px); background: white; box-shadow: 0 12px 28px rgba(53, 19, 79, 0.12); }

.aae-preview {
  max-width: 620px;
  margin: 68px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.aae-preview div { display: grid; justify-items: center; gap: 7px; }
.aae-preview b {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--gold-400);
  border-radius: 50%;
  color: var(--gold-500);
  background: white;
  font: 700 22px/1 "Playfair Display", serif;
}
.aae-preview span { color: var(--purple-800); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.aae-preview svg { width: 100%; stroke: var(--gold-400); fill: none; stroke-width: 1.2; }

.explorer-shell {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 100px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(75, 28, 105, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}
.explorer-heading { max-width: 700px; }
.explorer-heading h2 { color: var(--purple-950); font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.025em; }
.explorer-heading > p:last-child { max-width: 640px; color: var(--muted); }
.kicker { margin: 0 0 12px; }

.progress-wrap { margin: 44px 0 52px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.progress-track { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--purple-100); }
.progress-track span { display: block; width: 33.333%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-500), var(--purple-700)); transition: width 300ms ease; }

.step-panel[hidden] { display: none; }
.step-panel.is-active { animation: reveal 360ms ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.prompt-heading { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 30px; }
.step-number { flex: 0 0 auto; color: var(--gold-500); font: 600 18px/1 "Playfair Display", serif; padding-top: 5px; }
.prompt-heading h3 { color: var(--purple-950); font-size: clamp(27px, 4vw, 38px); }
.prompt-heading p { margin: 9px 0 0; color: var(--muted); }

.selected-moment {
  margin: -8px 0 24px 60px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 14px;
  border: 1px solid var(--gold-200);
  border-left: 4px solid var(--gold-500);
  border-radius: 12px;
  background: #fffaf0;
}
.selected-moment span { color: var(--gold-500); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.selected-moment strong { color: var(--purple-900); font-family: "Playfair Display", serif; font-size: 18px; }
.selected-moment small { color: var(--muted); font-weight: 700; text-transform: capitalize; }

.stressor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stressor-card {
  min-height: 160px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: border 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.stressor-card:hover { border-color: var(--gold-400); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(43, 15, 62, 0.09); }
.stressor-card[aria-checked="true"] { border: 2px solid var(--purple-700); padding: 21px; background: linear-gradient(150deg, #fff, #f5edf8); box-shadow: 0 10px 28px rgba(75, 28, 105, 0.12); }
.stressor-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; color: var(--gold-500); background: #fff8e6; font-size: 20px; }
.stressor-card b { color: var(--purple-900); font-size: 15px; }
.stressor-card small { margin-top: 7px; color: var(--muted); line-height: 1.4; }

.context-fieldset { margin: 28px 0 0; padding: 0; border: 0; }
.context-fieldset legend { margin-bottom: 12px; color: var(--purple-900); font-weight: 700; font-size: 14px; }
.context-options { display: flex; flex-wrap: wrap; gap: 9px; }
.context-options label { cursor: pointer; }
.context-options input { position: absolute; opacity: 0; pointer-events: none; }
.context-options span { display: block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 700; }
.context-options input:checked + span { border-color: var(--purple-700); color: var(--purple-800); background: var(--purple-100); }
.context-options input:focus-visible + span { outline: 3px solid var(--gold-400); outline-offset: 2px; }

.step-actions { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.step-actions.align-end { justify-content: flex-end; }
.text-button { padding: 10px 4px; border: 0; color: var(--purple-700); background: transparent; font-weight: 700; cursor: pointer; }
.inline-error { margin: 16px 0 0; color: #9e2734; font-size: 14px; font-weight: 700; }

.reflection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.reflection-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--purple-700);
  border-radius: var(--radius-md);
  background: white;
}
.reflection-card.assumptions { border-top-color: var(--gold-500); }
.reflection-card.expectations { border-top-color: #a56a9e; }
.reflection-letter { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--purple-700); font: 700 22px/1 "Playfair Display", serif; }
.assumptions .reflection-letter { color: var(--purple-950); background: var(--gold-400); }
.expectations .reflection-letter { background: #a56a9e; }
.reflection-copy { display: grid; align-content: center; }
.reflection-copy b { color: var(--purple-900); }
.reflection-copy small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.reflection-card textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 132px;
  margin-top: 6px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fcfafc;
  line-height: 1.5;
}
.reflection-card textarea:focus { outline: 3px solid rgba(216, 180, 92, 0.34); border-color: var(--gold-500); }
.reflection-card textarea[aria-invalid="true"] { border-color: #b83542; background: #fff9f9; }
.character-count { grid-column: 1 / -1; justify-self: end; margin-top: -8px; color: var(--muted); font-size: 11px; }
.care-note { margin-top: 18px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px; border-radius: 14px; color: #594e5d; background: #f7f1df; font-size: 14px; }
.care-note span { color: var(--gold-500); }
.care-note p { margin: 0; }

.cycle-and-summary { display: grid; grid-template-columns: minmax(330px, 1fr) minmax(280px, 0.9fr); align-items: center; gap: clamp(20px, 5vw, 64px); }
.cycle-visual { position: relative; min-height: 390px; }
.cycle-lines { position: absolute; inset: 20px 0 0; width: 100%; height: 340px; overflow: visible; }
.cycle-lines path { fill: none; stroke: var(--gold-400); stroke-width: 2; stroke-dasharray: 5 5; marker-end: url(#arrow); }
.cycle-lines marker path { fill: var(--gold-400); stroke: none; }
.cycle-node {
  position: absolute;
  z-index: 2;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: var(--purple-700);
  box-shadow: 0 8px 25px rgba(43, 15, 62, 0.17);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.cycle-node span { font: 700 34px/1 "Playfair Display", serif; }
.cycle-node b { font-size: 12px; }
.cycle-node.is-focused { transform: scale(1.08); box-shadow: 0 0 0 5px var(--gold-200), 0 10px 28px rgba(43, 15, 62, 0.24); }
.node-attitude { top: 10px; left: 16%; }
.node-assumptions { top: 98px; right: 4%; background: var(--gold-500); color: var(--purple-950); }
.node-expectations { bottom: 10px; left: 31%; background: #9b6394; }
.cycle-center { position: absolute; top: 151px; left: 35%; width: 105px; height: 105px; display: grid; place-content: center; text-align: center; border: 1px solid var(--line); border-radius: 50%; background: white; box-shadow: 0 8px 28px rgba(43, 15, 62, 0.1); }
.cycle-center small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.cycle-center strong { color: var(--purple-800); font-family: "Playfair Display", serif; }
.cycle-detail { padding: 30px; border-left: 1px solid var(--line); }
.detail-label { color: var(--gold-500); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.cycle-detail blockquote { margin: 15px 0; color: var(--purple-900); font: 600 clamp(22px, 3vw, 30px)/1.25 "Playfair Display", serif; overflow-wrap: anywhere; }
.cycle-detail > p { color: var(--muted); }
.mini-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.mini-tabs button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 11px; font-weight: 700; cursor: pointer; }
.mini-tabs button.is-active { border-color: var(--purple-700); color: white; background: var(--purple-700); }
.generate-button { width: 100%; margin-top: 32px; }

.result-card { margin-top: 26px; padding: clamp(24px, 5vw, 44px); border: 1px solid var(--gold-200); border-radius: var(--radius-md); background: linear-gradient(145deg, #fffdf7, #f8f0fa); box-shadow: 0 18px 50px rgba(43, 15, 62, 0.1); }
.result-card.reveal { animation: reveal 420ms ease both; }
.result-topline { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--gold-200); color: var(--gold-500); font-size: 11px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.result-card h3 { margin-top: 24px; color: var(--purple-950); font-size: clamp(27px, 4vw, 38px); }
.reflection-result { margin-top: 20px; color: #493d4c; font-size: 17px; line-height: 1.75; }
.reflection-result p { margin: 0 0 14px; }
.reflection-result strong { color: var(--purple-800); }
.conversation-starter { margin-top: 24px; padding: 20px; border-left: 4px solid var(--gold-500); border-radius: 0 12px 12px 0; background: white; }
.conversation-starter span { color: var(--gold-500); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.conversation-starter p { margin: 8px 0 0; color: var(--purple-900); font: 600 20px/1.45 "Playfair Display", serif; }
.result-actions { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.copy-button { padding: 10px 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--purple-700); border-radius: 999px; color: var(--purple-700); background: white; font-weight: 700; cursor: pointer; }
.copy-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.before-result-actions { margin-top: 12px; }

.closing { padding: 110px 32px; text-align: center; color: white; background: var(--purple-950); position: relative; overflow: hidden; }
.closing::before { content: ""; position: absolute; width: 420px; height: 420px; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(216, 180, 92, 0.12); border-radius: 50%; box-shadow: 0 0 0 75px rgba(216, 180, 92, 0.03), 0 0 0 150px rgba(216, 180, 92, 0.02); }
.closing > * { position: relative; }
.closing-mark { display: block; margin-bottom: 16px; color: var(--gold-400); font-size: 28px; }
.closing .kicker { color: var(--gold-400); }
.closing h2 { margin: 18px auto; font-size: clamp(34px, 5vw, 55px); }
.closing h2 em { color: var(--gold-400); }
.closing > p:not(.kicker):not(.signature) { color: #d9cfe0; }
.signature { margin-top: 32px; color: var(--gold-200); font-family: "Playfair Display", serif; font-style: italic; }

footer { padding: 26px 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: #766a7a; background: #190824; font-size: 11px; text-align: center; }
footer p { margin: 0; }
footer .disclaimer { flex-basis: 100%; color: #9a8ba0; }

@media (max-width: 820px) {
  .hero { padding-top: 62px; }
  .stressor-grid { grid-template-columns: repeat(2, 1fr); }
  .reflection-grid { grid-template-columns: 1fr; }
  .reflection-card { grid-template-columns: 42px 1fr; }
  .reflection-card textarea { min-height: 108px; }
  .cycle-and-summary { grid-template-columns: 1fr; }
  .cycle-detail { border-top: 1px solid var(--line); border-left: 0; }
  .cycle-visual { max-width: 500px; width: 100%; margin: 0 auto; }
}

@media (max-width: 560px) {
  .site-header { padding: 18px 20px; }
  .brand-copy small { display: none; }
  .privacy-pill { padding: 7px 9px; font-size: 10px; }
  .hero { padding: 52px 22px 92px; }
  .hero::before, .hero::after { display: none; }
  .hero h1 { font-size: clamp(44px, 14vw, 62px); }
  .hero-actions { display: grid; }
  .hero-button, .book-button { width: 100%; }
  .aae-preview { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 54px; }
  .aae-preview svg { display: none; }
  .aae-preview span { font-size: 9px; }
  .explorer-shell { width: calc(100% - 24px); padding: 28px 18px; border-radius: 22px; }
  .progress-wrap { margin: 34px 0 42px; }
  .prompt-heading { gap: 10px; }
  .step-number { font-size: 14px; }
  .selected-moment { margin-left: 0; grid-template-columns: 1fr; gap: 4px; }
  .stressor-grid { grid-template-columns: 1fr; }
  .stressor-card { min-height: 126px; }
  .context-options { display: grid; grid-template-columns: repeat(2, 1fr); }
  .context-options span { text-align: center; }
  .step-actions { align-items: stretch; flex-direction: column-reverse; }
  .step-actions .primary-button { width: 100%; }
  .step-actions.align-end { flex-direction: column; }
  .cycle-visual { min-height: 330px; transform: scale(0.88); margin: -15px 0; }
  .cycle-node { width: 100px; height: 100px; }
  .cycle-node span { font-size: 29px; }
  .cycle-center { top: 132px; width: 90px; height: 90px; }
  .node-assumptions { top: 84px; }
  .cycle-lines { height: 300px; }
  .cycle-detail { padding: 26px 8px 10px; }
  .result-actions { align-items: stretch; flex-direction: column; }
  .copy-button { justify-content: center; }
  .closing { padding: 88px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
