/* ============================================================================
   Starwink website v2 - the sections added from the competitive research (STRATEGY-v2.md):
   the hero proof row, worries answered, why rhyme (with the guess-the-rhyme toy), worlds,
   sung chapters, keepsakes, the bilingual/diaspora note, the 5-step process, the parent's
   checklist, and the page states (A join the list / B store / C web checkout).
   Same system: app roles only, radius by role, the app's motion tokens, one gold per view.
   ========================================================================== */

/* ---- page states (lab switch; production sets one class) ---- */
#app-frame:not(.state-a) .st-a { display: none !important; }
#app-frame.state-a .st-b:not(.st-a), #app-frame.state-a .st-c:not(.st-a):not(.st-b) { display: none !important; }
#app-frame.state-b .st-c:not(.st-b) { display: none !important; }
#app-frame.state-a .plan-cta, #app-frame.state-b .plan-cta { display: none !important; }
.d2-faq [data-gate="D2"] { display: none !important; }
[data-gate="D2"] > span:last-child::after { content: "D2"; font: 700 10px/1 system-ui, sans-serif; color: #111; background: #f0c060; border-radius: 4px; padding: 2px 4px; margin-left: 6px; vertical-align: 2px; }
.clean [data-gate="D2"] > span:last-child::after { content: none; }
.btn--block { width: 100%; }
.text-btn { appearance: none; border: 0; background: none; padding: 0 var(--sp-2); min-height: var(--control-h-sm); cursor: pointer; color: inherit; font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.src { display: inline-block; margin-top: var(--sp-3); font-size: var(--fs-meta); color: var(--ink-meta); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
#app-frame.dz-light .src { color: var(--ink-body); }
#app-frame.dz-light .dz-night .src { color: var(--ink-meta); }
@media (hover: hover) and (pointer: fine) { .src:hover { color: var(--ink-title); } }

/* ---- hero proof row: where rivals put star ratings, we put the rating process ---- */
.proof { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.proof li { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-label); color: var(--ink-title); }
.proof .ico { width: 1rem; height: 1rem; color: var(--cta); }
#app-frame.dz-light .hero--shelf .proof .ico { color: var(--tag-gold-ink); }
.hero--story .proof li { text-shadow: 0 1px 10px rgba(var(--feature-bg-rgb), 0.9); }

/* ---- worries, answered ---- */
.worries { padding: var(--site-section) 0; }
.worry-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 0.6rem + 1.4vw, 2rem); }
.worry-list li { padding-top: var(--sp-5); border-top: 1px solid var(--hairline); }
.worry-mark { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-pill); margin-bottom: var(--sp-4);
  background: var(--gold-wash); box-shadow: inset 0 0 0 1px rgba(var(--cta-rgb), 0.3); color: var(--cta); }
#app-frame.dz-light .worry-mark { color: var(--tag-gold-ink); }
.worry-mark .ico { width: 1.25rem; height: 1.25rem; }
@media (max-width: 1099.98px) { .worry-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 819.98px) { .worry-list { grid-template-columns: 1fr; gap: var(--sp-5); } .worry-list li { display: grid; grid-template-columns: auto 1fr; column-gap: var(--sp-4); }
  .worry-list .worry-mark { grid-row: span 2; margin: 0; } }

/* ---- why rhyme: research cards + the guess-the-rhyme toy (Read 2014, played) ---- */
.why { padding: var(--site-section) 0; }
.why .why-card { background: var(--l1); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.why-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.why-card { padding: var(--sp-6); border-radius: var(--radius-card); background: var(--l0); box-shadow: inset 0 0 0 1px var(--hairline); display: flex; flex-direction: column; }
.why-card .src { margin-top: auto; padding-top: var(--sp-4); }
.why-note { grid-column: 1 / -1; margin: 0; max-width: 46rem; font-size: var(--site-lead); line-height: 1.55; color: var(--ink-title); }
.rhyme-game { border-radius: var(--radius-card); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); box-shadow: var(--sh-material); background-image: var(--corner-glow); }
.rhyme-try { margin: 0 0 var(--sp-4); font-weight: 700; color: var(--cta); font-size: var(--fs-label); }
.rhyme-lines { margin: 0; min-height: 3.2em; font-size: var(--site-verse); line-height: 1.6; color: var(--ink-title); }
.rhyme-lines .ln { display: block; padding-left: 1.1em; text-indent: -1.1em; }
.rhyme-gap { display: inline-block; min-width: 3.2em; border-bottom: 2px dashed rgba(var(--cta-rgb), 0.7); color: transparent; cursor: pointer; border-radius: 2px; }
.rhyme-word { color: var(--cta); font-weight: 800; text-shadow: var(--glow-numeral); animation: sw-rhyme calc(700ms * var(--dz-k)) var(--ease-settle) backwards; display: inline-block; }
@keyframes sw-rhyme { from { opacity: 0; filter: blur(6px); transform: translateY(6px) scale(0.96); } }
.rhyme-lines.is-swapping { animation: sw-rise calc(var(--dur-medium) * var(--dz-k)) var(--ease-soft) backwards; }
.rhyme-actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; color: var(--ink-title); }
@media (max-width: 1099.98px) { .why-grid { grid-template-columns: 1fr; } }
@media (max-width: 559.98px) { .why-cards { grid-template-columns: 1fr; } }

/* ---- worlds: a rail you can drag, each painting drifting a little against its frame ---- */
.worlds { padding: var(--site-section) 0; }
.world-rail { display: flex; gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: var(--sp-2) max(var(--site-gutter), calc((100% - var(--site-max)) / 2)) var(--sp-4); cursor: grab; outline: none; }
.world-rail::-webkit-scrollbar { display: none; }
.world-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.world-rail:focus-visible { box-shadow: inset 0 0 0 2px var(--cta); }
.world { flex: none; width: clamp(15rem, 10rem + 18vw, 26rem); scroll-snap-align: start; margin: 0; }
.world-pic { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius-card); overflow: hidden; background: var(--l2); box-shadow: var(--sh-material); }
.world-pic img { position: absolute; inset: 0 -8%; width: 116%; height: 100%; object-fit: cover; will-change: transform; pointer-events: none; user-select: none; }
.world figcaption { margin-top: var(--sp-3); font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; color: var(--ink-title); }
.world-hint { margin-top: var(--sp-2); }
@media (hover: none) { .world-hint { display: none; } }

/* ---- sung chapters ---- */
.songs { padding: var(--site-section) 0; }
.song-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 0.6rem + 1.4vw, 2rem); }
.song { border-radius: var(--radius-card); overflow: hidden; background: var(--l1); box-shadow: var(--sh-material), inset 0 0 0 1px var(--hairline);
  transition: box-shadow calc(var(--dur-medium) * var(--dz-k)) var(--ease-light); display: flex; flex-direction: column; }
.song.is-playing { box-shadow: var(--sh-material), inset 0 0 0 1.5px rgba(var(--cta-rgb), 0.7), 0 0 40px rgba(var(--cta-rgb), 0.16); }
.song-art { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.song-art img { width: 100%; height: 100%; object-fit: cover; transition: transform calc(1200ms * var(--dz-k)) var(--ease-settle); }
.song.is-playing .song-art img { transform: scale(1.04); }
.song-body { padding: clamp(1.25rem, 1rem + 1vw, 2rem); display: flex; flex-direction: column; gap: var(--sp-4); flex: 1; }
.song-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; color: var(--ink-title); display: flex; align-items: center; gap: var(--sp-2); }
.song-title .ico { width: 1.2rem; height: 1.2rem; color: var(--cta); }
.song-chorus { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-body); font-style: normal; }
.song-chorus .ln { display: block; padding-left: 1.1em; text-indent: -1.1em; }
.song-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: auto; }
.song-play { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--control-h-sm); padding: 0 var(--sp-4) 0 var(--sp-3); border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong); background: transparent; color: var(--ink-title); font-weight: 700; cursor: pointer;
  transition: transform calc(var(--dur-press) * var(--dz-k)) var(--ease-out), background-color calc(var(--dur-small) * var(--dz-k)) var(--ease-light); }
.song-play:active { transform: scale(var(--press-scale, 0.97)); }
.song-play .ico { width: 1rem; height: 1rem; color: var(--cta); }
.song-play[aria-pressed="true"] { background: var(--gold-wash); border-color: rgba(var(--cta-rgb), 0.55); }
.song-play .ico-pause, .song-play[aria-pressed="true"] .ico-play { display: none; }
.song-play[aria-pressed="true"] .ico-pause { display: inline-grid; }
@media (max-width: 819.98px) { .song-list { grid-template-columns: 1fr; } }

/* ---- keepsakes: four real keepsakes floating (AIR), lifting when pointed at (PAPER) ---- */
.keeps { padding: calc(var(--site-section) * 0.6) 0; }   /* an interlude between the songs and the languages */
.keeps-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.keeps-line { margin-top: var(--sp-4); }
.keeps-art { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); align-items: center; }
.keeps-art img { width: 118%; max-width: none; justify-self: center; height: auto; filter: drop-shadow(0 12px 18px rgba(var(--shadow-rgb), 0.45));
  animation: sw-float calc(6s * var(--dz-air)) var(--ease-loop) infinite; transition: scale calc(var(--dur-medium) * var(--dz-k)) var(--ease-out); }
.keeps-art li:nth-child(2) img { animation-delay: -1.5s; }
.keeps-art li:nth-child(3) img { animation-delay: -3s; }
.keeps-art li:nth-child(4) img { animation-delay: -4.5s; }
@keyframes sw-float { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (hover: hover) and (pointer: fine) { .keeps-art img:hover { scale: 1.08; } }
@media (max-width: 819.98px) { .keeps-grid { grid-template-columns: 1fr; } }

/* ---- the bilingual / diaspora note ---- */
.diaspora { margin-top: var(--sp-7); display: flex; gap: var(--sp-4); align-items: flex-start; max-width: 40rem; padding: var(--sp-5);
  border-radius: var(--radius-card); background: var(--l1); box-shadow: inset 0 0 0 1px var(--hairline); }
.diaspora .worry-mark { flex: none; margin: 0; }
.diaspora .src { margin-top: var(--sp-2); }

/* ---- craft: the process, numbered because it IS a sequence ---- */
.process { list-style: none; margin: var(--sp-6) 0 var(--sp-5); padding: 0; display: grid; gap: var(--sp-4); counter-reset: none; }
.process li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--sp-3); align-items: start; }
.process-n { font-size: 1.35rem; line-height: 1.1; color: var(--cta); text-shadow: var(--glow-numeral); text-align: center; }
.process .h3 { font-size: 1.0625rem; }
.process .step-d { margin-top: 2px; }
.craft-ai { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0 0 var(--sp-4); padding: var(--sp-4); border-radius: var(--radius-row, var(--radius-card));
  background: rgba(242, 239, 232, 0.06); box-shadow: inset 0 0 0 1px var(--hairline-strong); color: var(--ink-title); font-weight: 700; line-height: 1.45; }
.craft-ai .ico { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.12em; color: var(--sage, var(--cta)); }

/* ---- the checklist: each answer ticks itself as the list comes into view (LIGHT) ---- */
.checklist { padding: var(--site-section) 0; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) clamp(1.5rem, 1rem + 3vw, 4rem); }
.check-list li { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-5) 0; border-bottom: 1px solid var(--hairline); }
.check-box { flex: none; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-chip); display: grid; place-items: center; margin-top: 2px;
  box-shadow: inset 0 0 0 1.5px var(--hairline-strong); color: transparent;
  transition: background-color calc(var(--dur-medium) * var(--dz-k)) var(--ease-light), box-shadow calc(var(--dur-medium) * var(--dz-k)) var(--ease-light), color calc(var(--dur-medium) * var(--dz-k)) var(--ease-light); }
.check-box .ico { width: 1.1rem; height: 1.1rem; transform: scale(0.6); opacity: 0; transition: transform calc(var(--dur-medium) * var(--dz-k)) var(--ease-out), opacity calc(var(--dur-small) * var(--dz-k)) var(--ease-light); }
.check-list li.is-checked .check-box { background: var(--gold-wash); box-shadow: inset 0 0 0 1.5px rgba(var(--cta-rgb), 0.6); color: var(--cta); }
#app-frame.dz-light .check-list li.is-checked .check-box { color: var(--tag-gold-ink); }
.check-list li.is-checked .check-box .ico { transform: none; opacity: 1; }
.check-q { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.3; color: var(--ink-title); }
.check-a { margin: var(--sp-1) 0 0; color: var(--ink-body); line-height: 1.5; }
@media (max-width: 819.98px) { .check-list { grid-template-columns: 1fr; } }

/* ---- plans, state C: a web route beside the store route ---- */
.plan-cta { margin-top: var(--sp-5); display: grid; gap: var(--sp-2); justify-items: center; }
.plan-app { font-size: var(--fs-label); }
/* state C: the plans carry their own subscribe buttons, so the section's store button steps aside (one gold per view) */
#app-frame.state-c .plans-foot [data-store] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .keeps-art img { animation: none; }
  .world-pic img { transform: none !important; }
}

/* ---- v3 (cold-read fixes, 2026-09-29) ---- */
/* options kept in the lab, off unless switched on: the extra trust block, the checklist, provisional
   prices, the AI line in the hero */
#app-frame:not(.x-trust) .x-opt-trust, #app-frame:not(.x-check) .x-opt-check,
#app-frame:not(.x-price) .x-opt-price, #app-frame:not(.x-aihero) .x-opt-aihero { display: none !important; }
.worry-list { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--sp-7); }
@media (max-width: 1099.98px) { .worry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 819.98px) { .worry-list { grid-template-columns: 1fr; } }
.worry-foot { margin: var(--sp-7) 0 0; color: var(--ink-body); font-size: var(--fs-label); }
/* small text reads brighter (the cold read found the meta ink hard work at night) */
#app-frame .note, #app-frame .foot-note { color: var(--ink-body); }
.craft-bar { margin-bottom: var(--sp-3); font-weight: 700; font-size: var(--fs-label); color: var(--ink-body); text-align: center; max-width: 14rem; text-wrap: balance; }
.keeps-art { list-style: none; margin: 0; padding: 0; }
.keeps-art li { display: grid; justify-items: center; gap: var(--sp-3); text-align: center; }
.keeps-art li span { font-weight: 700; font-size: var(--fs-label); color: var(--ink-body); text-wrap: balance; }
.keeps-art li:nth-child(2), .keeps-art li:nth-child(4) { margin-top: 2rem; }
.keeps-art img:nth-child(1) { margin-top: 0; }
.plan-price { margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); font-weight: 700; color: var(--ink-title); }
.plan-price .num { font-size: 1.5rem; color: var(--cta); margin-right: 0.1em; }
#app-frame.dz-light .plan-price .num { color: var(--tag-gold-ink); }
.hero-ai { margin: var(--sp-4) 0 0; font-size: var(--fs-label); font-weight: 700; color: var(--ink-title); max-width: 30rem; }
.hero--story .hero-ai { text-shadow: 0 1px 10px rgba(var(--feature-bg-rgb), 0.9); }
