@import url('https://fonts.googleapis.com/css2?family=Jersey+20&family=Space+Mono:wght@400;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --bg: #f8f4ff;
  --surface: #fffdfc;
  --text: #2c2340;
  --muted: #6b6182;
  --accent: #543D71;
  --accent-soft: rgba(84, 61, 113, 0.14);
  --line: rgba(84, 61, 113, 0.16);
  --line-strong: rgba(84, 61, 113, 0.28);
  --max-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 360px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

body.mode-zh {
  font-family: 'Noto Sans SC', sans-serif;
}

body.mode-en {
  font-family: 'Space Mono', monospace;
}

body.mode-zh .display,
body.mode-zh .brand-wordmark {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 900;
}

body.mode-en .display,
body.mode-en .brand-wordmark {
  font-family: 'Jersey 20', sans-serif;
  letter-spacing: 0.04em;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
a,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid rgba(84, 61, 113, 0.6);
  outline-offset: 3px;
}

[data-lang] {
  display: none;
}

body.mode-zh .lang-block[data-lang='zh'],
body.mode-en .lang-block[data-lang='en'] {
  display: block;
}

body.mode-zh .lang-inline[data-lang='zh'],
body.mode-en .lang-inline[data-lang='en'] {
  display: inline;
}

body.mode-zh .lang-flex[data-lang='zh'],
body.mode-en .lang-flex[data-lang='en'] {
  display: flex;
}

.site-shell {
  min-height: 100dvh;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 244, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 -1px 0 var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: fade-up-scale 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-copy {
  min-width: 0;
}

.brand-wordmark {
  font-size: 1.38rem;
  line-height: 1;
  color: var(--accent);
}

.brand-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  opacity: 0.82;
  transition: color 160ms ease-out, transform 160ms ease-out, opacity 160ms ease-out;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease-out;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  opacity: 1;
}

.brand:hover img {
  transform: translateY(-2px) rotate(-3deg) scale(1.06);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 42px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  transition: color 160ms ease-out, transform 160ms ease-out, opacity 160ms ease-out;
  transform-origin: center;
}

.language-toggle:hover,
.menu-toggle:hover {
  color: var(--accent);
}

.language-toggle:active,
.menu-toggle:active {
  transform: scale(0.97);
}

.menu-toggle {
  display: none;
  padding: 0;
  font-size: 1.2rem;
}

.mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  grid-template-rows: 1fr;
}

.mobile-menu > .mobile-menu-panel {
  min-height: 0;
  padding: 0 0 0 56px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 250ms ease-out 80ms, transform 250ms cubic-bezier(0.16, 1, 0.3, 1) 80ms;
}

.mobile-menu.open > .mobile-menu-panel {
  padding: 10px 0 18px 56px;
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-panel {
  display: grid;
  gap: 14px;
  padding-left: 56px;
}

.stack {
  display: grid;
  gap: 12px;
}

.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  transition: transform 160ms ease-out, opacity 160ms ease-out, color 160ms ease-out, text-decoration-color 160ms ease-out;
  transform-origin: center;
}

.button-ghost {
  color: var(--muted);
}

.button:hover,
.button-ghost:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.button:active,
.button-ghost:active {
  transform: scale(0.97);
}

.button-disabled,
.pending-note {
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.poster-hero {
  padding: 78px 0 26px;
}

.poster-hero .container {
  width: min(calc(100% - 40px), 1040px);
}

.poster-kicker,
.section-kicker,
.page-kicker,
.text-label,
.product-row-label,
.meta-label {
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.poster-title {
  margin: 14px 0 0;
  max-width: 13ch;
  font-size: clamp(2.2rem, 5.3vw, 5.1rem);
  line-height: 0.99;
  color: var(--accent);
  text-wrap: balance;
}

body.mode-zh .poster-title,
body.mode-zh .page-title,
body.mode-zh .product-row-title {
  letter-spacing: -0.04em;
}

body.mode-zh .poster-title,
body.mode-zh .page-title {
  line-height: 1.09;
}

.poster-copy {
  max-width: 54ch;
  margin: 22px 0 0;
  font-size: clamp(1.04rem, 1.55vw, 1.18rem);
  line-height: 1.9;
  color: var(--text);
  text-wrap: pretty;
}

.poster-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  align-items: center;
}

.poster-note,
.page-summary,
.section-copy,
.footer-note,
.meta-copy,
.product-row-copy,
.product-row-summary {
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.82;
  text-wrap: pretty;
}

.poster-note {
  max-width: 62ch;
  margin-top: 18px;
  font-size: 0.98rem;
}

.product-index {
  padding: 20px 0 44px;
}

.product-rows {
  margin-top: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px 0 24px;
  box-shadow: inset 0 -1px 0 var(--line);
  transition: opacity 200ms ease-out, transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease-out;
  transform-origin: center;
}

.product-row:first-child {
  box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}

.product-row > div,
.product-row-summary,
.product-row-title {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), color 300ms ease-out, opacity 200ms ease-out;
}

.product-row:hover {
  opacity: 1;
}

.product-row:hover > div,
.product-row:hover .product-row-summary {
  transform: translateX(4px);
}

.product-row:hover .product-row-summary {
  color: var(--text);
}

.product-row:active {
  transform: scale(0.995);
}

.product-row-title {
  margin: 8px 0 0;
  color: var(--accent);
  max-width: 18ch;
  font-size: clamp(1.26rem, 2.4vw, 2.05rem);
  line-height: 1.06;
  text-wrap: balance;
}

.product-row-link {
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero {
  padding: 62px 0 18px;
}

.page-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.88fr);
  gap: 36px;
  align-items: start;
}

.page-title {
  margin: 14px 0 0;
  max-width: 13ch;
  font-size: clamp(2.6rem, 4.25vw, 4.4rem);
  line-height: 1.01;
  color: var(--accent);
  text-wrap: balance;
}

.page-summary {
  margin: 20px 0 0;
  max-width: 44ch;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.84;
}

.page-meta {
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: 6px;
}

.meta-block {
  padding-top: 12px;
  box-shadow: inset 0 1px 0 var(--line);
}

.meta-copy {
  margin: 8px 0 0;
}

.page-stream {
  padding: 12px 0 48px;
}

.text-section {
  padding: 22px 0 24px;
  box-shadow: inset 0 1px 0 var(--line);
}

.page-stream .text-section:last-child {
  box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}

.text-section-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.text-section-title {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.42rem, 2.2vw, 2.08rem);
  line-height: 1.14;
  color: var(--accent);
  text-wrap: balance;
}

.section-copy {
  margin: 14px 0 0;
}

.bullet-stream,
.link-stream {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.bullet-stream li,
.link-stream li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.82;
}

.bullet-stream li::before,
.link-stream li::before {
  content: '/';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

.site-footer {
  margin-top: 0;
  padding: 22px 0 36px;
  background: none;
  box-shadow: inset 0 1px 0 var(--line);
}

.footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-note {
  max-width: 42ch;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  transition: color 160ms ease-out, opacity 160ms ease-out, transform 160ms ease-out;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Answer-first intro (index hero) ── */

.poster-intro {
  max-width: 62ch;
  margin: 16px 0 0;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.96rem;
  line-height: 1.82;
  color: var(--text);
  text-wrap: pretty;
}

/* ── FAQ section ── */

.faq-section {
  padding: 32px 0 48px;
}

.faq-list {
  margin-top: 16px;
}

.faq-item {
  padding: 16px 0;
  box-shadow: inset 0 1px 0 var(--line);
}

.faq-item:last-child {
  box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}

.faq-question {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}

details[open] > .faq-question::after {
  content: '\2212';
}

.faq-answer {
  margin-top: 10px;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.82;
  text-wrap: pretty;
}

/* ── Freshness date ── */

.freshness-date {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .page-hero-layout,
  .product-row {
    grid-template-columns: 1fr;
  }

  .product-row {
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-actions .button {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .footer-row {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .header-row {
    min-height: 74px;
  }

  .mobile-menu > .mobile-menu-panel {
    padding-left: 0;
  }

  .mobile-menu.open > .mobile-menu-panel {
    padding-left: 0;
  }

  .poster-hero {
    padding-top: 56px;
  }

  .poster-title,
  .page-title,
  .product-row-title,
  .text-section-title {
    max-width: none;
  }

  .poster-copy,
  .poster-note,
  .page-summary {
    max-width: none;
  }

  .poster-actions,
  .inline-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Keyframes ── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up-scale {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes title-reveal {
  from { opacity: 0; transform: translateY(60px) scale(0.94); clip-path: inset(100% 0 0 0); }
  to   { opacity: 1; transform: translateY(0) scale(1); clip-path: inset(0 0 0 0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes kicker-line {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes row-enter {
  from { opacity: 0; transform: translateX(-32px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes row-enter-alt {
  from { opacity: 0; transform: translateX(32px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Hero entrance (cinematic stagger) ── */

.poster-kicker {
  position: relative;
  animation: fade-up 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 100ms;
}

.poster-kicker::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: kicker-line 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 500ms;
}

.poster-title {
  animation: title-reveal 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 250ms;
}

.poster-copy {
  animation: fade-up-scale 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 500ms;
}

.poster-note {
  animation: slide-in-right 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 700ms;
}

/* ── Section kicker ── */

.section-kicker {
  position: relative;
  animation: fade-up 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 100ms;
}

.section-kicker::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: kicker-line 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 400ms;
}

/* ── Product rows — alternating slide directions ── */

.product-row {
  opacity: 0;
  transform: translateX(-32px) scale(0.98);
}

.product-row:nth-child(even) {
  transform: translateX(32px) scale(0.98);
}

/* Enhanced hover: lift + accent border */
.product-row:hover {
  opacity: 1;
  box-shadow: inset 3px 0 0 var(--accent), inset 0 -1px 0 var(--line);
}

.product-row:first-child:hover {
  box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}

.product-row:hover > div,
.product-row:hover .product-row-summary {
  transform: translateX(8px);
}

.product-row:hover .product-row-title {
  color: var(--text);
}

/* ── Footer ── */

.site-footer {
  opacity: 0;
}

/* ── Scroll-driven (modern browsers) ── */

@supports (animation-timeline: view()) {
  .product-row {
    animation: row-enter 1ms linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  .product-row:nth-child(even) {
    animation-name: row-enter-alt;
  }

  .site-footer {
    animation: fade-up 1ms linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 50%;
  }
}

/* ── Fallback (no scroll-timeline support) ── */

@supports not (animation-timeline: view()) {
  .product-row:nth-child(odd) {
    animation: row-enter 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .product-row:nth-child(even) {
    animation: row-enter-alt 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .product-row:nth-child(1) { animation-delay: 500ms; }
  .product-row:nth-child(2) { animation-delay: 640ms; }
  .product-row:nth-child(3) { animation-delay: 780ms; }
  .product-row:nth-child(4) { animation-delay: 920ms; }
  .product-row:nth-child(5) { animation-delay: 1060ms; }

  .site-footer {
    animation: fade-up 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 1200ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
}
