:root {
  color-scheme: dark;
  --ink: #020202;
  --carbon: #0a0a08;
  --carbon-2: #121210;
  --panel: rgba(18, 18, 16, 0.72);
  --text: #ece8e0;
  --muted: rgba(236, 232, 224, 0.65);
  --dim: rgba(236, 232, 224, 0.35);
  --faint: rgba(236, 232, 224, 0.12);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --brand: #c97a4a;
  --brand-soft: rgba(201, 122, 74, 0.1);
  --paper: #ece8e0;
  --radius: 8px;
  --radius-lg: 16px;
  --max: 1180px;
  --display: "Geist", "Noto Sans SC", sans-serif;
  --body: "Geist", "Noto Sans SC", sans-serif;
  --font-body: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-heavy: 800;
  --leading-body: 1.65;
  --leading-zh: 1.8;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  min-width: 320px;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: var(--leading-body);
  font-weight: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

html[lang="zh-CN"] body {
  font-family: "Noto Sans SC", "Geist", sans-serif;
  line-height: var(--leading-zh);
}

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

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

.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;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#light-rays {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.site-shell {
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

/* ===== Floating language switch ===== */

.lang-floating {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 50;
}

/* ===== Topbar (unused) ===== */

.language-switch {
  position: relative;
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: var(--slider-x, 4px);
  width: var(--slider-w, 38px);
  background: rgba(236, 232, 224, 0.12);
  border-radius: 999px;
  transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
}

.language-switch.no-anim::after {
  transition: none;
}

.language-switch button {
  position: relative;
  z-index: 1;
  border: 0;
  color: var(--dim);
  background: transparent;
  height: 30px;
  min-width: 36px;
  border-radius: 999px;
  font: var(--font-medium) 12px/1 var(--body);
  cursor: pointer;
  transition: color 0.25s ease;
}

.language-switch button.active {
  color: var(--text);
}

/* ===== Full Page ===== */

.full-page {
  width: 100%;
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding-top: 36px; /* leave space for floating language switch */
  padding-bottom: 32px;
}

.full-page#top {
  justify-content: flex-start;
  padding-top: 6vh;
}

/* ===== Page 1: Hero + Screenshots ===== */

.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px 28px;
}

.hero-body {
  width: 100%;
  max-width: var(--max);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.hero-text {
  max-width: 640px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: var(--font-medium);
  color: var(--muted);
  margin-bottom: 20px;
}
.kicker .brand-name {
  font-weight: var(--font-semibold);
  color: var(--text);
  letter-spacing: 0.02em;
}
/* App title - continuous text with shimmer sweep (replaces TrueFocus span split for Google brand verification) */
.app-title {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    110deg,
    var(--text) 38%,
    #ff9030 50%,
    var(--text) 62%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: title-sweep 3s linear infinite;
}

@keyframes title-sweep {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5bbd5e;
  box-shadow: 0 0 8px rgba(91, 189, 94, 0.5);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

h1 {
  font-size: clamp(48px, 9vw, 80px);
  font-family: var(--display);
  font-weight: var(--font-heavy);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
  position: relative;
  cursor: default;
}

h1:hover .focus-word {
  filter: url(#mosaic);
  animation-play-state: paused;
}

/* TrueFocus effect on hero title */
#hero-title {
  position: relative;
}

.true-focus {
  display: inline-flex;
  gap: 0.02em;
  align-items: baseline;
}

.focus-word {
  display: inline-block;
  color: var(--text);
  filter: blur(2px);
  transition: opacity 0.6s ease, filter 0.6s ease;
  opacity: 0.55;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .focus-word {
    background: linear-gradient(
      90deg,
      var(--text) 0%,
      var(--text) 40%,
      rgba(255, 255, 255, 0.9) 50%,
      var(--text) 60%,
      var(--text) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3.5s ease-in-out infinite;
  }
}

.focus-word.clear {
  opacity: 1;
  filter: blur(0);
}

.focus-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.focus-frame.visible {
  opacity: 1;
}

.corner {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #ff9030;
  filter: drop-shadow(0 0 6px #ff6a00);
  border-radius: 2px;
}

.top-left {
  top: -8px;
  left: -8px;
  border-right: none;
  border-bottom: none;
}

.top-right {
  top: -8px;
  right: -8px;
  border-left: none;
  border-bottom: none;
}

.bottom-left {
  bottom: -8px;
  left: -8px;
  border-right: none;
  border-top: none;
}

.bottom-right {
  bottom: -8px;
  right: -8px;
  border-left: none;
  border-top: none;
}

@media (prefers-reduced-motion: reduce) {
  .focus-word {
    filter: none;
    opacity: 1;
  }
  .focus-frame {
    display: none;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.hero-lead {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

html[lang="zh-CN"] .hero-lead {
  font-size: 20px;
}

.hero-actions {
  display: flex;
  justify-content: center;
}

.primary-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffaa61 0%, #ff6a00 100%);
  color: #fff;
  font-size: 15px;
  font-weight: var(--font-bold);
  transition: filter 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.primary-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: translateX(-180%) skewX(-20deg);
  animation: sweep 2.8s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes sweep {
  0% {
    transform: translateX(-180%) skewX(-20deg);
  }
  100% {
    transform: translateX(220%) skewX(-20deg);
  }
}

.primary-cta > * {
  position: relative;
  z-index: 1;
  transform: translateX(-1px);
}

.primary-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-cta svg {
  transition: transform 0.2s ease;
}

.primary-cta:hover svg {
  transform: translateX(3px);
}

.primary-cta span {
  margin-left: -4px;
}

/* ===== Screenshots on page 1 — Coverflow carousel */
.screenshots {
  padding: 48px 12px 0;
}

.screenshot-row {
  position: relative;
  height: clamp(260px, 46vh, 540px);
  max-width: 1600px;
  margin: 0 auto;
  perspective: 1600px;
  overflow: hidden;
  --shift: 70%;
}

.screenshot-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(46vw, 73.6vh, 820px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--carbon-2);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) scale(0.8) rotateY(0deg);
  transform-origin: center center;
  transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.2, 1),
    opacity 0.6s ease;
  opacity: 0.42;
  will-change: transform, opacity;
}

.screenshot-item.is-center {
  transform: translate(-50%, -50%) scale(1) rotateY(0deg);
  opacity: 1;
  z-index: 3;
}

.screenshot-item.is-side-left {
  transform: translate(calc(-50% - var(--shift, 70%)), -50%) scale(0.82)
    rotateY(32deg);
  opacity: 0.4;
  z-index: 1;
}

.screenshot-item.is-side-right {
  transform: translate(calc(-50% + var(--shift, 70%)), -50%) scale(0.82)
    rotateY(-32deg);
  opacity: 0.4;
  z-index: 1;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 800;
  display: block;
}

/* Prevent the initial coverflow "pop" on page load. The first JS render
   toggles classes while this attribute is present; transitions stay off
   until the initial layout is stable. */
.screenshot-row[data-initial="true"] .screenshot-item {
  transition: none !important;
}

/* ===== Page 2: Only Video ===== */

.hero-media {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.hero-media .video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1180px;
}

.hero-media video {
  width: 100%;
  max-width: 1180px;
  border-radius: var(--radius-lg);
  background: var(--carbon-2);
  display: block;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.mute-toggle {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 8, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mute-toggle:hover {
  background: rgba(10, 10, 8, 0.88);
  border-color: var(--line-strong);
}

.mute-toggle svg.icon-mute {
  display: none;
}

.mute-toggle[data-muted="true"] svg.icon-mute {
  display: block;
}

.mute-toggle[data-muted="true"] svg.icon-volume {
  display: none;
}

/* ===== Analysis banner ===== */
.analysis-banner {
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  margin: 0 0 20px;
  display: flex;
  justify-content: center;
}

.analysis-banner img {
  max-width: 100%;
  max-width: 880px;
  max-height: clamp(240px, 30vh, 300px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ===== Features ===== */

.features {
  padding: 0 max(24px, calc((100vw - var(--max)) / 2)) 0;
  background: transparent;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
}

.feature-grid article {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 30px 24px;
  background: var(--carbon);
  transition: background 0.25s ease;
}

.feature-grid article:hover {
  background: var(--carbon-2);
}

.feat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-top: 2px;
}

.feat-body {
  flex: 1;
  min-width: 0;
}

.feat-body h3 {
  font-size: 14px;
  font-weight: var(--font-semibold);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.feat-body p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.features-expand {
  display: none;
}

/* ===== Install ===== */

.install {
  padding: 24px max(24px, calc((100vw - var(--max)) / 2)) 0;
  background: transparent;
}

.install-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.install-info img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

.install-info div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.install-info strong {
  font-size: 14px;
  font-weight: var(--font-semibold);
}

.install-info span {
  font-size: 13px;
  color: var(--muted);
  font-weight: var(--font-body);
  overflow-wrap: anywhere;
}

.install-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--font-semibold);
  transition: opacity 0.2s ease;
}

.install-badge:hover {
  opacity: 0.85;
}

.install-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.install-badge.primary-cta {
  height: 46px;
  padding: 0 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffaa61 0%, #ff6a00 100%);
  color: #fff;
  font-size: 14px;
  font-weight: var(--font-bold);
}

.install-badge.primary-cta svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.privacy-note {
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(236, 232, 224, 0.40);
  letter-spacing: 0.02em;
}

/* ===== Reveal animation ===== */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Responsive: ≤ 560px ===== */

@media (max-width: 560px) {
  .site-shell {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  .full-page {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    min-height: auto;
    justify-content: flex-start;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .topbar {
    top: 10px;
    width: calc(100% - 20px);
    height: 52px;
    padding-left: 10px;
    gap: 12px;
  }

  .brand span {
    display: none;
  }

  .nav {
    display: none;
  }

  .install-link {
    min-width: 68px;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .language-switch button {
    height: 26px;
    min-width: 32px;
    font-size: 11px;
  }

  .full-page {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .full-page#top {
    padding-top: 56px;
    padding-bottom: 12px;
  }

  .full-page#demo {
    padding-top: 12px;
  }

  .lang-floating {
    top: 12px;
    right: 14px;
  }

  .hero {
    flex: 0 0 auto;
    padding: 0 20px 28px;
  }

  .kicker {
    font-size: 12px;
    margin-bottom: 24px;
  }

  h1 {
    font-size: clamp(44px, 15vw, 76px);
    margin-bottom: 14px;
  }

  .hero-lead {
    font-size: 17px;
    margin-bottom: 28px;
  }

  html[lang="zh-CN"] .hero-lead {
    font-size: 18px;
  }

  .primary-cta {
    height: 46px;
    padding: 0 24px;
    font-size: 14px;
  }

  .screenshots {
    padding: 8px 12px 0;
  }

  .screenshot-row {
    --shift: 60%;
    height: clamp(200px, 34vh, 300px);
  }

  .screenshot-item {
    width: min(78vw, 360px);
  }

  .features {
    padding: 0 20px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    padding: 20px;
  }

  .feature-grid:not(.expanded) article:nth-of-type(n + 5) {
    display: none;
  }

  .features-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    border: 0;
    background: var(--carbon);
    color: var(--muted);
    font: var(--font-medium) 13px/1 var(--body);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .features-expand:hover {
    background: var(--carbon-2);
    color: var(--text);
  }

  .feature-grid.expanded .features-expand {
    display: none;
  }

  .install {
    padding: 20px 20px 12px;
  }

  .install-inner {
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
  }

  .install-info {
    display: none;
  }

  .install-badge {
    width: 100%;
    justify-content: center;
  }

  .install-badge.primary-cta:hover svg {
    transform: none;
  }

  .privacy-note {
    padding: 0 20px;
    margin-top: 8px;
  }

  .mute-toggle {
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
}
