/* Kromar Official Website Redesign Preview
   Ceramic Light (default) & Obsidian Darkroom tokens derived from spectral-orb. */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F8FB;
  --bg-band: #EFF2F7;
  --surface: #FFFFFF;
  --surface-2: #F1F3F8;
  --surface-elevated: rgba(255, 255, 255, 0.86);
  --topbar-bg: rgba(247, 248, 251, 0.78);
  --fg: #14161D;
  --fg-2: #4A5162;
  --muted: #697286;
  --line: rgba(20, 22, 29, 0.08);
  --line-strong: rgba(20, 22, 29, 0.16);
  --accent: #C93624;
  --accent-text: #B82E1E;
  --accent-soft: rgba(201, 54, 36, 0.09);
  --btn-primary-bg: #14161D;
  --btn-primary-fg: #F7F8FB;
  --btn-primary-hover: #252936;
  --shadow-soft: 0 10px 30px rgba(20, 22, 29, 0.06);
  --shadow-stage: 0 22px 54px rgba(20, 22, 29, 0.10);
  --shadow-nav: 0 8px 28px rgba(20, 22, 29, 0.07);
  --icon-ring: rgba(20, 22, 29, 0.09);
  --orb-halo-a: rgba(110, 131, 245, 0.16);
  --orb-halo-b: rgba(244, 123, 114, 0.16);
  --orb-halo-c: rgba(92, 210, 174, 0.12);
  --device-bezel: rgba(20, 22, 29, 0.10);
  --spectrum-gradient: linear-gradient(90deg, #6E83F5 0%, #5CD2AE 34%, #F2C063 68%, #F47B72 100%);
  --radius-pill: 999px;
  --radius-stage: 24px;
  --radius-frame: 16px;
  --radius-chip: 10px;
  --ease-precision: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101218;
  --bg-band: #151821;
  --surface: #181B25;
  --surface-2: #1F2330;
  --surface-elevated: rgba(24, 27, 37, 0.88);
  --topbar-bg: rgba(16, 18, 24, 0.78);
  --fg: #F3F4F8;
  --fg-2: #B2B8C7;
  --muted: #8A92A6;
  --line: rgba(243, 244, 248, 0.09);
  --line-strong: rgba(243, 244, 248, 0.17);
  --accent: #F05846;
  --accent-text: #FF7666;
  --accent-soft: rgba(240, 88, 70, 0.15);
  --btn-primary-bg: #F3F4F8;
  --btn-primary-fg: #101218;
  --btn-primary-hover: #E2E5EE;
  --shadow-soft: 0 14px 36px rgba(5, 6, 10, 0.34);
  --shadow-stage: 0 28px 66px rgba(4, 5, 8, 0.56);
  --shadow-nav: 0 12px 34px rgba(4, 5, 8, 0.44);
  --icon-ring: rgba(243, 244, 248, 0.14);
  --orb-halo-a: rgba(110, 131, 245, 0.16);
  --orb-halo-b: rgba(244, 123, 114, 0.14);
  --orb-halo-c: rgba(92, 210, 174, 0.11);
  --device-bezel: rgba(243, 244, 248, 0.12);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

main {
  position: relative;
  z-index: 1;
}

/* Soft ambient spectral-orb aura starting at y = 0 behind the floating topbar */
.page-aura {
  position: absolute;
  inset: 0 0 auto 0;
  height: 700px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(44% 58% at 22% 0%, var(--orb-halo-a), transparent 72%),
    radial-gradient(42% 56% at 78% 0%, var(--orb-halo-b), transparent 72%),
    radial-gradient(50% 52% at 50% 22%, var(--orb-halo-c), transparent 75%);
}

.page-aura--doc {
  height: 440px;
}

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

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

button,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 24px;
}

/* ======================== Floating Pill-Glass Topbar ======================== */
.topbar-wrap {
  position: sticky;
  top: 14px;
  z-index: 40;
  padding: 0 18px;
  pointer-events: none;
}

.topbar {
  pointer-events: auto;
  max-width: 1084px;
  height: 60px;
  margin: 0 auto;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: var(--radius-pill);
  background: var(--topbar-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: background-color 180ms ease, border-color 180ms ease;
}

@media (prefers-reduced-transparency: reduce) {
  .topbar {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.brand-icon img,
.hero-orb img,
.footer-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-dark {
  display: none;
}

:root[data-theme="dark"] .icon-light {
  display: none;
}

:root[data-theme="dark"] .icon-dark {
  display: block;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1;
}

.topbar-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-2);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link:hover {
  color: var(--fg);
  background: var(--surface-2);
}

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

.lang-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 26px 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.lang-select:hover {
  border-color: var(--line-strong);
}

.lang-select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}

.theme-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms var(--ease-precision);
}

.theme-btn:hover {
  border-color: var(--line-strong);
}

.theme-btn:active {
  transform: scale(0.96);
}

.theme-btn svg {
  width: 17px;
  height: 17px;
}

:root[data-theme="light"] .theme-btn .glyph-sun {
  display: none;
}

:root[data-theme="dark"] .theme-btn .glyph-moon {
  display: none;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms var(--ease-precision), background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn:active {
  transform: scale(0.98) translateY(-1px);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-md {
  height: 44px;
  padding: 0 22px;
  font-size: 14.5px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

/* ======================== Section 1: Hero & Compare Theater ======================== */
.hero {
  position: relative;
  padding: 64px 0 92px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-orb {
  width: 76px;
  height: 76px;
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--icon-ring), var(--shadow-soft);
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.12;
  color: var(--fg);
  text-wrap: balance;
}

.hero-sub {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg-2);
  text-wrap: balance;
}

.cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.compare-theater {
  width: 100%;
  max-width: 920px;
  margin: 52px auto 0;
}

.scene-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}

.scene-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.scene-pill:hover {
  color: var(--fg);
}

.scene-pill[aria-pressed="true"] {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.compare-frame-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-stage);
  padding: 12px 12px 0;
  box-shadow: var(--shadow-stage);
}

.compare-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-frame);
  overflow: hidden;
  background: var(--surface-2);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  --split: 54%;
}

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

.compare-after-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split));
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 1.5px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  transform: translateX(-0.75px);
  pointer-events: none;
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: var(--split);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  transform: translate(-50%, -50%);
  background: rgba(247, 248, 251, 0.94);
  color: #14161D;
  border: 1px solid rgba(20, 22, 29, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 150ms var(--ease-precision);
}

.compare-stage.is-dragging .compare-knob {
  transform: translate(-50%, -50%) scale(1.06);
}

.compare-knob svg {
  width: 18px;
  height: 18px;
}

.compare-caption {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 13px;
  font-size: 13px;
}

.compare-caption-left {
  text-align: left;
  font-weight: 560;
  color: var(--fg-2);
}

.compare-caption-mid {
  font-size: 12px;
  color: var(--muted);
}

.compare-caption-right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-text);
}

/* ======================== Shared Section Rhythm ======================== */
.section {
  padding: 84px 0;
}

.section--band {
  background: var(--bg-band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-head--center {
  margin: 0 auto 32px;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.16;
  text-wrap: balance;
}

.section-head p {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.62;
  text-wrap: balance;
}

/* ======================== Section 2: Tabbed Darkroom Tour & Live Demos ======================== */
.tour-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.tour-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.tour-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg-2);
  font-size: 13.5px;
  font-weight: 560;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.tour-tab:hover {
  color: var(--fg);
}

.tour-tab[aria-selected="true"] {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.tour-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 36px;
  border-radius: var(--radius-stage);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.tour-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.tour-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: var(--radius-chip);
  margin-bottom: 16px;
}

.tour-copy h3 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tour-desc {
  margin: 12px 0 0;
  font-size: 15.5px;
  color: var(--fg-2);
  max-width: 48ch;
}

.tour-points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.tour-points li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14.5px;
  color: var(--fg);
}

.tour-points svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent-text);
}

.tour-nav-row {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tour-step-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.tour-step-btns {
  display: inline-flex;
  gap: 8px;
}

.icon-circle-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms var(--ease-precision);
}

.icon-circle-btn:hover {
  background: var(--bg-band);
}

.icon-circle-btn svg {
  width: 16px;
  height: 16px;
}

.tour-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-shell {
  width: 100%;
  max-width: 320px;
  padding: 8px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--device-bezel);
  box-shadow: var(--shadow-stage);
}

.device-shell img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-frame);
}

/* Secondary Asymmetric Interactive Recordings Duo */
.duo-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}

.duo-card {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius-stage);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.duo-copy h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.duo-copy p {
  margin: 10px 0 18px;
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.58;
}

.duo-link {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--fg);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.duo-link:hover {
  background: var(--bg-band);
}

.duo-link svg {
  width: 14px;
  height: 14px;
}

.duo-media {
  border-radius: var(--radius-frame);
  overflow: hidden;
  border: 1px solid var(--device-bezel);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}

.duo-media img {
  width: 100%;
  height: auto;
}

/* ======================== Section 3: Gallery & 25 Canisters ======================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.gallery-photo {
  border-radius: var(--radius-frame);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  padding: 12px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gallery-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
}

.gallery-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
}

.gallery-note {
  font-size: 13px;
  color: var(--muted);
}

.films-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.films-toolbar h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.films-toolbar p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fg-2);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 560;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.filter-pill:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

.filter-pill[aria-pressed="true"] {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: transparent;
}

.canister-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(126px, 134px);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}

.canister-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 160ms var(--ease-precision), border-color 160ms ease;
}

.canister-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.canister-item img {
  width: 66px;
  height: 92px;
  object-fit: contain;
  margin-bottom: 10px;
}

.canister-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  color: var(--fg);
}

.canister-name {
  margin-top: 2px;
  font-size: 12px;
  color: var(--fg-2);
  white-space: nowrap;
}

.canister-tier {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-chip);
  background: var(--surface-2);
  color: var(--muted);
}

.canister-tier.is-free {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ======================== Section 4: 4-Stage Optical Pipeline ======================== */
.spectrum-meter {
  margin-bottom: 26px;
}

.spectrum-line {
  height: 3px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--spectrum-gradient);
}

.spectrum-ticks {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-stage);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-chip);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}

.pipeline-icon svg {
  width: 18px;
  height: 18px;
}

.pipeline-card h3 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -0.015em;
}

.pipeline-card p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.56;
}

/* ======================== Section 5: Ownership & Privacy ======================== */
.ownership-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-stage);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.plan-card--pro {
  border-color: var(--line-strong);
}

.plan-card--pro::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.5px;
  background: var(--spectrum-gradient);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.plan-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-badge {
  font-size: 12px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  background: var(--surface-2);
  color: var(--fg-2);
}

.plan-card--pro .plan-badge {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.plan-lead {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--fg-2);
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14.5px;
  color: var(--fg);
}

.check-list svg {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--accent-text);
}

.privacy-bar {
  margin-top: 22px;
  padding: 24px 28px;
  border-radius: var(--radius-stage);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.privacy-summary h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
}

.privacy-summary p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fg-2);
}

.privacy-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.privacy-fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--fg);
}

.privacy-fact svg {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}

.policy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}

.policy-link:hover {
  text-decoration: underline;
}

.policy-link svg {
  width: 15px;
  height: 15px;
}

/* ======================== Footer ======================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--fg-2);
}

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

.footer-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.footer-brand strong {
  color: var(--fg);
  font-weight: 650;
}

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

.footer-links a:hover {
  color: var(--fg);
}

.footer-support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2);
  border-radius: var(--radius-chip);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 560;
  cursor: pointer;
}

.copy-chip:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

/* ======================== Modal Dialog ======================== */
.download-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-stage);
  background: var(--surface);
  color: var(--fg);
  padding: 26px;
  box-shadow: var(--shadow-stage);
}

.download-dialog::backdrop {
  background: rgba(16, 18, 24, 0.56);
  backdrop-filter: blur(6px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.dialog-close {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dialog-close svg {
  width: 16px;
  height: 16px;
}

.dialog-body {
  margin: 0;
  font-size: 14.5px;
  color: var(--fg-2);
}

.dialog-platform-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-email-row {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-frame);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ======================== Motion Reveals ======================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease-precision), transform 520ms var(--ease-precision);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .theme-btn,
  .canister-item,
  .compare-knob {
    transition: none;
  }
}

/* ======================== Responsive Breakpoints ======================== */
@media (max-width: 1024px) {
  .topbar-links {
    display: none;
  }
  .tour-panel {
    grid-template-columns: 1fr;
    padding: 26px;
  }
  .duo-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ownership-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }
  .topbar-wrap {
    top: 10px;
    padding: 0 12px;
  }
  .topbar {
    height: 56px;
    padding: 0 8px 0 12px;
  }
  .topbar-actions .btn-sm {
    display: none;
  }
  .hero {
    padding: 36px 0 60px;
  }
  .hero-orb {
    width: 66px;
    height: 66px;
    border-radius: 17px;
    margin-bottom: 22px;
  }
  .compare-theater {
    margin-top: 34px;
  }
  .section {
    padding: 60px 0;
  }
  .scene-bar {
    border-radius: var(--radius-frame);
  }
  .duo-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .duo-media {
    max-width: 280px;
    margin: 0 auto;
  }
  .compare-caption {
    grid-template-columns: auto 1fr;
    gap: 8px;
  }
  .compare-caption-right {
    font-size: 11.5px;
    white-space: nowrap;
  }
  .compare-caption-mid {
    display: none;
  }
}

@media (max-width: 480px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    gap: 12px;
  }
  .tour-panel {
    padding: 20px;
  }
  .privacy-bar {
    padding: 20px;
  }
  .dialog-platform-row {
    grid-template-columns: 1fr;
  }
}

/* ======================== Subpages: Privacy & Open Source ======================== */
.nav-link[aria-current="page"] {
  color: var(--fg);
  background: var(--surface-2);
  font-weight: 600;
}

.doc-hero {
  position: relative;
  padding: 58px 0 24px;
}

.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 16px;
}

.doc-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  color: var(--fg);
  text-wrap: balance;
}

.doc-meta {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--fg-3);
}

.doc-lead {
  margin: 14px 0 0;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-2);
}

.pledge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.pledge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.pledge-val {
  display: block;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--fg);
}

.pledge-label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.45;
}

.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 0;
  padding-bottom: 88px;
}

.doc-toc {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.doc-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.doc-toc-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 520;
  color: var(--fg-2);
  transition: background-color 150ms ease, color 150ms ease;
}

.doc-toc-link:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.doc-toc-link[aria-current="true"] {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.doc-toc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  opacity: 0.72;
  flex-shrink: 0;
}

.doc-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.doc-main > article:not([hidden]) {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.doc-main > article[hidden] {
  display: none;
}

.clause {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  padding: 28px 30px;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 96px;
  min-width: 0;
}

.clause-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.clause-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.clause h2 {
  margin: 0;
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.clause p {
  margin: 0;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.72;
}

.clause p + p {
  margin-top: 12px;
}

.clause code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg);
  overflow-wrap: anywhere;
}

.points-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.points-grid li {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-2);
}

.contact-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.contact-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

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

.source-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-card h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  color: var(--fg);
}

.source-card p {
  font-size: 13.5px;
  line-height: 1.6;
}

.source-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oss-toolbar {
  margin: 18px 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.oss-search {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font: inherit;
  font-size: 13.5px;
  color: var(--fg);
  min-width: 220px;
  max-width: 100%;
}

.oss-search:focus {
  outline: 2px solid var(--line-strong);
  outline-offset: 1px;
}

.component-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.component-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.component-table th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 650;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}

.component-table td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  line-height: 1.5;
}

.component-table tr:last-child td {
  border-bottom: 0;
}

.component-name {
  display: block;
  font-weight: 620;
  color: var(--fg);
}

.component-cat {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--fg-3);
}

.component-ver {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  word-break: break-all;
  color: var(--fg-2);
  max-width: 240px;
}

.license-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.jump-license-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  font-weight: 560;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.jump-license-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.license-reader {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.license-list-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 8px;
  max-height: 600px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.license-item-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--fg-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.license-item-btn:hover {
  background: var(--surface);
  color: var(--fg);
}

.license-item-btn[aria-selected="true"] {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.license-item-title {
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.license-item-meta {
  font-size: 11px;
  opacity: 0.78;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.license-viewer-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  min-width: 0;
}

.license-viewer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.license-viewer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.license-viewer-meta strong {
  font-size: 13.5px;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.license-viewer-meta span {
  font-size: 12px;
  color: var(--fg-3);
}

.license-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.license-pre {
  margin: 0;
  padding: 18px 20px;
  max-height: 548px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.clause .license-pre code {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  color: inherit;
  overflow-wrap: normal;
}

@media (max-width: 1024px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .doc-toc {
    position: static;
  }
  .doc-toc-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .pledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .license-reader {
    grid-template-columns: 1fr;
  }
  .license-list-panel {
    max-height: 240px;
  }
}

@media (max-width: 768px) {
  .doc-hero {
    padding: 36px 0 20px;
  }
  .doc-layout {
    padding-bottom: 64px;
  }
  .doc-main,
  .doc-main > article:not([hidden]) {
    gap: 18px;
  }
  .clause {
    padding: 20px 18px;
  }
  .points-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .pledge-grid {
    grid-template-columns: 1fr;
  }
  .oss-search {
    width: 100%;
    min-width: 0;
  }
}
