/* Ghostlovecake v6: approved hero copy and clear preview typography.
   Loads after styles.v2.css (tokens, type, buttons, footer base) and
   integrations.v1.css. Replaces polish.v1, media.v3 and player.v4 on index.html
   (those files stay on disk for rollback). */

:root {
  --mast-h: 68px;
  --band-h: clamp(200px, 33svh, 340px);
  --p-ring: rgba(143, 227, 214, 0.32);
  --p-surface: rgba(22, 34, 74, 0.5);
}

/* ---------- Shared ---------- */

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cta-note {
  margin-top: 12px;
  max-width: 30em;
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.5;
}
.masthead-nav a[aria-current="location"] { color: var(--cream); }

summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.more-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.2s var(--ease);
}
details[open] > summary .more-chevron { transform: rotate(180deg); }

/* ---------- Hero ---------- */

.hero {
  min-height: 0;
  display: block;
}
.hero-visual {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--mast-h);
  height: var(--band-h);
}
.hero-media {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  z-index: 0;
  -webkit-mask-image: none;
  mask-image: none;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-shade {
  background:
    linear-gradient(0deg, var(--night) 0%, rgba(10, 15, 31, 0.55) 22%, rgba(10, 15, 31, 0) 48%),
    linear-gradient(180deg, rgba(10, 15, 31, 0.35) 0%, rgba(10, 15, 31, 0) 18%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--mast-h) + var(--band-h) - 30px);
}
.hero-caption {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: var(--gutter);
  bottom: auto;
}
.hero-caption p { font-size: 0.85rem; }
.hero-caption-game { color: var(--cream); }
.media-toggle .icon-play { display: block; }
.media-toggle .icon-pause { display: none; }
.media-toggle[data-state="playing"] .icon-play { display: none; }
.media-toggle[data-state="playing"] .icon-pause { display: block; }

/* Decorative stars stay in the text area, never over her face. */
.hero .sky { z-index: 1; }
.hero .s1 { top: auto; bottom: 22%; left: 88%; }
.hero .s2 { top: auto; bottom: 46%; left: 3%; }
.hero .s3 { top: auto; bottom: 7%; left: 56%; }

.hero .eyebrow { color: var(--teal-strong); margin-bottom: 10px; }
.hero-hook {
  margin: 24px 0 0;
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.75rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
}
.hero-hook span { display: block; }
.hero-lede { margin-top: 12px; color: var(--muted); font-size: 1.125rem; max-width: 30em; }
.hero-actions { margin-top: 22px; }
.hero-actions .btn-ghost .icon { width: 16px; height: 16px; }
.hero-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 879px) {
  .hero { padding: 0 var(--gutter) 44px; }
  .wordmark { font-size: clamp(3rem, 15vw, 6rem); }
  :root { --band-h: clamp(168px, 24svh, 224px); }
  .hero-hook { margin-top: 18px; font-size: clamp(1.15rem, 5.2vw, 1.4rem); }
  .hero-lede { font-size: 1rem; line-height: 1.5; }
  .hero-note { font-size: 0.83rem; }
}
@media (max-width: 479px) {
  .hero-caption p { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (min-width: 880px) {
  :root { --mast-h: 72px; }
  .hero {
    display: flex;
    align-items: center;
    min-height: calc(var(--mast-h) + min(62vw, 860px) * 0.6 + 40px);
    padding: calc(var(--mast-h) + 48px) var(--gutter) 64px;
  }
  .hero-visual {
    left: auto;
    right: 0;
    top: calc(var(--mast-h) + 8px);
    width: min(62%, 860px);
    height: auto;
    aspect-ratio: 720 / 432;
  }
  .hero-video { object-position: 50% 35%; }
  .hero-shade {
    background:
      linear-gradient(90deg, var(--night) 0%, rgba(10, 15, 31, 0.7) 16%, rgba(10, 15, 31, 0) 42%),
      linear-gradient(0deg, var(--night) 0%, rgba(10, 15, 31, 0) 28%),
      linear-gradient(180deg, var(--night) 0%, rgba(10, 15, 31, 0) 12%);
  }
  .hero-inner { padding-top: 0; width: min(100%, 600px); }
  .wordmark { font-size: min(8rem, 9vw); }
  .hero-caption { top: auto; bottom: 18px; right: var(--gutter); }
}

/* ---------- Preview: one featured sample ---------- */

.preview {
  position: relative;
  padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(64px, 9vw, 120px);
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 55%, var(--night) 100%);
}
.preview-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "stage" "why" "more";
  gap: 32px;
  max-width: 1040px;
  margin-inline: auto;
}
.preview-head { grid-area: head; min-width: 0; }
.preview-head h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600;
  font-style: normal;
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.stage { grid-area: stage; min-width: 0; }
.preview-why { grid-area: why; min-width: 0; }
.more { grid-area: more; min-width: 0; }

@media (min-width: 880px) {
  .preview-inner {
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-areas: "stage head" "stage why" "stage more";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(40px, 6vw, 88px);
    row-gap: 28px;
    align-items: start;
  }
}

.stage {
  position: relative;
  /* About 320px wide; shrinks on short screens so the whole phone stays in view. */
  width: min(100%, 320px, calc((100svh - 150px) * 9 / 16));
  min-width: 200px;
  margin: 0 auto;
}
.stage-frame {
  width: 100%;
  margin: 0;
  aspect-ratio: 9 / 16;
  box-shadow:
    0 0 0 1px rgba(244, 238, 228, 0.16),
    0 0 0 8px #0c1328,
    0 0 0 9px var(--line),
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -24px var(--teal-glow);
}
.stage-video { object-fit: cover; background: #05070f; }
.stage[data-state="playing"] .stage-video,
.stage[data-state="paused"] .stage-video { object-fit: contain; background: #000; }
.stage-end[hidden] { display: none; }
.no-js .stage-play { display: none; }

.stage-progress {
  display: block;
  height: 3px;
  margin: 18px 6px 0;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.no-js .stage-progress { display: none; }
.stage-progress-bar {
  display: block;
  height: 100%;
  background: var(--teal);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

.stage-caption { padding: 14px 0 0; }
.stage-game { font-size: 0.85rem; }
.stage-dur { margin-left: 6px; color: var(--faint); font-variant-numeric: tabular-nums; }
.stage-source { min-height: 44px; font-size: 0.88rem; color: var(--muted); }

.stage-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 18px 22px;
  background: linear-gradient(0deg, rgba(5, 8, 18, 0.96) 0%, rgba(5, 8, 18, 0.88) 60%, rgba(5, 8, 18, 0.55) 100%);
  text-align: center;
}
.stage-end-kicker { color: var(--teal-strong); font-weight: 600; font-size: 0.95rem; }
.stage-end-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 650;
  font-size: 1.6rem;
  line-height: 1.12;
}
.stage-end-twitch { width: 100%; margin-top: 6px; }
.stage-end-note { color: var(--muted); font-size: 0.85rem; }
.stage-end-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.stage-end-row .btn { padding: 0 14px; font-size: 0.9rem; }
.stage-end-row .icon { width: 15px; height: 15px; }

/* Why watch + CTA */
.why-title {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.why-list { margin-top: 14px; display: grid; gap: 12px; }
.why-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}
.why-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(143, 227, 214, 0.16);
}
.why-list strong { color: var(--cream); font-weight: 600; }
.preview-cta { margin-top: 24px; }

/* More moments: progressive, compact, secondary */
.more {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.more-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 4px;
  list-style: none;
  font-weight: 600;
  color: var(--cream);
}
.more-count { margin-left: auto; color: var(--faint); font-weight: 500; font-size: 0.9rem; }
.more-summary:hover .more-count { color: var(--muted); }
.more-hint { color: var(--faint); font-size: 0.9rem; margin: 0 4px 10px; }
.moment-list { display: grid; gap: 4px; padding-bottom: 12px; }
.moment {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--cream);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.moment:hover { background: rgba(244, 238, 228, 0.05); }
.moment:focus-visible { outline-offset: -3px; }
.moment[aria-current="true"] { background: rgba(143, 227, 214, 0.1); box-shadow: inset 0 0 0 1px var(--p-ring); }
.moment-thumb {
  width: 44px;
  height: 60px;
  object-fit: cover;
  object-position: 50% 14%;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}
.moment-text { display: grid; gap: 2px; min-width: 0; }
.moment-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.2;
}
.moment-meta { color: var(--faint); font-size: 0.85rem; }
.moment-flag {
  grid-column: 2;
  justify-self: start;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--cream);
  font-size: 0.76rem;
  font-weight: 600;
}
.moment-state {
  grid-column: 3;
  grid-row: 1;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
}
.moment-state:empty { display: none; }

/* ---------- About ---------- */

.about { padding-block: clamp(64px, 8vw, 120px); }
.about::before { content: none; }
.about-photo img { aspect-ratio: 1; object-fit: contain; }
.about-avatar { bottom: -36px; width: clamp(96px, 22%, 124px); }
.about-avatar figcaption { font-size: 0.82rem; }
.about-copy p { margin-top: 14px; }
.copilot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
  margin-top: 28px;
  padding: 20px 22px;
  border-top: 0;
  border-radius: 22px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(143, 227, 214, 0.12), transparent 60%),
    var(--p-surface);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 36em;
}
.about-copy .copilot-line {
  flex: 1 1 16em;
  min-width: 0;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
}
.ghost-photo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--cream);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.ghost-photo img {
  width: 112px;
  height: 84px;
  object-fit: cover;
  object-position: 35% 69%;
  border: 1px solid rgba(213, 196, 169, 0.3);
  border-radius: 12px;
}
.ghost-photo:hover img { border-color: var(--teal); }

.rules-details {
  margin-top: 22px;
  max-width: 36em;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rules-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  list-style: none;
  font-weight: 600;
}
.rules-compact { display: grid; gap: 8px; padding: 0 0 16px; }
.rules-compact li { color: var(--muted); font-size: 0.98rem; }
.rules-compact strong { color: var(--cream); font-weight: 600; }

/* ---------- Closing + footer ---------- */

.footer { padding-top: clamp(64px, 8vw, 110px); }
.footer-cta { gap: 18px; margin-bottom: clamp(48px, 6vw, 80px); }
.footer-title { font-size: clamp(2.4rem, 1.4rem + 5vw, 5rem); }
.footer-lede { max-width: 30em; color: var(--muted); font-size: 1.1rem; }
.footer-cta .cta-note { margin-top: 0; }
.footer-col h3 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.link-list a { min-height: 52px; font-size: 1.08rem; }

.footer-extra {
  position: relative;
  max-width: var(--max);
  margin: 32px auto 0;
  border-top: 1px solid var(--line);
}
.footer-extra > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  list-style: none;
  color: var(--muted);
  font-weight: 600;
}
.footer-extra .recent { padding: 0 0 24px; background: none; }

@media (prefers-reduced-motion: reduce) {
  .more-chevron { transition: none; }
}

/* Keep the compact header on one line on narrow phones. */
@media (max-width: 380px) {
  .masthead { gap: 8px; }
  .masthead .brand { gap: 6px; }
  .masthead .brand-word { font-size: 1rem; }
  .masthead .brand-ghost { width: 18px; flex-shrink: 0; }
  .masthead .btn-compact { font-size: 0.85rem; padding-inline: 12px; white-space: nowrap; }
  .masthead .btn-compact .icon { width: 16px; height: 16px; }
}
