/* Becoming web. Section layouts. Field rhythm (light): Blush / Blush / Rose / Petal / Blush / Blush / Blush+glow / Petal.
   Phones (360-430) are the design; desktop opens it into a 12-column editorial spread. */

/* ================= Top bar ================= */
.bar { background: var(--bg); padding-top: env(safe-area-inset-top); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; position: relative; }
.bar-in::after { content: ""; position: absolute; left: var(--gut); right: var(--gut); bottom: 0; height: 1px; background: var(--rule); }
.bar-wm { display: flex; align-items: center; min-height: 44px; color: var(--text); }
.bar-wm .wm { width: 112px; height: auto; }
.wm .wm-disc, .wm-disc { fill: var(--wm-disc, var(--heat)); }
.bar-r { font-size: 13px; font-weight: 650; color: var(--muted); white-space: nowrap; }

/* ================= 1. HERO ================= */
.hero { padding: 20px 0 48px; overflow: hidden; }
.hero-grid {
  --disc: min(44vw, 200px);
  display: grid; column-gap: 16px;
  grid-template-columns: minmax(0, 1fr) var(--disc);
  grid-template-areas: "issue issue" "head head" "lede disc" "form form";
}
.issue { grid-area: issue; min-height: 30px; }
.issue .ref { text-transform: none; letter-spacing: 0; font-size: 13px; }
.hero-h { grid-area: head; margin-top: 16px; }
.hero-lede { grid-area: lede; align-self: start; margin-top: 20px; font-size: 16px; line-height: 1.5; }
.hero-lede b { display: block; margin-top: 10px; font-weight: 700; }

/* The Rise photo frame: portrait inside the disc, page-colour horizon cut just below the chin,
   a jewel ring offset 8px, and the sunrise glow behind it (glow 1 of 2). */
.disc { grid-area: disc; position: relative; margin-top: 20px; align-self: start; isolation: isolate; }
.disc::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: calc(var(--disc) * -.3); top: calc(var(--disc) * -.1); width: calc(var(--disc) * 1.6); aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--glow), .95), rgba(var(--glow), 0) 70%); }
.disc::after { content: ""; position: absolute; left: -8px; top: -8px; width: calc(var(--disc) + 16px); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule); pointer-events: none; }
.disc-frame { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg-3); isolation: isolate; }
.disc-frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 70%; }
.disc-cut { position: absolute; left: -2%; right: -2%; top: 66.5%; height: 7%; background: var(--bg); z-index: 1; }
.js [data-disc]:not(.risen) .disc-frame img { transform: translateY(58%) scale(1.04); }
.js [data-disc] .disc-frame img { transition: transform var(--d-reveal) var(--ease-rise); }
/* One face per viewport: page.v5.js veils whichever portrait (hero disc or cover) shows less. Veil out fast, unveil only after the other has gone. */
.js [data-disc].veil .disc-frame img { opacity: 0; transition: transform var(--d-reveal) var(--ease-rise), opacity var(--d-quick) linear; }
.js [data-disc].risen:not(.veil) .disc-frame img { transition: transform var(--d-reveal) var(--ease-rise), opacity var(--d-base) var(--ease-std) var(--d-quick); }
.disc .tag-ai { position: absolute; left: 50%; top: calc(var(--disc) - 13px); transform: translateX(-50%); z-index: 2; }
.disc-cap { margin: 24px auto 0; max-width: 17em; font-size: 12px; line-height: 1.35; text-align: center; color: var(--muted); text-wrap: balance; }
.hero-form { grid-area: form; margin-top: 24px; }
.js .hero-h, .js .hero-lede { animation: line-rise var(--d-rise) var(--ease-rise) both; }
.js .hero-lede { animation-delay: 60ms; }
@keyframes line-rise { from { opacity: .001; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 374px) {
  .hero-grid { --disc: 150px; column-gap: 14px; }
  .hero-lede { font-size: 15px; }
  .disc .tag-ai { letter-spacing: .06em; padding: 6px 9px 6px 7px; }
  .pill .btn { padding: 0 14px; font-size: 15px; }
}

/* ================= 2. MEET FUTURE YOU ================= */
.reveal { padding: 80px 0 96px; }
.reveal-grid { display: grid; grid-template-areas: "head" "cover" "arc" "lists"; }
.reveal-head { grid-area: head; margin-bottom: 32px; }
.cover { grid-area: cover; }
/* Double bezel: 1px ring, 8px Petal mat, 28px outer / 20px inner. */
.bezel { padding: 8px; background: var(--bg-2); border-radius: 28px; box-shadow: 0 0 0 1px var(--ring); }
.cover-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 20px; background: var(--bg-3); isolation: isolate; }
.cover-media picture { position: absolute; inset: 0; transition: opacity var(--d-base) var(--ease-std); }
.cover-media img { width: 100%; height: 100%; object-fit: cover; }
.cover-media .c01 { opacity: 0; }
.cover-media.d1 .c01 { opacity: 1; }
.cover-media.d1 .c90 { opacity: 0; }
.cover-media img { transition: opacity var(--d-base) var(--ease-std) var(--d-quick); }
.cover-media.veil img { opacity: 0; transition: opacity var(--d-quick) linear; }
.cover-media, .disc-frame { transition: background-color var(--d-base) var(--ease-std); }
.cover-media.veil, .veil .disc-frame { background: var(--bg-2); }
.tag-corner { position: absolute; left: 14px; bottom: 14px; z-index: 2; }
.cover-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; padding: 12px 4px 0; }
.cover-cap .cap { flex: 1 1 220px; }

/* The arc: the slider drives the Day count and the tallies; Day 01 swaps the single portrait. */
.arc { grid-area: arc; margin-top: 48px; scroll-margin-bottom: 120px; }
.arc-band { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: 20px; }
.arc-day { font-size: 72px; font-weight: 800; font-stretch: 75%; letter-spacing: -0.03em; line-height: .88; color: var(--pinktext); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arc-day span { display: inline-block; min-width: 1.05em; }
.tally { display: grid; padding-bottom: 2px; }
.tally div { display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--rule); padding: 6px 0 4px; }
.tally dd { order: -1; font: 800 22px/1 var(--f-display); font-stretch: 75%; letter-spacing: -0.02em; min-width: 1.6em; font-variant-numeric: tabular-nums; }
.tally dt { font-size: 13px; line-height: 1.25; color: var(--muted); }
.scrub { margin-top: 28px; }
.scrub input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; background: transparent; margin: 0; touch-action: pan-y; }
.scrub input::-webkit-slider-runnable-track { height: 2px; border-radius: 999px; background: linear-gradient(90deg, var(--heat) var(--fill, 100%), var(--rule) 0); }
.scrub input::-moz-range-track { height: 2px; border-radius: 999px; background: var(--rule); }
.scrub input::-moz-range-progress { height: 2px; border-radius: 999px; background: var(--heat); }
/* The thumb IS the Rise: a 28px Heat disc with a Blush horizon, in a 44px hit area. */
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; margin-top: -21px; border: 0; border-radius: 50%; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='47' fill='%23FFF1F5'/%3E%3Cpath fill='%23FF3D7F' d='M6.58 65.18A46 46 0 1 1 93.42 65.18ZM9.40 71.62H90.60A46 46 0 0 1 9.40 71.62Z'/%3E%3C/svg%3E") center / 28px no-repeat; }
.scrub input::-moz-range-thumb { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='47' fill='%23FFF1F5'/%3E%3Cpath fill='%23FF3D7F' d='M6.58 65.18A46 46 0 1 1 93.42 65.18ZM9.40 71.62H90.60A46 46 0 0 1 9.40 71.62Z'/%3E%3C/svg%3E") center / 28px no-repeat; }
.scrub input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 999px; }
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.days button { min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text); font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color var(--d-quick), color var(--d-quick); }
.days button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.days button:focus-visible { border-radius: 999px; }
.lists { grid-area: lists; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.lists h3 { font: 700 15px/1.3 var(--f-body); color: var(--pinktext); margin-bottom: 10px; }
.lists p { font-size: 17px; line-height: 1.6; }

/* ================= 3. STANCE (Rose band) ================= */
.stance { padding: 80px 0 96px; overflow: hidden; }
.stance-grid > * { max-width: 760px; }
.score { position: relative; display: inline-flex; align-items: baseline; color: transparent; -webkit-text-stroke: 1.5px var(--text); font-size: clamp(96px, 28vw, 168px); font-weight: 800; font-stretch: 75%; line-height: .84; letter-spacing: -0.03em; margin-left: -.03em; }
.score-of { font-size: .32em; margin-left: .06em; -webkit-text-stroke-width: 1px; }
.strike { position: absolute; left: -4%; right: -4%; top: 46%; height: 6px; background: var(--text); transform: rotate(-8deg) scaleX(var(--k, 1)); transform-origin: 0 50%; border-radius: 3px; }
.js .score:not(.struck) .strike { --k: 0; }
.js .score .strike { transition: transform var(--d-rise) var(--ease-rise); }
.stance-copy { margin-top: 32px; }
.stance .body-l { margin-top: 20px; max-width: 34ch; }
.kicker { margin-top: 16px; font-weight: 700; font-size: 18px; line-height: 1.45; }

/* ================= 4. YOUR DAY (Petal) ================= */
.plan { padding: 80px 0 96px; }
.plan-grid { display: grid; grid-template-areas: "head" "app" "post"; }
.plan-head { grid-area: head; }
.plan .lead { color: var(--muted); }
.app { grid-area: app; margin-top: 32px; background: var(--raised); border-radius: 28px; padding: 20px 18px 6px; box-shadow: 0 0 0 1px rgba(26, 10, 20, .08), var(--panel-shadow); }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-phase { font-size: 13px; font-weight: 650; color: var(--pinktext); }
.app-day { font-size: 28px; font-weight: 650; font-stretch: 92%; letter-spacing: -0.015em; margin-top: 4px; }
.app-glow { text-align: right; }
.app-glow .display { display: block; font-size: 44px; font-weight: 800; font-stretch: 75%; letter-spacing: -0.03em; line-height: .9; color: var(--pinktext); font-variant-numeric: tabular-nums; }
.app-glow small { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-top: 4px; }
.app-glow .bump { animation: bump var(--d-base) var(--ease-rise); }
@keyframes bump { from { transform: translateY(30%); opacity: .3; } to { transform: none; opacity: 1; } }
.app-bar { height: 4px; border-radius: 999px; background: var(--rule); margin: 16px 0 8px; overflow: hidden; }
.app-bar i { display: block; height: 100%; width: calc(var(--g, 5) * 1%); background: var(--heat); border-radius: inherit; transition: width var(--d-base) var(--ease-rise); }
.habits li { border-top: 1px solid var(--rule); }
.habits button, .habits .static { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; width: 100%; min-height: 60px; padding: 8px 0; background: none; border: 0; text-align: left; color: var(--text); }
.habits .ic { width: 26px; height: 26px; color: var(--muted); transition: color var(--d-quick); }
.habits b { display: block; font-weight: 650; font-size: 16px; line-height: 1.25; }
.habits small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.habits em { font-style: normal; font-weight: 700; font-size: 15px; color: var(--pinktext); font-variant-numeric: tabular-nums; }
.u-on { display: none; } [aria-pressed="true"] .u-on, details[open] .u-on, .static .u-on { display: inline; } [aria-pressed="true"] .u-off, details[open] .u-off, .static .u-off { display: none; }
.habits [aria-pressed="true"] .ic { animation: pop var(--d-quick) var(--ease-rise); }
.habits [aria-pressed="true"] b { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--heat); }
.app-foot { border-top: 1px solid var(--text); padding: 14px 0 12px; font-weight: 650; font-size: 15px; line-height: 1.4; }
.post-wrap { grid-area: post; margin-top: 32px; display: grid; gap: 8px; justify-items: start; }
.plan-close { font: 700 18px/1.4 var(--f-body); max-width: 30ch; }
.post-wrap .cap { max-width: 34ch; }

/* ================= 5. BESTIE: the referral ladder ================= */
.bestie { padding: 80px 0 96px; }
.ladder { margin-top: 32px; border-top: 1px solid var(--rule); }
.ladder li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.5; }
.rung-n { font-size: 40px; font-weight: 800; font-stretch: 75%; letter-spacing: -0.03em; line-height: .9; font-variant-numeric: tabular-nums; }
.ladder .rung-top { display: block; padding-top: 24px; }
.rung-top .rung-n { display: block; font-size: clamp(80px, 22vw, 128px); color: var(--pinktext); margin: 0 0 12px -.03em; }
.rung-top .rung-t { display: block; font-size: 18px; font-weight: 650; max-width: 30ch; }
.founding { margin: 28px 0 24px; font-size: 16px; line-height: 1.6; }
.bestie .btn { width: auto; padding: 0 40px; }

/* ================= 6. QUESTIONS ================= */
.faq { padding: 80px 0 80px; }
.qa { margin-top: 32px; border-top: 1px solid var(--rule); }
.qa details { border-bottom: 1px solid var(--rule); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 0; font-weight: 650; font-size: 17px; line-height: 1.35; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic { width: 20px; height: 20px; color: var(--pinktext); }
.qa p { padding: 0 0 22px; max-width: 62ch; }

/* ================= 7. FINAL: the second sunrise (glow 2 of 2), a centred manifesto ================= */
.final { padding: 96px 0 104px; overflow: hidden; }
.final-grid { display: grid; justify-items: center; text-align: center; }
.final-rise { position: relative; isolation: isolate; display: block; width: 168px; aspect-ratio: 1; color: var(--heat); stroke-width: 1.5px; pointer-events: none; }
.final-rise::before { content: ""; position: absolute; z-index: -1; left: -40%; top: -25%; width: 180%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--glow), .9), rgba(var(--glow), 0) 70%); }
.final-rise svg { width: 100%; height: 100%; overflow: visible; }
.final h2 { margin-top: 36px; max-width: 11ch; }
.final-form { width: 100%; max-width: 520px; margin-top: 40px; }
.final-form .join { margin: 0 auto; }
.final .seg { justify-content: center; }
.final .help, .final .msg { text-align: center; }
.final .done { text-align: left; }
.count { margin-top: 20px; font-weight: 650; font-size: 15px; }

/* ================= Footer (Petal) ================= */
.foot { padding: 56px 0 32px; }
.foot-grid { display: grid; gap: 20px; }
.foot-wm { display: flex; align-items: center; width: 140px; min-height: 44px; color: var(--text); }
.foot-wm .wm { width: 100%; height: auto; }
.foot-links { display: flex; flex-wrap: wrap; column-gap: 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-mail { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 14px; color: var(--muted); }
.foot-mail span { display: inline-flex; align-items: center; gap: 6px; }
.foot-mail a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; }
.foot-legal { font-size: 13px; color: var(--muted); max-width: 60ch; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); padding-top: 16px; font-size: 13px; color: var(--muted); }
.theme { display: flex; gap: 6px; }
.theme label { position: relative; }
.theme input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 650; color: var(--text); }
.theme input:checked + span { background: var(--text); color: var(--bg-2); border-color: var(--text); }
.theme input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ================= Tablet ================= */
@media (min-width: 640px) and (max-width: 959px) {
  .hero-grid { --disc: 260px; column-gap: 40px; }
  .hero-lede { font-size: 18px; }
  .cover { max-width: 576px; }
  .final-rise { width: 200px; }
}

/* ================= Desktop: a 12-column editorial spread ================= */
@media (min-width: 960px) {
  .d-xl { font-size: clamp(64px, 5.6vw, 84px); }
  .d-l { font-size: clamp(52px, 4.45vw, 64px); }
  .lead { font-size: 20px; }
  .bar-wm .wm { width: 128px; }
  .hero { padding: 32px 0 96px; }
  .hero-grid {
    --disc: min(440px, 34vw);
    grid-template-columns: minmax(0, 1fr) var(--disc); column-gap: clamp(64px, 8vw, 128px);
    grid-template-areas: "issue disc" "head disc" "lede disc" "form disc";
    grid-template-rows: auto auto auto 1fr; align-items: start;
  }
  .hero-h { margin-top: 28px; }
  .hero-lede { font-size: 20px; margin-top: 28px; max-width: 38ch; }
  .hero-lede b { display: inline; margin: 0; }
  .hero-form { margin-top: 36px; }
  .disc { margin-top: 40px; }
  .disc .tag-ai { font-size: 12px; padding: 9px 14px 9px 10px; top: calc(var(--disc) - 16px); }
  .disc-cap { font-size: 13px; margin-top: 30px; }

  .reveal { padding: 144px 0 160px; }
  .reveal-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(64px, 8vw, 120px); grid-template-areas: "cover head" "cover arc" "cover lists"; grid-template-rows: auto auto 1fr; }
  .reveal-head { margin-bottom: 0; }
  .arc { margin-top: 56px; }
  .arc-day { font-size: clamp(120px, 10vw, 148px); }
  .tally dd { font-size: 28px; }
  .tally dt { font-size: 14px; }
  .lists { margin-top: 56px; align-self: start; }

  .stance { padding: 144px 0 160px; }
  .stance-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(64px, 8vw, 120px); align-items: center; }
  .stance-grid > * { max-width: none; }
  .stance-copy { margin-top: 0; grid-column: 1; grid-row: 1; }
  .stance .score { grid-column: 2; grid-row: 1; justify-self: end; font-size: clamp(168px, 17vw, 260px); -webkit-text-stroke-width: 2px; }
  .stance .body-l { font-size: 20px; }

  .plan { padding: 144px 0 160px; }
  .plan-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(64px, 8vw, 120px); grid-template-areas: "head app" "post app"; grid-template-rows: auto 1fr; align-items: start; }
  .app { margin-top: 0; padding: 28px 28px 8px; }
  .post-wrap { margin-top: 48px; }

  .bestie { padding: 144px 0 160px; }
  .bestie-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(64px, 8vw, 120px); grid-template-areas: "h ladder" "end ladder"; grid-template-rows: auto 1fr; align-items: start; }
  .bestie h2 { grid-area: h; } .ladder { grid-area: ladder; margin-top: 0; } .bestie-end { grid-area: end; }
  .ladder .rung-top .rung-n { font-size: 168px; }

  .faq { padding: 144px 0 144px; }
  .faq-grid { display: grid; grid-template-columns: 4fr 7fr; column-gap: clamp(64px, 8vw, 120px); align-items: start; }
  .faq h2 { position: sticky; top: 32px; }
  .qa { margin-top: 0; }

  .final { padding: 144px 0 160px; }
  .final-rise { width: 240px; }
  .final h2 { margin-top: 48px; }
  .foot { padding: 72px 0 40px; }
  .foot-grid { grid-template-columns: 1fr auto; align-items: start; }
  .foot-links { justify-content: flex-end; }
  .foot-mail, .foot-legal, .foot-base { grid-column: 1 / -1; }
}

/* ================= Short landscape phones: compress so the form stays in the first view ================= */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 959px) {
  .hero { padding: 12px 0 24px; }
  .hero-grid { --disc: 180px; column-gap: 32px; grid-template-areas: "issue disc" "head disc" "lede disc" "form disc"; grid-template-rows: auto auto auto 1fr; }
  .hero-h { font-size: 34px; margin-top: 8px; }
  .hero-lede { margin-top: 8px; font-size: 15px; }
  .hero-lede b { display: inline; margin: 0; }
  .disc { margin-top: 10px; }
  .hero-form { margin-top: 10px; }
}
