/* ==========================================================================
   Tigris — official website
   Independent open-source project. Not affiliated with Apple.
   ========================================================================== */

:root {
  --ink: #070a10;
  --ink-1: #0a0e15;
  --ink-2: #0d131c;
  --ink-3: #121a25;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7fb;
  --text-soft: #d7dbe2;
  --muted: #a9b3c2;
  --muted-dim: #7d8797;
  --gold: #b9d4ff;
  --gold-deep: #8fb0ea;
  --sea: #86d6c6;
  --glass: rgba(20, 27, 38, 0.62);
  --glass-hi: rgba(255, 255, 255, 0.07);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-tv: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

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

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.4rem);
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(185, 212, 255, 0.28);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: #14100a;
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }
}

/* ---------- shared atoms ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.lede {
  font-size: clamp(1.02rem, 1.45vw, 1.18rem);
  color: var(--muted);
  line-height: 1.8;
  max-width: 62ch;
}

.section {
  position: relative;
  padding: clamp(72px, 10vw, 132px) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head p {
  margin-top: 18px;
}

.btn {
  --btn-bg: var(--text);
  --btn-fg: #0b0e14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: linear-gradient(180deg, #ffffff, #dfe8f7);
  color: #0a0f18;
  box-shadow: 0 12px 34px -12px rgba(185, 212, 255, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.btn-primary:focus-visible {
  outline-color: #fff;
  outline-offset: 3px;
}

.btn-primary:hover {
  box-shadow: 0 18px 42px -12px rgba(185, 212, 255, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 10px var(--sea);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(7, 10, 16, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(22px) saturate(140%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand span {
  color: var(--text);
}

.brand em {
  font-style: normal;
  color: var(--muted-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 0.89rem;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-lang {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 6px;
}

.nav-lang:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 17px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  content: "";
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle span::before {
  transform: translateY(-6px);
}

.nav-toggle span::after {
  transform: translateY(4.5px);
}

.site-header.is-open .nav-toggle span {
  background: transparent;
}

.site-header.is-open .nav-toggle span::before {
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle span::after {
  transform: translateY(-1.5px) rotate(-45deg);
}

.nav-mobile-cta,
.nav-mobile-note {
  display: none;
}

@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
  }

  .site-header.is-open {
    background: #070a10;
    backdrop-filter: none;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    z-index: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 18px 24px 40px;
    background: #070a10;
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 1.08rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-cta .btn {
    display: none;
  }

  .nav-lang {
    margin-left: auto;
  }

  .nav-mobile-cta {
    display: block;
    width: 100%;
    margin-top: 22px;
  }

  .nav-mobile-cta .btn {
    width: 100%;
    padding: 0 24px;
    border-bottom: 0;
    font-size: 0.97rem;
  }

  .nav-mobile-note {
    display: block;
    margin-top: 18px;
    font-size: 0.78rem;
    color: var(--muted-dim);
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(52px, 8vw, 104px)) 0 clamp(64px, 8vw, 110px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  z-index: -1;
  background:
    radial-gradient(48% 60% at 72% 28%, rgba(56, 108, 180, 0.32), transparent 70%),
    radial-gradient(42% 52% at 20% 10%, rgba(120, 100, 220, 0.20), transparent 72%),
    radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%);
  filter: blur(6px);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--ink));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  align-items: center;
}

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

.hero h1 .line {
  display: block;
}

.hero h1 .accent {
  color: transparent;
  background: linear-gradient(100deg, #ffffff 10%, var(--gold) 52%, #a79fee 96%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  margin: 26px 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.85;
  color: var(--muted);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.hero-note {
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--muted-dim);
}

/* TV frame */
.tv-stage {
  position: relative;
  perspective: 1600px;
  width: 100%;
  max-width: 940px;
  margin-inline: auto;
}

.tv-stage::before {
  content: "";
  position: absolute;
  inset: 8% -6% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(90, 140, 210, 0.30), transparent 74%);
  filter: blur(38px);
  pointer-events: none;
}

.tv-frame {
  position: relative;
  padding: 9px;
  border-radius: 20px;
  background: linear-gradient(155deg, #3a4351 0%, #0d1117 28%, #05070a 70%, #2b333f 100%);
  box-shadow: var(--shadow-tv);
}

.tv-frame::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 13px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.14), transparent 26%, transparent 72%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.tv-screen {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: #0a0f16;
  aspect-ratio: 16 / 9;
}

.tv-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 20%, transparent 55%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.tv-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -26px;
  height: 60px;
  background: linear-gradient(180deg, rgba(185, 212, 255, 0.18), transparent);
  filter: blur(26px);
  z-index: -1;
}

.tv-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-left: 190px;
  font-size: 0.76rem;
  color: var(--muted-dim);
}

.tv-caption .live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tv-caption .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(10, 15, 22, 0.6);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  font-size: 0.78rem;
  color: var(--text-soft);
  animation: float 9s ease-in-out infinite;
}

.float-chip strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
}

.float-chip small {
  color: var(--muted-dim);
  font-size: 0.72rem;
}

.float-chip .glyph {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(185, 212, 255, 0.9), rgba(143, 176, 234, 0.6));
  color: #181007;
}

.float-chip .glyph svg {
  width: 15px;
  height: 15px;
}

.chip-dock {
  left: 24px;
  bottom: -18px;
}

.chip-shelf {
  right: 24px;
  top: -18px;
  animation-delay: -4.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@media (min-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  }

  .hero-copy {
    padding-bottom: 8px;
  }
}

@media (max-width: 1039px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .tv-stage {
    max-width: 820px;
  }
}

@media (max-width: 900px) {
  .float-chip {
    display: none;
  }

  .tv-caption {
    padding-left: 0;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 413px) {
  .tv-caption {
    font-size: 0.7rem;
  }
}

@media (max-width: 640px) {
  .gallery figcaption em {
    display: none;
  }

  .compare-hint {
    font-size: 0.74rem;
  }
}

/* ---------- proof strip ---------- */

.proof {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
}

.proof-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 22px 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.proof-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.proof-item svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex: none;
}

/* ---------- comparison ---------- */

.compare-section {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.035), transparent 70%);
}

.compare-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02) 38%, rgba(255, 255, 255, 0.07));
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, 0.95);
}

.compare {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #05070a;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  --pos: 50%;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-after {
  z-index: 1;
}

.compare-before {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare-before img {
  z-index: 0;
}

/* labels */
.compare-label {
  position: absolute;
  z-index: 4;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 9, 14, 0.66);
  backdrop-filter: blur(14px);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text);
  pointer-events: none;
}

.compare-label span {
  color: var(--muted);
  font-size: 0.66rem;
}

.compare-label.is-before {
  left: 16px;
}

.compare-label.is-after {
  right: 16px;
  text-align: right;
}

.compare-handle {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  cursor: ew-resize;
}

.compare-handle:focus-visible {
  outline: none;
}

.compare-handle:focus-visible .grip {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.grip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 3px;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.9);
  color: #fff;
}

.grip svg {
  width: 8px;
  height: 14px;
}

.compare-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted-dim);
}

.compare-hint kbd {
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
}

@media (max-width: 640px) {
  .compare-wrap {
    padding: 6px;
    border-radius: 20px;
  }

  .compare {
    border-radius: 15px;
  }

  .compare-label {
    top: 10px;
    padding: 6px 9px;
    font-size: 0.66rem;
  }

  .compare-label.is-before {
    left: 10px;
  }

  .compare-label.is-after {
    right: 10px;
  }

  .compare-label span {
    display: none;
  }

  .grip {
    width: 44px;
    height: 44px;
  }
}

/* ---------- features ---------- */

.feature {
  display: grid;
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  padding: clamp(46px, 6vw, 84px) 0;
  border-top: 1px solid var(--line);
}

.feature:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.feature:last-of-type {
  padding-bottom: 0;
}

.feature-copy {
  max-width: 520px;
}

.feature-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.feature-kicker .num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(185, 212, 255, 0.4);
  border-radius: 7px;
  font-size: 0.68rem;
}

.feature h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 16px;
}

.feature p {
  color: var(--muted);
  font-size: 0.98rem;
}

.feature-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(185, 212, 255, 0.12);
}

.feature-media {
  position: relative;
}

.feature-media .tv-frame {
  border-radius: 16px;
  padding: 7px;
}

.feature-media .tv-screen {
  border-radius: 10px;
}

.feature-media .tv-frame::after {
  inset: 7px;
  border-radius: 10px;
}

.feature-media figcaption {
  margin-top: 14px;
  font-size: 0.74rem;
  color: var(--muted-dim);
  display: flex;
  gap: 8px;
  align-items: center;
}

.feature-media figcaption::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--line-strong);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .feature.is-flipped .feature-copy {
    order: 2;
  }

  .feature.is-flipped .feature-media {
    order: 1;
  }
}

/* ---------- gallery ---------- */

.gallery-section {
  background: linear-gradient(180deg, var(--ink), #080c12 40%, var(--ink));
  border-block: 1px solid var(--line);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.gallery button {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #06090d;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 50px -30px #000;
}

.gallery button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  transition: border-color 0.25s;
}

.gallery button:hover::after,
.gallery button:focus-visible::after {
  border-color: rgba(185, 212, 255, 0.6);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}

.gallery button:hover img {
  transform: scale(1.03);
}

.gallery .g-home,
.gallery .g-shelf {
  grid-column: span 3;
}

.gallery .g-grid,
.gallery .g-cc,
.gallery .g-frame {
  grid-column: span 2;
}

.gallery figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}

.gallery figcaption em {
  font-style: normal;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

@media (max-width: 860px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery .g-home,
  .gallery .g-shelf,
  .gallery .g-grid,
  .gallery .g-cc,
  .gallery .g-frame {
    grid-column: span 1;
  }

  .gallery .g-home {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .gallery {
    gap: 10px;
  }

  .gallery figcaption {
    padding: 8px 9px;
    font-size: 0.68rem;
  }

  .gallery figcaption em {
    display: none;
  }
}

/* ---------- install ---------- */

.install {
  position: relative;
}

.install-intro {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr);
}

.downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 0;
}

.download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.download:hover {
  border-color: rgba(185, 212, 255, 0.45);
  background: linear-gradient(160deg, rgba(185, 212, 255, 0.09), rgba(255, 255, 255, 0.02));
  transform: translateY(-2px);
}

.download .name {
  font-size: 1.02rem;
  font-weight: 600;
}

.download .use {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.download .arrow {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--gold);
}

.download .arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.download:hover .arrow svg {
  transform: translate(2px, -2px);
}

@media (max-width: 640px) {
  .downloads {
    grid-template-columns: 1fr;
  }
}

.prereq {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.88rem;
  color: var(--muted);
}

.prereq strong {
  color: var(--text);
}

.brand-table {
  margin-top: 26px;
}

/* tabs */
.tabs {
  margin-top: clamp(36px, 5vw, 56px);
}

.tablist {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  scrollbar-width: thin;
}

.tablist button {
  flex: 1 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.tablist button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tablist button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.tabpanel {
  padding-top: 30px;
  min-width: 0;
}

.tabpanel[hidden] {
  display: none;
}

.tabpanel h3 {
  margin-bottom: 8px;
}

.tabpanel > p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 70ch;
}

.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}

.steps > li {
  position: relative;
  padding-left: 46px;
  min-width: 0;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(185, 212, 255, 0.35);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  background: rgba(185, 212, 255, 0.05);
}

.steps h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 600;
}

.steps p {
  margin: 0 0 10px;
  font-size: 0.89rem;
  color: var(--muted);
  line-height: 1.7;
}

.steps .fine {
  font-size: 0.78rem;
  color: var(--muted-dim);
}

/* code */
.code {
  position: relative;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #06090e;
  overflow: hidden;
}

.code pre {
  margin: 0;
  padding: 15px 58px 15px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: #c8d3e2;
  tab-size: 2;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.copy:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

.copy.is-done {
  color: #0f1a12;
  border-color: transparent;
  background: var(--sea);
}

.copy svg {
  width: 12px;
  height: 12px;
}

.code .copy {
  position: absolute;
  top: 8px;
  right: 8px;
}

.callout code,
.prereq code,
.note code,
.steps code,
.feature p code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--text-soft);
}

/* callout */
.callout {
  display: flex;
  gap: 14px;
  margin: 20px 0 0;
  padding: 16px 18px;
  border: 1px solid rgba(185, 212, 255, 0.28);
  border-radius: 14px;
  background: rgba(185, 212, 255, 0.06);
  font-size: 0.87rem;
  line-height: 1.7;
  color: #dce6fa;
}

.callout.is-danger {
  border-color: rgba(255, 120, 110, 0.32);
  background: rgba(255, 120, 110, 0.07);
  color: #ffd9d4;
}

.callout svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--gold);
}

.callout.is-danger svg {
  color: #ff8b80;
}

.callout strong {
  color: #fff;
}

/* agent prompt */
.agent-card {
  margin-top: 26px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(134, 214, 198, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(134, 214, 198, 0.09), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.agent-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  margin-bottom: 8px;
}

.agent-card h3 svg {
  width: 18px;
  height: 18px;
  color: var(--sea);
}

.agent-card p {
  font-size: 0.86rem;
  color: var(--muted);
}

.prompt-box {
  position: relative;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.prompt-box p {
  margin: 0;
  padding-right: 60px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-soft);
}

.prompt-box .copy {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* compatibility */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

caption {
  text-align: left;
  padding: 16px 18px 0;
  font-size: 0.76rem;
  color: var(--muted-dim);
}

th,
td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  background: #0b1017;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody th {
  font-weight: 500;
  color: var(--text-soft);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

td.yes {
  color: var(--sea);
}

td.cond {
  color: var(--gold);
}

td.no {
  color: var(--muted-dim);
}

.notes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 24px;
}

.note {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.7;
}

.note strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.88rem;
}

/* faq */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

details.faq {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.25s, background 0.25s;
}

details.faq[open] {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.032);
}

details.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  list-style: none;
}

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

details.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

details.faq[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

details.faq .faq-body {
  padding: 0 20px 20px;
  font-size: 0.89rem;
  color: var(--muted);
  line-height: 1.8;
}

details.faq .faq-body p:last-child {
  margin-bottom: 0;
}

details.faq .faq-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--text-soft);
}

/* final cta */
.final-cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(45, 104, 118, 0.22), transparent 65%),
    linear-gradient(180deg, #080c12, var(--ink));
}

.final-cta .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(72px, 10vw, 128px) 0;
}

.final-cta h2 {
  max-width: 20ch;
}

.final-cta p {
  margin: 18px auto 0;
  max-width: 52ch;
  color: var(--muted);
}

.final-cta .hero-actions {
  justify-content: center;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #05080c;
  padding: 56px 0 34px;
  font-size: 0.82rem;
  color: var(--muted-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand p {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--muted-dim);
  max-width: 32ch;
  line-height: 1.7;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: var(--muted-dim);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  line-height: 1.7;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-dim);
}

.footer-bottom .legal {
  max-width: 74ch;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }
}

/* ---------- lightbox ---------- */

.lightbox {
  width: min(1180px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(3, 5, 8, 0.86);
  backdrop-filter: blur(10px);
}

.lightbox-inner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #05070a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 60px 140px -40px #000;
}

.lightbox img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #070b11;
  font-size: 0.8rem;
  color: var(--muted);
}

.lightbox-bar .nav-btns {
  display: flex;
  gap: 8px;
}

.lightbox-bar button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.lightbox-bar button:hover {
  background: rgba(255, 255, 255, 0.11);
}

.lightbox-bar svg {
  width: 16px;
  height: 16px;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(6, 9, 14, 0.65);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- 404 ---------- */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 24px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(120deg, #ffffff, var(--gold) 45%, var(--sea));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 16px 0 12px;
}

.error-page p {
  color: var(--muted);
  max-width: 44ch;
  margin-inline: auto;
}

/* ---------- english page ---------- */

.en .hero-sub,
.en p {
  color: var(--muted);
}

.en h1 {
  font-size: clamp(2.3rem, 3.7vw, 3.3rem);
  letter-spacing: -0.03em;
}

.en .hero-sub {
  max-width: 34em;
}

.lang-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted-dim);
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #c2cad6;
    --muted-dim: #a8b2c0;
    --line: rgba(255, 255, 255, 0.2);
  }
}

@media print {
  .site-header,
  .float-chip,
  .compare-hint,
  .code .copy,
  .final-cta,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }
}
