/* ============================================================================
   StoryFlux landing page
   The ribbon's colours on a deep plum night; the screenplay page is the hero.
   Courier Prime (the screenplay face) for headlines and script; Schibsted
   Grotesk for everything you read. One orchestrated moment: the page load.
   Sections sit on alternating bands (lift / warm / deep / glow) so the long
   page has rhythm without boxes.
   ============================================================================ */

:root {
  --night: #14101c;       /* page */
  --night-lift: #1a1525;  /* a band a step lighter */
  --night-deep: #0f0c16;  /* a band a step darker */
  --night-2: #1f1930;     /* raised surfaces */
  --line: #2f2640;        /* hairlines on night */
  --text: #f3eef7;
  --mist: #b5aac4;        /* secondary text */
  --gold: #fdb813;
  --ember: #f45b1f;
  --magenta: #d3175f;
  --plum: #6a0f5a;
  --violet: #a072fe;      /* the app's purple */
  --paper: #fbfaf7;       /* the script page */
  --ink: #1b1820;         /* type on paper */
  --ribbon: linear-gradient(100deg, var(--gold), var(--ember) 45%, var(--magenta) 80%, var(--plum));

  --script: "Courier Prime", "Courier New", monospace;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  --step-4: clamp(2.6rem, 1.5rem + 4.6vw, 4.9rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; color-scheme: dark; scrollbar-color: rgba(160, 114, 254, 0.28) transparent; }
/* scrollbars blend in: a faint purple thumb on no track (inherited by every scrolling box) */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
  ::-webkit-scrollbar-thumb { border-radius: 10px; border: 3px solid transparent; background: rgba(160, 114, 254, 0.28) padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: rgba(160, 114, 254, 0.45); }
  ::-webkit-scrollbar-corner { background: transparent; }
}
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; }
h2 { font-family: var(--script); font-size: var(--step-3); letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
::selection { background: rgba(244, 91, 31, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85em 1.5em; border-radius: 999px;
  background: var(--ribbon); color: #1a0d14;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(244, 91, 31, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease;
}
.btn::after { /* a slow sheen on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(211, 23, 95, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn:hover::after { transform: translateX(120%); }
.btn-small { padding: 0.55em 1.15em; font-size: var(--step--1); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost::after { display: none; }
.btn-ghost:hover { border-color: #57486e; background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.link-quiet { color: var(--mist); text-decoration: none; font-weight: 500; }
.link-quiet:hover { color: var(--text); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(20, 16, 28, 0.6); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: padding 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.top.scrolled { padding-block: 9px; background: rgba(20, 16, 28, 0.86); border-bottom-color: var(--line); }
.top-brand img { height: 76px; width: auto; transition: height 0.25s ease; }
.top.scrolled .top-brand img { height: 56px; }
.top-nav { display: flex; gap: 24px; margin-left: 14px; }
.top-nav a { position: relative; color: var(--mist); text-decoration: none; font-size: var(--step--1); font-weight: 500; padding: 4px 0; }
.top-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--ribbon); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out); }
.top-nav a:hover { color: var(--text); }
.top-nav a:hover::after { transform: scaleX(1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* ---------- section rhythm and bands ---------- */
main > section { position: relative; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: clamp(72px, 10vw, 128px); }
.band::before { /* full-bleed background behind a section */
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
}
.band-lift::before { background: var(--night-lift); border-block: 1px solid rgba(255, 255, 255, 0.03); }
.band-deep::before { background: var(--night-deep); }
.band-warm::before {
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(211, 23, 95, 0.16), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(253, 184, 19, 0.08), transparent 70%),
    var(--night-deep);
}
.band-glow::before { background: radial-gradient(55% 75% at 50% 45%, rgba(244, 91, 31, 0.18), transparent 70%), var(--night); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--mist); margin-top: 14px; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: clamp(36px, 6vw, 84px) !important; padding-bottom: clamp(72px, 9vw, 120px) !important;
  min-height: min(860px, calc(100vh - 70px));
}
.hero-glow {
  position: absolute; z-index: -2; top: -10%; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none;
  background:
    radial-gradient(40% 50% at 78% 42%, rgba(244, 91, 31, 0.22), transparent 70%),
    radial-gradient(35% 45% at 92% 75%, rgba(211, 23, 95, 0.2), transparent 70%),
    radial-gradient(30% 40% at 10% 20%, rgba(160, 114, 254, 0.12), transparent 70%);
}
.hero-ribbon {
  position: absolute; z-index: -1; left: -150px; top: -60px; height: 125%; width: auto;
  opacity: 0.17; filter: blur(1.5px); pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-18px) rotate(-2deg); } }
.hero h1 { font-family: var(--script); font-size: var(--step-4); letter-spacing: -0.025em; line-height: 1.04; }
.hero h1 .l { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; }
.hero h1 .l > span { display: inline-block; }
.fade-out {
  white-space: nowrap;
  background: linear-gradient(180deg, #fff 30%, #f6d7c6); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: 24px; max-width: 34em; color: #ddd4e6; font-size: var(--step-1); line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.fine { margin-top: 14px; color: var(--mist); font-size: var(--step--1); }

.hero-stage { position: relative; padding: 92px 0 0 56px; }
.beat-card {
  position: absolute; left: 0; top: 0; z-index: 2; width: 252px;
  background: #fff6d6; color: #3a2a12; border-radius: 4px; padding: 14px 16px 16px;
  box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.75), 0 2px 0 rgba(0, 0, 0, 0.05);
  transform: rotate(-4deg);
  font-size: 0.92rem; line-height: 1.45;
  border-top: 5px solid var(--gold);
}
.beat-card::before { /* the pin */
  content: ""; position: absolute; top: -12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a5c, var(--magenta) 60%, #7d0d3a); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
}
.beat-card strong { display: block; font-size: 1.02rem; margin: 2px 0 6px; }
.beat-tag { font-size: 0.78rem; color: #8a6a2a; font-weight: 600; }
.page {
  position: relative;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.025), transparent 6%),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(27, 24, 32, 0.022) 27px 28px),
    var(--paper);
  color: var(--ink); border-radius: 3px;
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05), 14px 14px 0 -6px rgba(255, 255, 255, 0.035);
  padding: 72px 40px 58px 58px;
}
.page-num { position: absolute; top: 30px; right: 36px; font-family: var(--script); font-size: 0.85rem; color: #6d6874; }
.page-inner { font-family: var(--script); font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.95rem); line-height: 1.3; max-width: 32em; }
.page-inner p { margin: 0 0 1.3em; }
.sp-slug { font-weight: 700; }
.sp-cue { margin: 0 0 0 38% !important; }
.sp-paren { margin: 0 0 0 30% !important; }
.sp-line { margin: 0 12% 1.3em 20% !important; }
.page-inner p.caret::after { /* the last line keeps a blinking cursor */
  content: ""; display: inline-block; width: 0.55em; height: 1.05em; margin-left: 3px; vertical-align: -0.15em;
  background: var(--ember); animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- the load-in (the page's one orchestrated moment) ----------
   .js is set before paint; .ready once fonts are in (main.js). */
.js .top { opacity: 0; transform: translateY(-10px); }
.js .hero-ribbon { opacity: 0; transform: scale(0.94) translateY(16px); filter: blur(10px); }
.js .hero-glow { opacity: 0; }
.js .hero h1 .l > span { transform: translateY(105%); }
.js .lede, .js .hero-actions, .js .fine { opacity: 0; transform: translateY(12px); }
.js .page { opacity: 0; transform: translateY(26px) scale(0.985); }
.js .beat-card { opacity: 0; transform: translateY(-38px) rotate(-11deg); }
.js .page-inner p { opacity: 0; transform: translateY(4px); }

.ready .top { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s var(--ease-out), padding 0.25s ease, background 0.25s ease, border-color 0.25s ease; }
.ready .hero-glow { opacity: 1; transition: opacity 1.6s ease 0.1s; }
.ready .hero-ribbon { opacity: 0.17; transform: none; filter: blur(1.5px); transition: opacity 1.4s ease 0.1s, transform 1.6s var(--ease-out) 0.1s, filter 1.4s ease 0.1s; }
.ready .hero h1 .l > span { transform: none; transition: transform 0.9s var(--ease-out); }
.ready .hero h1 .l:nth-child(1) > span { transition-delay: 0.15s; }
.ready .hero h1 .l:nth-child(2) > span { transition-delay: 0.27s; }
.ready .hero h1 .l:nth-child(3) > span { transition-delay: 0.39s; }
.ready .lede { opacity: 1; transform: none; transition: opacity 0.8s ease 0.6s, transform 0.8s var(--ease-out) 0.6s; }
.ready .hero-actions { opacity: 1; transform: none; transition: opacity 0.8s ease 0.72s, transform 0.8s var(--ease-out) 0.72s; }
.ready .fine { opacity: 1; transform: none; transition: opacity 0.8s ease 0.84s, transform 0.8s var(--ease-out) 0.84s; }
.ready .page { opacity: 1; transform: none; transition: opacity 0.9s ease 0.45s, transform 1s var(--ease-out) 0.45s; }
.ready .beat-card { opacity: 1; transform: rotate(-4deg); transition: opacity 0.5s ease 1s, transform 0.75s cubic-bezier(0.34, 1.45, 0.5, 1) 1s; }
.page-inner p.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }

/* ---------- journey (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; left: 20px; right: 20px; top: 19px; height: 3px; border-radius: 3px; background: var(--ribbon); opacity: 0.9; box-shadow: 0 0 18px rgba(244, 91, 31, 0.35); }
.steps li { position: relative; padding-right: 22px; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--night-lift); border: 2px solid var(--ember); color: var(--text);
  font-family: var(--script); font-weight: 700; position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--night-lift);
}
.steps li:nth-child(1) .step-n, .steps li:nth-child(2) .step-n { border-color: var(--gold); }
.steps li:nth-child(5) .step-n, .steps li:nth-child(6) .step-n { border-color: var(--magenta); }
.steps h3 { margin-top: 20px; }
.steps p { margin-top: 8px; color: var(--mist); font-size: var(--step--1); }

/* ---------- story memory ---------- */
.memory { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.memory-copy p { color: #ddd4e6; margin-top: 16px; max-width: 34em; }
.memory-demo {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: 22px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}
.kf-switch { display: flex; gap: 6px; background: rgba(0, 0, 0, 0.35); border-radius: 999px; padding: 5px; border: 1px solid var(--line); }
.kf-switch button { flex: 1; border: 0; background: none; color: var(--mist); font: 600 var(--step--1) var(--sans); padding: 9px 10px; border-radius: 999px; cursor: pointer; transition: color 0.2s; }
.kf-switch button:hover { color: var(--text); }
.kf-switch button[aria-selected="true"] { background: var(--ribbon); color: #1a0d14; box-shadow: 0 6px 18px -8px rgba(244, 91, 31, 0.8); }
.kf-cast { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.kf-cast li {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; background: rgba(15, 12, 22, 0.75); border: 1px solid var(--line);
  transition: opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.kf-cast .who { font-weight: 600; }
.kf-cast .where { display: block; color: var(--mist); font-size: var(--step--1); font-weight: 400; }
.kf-cast .age { font-family: var(--script); font-size: 1.2rem; }
.kf-cast li.dead { opacity: 0.55; border-style: dashed; }
.kf-cast li.changed { border-color: var(--ember); background: rgba(244, 91, 31, 0.07); }
.kf-check { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: var(--step--1); line-height: 1.5; background: rgba(211, 23, 95, 0.1); border: 1px solid rgba(211, 23, 95, 0.4); color: #ffc2d6; }
.kf-check.ok { background: rgba(253, 184, 19, 0.08); border-color: rgba(253, 184, 19, 0.35); color: #ffe6a8; }

/* ---------- studio ---------- */
.studio-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feat {
  position: relative; padding: 28px 28px 30px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}
.feat:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.feat-world { --accent: var(--gold); }
.feat-chat { --accent: #34d399; }
.feat-arch { --accent: var(--violet); }
.feat-review { --accent: var(--ember); }
.feat-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.feat-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat p { margin-top: 10px; color: var(--mist); max-width: 34em; }

/* ---------- for ---------- */
.for { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; }
.for-now p, .for-next p { margin-top: 12px; color: var(--mist); max-width: 32em; }
.for-next { border-left: 3px solid var(--magenta); padding-left: 22px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.plan h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan p:not(.price) { color: var(--mist); font-size: var(--step--1); flex: 1; }
.plan .price { font-family: var(--script); font-size: var(--step-2); font-weight: 700; }
.plan .price span { font-size: var(--step--1); font-weight: 400; color: var(--mist); }
.plan-main {
  background: linear-gradient(180deg, rgba(244, 91, 31, 0.1), rgba(211, 23, 95, 0.05) 60%, transparent), var(--night-2);
  border-color: rgba(244, 91, 31, 0.6);
  box-shadow: 0 30px 70px -30px rgba(244, 91, 31, 0.5);
  transform: translateY(-8px);
}
.plan-pop { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; color: #1a0d14; background: var(--ribbon); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.plan .btn { align-self: flex-start; }
.plans-note { margin-top: 22px; color: var(--mist); font-size: var(--step--1); }

/* ---------- faq ---------- */
.faq { max-width: 780px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 16px; transition: color 0.2s; }
.faq summary:hover { color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ember); font-family: var(--script); font-size: 1.5rem; line-height: 1; transition: transform 0.25s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--mist); max-width: 40em; animation: faq-in 0.3s var(--ease-out); }
.faq details a { color: var(--gold); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- closer ---------- */
.closer { text-align: center; display: grid; justify-items: center; gap: 28px; }
.closer img { height: 132px; width: auto; filter: drop-shadow(0 0 36px rgba(244, 91, 31, 0.45)); animation: drift 14s ease-in-out infinite alternate; }
.closer h2 { max-width: 16em; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 56px 0 40px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
  border-top: 1px solid var(--line); color: var(--mist); font-size: var(--step--1);
}
.foot::before { content: ""; position: absolute; top: -1px; left: 0; width: 120px; height: 1px; background: var(--ribbon); }
.foot-brand img { height: 42px; width: auto; }
.foot-brand p { margin-top: 14px; max-width: 24em; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col h4 { margin: 0 0 4px; color: var(--text); font-size: var(--step--1); font-weight: 600; }
.foot-col a { color: var(--mist); text-decoration: none; }
.foot-col a:hover, .foot-col a[aria-current="page"] { color: var(--text); }
.foot-copy { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.04); color: #8c829b; }

/* ---------- Terms & Privacy ---------- */
.legal { width: min(760px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 40px 0 96px; }
.legal .legal-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 26px; padding: 7px 14px; border-radius: 999px; color: var(--mist); text-decoration: none; font-size: var(--step--1); font-weight: 600; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.legal .legal-back:hover { color: var(--text); border-color: #57486e; }
.legal h1 { font-family: var(--script); font-size: var(--step-3); }
.legal h2 { font-family: var(--sans); font-size: var(--step-1); font-weight: 700; margin: 44px 0 12px; scroll-margin-top: 90px; }
.legal p, .legal li, .legal address { color: #ddd4e6; max-width: 40em; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 8px; }
.legal a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal address { font-style: normal; line-height: 1.7; }
.legal-meta { color: var(--mist) !important; font-size: var(--step--1); margin: 8px 0 28px; }
.legal-short { padding: 16px 18px; border-left: 3px solid var(--ember); background: var(--night-2); border-radius: 0 10px 10px 0; margin: 22px 0 !important; }
.legal-draft { padding: 12px 16px; border-radius: 10px; margin-bottom: 32px; font-size: var(--step--1); background: rgba(253, 184, 19, 0.08); border: 1px solid rgba(253, 184, 19, 0.35); color: #ffe6a8; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 8px; padding: 16px 0; border-block: 1px solid var(--line); font-size: var(--step--1); }
.legal-toc a { color: var(--mist); text-decoration: none; }
.legal-toc a:hover { color: var(--text); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .top-nav { display: none; }
  .hero, .memory, .for { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-stage { max-width: 560px; }
  .steps { grid-template-columns: 1fr 1fr 1fr; row-gap: 36px; }
  .steps::before { display: none; }
  .plans { grid-template-columns: 1fr 1fr; }
  .plan-main { transform: none; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top { gap: 12px; }
  .top-brand img, .top.scrolled .top-brand img { height: 48px; }
  .top-actions { gap: 12px; }
  .top-actions .link-quiet { display: none; }
  .hero-stage { padding: 0; }
  .beat-card { position: relative; width: 236px; left: 10px; margin-bottom: -18px; }
  .page { padding: 48px 22px 26px 28px; }
  .page-num { top: 18px; right: 18px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
  .steps li .step-n { grid-row: span 2; }
  .steps h3 { margin-top: 6px; }
  .studio-list { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .top, .js .hero-ribbon, .js .hero-glow, .js .lede, .js .hero-actions, .js .fine, .js .page, .js .page-inner p { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .js .hero-ribbon { opacity: 0.17 !important; }
  .js .hero h1 .l > span { transform: none !important; transition: none !important; }
  .js .beat-card { opacity: 1 !important; transform: rotate(-4deg) !important; transition: none !important; }
  .hero-ribbon, .closer img { animation: none; }
  .page-inner p.caret::after { animation: none; }
  .btn, .btn::after, .feat, .kf-cast li, .faq summary::after { transition: none; }
}

/* ---------- home: art behind the hero, full-width art bands, the closer's stage ---------- */
.hero-art { max-width: none; position: absolute; z-index: -4; top: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; object-fit: cover; object-position: 72% top; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.hero-shade { position: absolute; z-index: -3; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 16, 28, 0.94) 0%, rgba(20, 16, 28, 0.62) 42%, rgba(20, 16, 28, 0.2) 72%, rgba(20, 16, 28, 0.35) 100%); }
.js .hero-art { opacity: 0; }
.ready .hero-art { opacity: 1; transition: opacity 1.6s ease 0.1s; }

.art-band { padding-block: clamp(40px, 6vw, 80px) clamp(72px, 9vw, 112px); }
.ab-stage { position: relative; margin-inline: calc(50% - 50vw); min-height: clamp(380px, 33.33vw, 640px); display: flex; align-items: center; }
.ab-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); }
.art-left .ab-art { object-position: left center; }
.ab-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--night) 0%, rgba(20, 16, 28, 0.78) 28%, rgba(20, 16, 28, 0) 56%); }
.art-left .ab-stage::after { background: linear-gradient(270deg, var(--night) 0%, rgba(20, 16, 28, 0.78) 28%, rgba(20, 16, 28, 0) 56%); }
.ab-copy { position: relative; z-index: 1; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; }
.art-left .ab-copy { justify-content: flex-end; }
.ab-text { max-width: 470px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ab-kicker { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ab-kicker.violet { color: #c4b5fd; }
.ab-text h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); line-height: 1.08; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.ab-text h2 em { font-style: normal; color: var(--gold); }
.ab-text > p:not(.ab-kicker) { color: #ddd4e8; font-size: var(--step-1); line-height: 1.55; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.ab-text .btn { margin-top: 6px; }
.ab-tiles { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 12px; }
.ab-tiles .feat { padding: 24px 24px 26px; }
.ab-tiles .feat h3 { font-size: var(--step-0); line-height: 1.3; }

.closer { min-height: clamp(520px, 37.5vw, 760px); align-content: start; padding-top: clamp(56px, 6vw, 110px) !important; gap: 24px; }
.closer .closer-art { max-width: none; position: absolute; z-index: -1; top: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; object-fit: cover; object-position: center top; filter: none; animation: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent); }
.closer h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7); }
.closer h2 em { font-style: normal; color: var(--gold); }
.closer .closer-mark { height: clamp(84px, 8vw, 120px); margin-top: 4px; }

@media (max-width: 720px) {
  .ab-stage { flex-direction: column; align-items: stretch; min-height: 0; }
  .ab-art { position: relative; inset: auto; height: auto; aspect-ratio: 3 / 2; object-position: 78% center;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 70%, transparent 100%); }
  .art-left .ab-art { object-position: 22% center; }
  .ab-stage::after { display: none; }
  .ab-copy { margin-top: -36px; }
  .art-left .ab-copy { justify-content: flex-start; }
  .closer { min-height: 560px; }
  .closer .closer-art { object-position: 50% top; }
  .hero-shade { background: linear-gradient(180deg, rgba(20, 16, 28, 0.55), rgba(20, 16, 28, 0.85) 60%); }
}

/* Pictures fade in once loaded (lib-common.js fadeIn); the skeleton or the frame holds their place meanwhile */
img.fi:not(.in) { opacity: 0; }
img.fi.in { animation: fi-in 0.5s ease backwards; }
@keyframes fi-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { img.fi.in { animation: none; } }

/* A portrait's clip (lib-common clipOver): over the still, faded in while it plays */
.sf-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease, transform 0.6s var(--ease-out); pointer-events: none; }
.clip-on > .sf-clip { opacity: 1; }
