/* Public screens */
@layer components {

.public-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.public-page:has(.veil), .public-page:has(.landing) {
  align-items: start;
}
.landing {
  width: min(100%, 28rem);
  margin-top: 14dvh;
  text-align: center;
}
.landing__eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}
.landing__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 12vw, 4.8rem);
  line-height: 0.95;
  color: var(--ink);
}
.landing__intro {
  margin: 1rem auto 0;
  max-width: 22rem;
  color: var(--ink-dim);
}
.landing__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}
.landing__actions > :only-child { grid-column: 1 / -1; }
.landing__button {
  width: 100%;
}
.landing__learn { margin-top: 1.5rem; color: var(--ink-dim); font-size: 0.9rem; }
.landing__footer { margin-top: 2.5rem; font-size: 0.85rem; color: var(--ink-dim); }
.landing__footer a { color: var(--ink-dim); }
@media (hover: hover) {
  .landing__footer a:hover { color: var(--gold); }
}

/* The front page: the whole case for Sidereal, told top to bottom, in the
   same dawn the app is built from. Nothing new is invented here — the
   type, the gold, and the element colours are the ones the seeker will
   meet again inside. Only the rhythm is different: long, with air.

   The public screens are a centring grid, which is right for a sign-in
   card and wrong for a page that scrolls. This one takes the width back. */
.public-page:has(.front) {
  display: block;
  padding: 0;
  place-items: initial;
}

.front { text-align: left; }

.front section {
  width: min(100%, 46rem);
  margin: 0 auto;
  padding: 5.5rem max(1.25rem, env(safe-area-inset-left)) 5.5rem max(1.25rem, env(safe-area-inset-right));
}

/* A band that steps forward a shade, so the eye has somewhere to rest
   between movements. It bleeds the full width while its words don't. */
.front__movement--tinted, .front__stance, .front__tills {
  position: relative;
}
.front__movement--tinted::before, .front__stance::before, .front__tills::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background: var(--wash);
  border-block: 1px solid var(--line);
  z-index: -1;
}

/* The hero. The title takes the whole width it can get, and the wheel
   turns beneath it like the sky it's drawn from. */
.front__hero {
  text-align: center;
  padding-top: max(6rem, 12dvh);
  padding-bottom: 3rem;
}
.front__eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}
.front__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 5rem);
  line-height: 0.95;
  color: var(--ink);
  text-wrap: balance;
}
.front__intro {
  margin: 1.2rem auto 0;
  max-width: 30rem;
  font-size: 1.1rem;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.front__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.front__button { margin-top: 0; min-width: 11rem; }
.front__learn { margin-top: 1.5rem; color: var(--ink-dim); font-size: 0.9rem; }

/* The zodiac, drawn by the same hand that draws it inside. It turns once
   very slowly — enough to be alive, not enough to be a distraction. */
.front__wheel {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}
.front__wheel .zodiac-ring {
  animation: front-turn 240s linear infinite;
}

/* Each movement: a gold kicker, a display heading, and prose set at
   reading width. */
.front__kicker {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.front__heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
.front__prose {
  margin: 1.1rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.front__link { font-family: var(--font-ui); font-weight: 600; }

/* A figure: something drawn, with its caption under it. */
.front__figure { margin: 2.5rem 0 0; }
.front__caption {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-dim);
  text-align: center;
}

/* The chart, drawn the way the app draws it. The front-wheel is its own
   block — .wheel belongs to the cast chart, sized for its page. */
.front__figure--wheel { display: flex; justify-content: center; }
.front-wheel { width: min(24rem, 80vw); }
.front-wheel__disc { fill: var(--paper-high); }
.front-wheel__rim { fill: none; stroke: var(--line-strong); stroke-width: 0.5; }
.front-wheel__wedge { stroke: var(--paper-high); stroke-width: 0.6; }
.front-wheel__wedge--fire { fill: color-mix(in srgb, var(--fire) 20%, var(--wash)); }
.front-wheel__wedge--earth { fill: color-mix(in srgb, var(--earth) 20%, var(--wash)); }
.front-wheel__wedge--air { fill: color-mix(in srgb, var(--air) 20%, var(--wash)); }
.front-wheel__wedge--water { fill: color-mix(in srgb, var(--water) 20%, var(--wash)); }
.front-wheel__glyph { font-family: var(--font-glyph); font-size: 9px; text-anchor: middle; dominant-baseline: central; }
.front-wheel__glyph--fire { fill: var(--fire); }
.front-wheel__glyph--earth { fill: var(--earth); }
.front-wheel__glyph--air { fill: var(--air); }
.front-wheel__glyph--water { fill: var(--water); }
.front-wheel__spoke { stroke: var(--line); stroke-width: 0.35; }
.front-wheel__tick { stroke: var(--gold-dim); stroke-width: 0.6; }
.front-wheel__body { font-family: var(--font-glyph); font-size: 7.5px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.front-wheel__aspect { stroke-width: 0.55; opacity: 0.75; fill: none; }
.front-wheel__aspect--opposition { stroke: var(--fire); }
.front-wheel__aspect--square { stroke: var(--fire); stroke-dasharray: 2 1.5; }
.front-wheel__aspect--trine { stroke: var(--air); }

/* The Seer, mid-consultation. */
.front__talk {
  padding: 1.6rem 1.5rem;
  background: var(--paper-high);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.front__talk-utterance + .front__talk-utterance {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.front__talk-speaker {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.front__talk-speaker--seer { color: var(--gold); }
.front__talk-speaker--seer::before { content: "✦"; margin-right: 0.45rem; }
.front__talk-body { margin: 0; color: var(--ink); }
.front__talk-body + .front__talk-body { margin-top: 0.7rem; }
.front__talk-aside {
  margin: 1.2rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem;
  color: var(--ink-dim);
  font-style: italic;
}

/* Today, this week, this month — arrived cast. */
.front__readings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.front__reading {
  padding: 1.2rem 1.1rem;
  background: var(--paper-high);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.front__reading-when {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.front__reading-sky { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.front__reading-line { margin: 0; font-size: 0.92rem; color: var(--ink-dim); }
@media (max-width: 46rem) { .front__readings { grid-template-columns: 1fr; } }

/* Two charts, read against each other. */
.front__figure--synastry { display: flex; justify-content: center; }
.front__figure--synastry svg { width: min(26rem, 86vw); }
.synastry__ring { fill: none; stroke: var(--line-strong); stroke-width: 0.8; }
.synastry__ring--yours { stroke: var(--gold-dim); }
.synastry__field { fill: color-mix(in srgb, var(--gold-bright) 10%, transparent); }
.synastry__label {
  font-family: var(--font-ui);
  font-size: 5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: var(--ink-dim);
  text-anchor: middle;
}
/* The marks sit on top of the rings, so they carry the paper with them. */
.synastry__mark {
  font-family: var(--font-glyph);
  font-size: 8px;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--wash);
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.synastry__thread { stroke-width: 0.7; }
.synastry__thread--easy { stroke: var(--air); }
.synastry__thread--grind { stroke: var(--fire); stroke-dasharray: 2 1.5; }

/* The twelve, as Learn lays them out. */
.front__signs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.2rem; }
.front__sign {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-high);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-dim);
}
.front__sign .glyph { font-size: 1rem; }
.front__sign--fire { border-color: color-mix(in srgb, var(--fire) 40%, var(--line)); }
.front__sign--fire .glyph { color: var(--fire); }
.front__sign--earth { border-color: color-mix(in srgb, var(--earth) 40%, var(--line)); }
.front__sign--earth .glyph { color: var(--earth); }
.front__sign--air { border-color: color-mix(in srgb, var(--air) 40%, var(--line)); }
.front__sign--air .glyph { color: var(--air); }
.front__sign--water { border-color: color-mix(in srgb, var(--water) 40%, var(--line)); }
.front__sign--water .glyph { color: var(--water); }

/* What it costs. Two plans, the paid one wearing the gold hem — the same
   signal the till uses inside. */
.front__plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.front__plan {
  background: var(--paper-high);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.front__plan--paid { border-color: var(--gold-dim); }
.front__plan-name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.front__plan-price {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.front__plan-interval {
  margin-left: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-dim);
}
.front__plan-aside { margin: 0.4rem 0 0; color: var(--ink-dim); font-size: 0.9rem; }
.front__plan-points {
  margin: 1.2rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.front__plan-points li { margin-top: 0.5rem; }
.front__plan-points li::marker { color: var(--gold-dim); }
.front__fine {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.front__tills .front__actions { justify-content: flex-start; }

/* The questions, closed until asked. */
.front__question {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.front__question summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.front__question summary::-webkit-details-marker { display: none; }
.front__question summary::before {
  content: "✦";
  margin-right: 0.6rem;
  color: var(--gold-dim);
}
.front__question[open] summary::before { color: var(--gold); }
.front__question p { margin: 0.8rem 0 0 1.5rem; color: var(--ink-dim); }
.front__questions .front__heading { margin-bottom: 1rem; }

/* The closing: the last word, the two doors again, and the colophon under
   them — one tinted band from here to the page's end. */
.front__closing {
  position: relative;
  width: min(100%, 46rem);
  margin: 0 auto;
  padding: 5.5rem max(1.25rem, env(safe-area-inset-left)) 0 max(1.25rem, env(safe-area-inset-right));
  text-align: center;
}
.front__closing::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background: var(--wash);
  border-top: 1px solid var(--line);
  z-index: -1;
}
.front__closing-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}
.front__closing-line { margin: 1rem auto 0; max-width: 28rem; color: var(--ink-dim); }
.front__closing .front__actions { margin-top: 2rem; }

/* The colophon: the papers consolidated on the company's own domain, and
   the house named under them. */
.colophon {
  margin: 3rem auto 0;
  padding: 2rem 0 calc(3rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.colophon a { color: var(--ink-dim); }
@media (hover: hover) {
  .colophon a:hover { color: var(--gold); }
}
.colophon__house { margin: 0.8rem 0 0; }
.colophon__house a { color: var(--gold); }

/* The map credit sits a step quieter than the house that made the app —
   owed, and said plainly, but nobody came here to read it. */
.colophon__credits { margin: 0.6rem auto 0; max-width: 26rem; font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 760px) {
  .landing__actions {
    grid-template-columns: 1fr;
  }
  .front section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .front__hero { padding-top: 4rem; }
  .front__plans { grid-template-columns: 1fr; }
  /* The buttons go full width on a phone, so a row of them wants to stack. */
  .front__actions { display: block; }
  .front__button + .front__button { margin-top: 0.75rem; }
}

}

@keyframes front-turn {
  to { transform: rotate(-360deg); }
}
