/* Nocturne tokens carried over from the Hopp homepage design. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;
  --color-accent-300: #d2cefd;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-section: #262a60;
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", system-ui, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --color-bg: #f3f5fe;
  --color-surface: #e9ebf6;
  --color-text: #1d1f2e;
  --color-accent: #6a5db3;
  --color-divider: color-mix(in srgb, #1d1f2e 14%, transparent);
  --color-neutral-100: #292b31;
  --color-neutral-200: #3f424d;
  --color-neutral-300: #595d6c;
  --color-neutral-400: #75798c;
  --color-neutral-600: #b2b6ca;
  --color-neutral-700: #cfd3e5;
  --color-neutral-800: #e4e7f5;
  --color-neutral-900: #eef0fa;
  --color-accent-300: #5d5294;
  --color-accent-600: #b5abfc;
  --color-accent-700: #d2cefd;
  --color-section: #dfe2f8;
  --shadow-lg: 0 20px 50px color-mix(in srgb, #1d1f2e 16%, transparent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}
img, video { display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-300); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

h1, h2 { font-weight: 500; margin: 0; }
:lang(zh) h1, :lang(zh) h2, :lang(ja) h1, :lang(ja) h2 { letter-spacing: -0.01em !important; }

/* Navigation */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px 20px;
  padding: 14px clamp(20px, 4vw, 40px);
  font-size: 13px;
}
.nav-link { color: var(--color-neutral-200); }
.nav-download { color: var(--color-text); display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: none; }

.lang-menu { position: relative; color: var(--color-neutral-200); }
.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--color-neutral-700);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.lang-menu li a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--color-text);
}
.lang-menu li a:hover { background: color-mix(in srgb, var(--color-accent) 16%, transparent); }
.lang-menu li a[aria-current="page"] { color: var(--color-accent); }

/* Layout */
.page { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

.hero, .closing, .problem, .feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero { padding: 40px 0 48px; }
.wordmark { font-weight: 500; font-size: 20px; margin-top: 6px; }
h1 {
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 24px;
}
.hero-sub {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.4;
  margin: 18px 0 0;
  color: var(--color-neutral-200);
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.closing .actions { margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-secondary { color: var(--color-text); border-color: var(--color-divider); }
.btn-secondary:hover { color: var(--color-text); background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--color-neutral-300);
}

/* Video panels */
.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  width: 100%;
  padding: clamp(16px, 4vw, 56px);
  overflow: hidden;
  border: 1px solid var(--color-neutral-800);
  border-radius: 20px;
}
.panel-lead {
  background:
    radial-gradient(900px 500px at 50% 110%, color-mix(in srgb, var(--color-accent-600) 45%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-neutral-900), var(--color-section));
}
.panel-top {
  margin-top: 40px;
  background:
    radial-gradient(800px 480px at 20% -10%, color-mix(in srgb, var(--color-accent-700) 50%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-section), var(--color-neutral-900));
}
.panel-bottom {
  margin-top: 40px;
  background:
    radial-gradient(800px 480px at 80% 110%, color-mix(in srgb, var(--color-accent-700) 50%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-neutral-900), var(--color-section));
}
.panel-title {
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-align: center;
}
.demo {
  width: 100%;
  max-width: 1080px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

/* Problem */
.problem { padding-top: 120px; }
.problem-title {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-accent);
}
.dock {
  display: flex;
  gap: 10px;
  max-width: 100%;
  margin-top: 48px;
  padding: 14px;
  border: 1px solid var(--color-neutral-700);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-neutral-700) 60%, transparent);
}
.tile {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 1 64px;
  border: 1px solid var(--color-neutral-700);
  border-radius: 15px;
  background: var(--color-neutral-800);
  color: var(--color-neutral-100);
  font-size: 26px;
  font-weight: 600;
}
.tile-active { background: var(--color-neutral-600); border-color: var(--color-neutral-400); }
.note { margin: 18px 0 0; font-size: 14px; color: var(--color-neutral-300); }
.better { margin: 120px 0 0; font-size: 16px; color: var(--color-neutral-200); }
.closing .note { font-size: 13px; }

/* Features */
.feature { padding-top: 140px; }
.problem + .feature { padding-top: 72px; }
.feature h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.sub { margin: 12px 0 0; font-size: 16px; color: var(--color-neutral-300); }
.sub-wide { max-width: 52ch; line-height: 1.6; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  width: min(880px, 100%);
  margin-top: 40px;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px;
  border-radius: 8px;
  background: var(--color-surface);
}
.card-title { font-size: 24px; font-weight: 500; line-height: 1.25; }
.card-body { font-size: 13.5px; opacity: 0.8; }

/* FAQ */
.faq { display: flex; flex-direction: column; align-items: center; padding-top: 160px; }
.faq h2 {
  margin-bottom: 48px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
}
.faq-list { display: flex; flex-direction: column; gap: 6px; width: min(720px, 100%); }
.faq-list details { padding: 16px 20px; border-radius: 8px; background: var(--color-surface); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list h3 { margin: 0; font: inherit; }
.faq-list p { margin: 12px 0 2px; font-size: 14.5px; line-height: 1.7; color: var(--color-neutral-200); }
.faq-chev { flex: none; color: var(--color-neutral-300); transition: transform 160ms ease; }
details[open] .faq-chev { transform: rotate(180deg); }

/* Closing and footer */
.closing { padding: 160px 0 96px; }
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 48px;
  font-size: 12px;
  text-align: center;
  color: var(--color-neutral-400);
}
.footer a { color: var(--color-neutral-300); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-chev { transition: none; }
}
