/* ==========================================================================
   Union — union.cculture.net
   Lumen: porcelain ground, ink type, one ultramarine signal, champagne value.
   ========================================================================== */

@font-face {
  font-family: "Union Sans";
  src: url("assets/fonts/google-sans-variable-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Union Sans";
  src: url("assets/fonts/google-sans-400-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Union Code";
  src: url("assets/fonts/google-sans-code-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens */

:root {
  --font: "Union Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Union Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --paper: #f4f1ea;
  --paper-2: #efebe2;
  --surface: #fbf9f4;
  --surface-2: #f7f4ed;
  --ink: #191a1f;
  --ink-2: #3c3e47;
  --muted: #62656f;
  --faint: #8a8d96;
  --line: rgba(25, 26, 31, 0.12);
  --line-strong: rgba(25, 26, 31, 0.22);
  --signal: #2b3bd6;
  --signal-ink: #2130b8;
  --signal-soft: rgba(43, 59, 214, 0.09);
  --gold: #a9711f;
  --gold-bright: #d9aa5f;
  --gold-soft: rgba(169, 113, 31, 0.12);
  --lacquer: #101116;
  --lacquer-2: #1a1b24;
  --on-lacquer: #f6f4ef;
  --on-lacquer-muted: #b9b7b0;

  --shadow-sm: 0 1px 2px rgba(20, 21, 26, 0.05), 0 2px 8px rgba(20, 21, 26, 0.04);
  --shadow-md: 0 2px 6px rgba(20, 21, 26, 0.06), 0 18px 44px -18px rgba(20, 21, 26, 0.22);
  --shadow-lg: 0 4px 12px rgba(20, 21, 26, 0.07), 0 40px 80px -30px rgba(20, 21, 26, 0.3);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-full: 999px;

  --wrap: 1160px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --head-h: 70px;

  --ease: cubic-bezier(0.22, 0.9, 0.3, 1);
  --spring: cubic-bezier(0.2, 1.25, 0.35, 1);
}

html[data-theme="dark"] {
  --paper: #101116;
  --paper-2: #0b0c10;
  --surface: #17181f;
  --surface-2: #1c1d26;
  --ink: #f2efe8;
  --ink-2: #d8d6d0;
  --muted: #a9a7a1;
  --faint: #7f7d78;
  --line: rgba(242, 239, 232, 0.13);
  --line-strong: rgba(242, 239, 232, 0.24);
  --signal: #98a3ff;
  --signal-ink: #b3bcff;
  --signal-soft: rgba(152, 163, 255, 0.12);
  --gold: #e2bc7b;
  --gold-bright: #eccd97;
  --gold-soft: rgba(226, 188, 123, 0.13);
  --lacquer: #f4f1ea;
  --lacquer-2: #eae6dc;
  --on-lacquer: #15161b;
  --on-lacquer-muted: #4e5059;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.45), 0 50px 90px -30px rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --paper: #101116;
    --paper-2: #0b0c10;
    --surface: #17181f;
    --surface-2: #1c1d26;
    --ink: #f2efe8;
    --ink-2: #d8d6d0;
    --muted: #a9a7a1;
    --faint: #7f7d78;
    --line: rgba(242, 239, 232, 0.13);
    --line-strong: rgba(242, 239, 232, 0.24);
    --signal: #98a3ff;
    --signal-ink: #b3bcff;
    --signal-soft: rgba(152, 163, 255, 0.12);
    --gold: #e2bc7b;
    --gold-bright: #eccd97;
    --gold-soft: rgba(226, 188, 123, 0.13);
    --lacquer: #f4f1ea;
    --lacquer-2: #eae6dc;
    --on-lacquer: #15161b;
    --on-lacquer-muted: #4e5059;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.45), 0 50px 90px -30px rgba(0, 0, 0, 0.85);
  }
}

/* ---------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.028em; line-height: 1.08; text-wrap: balance; }
strong { font-weight: 600; }
code, pre { font-family: var(--mono); }
::selection { background: var(--signal); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip:focus { transform: none; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--head-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-head.scrolled { border-bottom-color: var(--line); }
.head-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.16rem;
}
.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--ink);
  transition: transform 0.5s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-word { transform: translateY(0.5px); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav a {
  padding: 0.5rem 0.78rem;
  font-size: 0.92rem;
  color: var(--muted);
  border-radius: var(--r-full);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--signal-soft); }

.head-actions { display: flex; align-items: center; gap: 0.55rem; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.iconbtn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.iconbtn .icon { width: 19px; height: 19px; }

.theme-sun, .theme-moon { display: none; }
html[data-theme="dark"] .theme-moon { display: block; }
html:not([data-theme="dark"]) .theme-sun { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-sun { display: none; }
  html:not([data-theme="light"]) .theme-moon { display: block; }
}

.menu-btn { display: none; }

/* --------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 0.78rem 1.4rem;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--btn-ink);
  background: var(--btn-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: transform 0.24s var(--spring), box-shadow 0.24s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.24s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn.primary {
  --btn-bg: var(--ink);
  --btn-ink: var(--paper);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .btn.primary {
  --btn-bg: var(--gold);
  --btn-ink: #17130b;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .btn.primary { --btn-bg: var(--gold); --btn-ink: #17130b; }
}
.btn.soft { background: transparent; }
.btn.soft:hover { background: var(--surface); }
.btn.sm { min-height: 40px; padding: 0.45rem 1.05rem; font-size: 0.9rem; }
.btn.block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--signal-ink);
  padding-block: 0.2rem;
}
.text-link .icon { width: 17px; height: 17px; transition: transform 0.22s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
html[data-theme="dark"] .text-link { color: var(--signal); }

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

.hero {
  position: relative;
  padding: clamp(3.2rem, 9vw, 6.4rem) 0 clamp(2.6rem, 7vw, 5rem);
  overflow: clip;
}
.hero-glow {
  position: absolute;
  inset: -30% -10% auto auto;
  width: min(900px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(closest-side, var(--signal-soft), transparent 72%),
    radial-gradient(closest-side at 70% 30%, var(--gold-soft), transparent 70%);
  filter: blur(10px);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.hero h1 {
  font-size: clamp(2.9rem, 8vw, 5.1rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.99;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--signal-ink);
}
html[data-theme="dark"] .hero h1 em { color: var(--gold); }

.lede {
  max-width: 33rem;
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.35rem;
  margin-top: 1.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 0.42rem; }
.hero-meta .icon { color: var(--gold); width: 17px; height: 17px; }

/* phone */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(420px, 54vw, 600px);
}
.hero-orbit {
  position: absolute;
  width: min(520px, 92%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.hero-orbit::before { inset: 12%; opacity: 0.7; }
.hero-orbit::after { inset: 27%; opacity: 0.45; }

.phone {
  position: relative;
  width: min(286px, 74%);
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(150deg, #2a2c36, #0c0d12 55%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(1.4deg);
  transition: transform 0.7s var(--spring);
}
.hero-visual:hover .phone { transform: rotate(0deg) translateY(-4px); }
.phone::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  translate: -50% 0;
  width: 72px;
  height: 7px;
  border-radius: 99px;
  background: #08090d;
  z-index: 2;
}
.phone-screen {
  overflow: hidden;
  border-radius: 34px;
  background: var(--paper);
  aspect-ratio: 720 / 1228;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.small { width: min(250px, 88%); transform: none; }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.7rem 0.95rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  line-height: 1.3;
  animation: hover 7s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 0.82rem; letter-spacing: -0.01em; }
.float-card small { color: var(--muted); font-size: 0.73rem; }
.float-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--signal-soft);
  color: var(--signal-ink);
}
.float-icon.gold { background: var(--gold-soft); color: var(--gold); }
.float-icon .icon { width: 18px; height: 18px; }
.float-one { top: 16%; left: -2%; }
.float-two { bottom: 12%; right: -3%; animation-delay: -3.2s; }

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

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

.strip { border-block: 1px solid var(--line); background: var(--surface-2); }
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.15rem;
  padding-block: 0.95rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.strip-label {
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 0.3rem;
}
.sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* -------------------------------------------------------------- sections */

.section { padding: clamp(4rem, 9vw, 7.2rem) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: clamp(2.2rem, 5vw, 3.6rem);
}
.section-head .index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  padding-top: 0.55rem;
  letter-spacing: 0.06em;
}
.section-head .eyebrow { margin-bottom: 0.65rem; }
.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  letter-spacing: -0.038em;
  line-height: 1.06;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.intro-lede {
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  max-width: 28rem;
}

.pillar-grid { display: grid; gap: 1rem; }
.pillar {
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pillar-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.9rem;
  border-radius: 13px;
  background: var(--signal-soft);
  color: var(--signal-ink);
}
.pillar-icon.gold { background: var(--gold-soft); color: var(--gold); }
.pillar-icon .icon { width: 21px; height: 21px; }
.pillar h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.94rem; color: var(--muted); line-height: 1.58; }

/* practice */

.practice {
  background:
    radial-gradient(80% 120% at 100% 0%, var(--gold-soft), transparent 55%),
    var(--paper);
}
.statement { max-width: 50rem; margin-bottom: clamp(2.4rem, 5vw, 3.8rem); }
.statement blockquote {
  margin: 0;
  font-size: clamp(1.65rem, 4.2vw, 3.05rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.statement blockquote em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.value {
  padding: 1.5rem;
  border-top: 1px solid var(--line-strong);
  padding-left: 0;
}
.value-kicker {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-ink);
  margin-bottom: 0.7rem;
}
html[data-theme="dark"] .value-kicker { color: var(--gold); }
.value p { color: var(--muted); font-size: 0.98rem; }

/* capabilities */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cap {
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  background: var(--surface);
  transition: background 0.25s var(--ease);
}
.cap:hover { background: var(--surface-2); }
.cap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}
.cap-num {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.08em;
}
.cap-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--signal-soft);
  color: var(--signal-ink);
}
.cap-icon .icon { width: 19px; height: 19px; }
.cap h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.cap p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; max-width: 26rem; }

/* tour */

.tour-section { background: var(--surface-2); }
.tour {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: start;
}
.tour-tabs { display: grid; gap: 0.25rem; }
.tour-tab {
  display: grid;
  gap: 0.06rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.tour-tab span { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.015em; }
.tour-tab small { font-size: 0.78rem; color: var(--muted); }
.tour-tab:hover { background: var(--surface); }
.tour-tab[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.tour-tab[aria-selected="true"] span { color: var(--signal-ink); }
html[data-theme="dark"] .tour-tab[aria-selected="true"] span { color: var(--gold); }

.tour-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.tour-phone { display: grid; place-items: center; }
.tour-copy .eyebrow { margin-bottom: 0.55rem; }
.tour-copy h3 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin-bottom: 0.8rem; }
.tour-copy p:last-child { color: var(--muted); font-size: 0.97rem; }

/* privacy */

.dark {
  background:
    radial-gradient(70% 100% at 85% 0%, rgba(43, 59, 214, 0.22), transparent 60%),
    radial-gradient(60% 90% at 0% 100%, rgba(226, 188, 123, 0.1), transparent 60%),
    var(--lacquer);
  color: var(--on-lacquer);
}
.dark .section-head .index,
.dark .eyebrow { color: var(--on-lacquer-muted); }
.dark .intro-lede { color: var(--on-lacquer); }
.privacy .section-head { margin-bottom: 2.6rem; }
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.privacy-copy .text-link { color: var(--gold-bright); margin-top: 1.6rem; }
.relay-diagram {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.2rem;
  padding: 1.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
}
.relay-node { flex: 1; display: grid; justify-items: center; text-align: center; gap: 0.2rem; }
.relay-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.35rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold-bright);
}
.relay-icon .icon { width: 19px; height: 19px; }
.relay-node strong { font-size: 0.76rem; font-weight: 600; }
.relay-node small { font-size: 0.66rem; color: var(--on-lacquer-muted); line-height: 1.3; }
.relay-line {
  flex: 0 0 18px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold-bright) 0 3px, transparent 3px 6px);
  opacity: 0.6;
}
.privacy-list { display: grid; gap: 0.1rem; }
.privacy-list li {
  display: flex;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.93rem;
  color: var(--on-lacquer-muted);
  line-height: 1.5;
}
.privacy-list li:first-child { padding-top: 0; }
.privacy-list li:last-child { border-bottom: 0; }
.privacy-list .icon { color: var(--gold-bright); margin-top: 0.28rem; width: 17px; height: 17px; }
.privacy-list strong { color: var(--on-lacquer); font-weight: 600; }

/* install */

.install-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.install-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.3rem, 2.6vw, 1.8rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.install-card.featured {
  background:
    linear-gradient(180deg, var(--signal-soft), transparent 34%),
    var(--surface);
  border-color: color-mix(in srgb, var(--signal) 26%, var(--line));
}
.install-head { display: flex; align-items: center; justify-content: space-between; }
.install-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--signal-soft);
  color: var(--signal-ink);
}
.install-icon .icon { width: 21px; height: 21px; }
.chip {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
}
.install-card h3 { font-size: 1.28rem; }
.install-card p { font-size: 0.93rem; color: var(--muted); }
.install-card .version {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: -0.4rem;
}
.install-card .btn { margin-top: auto; }
.hash-box {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
}
.hash-box span { color: var(--faint); font-weight: 600; letter-spacing: 0.1em; font-size: 0.64rem; }
.hash-box code { word-break: break-all; color: var(--ink-2); line-height: 1.45; }

.verify { border-top: 1px solid var(--line); padding-top: 0.7rem; }
.verify summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  list-style: none;
}
.verify summary::-webkit-details-marker { display: none; }
.verify summary::before { content: "+ "; color: var(--gold); }
.verify[open] summary::before { content: "− "; }
.verify pre { margin: 0.7rem 0 0.5rem; }
.fine { font-size: 0.78rem !important; color: var(--muted); line-height: 1.5; }
.break { word-break: break-all; }

pre {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-2);
}
code { font-size: 0.9em; }

.qr-row { display: flex; align-items: center; gap: 0.9rem; }
.qr {
  width: 108px;
  height: 108px;
  padding: 7px;
  background: #fff;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.qr-row .fine { margin-bottom: 0.15rem; }

.snippet { margin-top: auto; }

.install-note {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--gold-soft);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.install-note .icon { color: var(--gold); margin-top: 0.2rem; width: 18px; height: 18px; }
.install-note strong { color: var(--ink); }

/* docs section */

.docs-section { background: var(--surface-2); }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}
.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease), border-color 0.2s var(--ease);
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.doc-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--signal-soft);
  color: var(--signal-ink);
  margin-bottom: 0.3rem;
}
.doc-icon .icon { width: 18px; height: 18px; }
.doc-card h3 { font-size: 1rem; }
.doc-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.doc-arrow {
  position: absolute;
  top: 1.3rem;
  right: 1.25rem;
  color: var(--faint);
  transition: transform 0.22s var(--ease), color 0.22s var(--ease);
}
.doc-card:hover .doc-arrow { transform: translateX(3px); color: var(--signal-ink); }
.doc-arrow .icon { width: 16px; height: 16px; }

/* limits */

.limits-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0;
}
.limit {
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.limit dt { font-weight: 600; font-size: 0.98rem; margin-bottom: 0.3rem; }
.limit dd { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* faq */

.faq { background: var(--surface-2); }
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--faint);
  border-bottom: 1.6px solid var(--faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq-list details p {
  padding: 0 0 1.2rem;
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* footer */

.site-foot {
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.6rem;
  background: var(--lacquer);
  color: var(--on-lacquer);
}
.site-foot .brand { color: var(--on-lacquer); }
.site-foot .brand-mark { color: var(--on-lacquer); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.8fr));
  gap: 2rem;
  padding-bottom: 2.6rem;
}
.foot-brand p {
  margin-top: 1rem;
  max-width: 23rem;
  font-size: 0.86rem;
  color: var(--on-lacquer-muted);
  line-height: 1.6;
}
.foot-col { display: flex; flex-direction: column; gap: 0.5rem; }
.foot-col h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-lacquer-muted);
  margin-bottom: 0.35rem;
}
.foot-col a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--on-lacquer);
  opacity: 0.82;
  transition: opacity 0.18s var(--ease);
  width: fit-content;
}
.foot-col a:hover { opacity: 1; color: var(--gold-bright); }
.foot-col a .icon { width: 14px; height: 14px; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  color: var(--on-lacquer-muted);
}
.foot-mark { display: inline-flex; align-items: center; gap: 0.4rem; }
.foot-mark .icon { width: 14px; height: 14px; }

/* ------------------------------------------------------------- utilities */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- docs */

.doc-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
  align-items: start;
}
.doc-side {
  position: sticky;
  top: calc(var(--head-h) + 1.5rem);
  display: grid;
  gap: 1.5rem;
}
.doc-side nav { display: grid; gap: 0.1rem; }
.doc-side h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}
.doc-side a {
  padding: 0.38rem 0.65rem;
  margin-left: -0.65rem;
  border-radius: var(--r-xs);
  font-size: 0.88rem;
  color: var(--muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.doc-side a:hover { background: var(--signal-soft); color: var(--ink); }
.doc-side a[aria-current="page"] {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}
.doc-side .side-cta {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--muted);
}
.doc-side .side-cta .text-link { font-size: 0.82rem; margin-top: 0.5rem; }

.doc-main { min-width: 0; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 1.4rem;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .icon { width: 13px; height: 13px; }
.doc-main > h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.8rem;
  max-width: 20ch;
}
.doc-dek {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 46rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-bottom: 1.8rem;
}

.prose { max-width: 48rem; }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  letter-spacing: -0.028em;
  line-height: 1.18;
  scroll-margin-top: calc(var(--head-h) + 20px);
}
.prose h1 { font-size: 2rem; margin: 2.4rem 0 0.9rem; }
.prose h2 {
  font-size: 1.5rem;
  margin: 2.8rem 0 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.14rem; margin: 2rem 0 0.6rem; }
.prose h4 { font-size: 1rem; margin: 1.6rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.35rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4rem; color: var(--ink-2); }
.prose li::marker { color: var(--gold); }
.prose a {
  color: var(--signal-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--signal) 35%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s var(--ease);
}
.prose a:hover { text-decoration-color: var(--signal); }
html[data-theme="dark"] .prose a { color: var(--signal); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code {
  padding: 0.12em 0.36em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.82em;
  color: var(--ink);
}
.prose pre {
  margin: 0 0 1.3rem;
  padding: 1rem 1.1rem;
  background: var(--lacquer);
  color: var(--on-lacquer);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .prose pre { background: #08090d; }
.prose pre code { padding: 0; background: none; border: 0; color: inherit; font-size: 0.8rem; }
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table {
  width: 100%;
  margin: 0 0 1.3rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose img { border-radius: var(--r-md); border: 1px solid var(--line); margin: 1rem 0; }

.doc-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.doc-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--signal-ink);
}
.doc-foot a .icon { width: 16px; height: 16px; }

.docs-hero {
  padding: clamp(2.8rem, 6vw, 4.6rem) 0 clamp(1.6rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.docs-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); letter-spacing: -0.042em; max-width: 16ch; }
.docs-hero p { margin-top: 1rem; max-width: 40rem; color: var(--muted); font-size: 1.05rem; }
.docs-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(4rem, 8vw, 6rem);
}
.doc-index-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease);
}
.doc-index-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.doc-index-card h2 { font-size: 1.05rem; }
.doc-index-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.doc-index-card .meta { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); margin-top: 0.4rem; }

.notfound {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 62vh;
  padding: 4rem 0;
}
.notfound h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); letter-spacing: -0.045em; }
.notfound p { margin: 1rem auto 2rem; max-width: 28rem; color: var(--muted); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-copy { max-width: 40rem; }
  .hero-visual { min-height: 480px; }
  .float-one { left: 4%; }
  .float-two { right: 2%; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-lede { max-width: 38rem; }
  .tour { grid-template-columns: 1fr; }
  .tour-tabs { display: flex; overflow-x: auto; gap: 0.35rem; padding-bottom: 0.4rem; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab { flex: none; min-width: 9.5rem; }
  .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-grid { grid-template-columns: 1fr 1fr; }
  .install-card.featured { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: span 2; }
  .doc-shell { grid-template-columns: 1fr; }
  .doc-side { position: static; }
  .doc-side nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .doc-side h2 { display: none; }
  .doc-side .side-cta { display: none; }
}

@media (max-width: 760px) {
  :root { --head-h: 62px; }
  body { font-size: 16px; }
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .site-head .btn.sm { display: none; }

  .nav.open {
    display: flex;
    position: fixed;
    inset: var(--head-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.8rem var(--gutter) 1.2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.open a { padding: 0.85rem 0.8rem; font-size: 1rem; border-radius: var(--r-sm); }

  .hero { padding-top: 2.4rem; }
  .hero h1 { font-size: clamp(2.55rem, 12.5vw, 3.5rem); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-meta { font-size: 0.8rem; gap: 0.45rem 1rem; }
  .hero-visual { min-height: 430px; }
  .float-card { font-size: 0.7rem; padding: 0.55rem 0.7rem; }
  .float-card small { display: none; }
  .float-one { top: 8%; left: 0; }
  .float-two { bottom: 6%; right: 0; }

  .section-head { grid-template-columns: 1fr; gap: 0.35rem; }
  .section-head .index { padding-top: 0; }
  .values { grid-template-columns: 1fr; }
  .value { padding: 1.1rem 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .tour-panel { grid-template-columns: 1fr; }
  .tour-phone { order: 2; }
  .privacy-grid { grid-template-columns: 1fr; }
  .relay-diagram { gap: 0.2rem; padding: 1rem 0.5rem; }
  .relay-line { flex-basis: 8px; }
  .install-grid { grid-template-columns: 1fr; }
  .install-card.featured { grid-column: auto; }
  .docs-grid { grid-template-columns: 1fr; }
  .limits-list { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem 1.2rem; }
  .foot-brand { grid-column: span 2; }
  .docs-index { grid-template-columns: 1fr; }
  .doc-main > h1 { font-size: 2rem; }
  .prose pre { font-size: 0.72rem; }
  .prose table { display: block; overflow-x: auto; }
}

@media (max-width: 420px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .brand-word { font-size: 1rem; }
  .qr-row { align-items: flex-start; }
  .qr { width: 92px; height: 92px; }
}

/* ------------------------------------------------------------- print */

@media print {
  .site-head, .site-foot, .hero-visual, .home-cta, .side-cta, .menu-btn, .iconbtn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { padding: 0; }
  .section { padding: 1.2rem 0; }
  .dark { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
  a { text-decoration: underline; }
}
