:root {
  --bg: #05060a;
  --ink: #f4f6fa;
  --muted: #b4bbc8;
  --dim: #7b8494;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(14, 16, 24, 0.48);
  --cyan: #5ec8ff;
  --blue: #4da3ff;
  --purple: #b794f6;
  --orange: #ff8c42;
  --teal: #50d6c4;
  --sense: #5ec8ff;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 300;
}

html {
  scroll-behavior: smooth;
}

body.home {
  min-height: 100vh;
}

::selection {
  background: color-mix(in srgb, var(--sense) 40%, transparent);
  color: #fff;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

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

.void {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 560px at 12% 8%, rgba(94, 200, 255, 0.18), transparent 58%),
    radial-gradient(820px 520px at 88% 18%, rgba(183, 148, 246, 0.12), transparent 62%),
    radial-gradient(900px 520px at 70% 100%, rgba(255, 140, 66, 0.08), transparent 60%),
    #05060a;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.65;
  animation: drift 18s var(--ease) infinite alternate;
}

.orb-a {
  width: 460px;
  height: 460px;
  left: -90px;
  top: 14%;
  background: rgba(77, 163, 255, 0.3);
}

.orb-b {
  width: 380px;
  height: 380px;
  right: -50px;
  top: 6%;
  background: rgba(94, 200, 255, 0.22);
  animation-delay: -6s;
}

.orb-c {
  width: 520px;
  height: 520px;
  right: 10%;
  bottom: -160px;
  background: rgba(255, 140, 66, 0.14);
  animation-delay: -11s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
}

.wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.nav {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: min(1180px, calc(100vw - 40px));
  margin: 20px auto 0;
  padding: 9px 12px;
  border-radius: var(--radius);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.2em;
  font-weight: 600;
  font-size: 13px;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav nav {
  display: flex;
  gap: 4px;
}

.nav-link,
.chip,
.btn {
  transition:
    transform 220ms var(--ease),
    background 220ms var(--ease),
    border-color 220ms var(--ease),
    color 220ms var(--ease);
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.nav-legal {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding-right: 6px;
}

.nav-legal a {
  color: var(--dim);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.nav-legal a:hover,
.nav-legal a.is-active {
  color: var(--ink);
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 168px);
  padding: 20px 20px 12px;
}

.vessel {
  width: min(1180px, 100%);
  min-height: min(700px, calc(100vh - 188px));
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.05fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 8px;
  padding: 28px 24px 16px 36px;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}

.vessel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 340px at 78% 40%, color-mix(in srgb, var(--sense) 24%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 500ms var(--ease);
}

.vessel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 32%, transparent 68%, rgba(255, 255, 255, 0.04));
  pointer-events: none;
  z-index: 0;
}

.vessel-copy,
.vessel-stage,
.rail,
.marks {
  position: relative;
  z-index: 1;
}

.marks {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.mark {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vessel-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 470px;
  padding: 8px 0 16px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sense);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 400ms var(--ease);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h1 em {
  font-style: italic;
  color: color-mix(in srgb, var(--sense) 82%, white);
}

.lede {
  margin: 20px 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.btn-solid {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: #f4f6fa;
  color: #111318;
  font-size: 13px;
  font-weight: 500;
}

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

.btn-ghost {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 13px;
}

.aside {
  margin: 0;
  max-width: 20ch;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
}

.vessel-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.halo {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sense) 48%, transparent), transparent 68%);
  filter: blur(10px);
  transition: background 450ms var(--ease);
}

.watch-frame,
.film-frame {
  position: relative;
  z-index: 1;
}

.watch-frame img {
  width: min(400px, 38vw);
  height: auto;
  filter: drop-shadow(0 30px 46px rgba(0, 0, 0, 0.48));
  animation: float 7s var(--ease) infinite;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.watch-frame.is-swap img {
  animation: none;
  opacity: 0;
  transform: scale(0.97);
}

.film-frame {
  width: min(540px, 44vw);
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.film-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #000;
}

.rail {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 4px;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

.chip:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.18);
}

.chip.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: color-mix(in srgb, var(--sense) 45%, transparent);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--sense);
}

.chip[data-sense="structure"] .chip-dot { background: var(--blue); }
.chip[data-sense="material"] .chip-dot { background: var(--orange); }
.chip[data-sense="fill"] .chip-dot { background: var(--purple); }
.chip[data-sense="resonance"] .chip-dot { background: var(--orange); }
.chip[data-sense="compare"] .chip-dot { background: var(--teal); }
.chip[data-sense="haptics"] .chip-dot { background: var(--purple); }
.chip[data-sense="calibrate"] .chip-dot { background: var(--blue); }

.foot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto 18px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 12px;
}

.foot p {
  margin: 0;
}

.foot-links {
  display: flex;
  gap: 4px;
}

.foot-links a,
.legal-links a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.foot-links a:hover,
.legal-links a:hover,
.legal-links a.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.doc-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 40px));
  margin: 20px auto 28px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 20px;
  padding: 22px 18px;
  border-radius: var(--radius);
}

.toc p {
  margin: 0 0 14px;
  color: var(--sense);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toc a:hover {
  color: var(--ink);
}

.paper {
  padding: 42px 48px 56px;
  border-radius: var(--radius);
}

.paper h1 {
  font-size: clamp(40px, 5vw, 64px);
}

.paper .lede {
  max-width: 58ch;
}

.meta {
  display: flex;
  gap: 16px;
  margin: 18px 0 0;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper h2 {
  margin: 42px 0 12px;
  font-size: 22px;
  font-weight: 500;
}

.paper h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--sense);
}

.paper p,
.paper li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.paper p {
  margin: 0 0 14px;
  max-width: 68ch;
}

.paper a {
  color: var(--cyan);
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
}

.paper ul,
.paper ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.quote {
  margin: 18px 0 22px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.45;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 22px;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

td {
  color: var(--muted);
}

.notice {
  margin: 8px 0 28px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--orange) 35%, transparent);
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  color: #ffd7b8;
  font-size: 15px;
  line-height: 1.55;
}

.lost {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}

.lost h1 {
  margin-bottom: 12px;
}

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

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(24px, -18px, 0); }
}

@media (max-width: 960px) {
  .nav,
  .foot {
    grid-template-columns: 1fr auto;
    border-radius: var(--radius);
  }

  .nav {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .nav nav,
  .nav-legal {
    display: flex;
    flex-wrap: wrap;
  }

  .vessel {
    grid-template-columns: 1fr;
    padding: 24px 18px 14px;
  }

  .watch-frame img,
  .film-frame {
    width: min(320px, 78vw);
  }

  .actions {
    flex-wrap: wrap;
  }

  .doc-shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .paper {
    padding: 28px 20px 40px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    border-radius: var(--radius);
  }
}

@media (prefers-reduced-motion: reduce) {
  .watch-frame img,
  .orb {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
