:root {
  --paper: #ffffff;
  --paper-alt: #f5f7fb;
  --line: #e4e8ef;
  --ink: #0b0f19;
  --ink-soft: #5b6678;
  --blue: #2563eb;
  --blue-pale: #eaf1ff;
  --night: #05070d;
  --night-2: #0b1020;
  --night-line: rgb(255 255 255 / 0.1);
  --night-ink: #f4f6fb;
  --night-soft: #9aa4b8;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight", Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0d16;
    --paper-alt: #0e1220;
    --line: #1c2333;
    --ink: #f1f4fa;
    --ink-soft: #97a1b5;
    --blue: #60a5fa;
    --blue-pale: #13203f;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .foot-brand img { content: url("/brand/xi-mark-dark.png"); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
sup { font-size: 0.55em; color: var(--blue); font-weight: 600; margin-left: 0.06em; }
section[id] { scroll-margin-top: 64px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.035em; margin: 0; }

/* Header */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px clamp(16px, 4vw, 40px);
  color: var(--night-ink);
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.bar-solid { background: rgb(5 7 13 / 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--night-line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.bar nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.bar nav a { text-decoration: none; color: var(--night-soft); font-size: 0.95rem; font-weight: 500; }
.bar nav a:hover { color: var(--night-ink); }
.bar .nav-cta { color: var(--night); background: var(--night-ink); padding: 7px 14px; border-radius: 99px; }
.bar .nav-cta:hover { color: var(--night); background: #fff; }
.bar .nav-chip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--night-ink); color: var(--night); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; }

/* Dark bands */
.dark { background: var(--night); color: var(--night-ink); }
.dark .eyebrow { color: #7fa8ff; }
.dark sup { color: #7fa8ff; }

.hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 860px);
  display: grid; align-items: end;
  padding: 140px clamp(16px, 5vw, 64px) clamp(56px, 9vh, 96px);
  background:
    radial-gradient(60% 70% at 85% 10%, rgb(37 99 235 / 0.38), transparent 60%),
    radial-gradient(45% 55% at 10% 90%, rgb(99 102 241 / 0.22), transparent 65%),
    var(--night);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.35;
  mask-image: radial-gradient(70% 60% at 70% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 70% 30%, #000, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 1180px; width: 100%; margin: 0 auto; }
.eyebrow { margin: 0 0 18px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.hero h1 { font-size: clamp(2.6rem, 8.2vw, 6.6rem); line-height: 0.98; font-weight: 600; max-width: 13ch; }
.hero h1 span {
  display: block; margin-top: 0.12em;
  background: linear-gradient(92deg, #9fbcff 0%, #5b8cff 45%, #c7d6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 36rem; margin: 32px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--night-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 99px; border: 0; font: 600 0.98rem var(--body); text-decoration: none; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn sup { color: inherit; }
.btn-light { background: var(--night-ink); color: var(--night); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--night-ink); border: 1px solid rgb(255 255 255 / 0.28); }
.btn-ghost:hover { border-color: rgb(255 255 255 / 0.6); }
.btn-blue { background: #2563eb; color: #fff; }
.btn-blue:hover { background: #1d4ed8; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
a:focus-visible, button:focus-visible { outline: 3px solid #5b8cff; outline-offset: 3px; }

/* Wheel */
.wheel-band {
  padding: clamp(64px, 10vw, 120px) clamp(16px, 5vw, 64px) clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--night-line);
  background: radial-gradient(50% 45% at 50% 62%, rgb(37 99 235 / 0.18), transparent 70%), var(--night);
}
.section-head { max-width: 1180px; margin: 0 auto; }
.section-head.center { text-align: center; max-width: 40rem; }
.section-head h2 { font-size: clamp(2.1rem, 5.4vw, 4rem); line-height: 1.02; font-weight: 600; }
.section-head p:not(.eyebrow) { margin: 20px 0 0; color: var(--ink-soft); font-size: 1.1rem; }
.dark .section-head p:not(.eyebrow) { color: var(--night-soft); }
.wheel-wrap { position: relative; width: min(640px, 100%); margin: 48px auto 0; }
#wheel { display: block; width: 100%; height: auto; overflow: visible; }
.ring { fill: none; stroke: rgb(255 255 255 / 0.14); stroke-width: 1.2; }
.ring-faint { stroke-dasharray: 2 9; stroke: rgb(255 255 255 / 0.12); }
.orbit { transform-origin: 300px 300px; animation: spin 60s linear infinite; }
.satellite { fill: #7fa8ff; }
.spoke { stroke: rgb(255 255 255 / 0.12); stroke-width: 1.2; stroke-dasharray: 3 7; }
.spoke-on { stroke: #5b8cff; stroke-dasharray: 6 10; stroke-width: 2; animation: flow 2.4s linear infinite; }
.node .disc { fill: var(--night-2); stroke: rgb(255 255 255 / 0.14); stroke-width: 1.2; }
.node-q { fill: rgb(255 255 255 / 0.38); font: 600 24px var(--display); }
.node-on { cursor: pointer; text-decoration: none; outline: none; }
.node-on .disc { fill: #0d1730; stroke: #5b8cff; stroke-width: 2.5; }
.node-on .halo { fill: #3b82f6; opacity: 0.16; transform-box: fill-box; transform-origin: center; animation: breathe 3.2s ease-in-out infinite; }
.node-on:hover .halo, .node-on:focus-visible .halo { opacity: 0.32; }
.node-on:focus-visible .disc { stroke-width: 4; stroke: #9fbcff; }
.node-name { fill: #fff; font: 700 19px var(--display); letter-spacing: -0.02em; }
.node-sup { fill: #7fa8ff; font-size: 11px; font-weight: 700; }
.you { cursor: pointer; outline: none; }
.you-halo { fill: #fff; opacity: 0.07; }
.you-disc { fill: #f4f6fb; }
.you-label { fill: var(--night); font: 700 20px var(--display); letter-spacing: 0.16em; }
.you:hover .you-halo, .you:focus-visible .you-halo { opacity: 0.16; }
.you:focus-visible .you-disc { stroke: #5b8cff; stroke-width: 5; }
.tip {
  position: absolute; transform: translateX(-50%); z-index: 3;
  width: min(290px, 82vw); padding: 16px 18px; text-align: left;
  background: #0f1527; color: var(--night-ink); border: 1px solid rgb(255 255 255 / 0.14); border-radius: 16px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.45); pointer-events: none;
}
.tip strong { font: 600 1.1rem var(--display); }
.tip sup { color: #7fa8ff; }
.tip p { margin: 6px 0 10px; color: var(--night-soft); font-size: 0.9rem; line-height: 1.5; }
.tip-tag { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px; background: rgb(91 140 255 / 0.18); color: #9fbcff; font-size: 0.72rem; font-weight: 600; vertical-align: middle; }
.tip-go { color: #9fbcff; font-size: 0.85rem; font-weight: 600; }

/* Light bands */
.band { padding: clamp(72px, 11vw, 140px) clamp(16px, 5vw, 64px); }
.band-alt { background: var(--paper-alt); }
.split { max-width: 1180px; margin: 0 auto; display: grid; gap: clamp(40px, 6vw, 96px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
.big { font: 500 clamp(1.3rem, 2.4vw, 1.75rem)/1.35 var(--display) !important; letter-spacing: -0.02em; color: var(--ink) !important; }
.principles { display: grid; gap: 0; }
.principles article { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
.principles article:last-child { border-bottom: 1px solid var(--line); }
.num { grid-row: span 2; font: 600 0.85rem var(--display); color: var(--blue); padding-top: 6px; }
.principles h3 { font-size: 1.45rem; font-weight: 600; letter-spacing: -0.025em; }
.principles p { margin: 8px 0 0; color: var(--ink-soft); }

.products { max-width: 1180px; margin: 48px auto 0; display: grid; gap: 20px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.product-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 340px;
  padding: clamp(24px, 4vw, 40px); border-radius: 24px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.product-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 24px 60px rgb(37 99 235 / 0.14); }
.product-card::before {
  content: ""; position: absolute; inset: auto -1px -1px -1px; height: 45%; border-radius: 0 0 24px 24px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgb(37 99 235 / 0.07));
}
.tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.product-name { margin: 12px 0 0; font: 700 clamp(2.8rem, 6.5vw, 4.6rem)/1 var(--display); letter-spacing: -0.045em; }
.product-line { margin: 4px 0 0; font: 600 1.3rem var(--display); letter-spacing: -0.02em; }
.product-desc { margin: 0; color: var(--ink-soft); max-width: 30rem; }
.product-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--blue-pale); color: var(--blue); font-size: 0.78rem; font-weight: 600; }
.go { font-weight: 600; color: var(--blue); }
.go::after { content: " \2192"; }
.product-dark { background: var(--night); color: var(--night-ink); border-color: var(--night); }
.product-dark::before { background: radial-gradient(80% 60% at 80% 0%, rgb(37 99 235 / 0.3), transparent 70%); inset: 0; height: auto; border-radius: 24px; }
.product-dark .tag, .product-dark .product-desc { color: var(--night-soft); position: relative; }
.product-dark .product-line { position: relative; margin-top: auto; }
.q-row { position: relative; display: flex; gap: 12px; margin-top: 20px; }
.q-row span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.16); color: rgb(255 255 255 / 0.4); font: 600 1.4rem var(--display); background: rgb(255 255 255 / 0.03); }

.about { max-width: 1180px; margin: 0 auto; }
.statement { margin: 0; max-width: 22em; font: 500 clamp(1.7rem, 4.2vw, 3.2rem)/1.15 var(--display); letter-spacing: -0.035em; }
.about-sub { margin: 32px 0 0; font-size: 1.15rem; color: var(--ink-soft); }

.closer { text-align: center; padding: clamp(80px, 12vw, 140px) 16px; background: radial-gradient(60% 80% at 50% 100%, rgb(37 99 235 / 0.32), transparent 70%), var(--night); }
.closer h2 { font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 600; margin-bottom: 32px; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 32px clamp(16px, 5vw, 64px) 40px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.92rem; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 600 1rem var(--display); letter-spacing: -0.02em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Dialog */
.sheet { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgb(5 7 13 / 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet[hidden] { display: none; }
.sheet-card { width: min(440px, 100%); background: var(--paper); color: var(--ink); border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); }
.sheet-card h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 12px; }
.sheet-card p { margin: 0 0 10px; color: var(--ink-soft); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Documents (privacy, terms, 404) */
.doc-hero { padding: 140px clamp(16px, 5vw, 64px) 56px; }
.doc-hero h1 { max-width: 1180px; margin: 0 auto; font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 600; line-height: 1; }
.doc-hero .date { max-width: 1180px; margin: 18px auto 0; color: var(--night-soft); }
.doc { max-width: 720px; margin: 0 auto; padding: 56px 16px 96px; }
.doc h2 { font-size: 1.35rem; font-weight: 600; margin: 40px 0 10px; letter-spacing: -0.02em; }
.doc h2:first-child { margin-top: 0; }
.doc p { margin: 0 0 14px; }
.doc a { color: var(--blue); }

@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 860px) {
  .split, .products { grid-template-columns: minmax(0, 1fr); }
  .product-card { min-height: 0; }
  .product-dark { min-height: 240px; }
}
@media (max-width: 520px) {
  .bar { padding: 14px 16px; }
  .brand span { font-size: 1rem; }
  .bar nav { gap: 14px; }
  .bar nav a { font-size: 0.9rem; }
  .hero { padding-top: 120px; min-height: 0; }
  .actions .btn { flex: 1 1 100%; }
  .principles article { grid-template-columns: 40px 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
}
