/* ============================================================
   LIFE WITH CHRISTINE
   Layout: a planetarium at night. One warm serif, set like a printed
   programme; handwritten notes on the sky; a single paper ticket for
   the workbook as the one bright object in the room. Left aligned,
   no cards, no labels above headings.
   ============================================================ */

:root {
  --dome: #05060c;        /* the planetarium ceiling */
  --ivory: #efe9de;       /* starlight and paper */
  --body: #d9d3c8;        /* running text */
  --mist: #a7a3b3;        /* quieter text */
  --hairline: rgba(239, 233, 222, 0.16);
  --candle: #f0c867;      /* handwriting, matched to the gold moon in the logo */
  --ink: #1b1a24;         /* type printed on the ticket */

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hand: "Nanum Pen Script", "Bradley Hand", "Segoe Print", cursive;

  --fs-sm: 0.95rem;
  --fs-base: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
  --fs-lg: clamp(1.3rem, 1.18rem + 0.5vw, 1.55rem);
  --fs-xl: clamp(1.8rem, 1.5rem + 1.3vw, 2.6rem);
  --fs-2xl: clamp(2.4rem, 1.7rem + 3vw, 4.1rem);
  --fs-hero: clamp(3rem, 1.9rem + 5vw, 6.2rem);

  --gutter: clamp(18px, 5vw, 64px);
  --max: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--dome);
  color: var(--body);
  font-family: var(--serif);
  font-size: var(--fs-base);
  font-optical-sizing: auto;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; }
::selection { background: rgba(241, 211, 155, 0.35); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.measure > * { max-width: 46rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ivory); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }

.hand { font-family: var(--hand); color: var(--candle); font-size: 1.7rem; line-height: 1; letter-spacing: 0.01em; }

/* ---------- The sky ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; background: var(--dome); }
.page { position: relative; z-index: 1; }

/* ---------- Curtain (first visit) ---------- */
.curtain { position: fixed; inset: 0; z-index: 60; background: var(--dome); display: grid; place-items: center; padding: 2rem var(--gutter); transition: opacity 1.1s ease, visibility 1.1s; }
.curtain.is-hidden { opacity: 0; visibility: hidden; }
.curtain__text { font-style: italic; font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.7rem); font-weight: 300; line-height: 1.3; max-width: 22ch; text-align: center; color: var(--ivory); margin: 0; min-height: 3em; }
.curtain__cursor { display: inline-block; width: 1.5px; height: 1em; margin-left: 4px; vertical-align: -0.12em; background: var(--candle); animation: blink 0.9s steps(1) infinite; }
.curtain__skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; translate: -50% 0; background: none; border: 0; color: var(--mist); font-family: var(--serif); font-size: 1rem; font-style: italic; cursor: pointer; padding: 8px 12px; }
.curtain__skip:hover { color: var(--ivory); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Nav ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); transition: background 0.4s ease; }
.site-header.is-scrolled { background: rgba(5, 6, 12, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 18px; }
.nav__brand { display: block; line-height: 0; }
.nav__brand img { height: 56px; width: auto; }
@media (max-width: 560px) { .nav__brand img { height: 44px; } }
.nav__links { display: flex; align-items: baseline; gap: clamp(18px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav__link { font-size: 1.02rem; color: var(--mist); text-decoration: none; }
.nav__link:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav__cta { font-size: 1.02rem; color: var(--candle); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav__cta:hover { color: var(--ivory); }
@media (max-width: 760px) { .nav__links .nav__hide-sm { display: none; } }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 3px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--ivory);
  background: var(--ivory);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--candle); border-color: var(--candle); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn--glow { }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.98rem; }
.text-link { color: var(--ivory); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--candle); }
.text-link:hover { color: var(--candle); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; padding-block: 130px clamp(56px, 10vh, 120px); }
@media (max-width: 760px) { .hero { padding-top: 230px; } }
.hero__inner { display: grid; gap: 1.4rem; max-width: 46rem; }
.hero__title { font-size: var(--fs-hero); font-weight: 300; letter-spacing: -0.035em; line-height: 0.98; max-width: 11ch; }
.hero__lede { margin: 0.4rem 0 0; font-size: var(--fs-lg); line-height: 1.5; color: var(--ivory); max-width: 32ch; }
.hero__for { margin: 0; color: var(--body); max-width: 40ch; }
.hero__start { margin-top: 1rem; display: grid; gap: 14px; }
.hero__start > p { margin: 0; font-style: italic; color: var(--ivory); }
.hero__note { margin: 0; font-size: var(--fs-sm); color: var(--mist); font-style: normal !important; }
.hero--welcome { min-height: min(72svh, 700px); }
.hero__title--sm { font-size: var(--fs-2xl); max-width: 16ch; }

.hand--moon { position: absolute; right: clamp(40px, 9vw, 150px); top: clamp(360px, 44vh, 420px); margin: 0; display: flex; align-items: flex-end; gap: 6px; transform: rotate(-4deg); }
.hand__arrow { width: 70px; height: 48px; order: 2; margin-bottom: 14px; }
.hand__arrow path { fill: none; stroke: var(--candle); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .hand--moon { display: none; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(90px, 15vh, 170px); scroll-margin-top: 24px; }
.section--end { padding-bottom: clamp(110px, 18vh, 190px); }
.section__title { font-size: var(--fs-2xl); font-weight: 300; letter-spacing: -0.03em; }
.section__sub { margin: 0; color: var(--mist); font-size: var(--fs-lg); font-style: italic; }

.prose { display: grid; gap: 1.15rem; max-width: 62ch; min-width: 0; }
.prose p { margin: 0; }
.prose--lg p { font-size: var(--fs-lg); line-height: 1.6; }
.prose .prose__last { color: var(--ivory); font-style: italic; }
.prose .prose__quiet { color: var(--mist); }
#dreams .section__title, #course .section__title { margin-bottom: 2.2rem; max-width: 18ch; }

/* ---------- Principles: a page from a star atlas ---------- */
.principles-head { display: grid; gap: 1rem; max-width: 40rem; margin-bottom: clamp(40px, 7vh, 72px); }
.atlas { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .atlas { grid-template-columns: minmax(0, 1fr); } }
.atlas__chart { margin: 0; max-width: 440px; width: 100%; position: sticky; top: 110px; }
@media (max-width: 860px) { .atlas__chart { position: static; max-width: 340px; } }
.atlas__chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.atlas__ring { fill: none; stroke: var(--hairline); stroke-width: 1; }
.atlas__ring--in { stroke-dasharray: 2 6; }
.atlas__axis { stroke: rgba(239, 233, 222, 0.08); stroke-width: 1; }
.atlas__link { fill: none; stroke: var(--ivory); stroke-width: 1; opacity: 0.55; }
.atlas__star circle { fill: var(--ivory); }
.atlas__star .atlas__halo { fill: rgba(241, 211, 155, 0.14); }
.atlas__note { font-family: var(--hand); font-size: 26px; fill: var(--candle); }
.principles { margin: 0; display: grid; }
.principle { padding-block: 26px; border-top: 1px solid var(--hairline); display: grid; gap: 6px; }
.principle:last-child { border-bottom: 1px solid var(--hairline); }
.principle__title { font-size: var(--fs-xl); font-weight: 400; color: var(--ivory); letter-spacing: -0.02em; line-height: 1.15; }
.principle__body { margin: 0; color: var(--body); max-width: 46ch; }

/* ---------- Workbook: the ticket ---------- */
.workbook__intro { margin: 0 0 1.6rem; font-size: var(--fs-xl); font-style: italic; font-weight: 300; color: var(--ivory); }
.ticket {
  --notch: 14px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  max-width: 980px;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 50%, transparent var(--notch), var(--ivory) calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), var(--ivory) calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 40px rgba(241, 211, 155, 0.12));
  transform: rotate(-0.6deg);
}
.ticket__main { padding: clamp(28px, 4vw, 52px); display: grid; gap: 1rem; align-content: start; min-width: 0; }
.ticket__admit { margin: 0; font-style: italic; color: #6a5f4d; }
.ticket__title { color: var(--ink); font-size: var(--fs-2xl); font-weight: 400; letter-spacing: -0.03em; max-width: 14ch; }
.ticket__title span { display: block; font-size: var(--fs-lg); font-style: italic; font-weight: 400; letter-spacing: 0; color: #6a5f4d; margin-bottom: 0.5rem; }
.ticket__lede { margin: 0; font-size: var(--fs-lg); line-height: 1.5; max-width: 34ch; }
.ticket__body { margin: 0; color: #3d3a45; max-width: 42ch; }
.ticket__stub { position: relative; padding: clamp(28px, 4vw, 44px) 26px; border-left: 2px dashed rgba(27, 26, 36, 0.3); display: flex; flex-direction: column; gap: 16px; }
.ticket__stub-hand { font-family: var(--hand); font-size: 1.9rem; line-height: 1; color: #8a5a1c; transform: rotate(-3deg); margin-bottom: 8px; }
.ticket__stub-row { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(27, 26, 36, 0.18); padding-bottom: 6px; font-size: 0.98rem; }
.ticket__stub-row span:first-child { font-style: italic; color: #6a5f4d; }
.ticket__stub-star { width: 34px; height: 34px; margin-top: auto; }
.ticket__stub-star path { fill: #c99b4d; }
@media (max-width: 720px) {
  .ticket { grid-template-columns: minmax(0, 1fr); transform: none; background: var(--ivory); border-radius: 4px; }
  .ticket__stub { border-left: 0; border-top: 2px dashed rgba(27, 26, 36, 0.3); flex-direction: row; flex-wrap: wrap; align-items: baseline; }
  .ticket__stub-row { flex: 1 1 120px; }
  .ticket__stub-star { display: none; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } }
.about__photo { margin: 0; position: relative; max-width: 440px; }
.about__photo img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: 50% 30%; border-radius: 999px 999px 4px 4px; filter: saturate(0.85); }
.about__photo figcaption { position: absolute; right: -8px; bottom: -26px; transform: rotate(-5deg); }
.about__text { display: grid; gap: 1.3rem; min-width: 0; }
.about__intro { margin: 0; font-size: var(--fs-lg); line-height: 1.5; color: var(--ivory); font-style: italic; max-width: 30ch; }

/* ---------- Signup forms ---------- */
.signup { display: grid; gap: 10px; min-width: 0; position: relative; }
.signup__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup__fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.signup__fields .field { flex: 1 1 220px; min-width: 0; }
.signup__fields .btn { flex: 0 0 auto; }
.field { display: grid; gap: 4px; }
.field label { font-size: 0.95rem; font-style: italic; color: var(--mist); }
.field input {
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-size: 1.1rem;
  color: var(--ivory);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(239, 233, 222, 0.45);
  border-radius: 0;
  padding: 0 2px;
}
.field input::placeholder { color: #7f7b8c; font-style: italic; }
.field input:focus { outline: none; border-bottom-color: var(--candle); box-shadow: 0 1px 0 var(--candle); }
.signup__msg { margin: 0; font-size: 1rem; font-style: italic; color: var(--candle); }
.signup__msg:empty { display: none; }
.signup__msg.is-error { color: #f2a99a; }
.signup--hero, .signup--line { max-width: 36rem; }
.signup--line { margin-top: 2rem; }
.signup--hero .field label, .signup--line .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.signup--ticket { margin-top: 0.6rem; }
.signup--ticket .field label { color: #6a5f4d; }
.signup--ticket .field input { color: var(--ink); border-bottom-color: rgba(27, 26, 36, 0.4); }
.signup--ticket .field input::placeholder { color: #8d8576; }
.signup--ticket .field input:focus { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.signup--ticket .btn { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.signup--ticket .btn:hover { background: #2e2c3c; border-color: #2e2c3c; }
.signup--ticket .signup__msg { color: #6a4612; }
.signup--popup .signup__fields .btn { flex: 1 1 100%; }
@media (max-width: 480px) { .signup__fields .btn { flex: 1 1 100%; } }

/* ---------- Closing ---------- */
.closing__title { font-size: var(--fs-2xl); font-weight: 300; letter-spacing: -0.03em; max-width: 14ch; }
.closing__versions { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.closing__versions li { font-size: var(--fs-xl); font-style: italic; font-weight: 300; color: var(--body); line-height: 1.3; }
.closing__line { margin: 2rem 0 2.2rem; font-size: var(--fs-lg); color: var(--ivory); }

/* ---------- Welcome page ---------- */
.first-step { display: grid; gap: 0.8rem; max-width: 42rem; padding-left: 24px; border-left: 2px solid var(--candle); }
.first-step p { margin: 0; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 2.4rem; }
.offer { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; padding-top: 22px; border-top: 1px solid var(--hairline); }
.offer p { margin: 0; }
.offer .btn, .offer .text-link { margin-top: auto; }
.offer__title { font-size: var(--fs-xl); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }

/* ---------- Capture bar and popup ---------- */
.capture-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(5, 6, 12, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--hairline); animation: barUp 0.5s ease both; }
.capture-bar__inner { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.capture-bar__text { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 1.02rem; color: var(--body); }
.capture-bar__text em { color: var(--ivory); }
.capture-bar__close { background: none; border: 0; color: var(--mist); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px; }
.capture-bar__close:hover { color: var(--ivory); }
@media (max-width: 560px) { .capture-bar__text { font-size: 0.92rem; } }
@keyframes barUp { from { transform: translateY(100%); } to { transform: none; } }

/* Anything marked hidden stays hidden, even when a class gives it a display value. */
[hidden] { display: none !important; }
.popup { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px var(--gutter); opacity: 0; transition: opacity 0.3s ease; }
.popup.is-open { opacity: 1; }
.popup__overlay { position: absolute; inset: 0; background: rgba(2, 2, 6, 0.8); }
.popup__card { position: relative; width: min(100%, 31rem); display: grid; gap: 1rem; padding: clamp(28px, 4vw, 44px); background: var(--dome); border: 1px solid var(--hairline); border-radius: 4px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
.popup__close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--mist); font-size: 1.7rem; cursor: pointer; padding: 6px 10px; line-height: 1; }
.popup__close:hover { color: var(--ivory); }
.popup__hand { margin: 0; transform: rotate(-3deg); width: fit-content; }
.popup__title { font-size: var(--fs-xl); font-weight: 300; }
.popup__note { margin: 0; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 34px calc(34px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hairline); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; font-size: 0.98rem; color: var(--mist); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 4px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 26px; }

@media (prefers-reduced-motion: reduce) {
  .curtain__cursor, .capture-bar { animation: none; }
}

/* ---------- Space pattern quiz ---------- */
.quiz { padding: clamp(130px, 18vh, 170px) 0 clamp(80px, 12vh, 130px); min-height: 80vh; }
.quiz__wrap { max-width: 46rem; }
.quiz__screen { display: grid; gap: 1.1rem; }
.quiz__hand { margin: 0; transform: rotate(-3deg); width: fit-content; }
.quiz__hand--small { font-size: 1.5rem; margin-top: 0.4rem; }
.quiz__title { font-size: var(--fs-2xl); font-weight: 300; letter-spacing: -0.03em; }
.quiz__lede { margin: 0; font-size: var(--fs-lg); line-height: 1.5; color: var(--ivory); max-width: 34ch; }
.quiz__note { margin: 0; color: var(--mist); font-style: italic; }
.quiz__start { justify-self: start; margin-top: 0.6rem; }
.quiz__progress { display: flex; align-items: center; gap: 16px; font-size: var(--fs-sm); color: var(--mist); }
.quiz__bar { flex: 1; height: 2px; background: var(--hairline); position: relative; }
.quiz__bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--candle); transition: width 0.3s ease; }
.quiz__q { font-size: var(--fs-xl); font-weight: 300; letter-spacing: -0.02em; margin-top: 0.6rem; }
.quiz__options { display: grid; gap: 10px; margin-top: 0.4rem; }
.quiz__option { text-align: left; font: inherit; font-size: var(--fs-base); line-height: 1.4; color: var(--ivory); background: rgba(239, 233, 222, 0.04); border: 1px solid var(--hairline); border-radius: 4px; padding: 16px 20px; min-height: 56px; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.quiz__option:hover { border-color: var(--candle); background: rgba(240, 200, 103, 0.06); }
.quiz__option.is-picked { border-color: var(--candle); }
.quiz__back { justify-self: start; background: none; border: 0; padding: 10px 0; font: inherit; font-size: var(--fs-sm); color: var(--mist); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.quiz__back:hover { color: var(--ivory); }
.quiz__mark { width: 110px; height: auto; }
.quiz__eyebrow { margin: 0.6rem 0 0; font-size: var(--fs-sm); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); }
.quiz__name { font-size: var(--fs-2xl); font-weight: 300; letter-spacing: -0.03em; }
.quiz__path { margin: 0; font-size: var(--fs-lg); font-style: italic; color: var(--candle); }
.quiz__desc { margin: 0.4rem 0 0; font-size: var(--fs-lg); line-height: 1.6; color: var(--body); }
.quiz__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 0.6rem; }
.quiz__card { border-top: 1px solid var(--hairline); padding-top: 14px; }
.quiz__card h3 { font-size: var(--fs-base); font-weight: 500; letter-spacing: 0; }
.quiz__card p { margin: 6px 0 0; line-height: 1.55; }
.quiz__next { margin-top: 1.6rem; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--hairline); border-radius: 6px; background: rgba(5, 6, 12, 0.7); display: grid; gap: 0.9rem; }
.quiz__next-title { font-size: var(--fs-xl); font-weight: 300; }
.quiz__next-body { margin: 0; line-height: 1.6; }
.workbook__quiz { margin: 1.4rem 0 0; color: var(--mist); font-style: italic; }
.workbook__quiz a { color: var(--candle); }
