/* ============================================================
   Hongyi · AI Music Video Studio
   Design direction: "Projector glow" — a dark screening room lit
   by warm projector light. Signature = the bilingual subtitle bar.
   Palette: deep aubergine-ink + warm projector gold + music rose.
   ============================================================ */

:root {
  /* Softer dark, not pure black (avoids halation; better readability).
     Text contrast on --ink verified ≥ WCAG AA — see README「排版与配色规范」. */
  --ink:        #1B1826;   /* main background — lifted dark plum, not black */
  --ink-2:      #252131;   /* raised panels */
  --ink-3:      #322D40;   /* hover / borders */
  --deep:       #14111C;   /* deepest backdrop (behind players) */
  --gold:       #EAB65B;   /* projector light — primary accent */
  --gold-soft:  #F4CE87;
  --rose:       #E86C8D;   /* music / emotion — secondary accent */
  --cream:      #F5F0E8;   /* warm off-white text (not pure white) */
  --muted:      #CBC5D4;   /* secondary text — ~8.5:1 on --ink */
  --muted-2:    #A9A1B5;   /* captions — ~5.6:1 on --ink */
  --line:       rgba(245, 240, 232, 0.13);
  --line-2:     rgba(245, 240, 232, 0.22);

  --font-display: "Fraunces", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --font-cjk-display: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "Fraunces", serif;
  --font-body: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", "Menlo", monospace;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 18px;          /* body ≥16px best practice; 18px for landing-page readability */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Faint film-grain / vignette over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(230, 178, 76, 0.06), transparent 60%),
    radial-gradient(90% 60% at 100% 110%, rgba(224, 86, 122, 0.05), transparent 55%);
}

img, iframe { max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(230, 178, 76, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Shared type helpers ---------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
:lang(zh) .eyebrow, [data-lang-active="zh"] .eyebrow { letter-spacing: 0.16em; }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

.section-sub {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 0.6em 1.1em; font-size: 0.9rem; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #241a08;
  box-shadow: 0 8px 30px -8px rgba(230, 178, 76, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(230, 178, 76, 0.7); }

.btn-ghost {
  background: rgba(245, 239, 227, 0.03);
  border-color: var(--line-2);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); transform: translateY(-2px); }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--pad);
  background: rgba(27, 24, 38, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--cream); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.footer-brandword { align-items: center; }
.footer-logo { height: 40px; }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.18s ease;
  position: relative;
}
.nav a:hover { color: var(--cream); }

.topbar-right { display: flex; align-items: center; gap: 0.9rem; margin-left: 1rem; }

/* CC-style language switch — a nod to subtitle tracks */
.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  padding: 0.32em 0.7em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.lang-btn[aria-pressed="true"] { background: var(--gold); color: #241a08; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: min(92vh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3rem, 10vh, 7rem) var(--pad) clamp(3rem, 7vh, 5rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Projector beam — slow, warm, drifting */
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: 0;
  background:
    radial-gradient(50% 55% at 50% 8%, rgba(230, 178, 76, 0.30), transparent 60%),
    radial-gradient(40% 50% at 72% 30%, rgba(224, 86, 122, 0.16), transparent 60%),
    radial-gradient(45% 45% at 25% 40%, rgba(120, 90, 220, 0.12), transparent 60%);
  filter: blur(6px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.9; }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); opacity: 1; }
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero-inner { position: relative; z-index: 2; max-width: 860px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
}
.hero-title .line { display: block; }
.hero-title .line-em {
  font-style: italic;
  color: var(--gold-soft);
}
:lang(zh) .hero-title .line-em { font-style: normal; }

/* Signature: the subtitle bar */
.subtitle-bar {
  display: inline-block;
  position: relative;
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  color: var(--cream);
  background: rgba(8, 7, 12, 0.55);
  padding: 0.55em 1.15em;
  border-radius: 6px;
  margin: 0 auto 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  box-shadow: inset 0 0 0 1px var(--line);
}
.subtitle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.65rem;
  width: 44px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--gold);
  opacity: 0.8;
}

/* Film-slate metadata */
.slate {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  margin: 0 0 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.slate-item { display: inline-flex; align-items: baseline; gap: 0.45em; }
.slate-k { text-transform: uppercase; color: var(--muted-2); font-size: 0.78rem; letter-spacing: 0.14em; }
.slate-v { color: var(--cream); }
.slate-v.price { color: var(--gold-soft); }
.slate-dot { color: var(--muted-2); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; margin-bottom: 1.7rem; }

.hero-note {
  color: var(--muted-2);
  font-size: 0.98rem;
  max-width: 40ch;
  margin: 0 auto;
}

/* ============================================================
   Generic section
   ============================================================ */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 8rem) var(--pad);
  border-bottom: 1px solid var(--line);
}
.section-head { text-align: center; margin: 0 auto clamp(2.5rem, 6vh, 4rem); }

/* ============================================================
   Demos
   ============================================================ */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 2.2rem);
}

.demo-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.demo-card:hover { border-color: var(--line-2); transform: translateY(-3px); }

.demo-card-head { display: flex; align-items: center; gap: 0.7rem; margin: 0.2rem 0.2rem 1rem; }
.track-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28em 0.6em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.track-yt { color: #ff6b6b; }
.track-bili { color: #4fc4e8; }
.demo-card-title { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; margin: 0; }

/* 16:9 responsive frame */
.frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--deep);
  border: 1px solid var(--line);
}
.frame-16x9 { aspect-ratio: 16 / 9; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.frame-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.frame-linkcard {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--cream);
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(79, 196, 232, 0.12), transparent 70%),
    var(--deep);
  transition: background 0.25s ease;
}
.frame-linkcard:hover { background: radial-gradient(70% 70% at 50% 40%, rgba(79, 196, 232, 0.2), transparent 70%), var(--deep); }
.frame-linkcard-play { color: #4fc4e8; }
.frame-linkcard-text { font-size: 1rem; color: var(--muted); }

.demo-open {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 1rem 0.2rem 0.2rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.18s ease, gap 0.18s ease;
}
.demo-open:hover { color: var(--gold-soft); gap: 0.7em; }
.demo-open .arrow { transition: transform 0.18s ease; }

/* ============================================================
   Offer
   ============================================================ */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  margin-bottom: clamp(2rem, 5vh, 3rem);
}
.stat {
  text-align: center;
  padding: clamp(1.6rem, 4vw, 2.4rem) 1rem;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-price { border-color: rgba(230, 178, 76, 0.35); box-shadow: inset 0 0 40px -20px rgba(230, 178, 76, 0.6); }
.stat-v {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-price .stat-v { color: var(--gold-soft); }
.stat-k { color: var(--muted); font-size: 0.98rem; letter-spacing: 0.02em; }

.included {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(245, 239, 227, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.2rem);
}
.included-title { font-weight: 600; margin: 0 0 1rem; color: var(--cream); }
.included-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.included-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--muted);
}
.included-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.75rem;
  height: 0.42rem;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* ============================================================
   How it works
   ============================================================ */
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  counter-reset: none;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.3rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; }
.step-n {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--gold);
  padding-top: 0.15rem;
  min-width: 2.2rem;
}
.step-t { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin: 0 0 0.35rem; }
.step-d { color: var(--muted); margin: 0; }

/* ============================================================
   Start / Form
   ============================================================ */
.form-wrap { max-width: 760px; margin: 0 auto; }
.form-frame {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
}
/* white backdrop only when a real (white) Google Form iframe is embedded */
.form-frame:has(iframe) { background: #fff; }
.form-frame iframe { display: block; width: 100%; min-height: 1000px; border: 0; }
.form-fallback {
  display: grid;
  place-items: center;
  gap: 1.2rem;
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--cream);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  min-height: 300px;
}
.form-fallback p { color: var(--muted); margin: 0; max-width: 40ch; }
.form-actions { display: flex; justify-content: center; margin-top: 1.2rem; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--cream);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-a {
  color: var(--muted);
  padding: 0 2.5rem 1.2rem 0;
  max-width: 60ch;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 4.5rem) var(--pad) 2.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand .brand-word { font-size: 1.5rem; }
.footer-tag { color: var(--muted); margin: 0.6rem 0 0; max-width: 34ch; font-size: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer-links a { color: var(--muted); font-size: 1rem; transition: color 0.18s ease; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
  margin-top: 1.5rem;
  color: var(--muted-2);
  font-size: 0.86rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .nav { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
  .topbar-right { margin-left: auto; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand-word { font-size: 1.2rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .step { grid-template-columns: 1fr; gap: 0.4rem; }
  .step-n { padding-top: 0; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .demo-card, .demo-open, .nav a { transition: none; }
}
