/* ==========================================================================
   Folith Official Site — Apple-Inspired Visual Hierarchy (EN / ZH / AR RTL)
   Folith Daylight UI Blue (#2B5FD1) + Night Graphite (#1C1C1E)
   + Promo Deep Navy Monument (#0D1730 → #2B4BC8) + Warm Highlighter (#FFE08A)
   ========================================================================== */
:root {
  --bg-page: #f5f5f7;
  --bg-canvas-white: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f5f5f7;
  --bg-surface-sunken: #ebedf0;
  --bg-hover: rgba(19, 28, 46, 0.045);
  --bg-selected: #eef4fd;
  --bg-glass: rgba(245, 245, 247, 0.78);

  --text-primary: #111827;
  --text-secondary: #525d70;
  --text-muted: #667085;
  --text-on-accent: #ffffff;

  --border-hairline: rgba(17, 24, 39, 0.07);
  --border-subtle: rgba(17, 24, 39, 0.10);
  --border-strong: rgba(17, 24, 39, 0.18);

  /* Folith UI Blue (Cobalt #004CFD belongs exclusively to the icon mark) */
  --accent: #2b5fd1;
  --accent-hover: #2352b8;
  --accent-fill: #2b5fd1;
  --accent-fill-hover: #2352b8;
  --accent-soft: #eaf1fe;
  --accent-border: #bfd2f5;

  --success: #25855b;
  --success-soft: #e9f8f0;
  --warning: #9d621e;
  --warning-soft: #fff6e5;
  --info: #7761b0;
  --info-soft: #f4f1ff;

  --highlight-bg: #ffe08a;
  --highlight-ring: #f2c94c;
  --highlight-ink: #1b1b1f;

  --glow-blue: rgba(176, 200, 255, 0.45);
  --glow-warm: rgba(255, 228, 158, 0.28);

  --shadow-card: 0 2px 12px rgba(17, 24, 39, 0.04), 0 1px 2px rgba(17, 24, 39, 0.03);
  --shadow-card-hover: 0 20px 44px -18px rgba(17, 24, 39, 0.14), 0 2px 6px rgba(17, 24, 39, 0.04);
  --shadow-stage: 0 40px 96px -24px rgba(17, 24, 39, 0.18), 0 12px 30px -12px rgba(17, 24, 39, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Geeza Pro", "Noto Sans Arabic", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --max-w: 1160px;
  --shot-ratio: 1840 / 993;
  color-scheme: light;
}

/* Authentic Night mode: macOS neutral graphite (#1C1C1E) */
[data-theme="dark"] {
  --bg-page: #111113;
  --bg-canvas-white: #1c1c1e;
  --bg-surface: #1c1c1e;
  --bg-surface-subtle: #242426;
  --bg-surface-sunken: #2c2c2e;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-selected: rgba(130, 172, 255, 0.16);
  --bg-glass: rgba(17, 17, 19, 0.78);

  --text-primary: rgba(255, 255, 255, 0.94);
  --text-secondary: rgba(235, 235, 245, 0.66);
  --text-muted: rgba(235, 235, 245, 0.50);

  --border-hairline: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #82acff;
  --accent-hover: #a1c0ff;
  --accent-fill: #3a6fe0;
  --accent-fill-hover: #477bec;
  --accent-soft: rgba(130, 172, 255, 0.16);
  --accent-border: rgba(130, 172, 255, 0.34);

  --success: #80d9af;
  --success-soft: rgba(128, 217, 175, 0.14);
  --warning: #f2c97c;
  --warning-soft: rgba(242, 201, 124, 0.14);
  --info: #c0a8ff;
  --info-soft: rgba(192, 168, 255, 0.16);

  --highlight-bg: rgba(255, 214, 102, 0.86);
  --highlight-ring: #f2c94c;
  --highlight-ink: #1b1b1f;

  --glow-blue: rgba(58, 111, 224, 0.22);
  --glow-warm: rgba(255, 214, 107, 0.07);

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 22px 48px -18px rgba(0, 0, 0, 0.60);
  --shadow-stage: 0 42px 100px -22px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

/* ==========================================================================
   Reset & Locale Typography
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

:lang(zh-CN) { --shot-ratio: 1840 / 1116; }
:lang(zh-CN) body { line-height: 1.65; }
:lang(zh-CN) .hero h1 { letter-spacing: -0.025em; line-height: 1.12; }
:lang(zh-CN) .chapter-title, :lang(zh-CN) .monument h2, :lang(zh-CN) .finale h2 { letter-spacing: -0.02em; line-height: 1.18; }

[lang="ar"] body {
  font-family: "Geeza Pro", -apple-system, BlinkMacSystemFont, "SF Pro Arabic", "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
  line-height: 1.7;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] .brand,
[lang="ar"] .eyebrow, [lang="ar"] .lang-menu-label, [lang="ar"] .bento-kicker,
[lang="ar"] .demo-paper-meta {
  letter-spacing: 0 !important;
}
[lang="ar"] .hero h1 { line-height: 1.22; }
[lang="ar"] .chapter-title, [lang="ar"] .monument h2, [lang="ar"] .finale h2 { line-height: 1.26; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-surface-sunken);
  color: var(--text-primary);
  direction: ltr;
  unicode-bidi: isolate;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Minimalist Apple-Style Sticky Header (52px)
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-hairline);
}

.nav-inner {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand img { width: 24px; height: 24px; flex-shrink: 0; }
.brand-sep { opacity: 0.4; font-weight: 500; }

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

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.icon-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.lang-wrap { position: relative; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 176px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-card-hover);
  display: none;
  z-index: 60;
}

.lang-menu.open { display: block; }

.lang-menu-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 5px 10px 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background 0.12s ease;
}

.lang-menu a:hover, .lang-menu a.current {
  background: var(--accent-soft);
  color: var(--accent);
}
.lang-menu a.current { font-weight: 700; }
.lang-menu a span { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.lang-menu a.current span { color: var(--accent); }

/* Apple-style Pill Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.98); }

.btn-xs { height: 30px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }

.btn-primary {
  background: var(--accent-fill);
  color: var(--text-on-accent);
  box-shadow: 0 6px 20px -6px rgba(43, 95, 209, 0.45);
}
.btn-primary:hover {
  background: var(--accent-fill-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -6px rgba(43, 95, 209, 0.55);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.btn-link {
  background: transparent;
  color: var(--accent);
  padding: 0 10px;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ==========================================================================
   Hero — Giant Headline + One-Line Pitch + Edge-to-Edge Product Stage
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  padding: 84px 0 36px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow::before {
  content: "";
  position: absolute;
  width: 960px;
  height: 540px;
  top: -180px;
  left: 50%;
  transform: translateX(-35%);
  background: radial-gradient(ellipse at center, var(--glow-blue) 0%, transparent 68%);
  filter: blur(56px);
}

.hero-glow::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 360px;
  top: 20px;
  left: 50%;
  transform: translateX(-80%);
  background: radial-gradient(ellipse at center, var(--glow-warm) 0%, transparent 68%);
  filter: blur(60px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 7px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

[dir="rtl"] .eyebrow { padding: 5px 7px 5px 14px; }
.eyebrow:hover { transform: translateY(-1px); border-color: var(--accent-border); color: var(--text-primary); }

.eyebrow-ver {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  direction: ltr;
}

.hero h1 {
  margin: 24px auto 0;
  max-width: 920px;
  font-size: clamp(2.85rem, 6.8vw, 5.15rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.042em;
  color: var(--text-primary);
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 600px;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.48;
  font-weight: 500;
  color: var(--text-secondary);
  text-wrap: balance;
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Product Hardware Stage — Clean & Giant (Gallery switcher sits BELOW like apple.com) */
.stage-wrap {
  margin-top: 56px;
}

.stage-frame {
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-stage);
}

.app-viewport {
  position: relative;
  aspect-ratio: var(--shot-ratio);
  background: #f4f6f8;
  overflow: hidden;
}

.app-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.app-shot.active { opacity: 1; pointer-events: auto; }

.stage-controls {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.stage-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.stage-tabs::-webkit-scrollbar { display: none; }

.stage-tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.stage-tab:hover { color: var(--text-primary); }

.stage-tab[aria-selected="true"] {
  background: var(--text-primary);
  color: var(--bg-canvas-white);
}

.stage-caption {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  min-height: 22px;
}

/* ==========================================================================
   Chapter Headings — Apple-Style High-Contrast Statement
   ========================================================================== */
.chapter {
  padding: 112px 0 0;
}

.chapter-head {
  max-width: 760px;
  margin-bottom: 44px;
}

.chapter-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.45rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.036em;
  color: var(--text-primary);
  text-wrap: balance;
}

.chapter-title span {
  color: var(--text-muted);
}

/* ==========================================================================
   Apple Bento Grid — Visual Artifacts First, One-Line Punchy Copy
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 28px;
  padding: 34px 34px 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }

.bento-kicker {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.tile h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  text-wrap: balance;
}

.tile .tile-line {
  margin: 10px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 46ch;
}

/* Interactive Alice Source-Highlight Bento (Tile 1 — Full-Width Hero Bento) */
.tile-demo {
  padding: 36px;
}

.tile-demo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}

.tile-demo-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--highlight-bg);
  color: var(--highlight-ink);
  font-size: 12.5px;
  font-weight: 700;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-surface);
}

.demo-page-pane {
  padding: 24px;
  background: var(--bg-surface-subtle);
  border-inline-end: 1px solid var(--border-hairline);
}

.demo-paper {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.demo-paper-ltr { direction: ltr; text-align: left; }

.demo-paper-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-paper h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.demo-paper p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.68; color: var(--text-secondary); }
.demo-paper p:last-child { margin-bottom: 0; }

.src-span {
  border-radius: 5px;
  padding: 1px 3px;
  margin: 0 -3px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.src-span.active {
  background: var(--highlight-bg);
  color: var(--highlight-ink);
  box-shadow: 0 0 0 1.5px var(--highlight-ring);
}

.demo-seg-pane { display: flex; flex-direction: column; }
.seg-list { flex: 1; }

.seg-row {
  width: 100%;
  text-align: start;
  border: 0;
  border-bottom: 1px solid var(--border-hairline);
  background: transparent;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
  transition: background 0.14s ease;
}

.seg-row:hover { background: var(--bg-hover); }
.seg-row.active {
  background: var(--bg-selected);
  box-shadow: inset 3.5px 0 0 var(--accent);
}
[dir="rtl"] .seg-row.active { box-shadow: inset -3.5px 0 0 var(--accent); }

.seg-no {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 2px;
}
.seg-row.active .seg-no { color: var(--accent); }
.seg-src { font-size: 13px; line-height: 1.55; color: var(--text-secondary); direction: ltr; text-align: left; }
.seg-tgt { font-size: 13.5px; line-height: 1.65; color: var(--text-primary); }

.term-mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent-border);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
}

.demo-inspector {
  padding: 12px 18px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}
.demo-inspector-note { color: var(--text-secondary); }
.demo-inspector-note strong { color: var(--text-primary); }

.chip-ok {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Tile 2: Deep Navy 4-Stage Visual Tile (Promo Cover Accent!) */
.tile-navy {
  background: radial-gradient(640px 480px at 90% 10%, #2b4bc8 0%, #14213d 60%, #0d1730 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.10);
}
[dir="rtl"] .tile-navy {
  background: radial-gradient(640px 480px at 10% 10%, #2b4bc8 0%, #14213d 60%, #0d1730 100%);
}
.tile-navy .bento-kicker { color: #ffd66b; }
.tile-navy h3 { color: #ffffff; }
.tile-navy .tile-line { color: #c7d3f4; }

.stage-stack {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.stage-row b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffd66b;
  direction: ltr;
}

.stage-row span {
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 500;
  color: #b7c6ee;
}

/* Tile 3: Model Routing Media Tile (Cropped settings screenshot rising from bottom) */
.tile-media {
  padding-bottom: 0;
}

.tile-shot {
  margin-top: 24px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  box-shadow: 0 -8px 28px rgba(17, 24, 39, 0.06);
  background: #f4f6f8;
}

.tile-shot img { width: 100%; height: auto; }

/* Tile 4: Formats Visual Pill Cloud */
.format-wall {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fmt-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  direction: ltr;
}

.fmt-badge.hi {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Tile 5: Locked Terms Visual */
.term-visual {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  font-size: 14px;
}

.term-pair { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.term-pair .src { color: var(--text-secondary); font-weight: 500; direction: ltr; }
.term-pair .arr { color: var(--accent); font-weight: 700; }
.term-lock {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  white-space: nowrap;
}

/* Tile 6: Smart QA & Human Control Visual */
.qa-visual {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
}

.qa-pill-row.primary {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.qa-pill-row.audit {
  background: var(--success-soft);
  border: 1px solid rgba(37, 133, 91, 0.22);
  color: var(--success);
}

.qa-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.qa-mini-tags span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ==========================================================================
   Apple Privacy Monument (Full-Width Deep Navy Statement)
   ========================================================================== */
.monument-sec {
  padding: 112px 0 0;
}

.monument {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 84px 56px;
  text-align: center;
  background: radial-gradient(1000px 680px at 50% 0%, #2647c4 0%, #13203b 56%, #0b1429 100%);
  color: #ffffff;
  box-shadow: 0 36px 80px -24px rgba(11, 20, 41, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.monument-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 18px;
  background: rgba(255, 214, 107, 0.16);
  border: 1px solid rgba(255, 214, 107, 0.34);
  color: #ffd66b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.monument-icon svg { width: 26px; height: 26px; }

.monument h2 {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(2.3rem, 5vw, 3.85rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.038em;
  color: #ffffff;
  text-wrap: balance;
}

.monument h2 em {
  font-style: normal;
  color: #ffd66b;
}

.monument-sub {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.6;
  color: #c7d3f4;
  text-wrap: balance;
}

.monument-stats {
  margin: 52px auto 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.m-stat h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.m-stat p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #b7c6ee;
}

/* ==========================================================================
   Apple-Style Minimalist Download Finale
   ========================================================================== */
.finale {
  padding: 112px 0 88px;
  text-align: center;
}

.finale-mark {
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.finale-mark img { width: 44px; height: 44px; }

.finale h2 {
  margin: 0 auto;
  max-width: 680px;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.036em;
  text-wrap: balance;
}

.finale-sub {
  margin: 14px auto 0;
  font-size: 17px;
  color: var(--text-secondary);
}

.dl-cards {
  margin: 40px auto 0;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dl-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dl-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.dl-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dl-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-icon svg { width: 22px; height: 22px; }
.dl-card h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.dl-spec { font-size: 13.5px; color: var(--text-muted); margin-top: 2px; }
.dl-card .btn { width: 100%; }

/* Quiet collapsible install notes — keeps the stage spotless while keeping helpful details 1 click away */
.notes-disclosure {
  margin: 26px auto 0;
  max-width: 760px;
  text-align: start;
}

.notes-disclosure summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.notes-disclosure summary::-webkit-details-marker { display: none; }
.notes-disclosure summary:hover { background: var(--accent-soft); }
.notes-disclosure summary::after { content: "▾"; font-size: 11px; transition: transform 0.18s ease; }
.notes-disclosure[open] summary::after { transform: rotate(180deg); }

.notes-body {
  margin-top: 12px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.notes-body ul { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; }
.notes-body strong { color: var(--text-primary); }

/* ==========================================================================
   Clean Single-Band Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-hairline);
  padding: 28px 0 44px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-left img { width: 20px; height: 20px; }
.footer-left strong { color: var(--text-primary); font-weight: 700; }

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

.footer-links a { text-decoration: none; font-weight: 500; transition: color 0.14s ease; }
.footer-links a:hover { color: var(--accent); }

.footer-sep { opacity: 0.35; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 980px) {
  .col-8, .col-7, .col-6, .col-5, .col-4 { grid-column: span 12; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-page-pane { border-inline-end: 0; border-bottom: 1px solid var(--border-hairline); }
  .monument { padding: 56px 32px; }
  .monument-stats { grid-template-columns: minmax(0, 1fr); gap: 22px; text-align: start; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding: 52px 0 24px; }
  .chapter, .monument-sec { padding-top: 76px; }
  .finale { padding: 76px 0 60px; }
  .dl-cards { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile-demo { padding: 24px; border-radius: 22px; }
  .tile-media { padding-bottom: 0; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  #langBtn .lang-label { display: none; }
  .hero-cta .btn-lg { width: 100%; }
  .stage-tab { padding: 7px 12px; font-size: 12.5px; }
  .seg-row { grid-template-columns: 24px minmax(0, 1fr); gap: 6px 10px; padding: 13px 14px; }
  .seg-tgt { grid-column: 2; padding-top: 6px; border-top: 1px dashed var(--border-hairline); }
  .demo-page-pane { padding: 14px; }
  .demo-paper { padding: 16px; }
  .monument { padding: 44px 20px; border-radius: 24px; }
  .dl-card { padding: 22px; }
}

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