/* ============================================================================
   Starwink website v7 (founder review of v6, 2026-09-29). Loads after v6.css; overrides only.
   ========================================================================== */

/* 1. the shelf rides the founder's S-curve: the row may rise above its own box (never over the numbers; the
   script keeps it clear of them), the page clips it only at the sides, and the row fades into both edges */
.shelf { overflow-x: clip; }
.ribbon { overflow: visible; -webkit-mask-image: none; mask-image: none; margin-top: var(--sp-6); }

/* 2. the worlds title: on the page, left-aligned, the letters popping in one by one, a star at the end */
.wt7 { padding: var(--site-section) 0 calc(var(--site-section) * 0.6); }
.wt7-h { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5rem); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
.wt7-a, .wt7-b { display: block; }
.wt7-a { color: var(--ink-title); }
.wt7-b { color: var(--cta); }
#app-frame.dz-light .wt7-b { color: var(--tag-ink-gold); }
.wt7-w { display: inline-block; white-space: nowrap; }
.wt7-ch { display: inline-block; opacity: 0; transform: translateY(0.55em) rotate(14deg) scale(0.55); transform-origin: 50% 90%; }
.wt7.is-in .wt7-ch { animation: wt7-pop calc(720ms * var(--dz-k)) var(--ease-settle) forwards; animation-delay: calc(var(--i) * 34ms * var(--dz-k)); }
@keyframes wt7-pop { 60% { opacity: 1; transform: translateY(-0.08em) rotate(-4deg) scale(1.08); } 100% { opacity: 1; transform: none; } }
.wt7-star { display: inline-grid; place-items: center; width: 0.62em; height: 0.62em; margin-left: 0.12em; vertical-align: 0.35em; color: var(--cta); opacity: 0; transform: scale(0) rotate(-90deg); }
#app-frame.dz-light .wt7-star { color: var(--tag-ink-gold); }
.wt7-star .ico { width: 100%; height: 100%; }
.wt7.is-in .wt7-star { animation: wt7-star calc(700ms * var(--dz-k)) var(--ease-settle) forwards, wt7-twinkle calc(2.6s * var(--dz-air)) var(--ease-loop) infinite alternate;
  animation-delay: calc((var(--n, 40) * 34ms + 150ms) * var(--dz-k)), calc((var(--n, 40) * 34ms + 900ms) * var(--dz-k)); }
@keyframes wt7-star { to { opacity: 1; transform: none; } }
@keyframes wt7-twinkle { from { scale: 1; filter: drop-shadow(0 0 0 rgba(var(--cta-rgb), 0)); } to { scale: 1.18; filter: drop-shadow(0 0 10px rgba(var(--cta-rgb), 0.7)); } }
.wt7-line { margin-top: var(--sp-4); max-width: 34rem; opacity: 0; transform: translateY(8px); transition: opacity calc(600ms * var(--dz-k)) var(--ease-light), transform calc(600ms * var(--dz-k)) var(--ease-soft); transition-delay: calc(500ms * var(--dz-k)); }
.wt7.is-in .wt7-line { opacity: 1; transform: none; }

/* 3. keepsakes: the page's own ground, the open card back to its night card */
.k4-card { background: rgba(var(--feature-bg-rgb), 0.94); background-image: none; color: var(--onart-ink); box-shadow: var(--sh-lg), inset 0 0 0 1px rgba(242, 239, 232, 0.14); }
.k4-cname { color: var(--onart-ink); }
.k4-desc { color: rgba(242, 239, 232, 0.92); }
.k4-fact { background: rgba(var(--cta-rgb), 0.1); box-shadow: inset 0 0 0 1px rgba(var(--cta-rgb), 0.28); }
.k4-fact p { color: rgba(242, 239, 232, 0.94); }
.k4-fk { color: var(--cta) !important; }
.k4-fact .src { color: rgba(242, 239, 232, 0.86); }
.k4-from { color: rgba(242, 239, 232, 0.86); }
.k4-from strong { color: var(--onart-ink); }
.k4-name { background: rgba(var(--feature-bg-rgb), 0.86); color: var(--onart-ink); box-shadow: inset 0 0 0 1px rgba(242, 239, 232, 0.16); }

/* 4. you're in charge: the settings card, Tuk yawning on its top edge, each switch turning on with a glow;
   then what is always on, as a row of promises popping in */
.c6-card { position: relative; margin-top: 5.5rem; }
.c7-tuk { position: absolute; right: var(--sp-5); bottom: calc(100% - 1.2rem); width: 8.5rem; height: auto; pointer-events: none; transform-origin: 50% 100%;
  filter: drop-shadow(0 10px 16px rgba(var(--shadow-rgb), 0.35)); animation: c7-breathe calc(4.5s * var(--dz-air)) var(--ease-loop) infinite alternate; }
@keyframes c7-breathe { from { scale: 1 1; } to { scale: 1.015 1.03; } }
.c6-rows li { position: relative; }
.c6-rows li::before { content: ""; position: absolute; inset: 2px calc(-1 * var(--sp-3)); border-radius: var(--radius-row); background: var(--gold-wash); opacity: 0; pointer-events: none; }
.c6-rows li > * { position: relative; }
.c6-rows li.is-flip::before { animation: c7-flash calc(900ms * var(--dz-k)) var(--ease-soft); }
@keyframes c7-flash { 20% { opacity: 1; } 100% { opacity: 0; } }
.c6-rows li.is-flip .c6-mark { animation: c7-mark calc(600ms * var(--dz-k)) var(--ease-settle); }
@keyframes c7-mark { 40% { transform: scale(1.18) rotate(-8deg); } }
.c4-sw.c6-sw.is-on i { animation: c7-knob calc(450ms * var(--dz-k)) var(--ease-settle); }
@keyframes c7-knob { 45% { scale: 1.3 0.85; } }
.c7-always { margin-top: var(--sp-7); }
.c7-k { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-title); }
.c7-k .ico { width: 22px; height: 22px; color: var(--tag-ink-sage); }
.c7-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.c7-chips li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: var(--radius-pill); background: var(--l1);
  box-shadow: var(--sh-sm), inset 0 0 0 1px var(--hairline); font-weight: 700; color: var(--ink-title);
  opacity: 0; transform: translateY(12px) scale(0.9);
  transition: opacity calc(400ms * var(--dz-k)) var(--ease-light), transform calc(520ms * var(--dz-k)) var(--ease-settle); transition-delay: calc(var(--i) * 110ms * var(--dz-k)); }
.c7-chips li .ico { width: 30px; height: 30px; padding: 6px; border-radius: var(--radius-pill); background: var(--sage-bg); color: var(--tag-ink-sage); flex: none; }
.c7-always.is-in .c7-chips li { opacity: 1; transform: none; }
.c7-chips li:hover { transform: translateY(-2px); }
@media (max-width: 899.98px) { .c6-card { margin-top: 5rem; } .c7-tuk { width: 7rem; } }

/* 5. why rhyme: four small living cards, each a real line from our stories */
.why7 { padding: var(--site-section) 0; }
.y7-head { max-width: 44rem; }
.y7-grid { list-style: none; margin: var(--sp-7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 0.6rem + 1vw, 1.5rem); }
.y7-card { display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--l1); box-shadow: var(--sh-card), inset 0 0 0 1px var(--hairline); overflow: hidden;
  opacity: 0; transform: translateY(30px) rotate(calc((var(--i) - 1.5) * 1.4deg));
  transition: opacity calc(600ms * var(--dz-k)) var(--ease-light), transform calc(800ms * var(--dz-k)) var(--ease-settle), box-shadow calc(var(--dur-medium) * var(--dz-k)) var(--ease-light);
  transition-delay: calc(var(--i) * 120ms * var(--dz-k)); }
.y7-grid.is-in .y7-card { opacity: 1; transform: none; }
.y7-grid.is-in .y7-card:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--hairline-strong); transition-delay: 0s; }
.y7-demo { position: relative; display: grid; align-content: center; gap: var(--sp-3); min-height: 9.5rem; margin: var(--sp-2); padding: var(--sp-4);
  border-radius: calc(var(--radius-card) - var(--sp-2)); background: var(--l2); background-image: var(--corner-glow); }
.y7-body { flex: 1; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-5) var(--sp-5); }
.y7-n { font-family: var(--font-numeral); font-weight: 600; font-size: 1.7rem; line-height: 1; color: var(--tag-ink-gold); }
.y7-q { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.15rem, 1rem + 0.35vw, 1.35rem); line-height: 1.2; color: var(--ink-title); text-wrap: balance; }
.y7-a { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-body); }
.y7-src { margin-top: auto; padding-top: var(--sp-2); display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: 700; color: var(--ink-body); text-decoration: none; }
.y7-src .ico { flex: none; width: 15px; height: 15px; color: var(--tag-ink-gold); }
.y7-src span:last-child { text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
.y7-src:hover span:last-child { color: var(--ink-title); text-decoration-color: currentColor; }
/* the demos, sized for the card */
.y7-demo .y6-verse { font-size: 0.98rem; line-height: 1.6; }
.y7-demo .y6-week { gap: 4px; }
.y7-demo .y6-disc { width: 1.85rem; height: 1.85rem; transition: none; }
.y7-demo .y6-disc .ico { width: 14px; height: 14px; }
.y7-demo .y6-rime { gap: 6px; font-size: 0.9rem; }
.y7-demo .y6-rime > span:not(.y6-arrow) { padding: 3px 10px; background: var(--l1); }
.y7-demo .y6-pair { gap: var(--sp-2); }
.y7-demo .y6-pair p { font-size: 0.95rem; gap: var(--sp-2); }
.y7-demo .y6-pair p[lang="ro"] { opacity: 1; transform: none; transition: none; }
.y7-demo .y6-end, .y7-demo .y6-chip { transition: none; }
/* the loops: only while the card is live and on screen */
.y7-grid:not(.is-onscreen) .y7-card * { animation-play-state: paused !important; }
.y7-card.is-live .y6-disc { animation: y7-night calc(5.6s * var(--dz-air)) var(--ease-soft) infinite; animation-delay: calc(var(--d) * 0.3s); }
@keyframes y7-night { 0%, 6% { background: var(--l1); color: var(--ink-body); scale: 1; } 14%, 76% { background: var(--gold-wash); color: var(--tag-ink-gold); scale: 1.1; } 90%, 100% { background: var(--l1); color: var(--ink-body); scale: 1; } }
.y7-card.is-live .y6-end { animation: y7-under calc(4.4s * var(--dz-air)) var(--ease-soft) infinite; }
.y7-card.is-live .ln + .ln .y6-end { animation-delay: 0.45s; }
@keyframes y7-under { 0%, 8% { background-size: 0% 2px; } 30%, 78% { background-size: 100% 2px; } 92%, 100% { background-size: 0% 2px; } }
.y7-card.is-live .y6-chip { animation: y7-chip calc(4.4s * var(--dz-air)) var(--ease-settle) infinite; }
@keyframes y7-chip { 0%, 30% { opacity: 0; transform: scale(0.6); } 42%, 80% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: scale(0.8); } }
.y7-card[data-demo="guess"].is-live .ln:first-child .y6-end { animation: none; background-size: 100% 2px; }
.y7-card.is-live .y6-land { animation: y7-land calc(4.6s * var(--dz-air)) var(--ease-settle) infinite; }
@keyframes y7-land { 0%, 28% { opacity: 0; transform: translateY(-0.8em) rotate(-10deg); } 42%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(0.2em); } }
.y7-card.is-live .y6-pair p[lang="en"] { animation: y7-lang calc(5s * var(--dz-air)) var(--ease-soft) infinite; }
.y7-card.is-live .y6-pair p[lang="ro"] { animation: y7-lang calc(5s * var(--dz-air)) var(--ease-soft) infinite; animation-delay: calc(-2.5s * var(--dz-air)); }
@keyframes y7-lang { 0%, 40% { opacity: 1; } 50%, 90% { opacity: 0.32; } 100% { opacity: 1; } }
@media (max-width: 1180px) { .y7-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .y7-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .wt7-ch, .wt7-star, .wt7-line { opacity: 1; transform: none; animation: none !important; }
  .c7-tuk, .y7-card * { animation: none !important; }
  .c7-chips li, .y7-card { opacity: 1; transform: none; }
  .y7-demo .y6-disc { background: var(--gold-wash); color: var(--tag-ink-gold); }
  .y7-demo .y6-end { background-size: 100% 2px; }
  .y7-demo .y6-chip, .y7-demo .y6-land { opacity: 1; transform: none; }
}

/* v7.1 - the row fades into both page edges under a veil of the page's own colour (see-through cards looked like ghosts) */
.ribbon::before, .ribbon::after { content: ""; position: absolute; top: -60%; bottom: -10%; width: clamp(2rem, 7vw, 7rem); z-index: 6000; pointer-events: none; }
.ribbon::before { left: 0; background: linear-gradient(90deg, var(--l0), rgba(var(--l0-rgb, 0, 0, 0), 0)); background: linear-gradient(90deg, var(--l0) 0%, transparent 100%); }
.ribbon::after { right: 0; background: linear-gradient(270deg, var(--l0) 0%, transparent 100%); }
.ribbon { position: relative; z-index: 1; isolation: isolate; }   /* its cards and veils stack inside the row, always under the site header */

/* v7.2 - the treasures never reach the words: more room above and below the field (with the bounded drift in v4.js) */
.k4-field { margin-top: var(--sp-7); margin-bottom: var(--sp-4); }

/* v7.3 - the treasures sit beside the open card, never behind it: v4.js measures the card and places them in the two side
   regions (px centres and sizes as --x, --y, --s). The field is as tall as the tallest card plus a little air, so no dead band. */
@media (min-width: 820px) {
  .k4-field { height: 44rem; }
  .k4-t { width: var(--s, 6rem); left: var(--x, 50%); top: var(--y, 50%); }
  .k4-t.is-off { display: none; }
}
