/* Vector Principles · cinematic ------------------------------------------ */
:root {
  --void: #0A0D16;
  --panel: #0F1420;
  --line: #1E2536;
  --ink: #E9ECF5;
  --ink-2: #A9B1C6;
  --ink-3: #8791A8;
  --accent: #3E63FF;
  --accent-bright: #6D8DFF;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 3px; }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-3); }
.measure { max-width: var(--measure); margin: 0 auto; padding: 0 32px; width: 100%; min-width: 0; }
em { font-style: italic; }

/* The field ---------------------------------------------------------------- */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

/* Preloader ---------------------------------------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}

#preloader.done { opacity: 0; visibility: hidden; }

.pre-inner { width: min(420px, 80vw); }

.pre-name { color: var(--ink); letter-spacing: 0.34em; font-size: 13px; }

.pre-line {
  height: 1px;
  background: var(--line);
  margin: 18px 0 10px;
  overflow: hidden;
}

.pre-line span {
  display: block;
  height: 100%;
  background: var(--accent-bright);
  animation: preload 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  transform-origin: left;
}

@keyframes preload { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.pre-meta { display: flex; justify-content: space-between; }

/* Header / rail / HUD ------------------------------------------------------- */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(10, 13, 22, 0.8), rgba(10, 13, 22, 0));
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.9s ease 0.5s, transform 0.9s ease 0.5s;
}

body.booted .top { opacity: 1; transform: none; }

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span { color: var(--accent-bright); font-style: italic; }

.top nav {
  display: flex;
  gap: 26px;
  align-items: center;
  background: rgba(10, 14, 24, 0.42);
  border: 1px solid rgba(109, 141, 255, 0.16);
  border-radius: 99px;
  padding: 9px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
}

.top nav::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -13px;
  height: 16px;
  background: radial-gradient(55% 100% at 50% 0%, rgba(150, 180, 255, 0.3), transparent 70%);
  filter: blur(3px);
  pointer-events: none;
}

.top nav a { font-family: var(--mono); font-size: 13px; color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .index-btn { border: none; border-radius: 0; padding: 0; color: var(--accent-bright); }
.top nav .index-btn:hover { color: var(--ink); }

/* the constellation navigator: the journey as a clickable star-chart */
.rail {
  position: fixed;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 78px;
  height: 470px;
  opacity: 0;
  transition: opacity 0.9s ease 0.8s;
}

body.booted .rail { opacity: 1; }

.const-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cline-base { fill: none; stroke: rgba(140, 160, 220, 0.16); stroke-width: 1; }
.cline-lit {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.4;
  opacity: 0.85;
  filter: drop-shadow(0 0 3px rgba(109, 141, 255, 0.7));
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.cnode {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.cdot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 4px rgba(140, 160, 220, 0.5);
  transition: background 0.3s ease, width 0.3s ease, height 0.3s ease, margin 0.3s ease, box-shadow 0.3s ease;
}

.cnode:hover .cdot { background: var(--ink); box-shadow: 0 0 8px rgba(160, 180, 240, 0.9); }

.cnode.here .cdot {
  background: var(--accent-bright);
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  box-shadow: 0 0 10px 2px rgba(109, 141, 255, 0.9);
}

.cnode.here::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid rgba(109, 141, 255, 0.5);
  border-radius: 50%;
  animation: cpulse 2.6s ease-out infinite;
}

@keyframes cpulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.clabel {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-size: 11px;
  white-space: nowrap;
  color: var(--ink-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cnode:hover .clabel, .cnode.here .clabel { opacity: 1; transform: translateY(-50%) translateX(0); }
.cnode.here .clabel { color: var(--accent-bright); }

/* the voyage console: travel the journey station by station */
.voyage {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 9px;
  opacity: 0;
  transition: opacity 0.9s ease 1s;
}

body.booted .voyage { opacity: 1; }

.voy-arrow {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: var(--ink-3);
  padding: 2px 10px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.voy-arrow:hover:not(:disabled) { color: var(--ink); transform: scale(1.18); }
.voy-arrow:disabled { opacity: 0.22; cursor: default; }

.voy-center { text-align: center; min-width: 190px; }
.voy-name { display: block; font-family: var(--serif); font-weight: 300; font-size: 16px; color: var(--ink); }
.voy-num { display: block; font-size: 10px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.16em; }

.voy-progress { position: absolute; left: 46px; right: 46px; bottom: 0; height: 1px; background: var(--line); }
.voy-fill {
  height: 100%;
  background: var(--accent-bright);
  width: calc(var(--journey, 0) * 100%);
  box-shadow: 0 0 5px rgba(109, 141, 255, 0.7);
  transition: width 0.12s linear;
}

.scroll-cue { display: none; }   /* the voyage console is the wayfinding now */

/* cinematic travel: letterbox bars + a station arrival title */
.lbar {
  position: fixed;
  left: 0; right: 0;
  height: 6vh;
  background: #05070d;
  z-index: 25;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.lbar-top { top: 0; transform: translateY(-101%); }
.lbar-bottom { bottom: 0; transform: translateY(101%); }
body.voyaging .lbar-top, body.voyaging .lbar-bottom { transform: translateY(0); }

.arrival {
  position: fixed;
  left: 0; right: 0;
  top: 15%;
  text-align: center;
  z-index: 26;
  pointer-events: none;
  opacity: 0;
}
.arr-state {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-transform: capitalize;
}
.arr-name {
  display: block;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
  margin-top: 10px;
  text-transform: uppercase;
}
.arrival.show { animation: arrivalCard 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes arrivalCard {
  0% { opacity: 0; transform: translateY(14px); }
  16% { opacity: 1; transform: none; }
  70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .lbar, .arrival { display: none; }
}

/* Pythagorean hero geometry: golden circles, harmonic axes, the tetractys */
.geo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#c-hero .pin .measure { position: relative; z-index: 1; }
.geo-line {
  fill: none;
  stroke: rgba(150, 168, 224, 0.15);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}
.geo-main { stroke: rgba(150, 168, 224, 0.24); }
body.booted .geo-line { stroke-dashoffset: 0; }
.geo-dot { fill: var(--accent-bright); opacity: 0; transition: opacity 0.6s ease; }
body.booted .geo-dot { opacity: 0.9; filter: drop-shadow(0 0 2px rgba(109, 141, 255, 0.7)); }

@media (prefers-reduced-motion: reduce) {
  .geo-line { stroke-dashoffset: 0; transition: none; }
  .geo-dot { opacity: 0.9; transition: none; }
}
@media (max-width: 760px) { .geo { opacity: 0.45; } }

.hud {
  position: fixed;
  left: 36px;
  bottom: 30px;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.9s ease 1s;
}

body.booted .hud { opacity: 1; }

.hud-right { left: auto; right: 36px; }

.ch { display: inline-block; will-change: transform; }

.sound-toggle {
  position: fixed;
  right: 36px;
  bottom: 54px;
  z-index: 20;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  padding: 4px 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.9s ease 1.1s, color 0.3s ease;
}

body.booted .sound-toggle { opacity: 1; }
.sound-toggle:hover { color: var(--ink); }

.cursor-coord {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 200;
  font-size: 10.5px;
  color: rgba(109, 141, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

/* Portal menu ------------------------------------------------------------------- */
.index-btn {
  background: none;
  border: 1px solid var(--line-strong, #2A3348);
  border-color: #2A3348;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 5px 14px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.index-btn:hover { color: var(--ink); border-color: var(--accent-bright); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 7, 13, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-overlay.open { opacity: 1; visibility: visible; }

.menu-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% 118%, rgba(62, 99, 255, 0.32), transparent 62%);
  pointer-events: none;
}

.menu-inner {
  position: relative;
  width: min(640px, 88vw);
  text-align: center;
}

.menu-mark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 42px;
  will-change: transform;
}

.menu-mark em { color: var(--accent-bright); }

.menu-list { display: flex; flex-direction: column; will-change: transform; }

.menu-list a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  text-decoration: none;
  color: var(--ink-2);
  padding: 13px 6px;
  border-top: 1px solid rgba(30, 37, 54, 0.8);
  transition: color 0.25s ease, padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-list a:last-child { border-bottom: 1px solid rgba(30, 37, 54, 0.8); }

.menu-list .mnum { color: var(--ink-3); }
.menu-list .mname { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 300; }
.menu-list .mstate { margin-left: auto; color: var(--ink-3); }

.menu-list a:hover { color: var(--ink); padding-left: 18px; }
.menu-list a:hover .mname { color: var(--accent-bright); font-style: italic; }

.menu-foot { margin-top: 40px; color: var(--ink-3); }

@media (max-width: 640px) {
  .menu-list .mstate { display: none; }
}

#hud-state { display: inline-block; color: var(--ink-3); }
#hud-state.swap { animation: hudswap 0.5s ease; }

@keyframes hudswap {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: none; }
}

/* Chapters ------------------------------------------------------------------ */
main { position: relative; z-index: 10; }

.chapter { position: relative; }

#c-hero { height: 220vh; }
#manifesto { height: 230vh; }
#principles { height: 250vh; }
#systems, #presence, #advisory { height: 200vh; }
#method { height: 230vh; }
#contact { height: 125vh; }

.cap-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

.cap-lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink);
  margin-bottom: 18px;
}

.cap-tags { color: var(--ink-3); }

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}

.pin::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(64% 60% at 34% 52%, rgba(10, 13, 22, 0.8), rgba(10, 13, 22, 0) 78%);
  pointer-events: none;
}

.pin .measure { position: relative; }

.pin.center { text-align: center; }

.pin.center::before {
  background: radial-gradient(58% 46% at 50% 46%, rgba(10, 13, 22, 0.62), rgba(10, 13, 22, 0) 78%);
}

.chapter-right .pin::before {
  background: radial-gradient(64% 60% at 68% 52%, rgba(10, 13, 22, 0.8), rgba(10, 13, 22, 0) 78%);
}

#method .pin::before {
  background: radial-gradient(72% 64% at 50% 55%, rgba(10, 13, 22, 0.84), rgba(10, 13, 22, 0) 82%);
}

/* the beacon sweep illuminates the closing text as it revolves */
#contact .measure { opacity: calc(0.42 + 0.58 * var(--beam, 1)); }

@media (min-width: 901px) {
  .chapter-right .measure { display: flex; flex-direction: column; align-items: flex-end; }
  .chapter-right .plist { max-width: 560px; }
}

/* Reveals ------------------------------------------------------------------- */
.rev {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.rev.in { opacity: 1; transform: none; }

.rev-blur {
  opacity: 0;
  filter: blur(16px);
  transition: opacity 1.1s ease, filter 1.1s ease;
}

.rev-blur.in { opacity: 1; filter: blur(0); }

.rev-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.rev-clip.in { clip-path: inset(0 0 0 0); }

/* the manifesto lights up word by word as you read */
.big .w { color: var(--ink-3); transition: color 0.35s ease; }
.big .w.lit { color: var(--ink); }
.big em .w { font-style: italic; }
.big em .w.lit { color: var(--accent-bright); }

.plist li.rev:nth-child(2), .caps article.rev:nth-child(2), .steps li.rev:nth-child(2) { transition-delay: 0.12s; }
.plist li.rev:nth-child(3), .caps article.rev:nth-child(3), .steps li.rev:nth-child(3) { transition-delay: 0.24s; }

/* Hero ---------------------------------------------------------------------- */
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.9rem, 10.5vw, 8.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 span { display: block; }
h1 em { color: var(--accent-bright); }

.outline {
  display: inline !important;
  color: rgba(233, 236, 245, 0.16);
  -webkit-text-stroke: 2px var(--ink);
}

.rev.r1 { transition-delay: 0.15s; }
.rev.r2 { transition-delay: 0.28s; }
.rev.r3 { transition-delay: 0.45s; }
.rev.r4 { transition-delay: 0.6s; }

body.booted #c-hero .rev { opacity: 1; transform: none; }

.hero-sub {
  margin-top: 30px;
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-2);
}

.hero-cta { margin-top: 42px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 4px;
  transition: background 0.25s ease;
  will-change: transform;
}

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

.hero-note { color: var(--ink-3); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-3);
  animation: cue 2.4s ease-in-out infinite;
}

@keyframes cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* Type ---------------------------------------------------------------------- */
h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 3.8vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: 46px;
}

h3 { font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; }

.big {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.38;
  max-width: 32ch;
}

.big em { color: var(--accent-bright); }

.field-note { margin-top: 30px; color: var(--ink-3); }

/* Principles ----------------------------------------------------------------- */
.plist { list-style: none; max-width: 620px; }

.plist li {
  padding: 24px 0 24px 28px;
  border-left: 2px solid var(--line);
  position: relative;
}

.plist li::before {
  content: "→";
  position: absolute;
  left: -12px;
  top: 28px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent-bright);
  background: var(--void);
}

.plist p { color: var(--ink-2); max-width: 54ch; }

/* Capabilities: the index ------------------------------------------------------ */
.index-rows { border-top: 1px solid var(--line); }

.irow { border-bottom: 1px solid var(--line); }

.irow-head {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding: 26px 0;
  cursor: pointer;
}

.irow-num { color: var(--ink-3); transition: color 0.3s ease; }

.irow h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.01em;
  margin: 0;
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.irow-tags { margin-left: auto; color: var(--ink-3); text-align: right; }

.irow-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, padding 0.55s ease;
  max-width: 62ch;
  padding: 0 0 0 52px;
}

.irow-body p { color: var(--ink-2); font-size: 15.5px; }

.irow:hover .irow-body, .irow:focus-within .irow-body { max-height: 200px; opacity: 1; padding-bottom: 26px; }
.irow:hover h3 { color: var(--accent-bright); font-style: italic; transform: translateX(10px); }
.irow:hover .irow-num { color: var(--accent-bright); }

/* Method ----------------------------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-bright);
  display: block;
  margin-bottom: 14px;
}

.steps h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-bottom: 12px; }
.steps p { color: var(--ink-2); font-size: 15.5px; }

/* Contact ------------------------------------------------------------------------ */
.contact-lede { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 22px; }
.contact-sub {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.3;
  color: var(--ink);
  max-width: 20ch;
  margin: 0 auto 40px;
}
.contact-sub em, .contact-key { color: var(--accent-bright); font-style: normal; }

.contact-cta {
  font-size: 16px;
  padding: 16px 34px;
  margin-bottom: 26px;
}

.contact-mail {
  display: block;
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact-mail:hover { color: var(--accent-bright); }

/* Contact form (Web3Forms) ------------------------------------------------- */
.contact-form { max-width: 448px; margin: 0 auto 24px; text-align: left; }
.cf-row { display: flex; gap: 12px; margin-bottom: 12px; }
.cf-row .cf-input { flex: 1 1 0; min-width: 0; }
.cf-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: rgba(15, 20, 32, 0.55);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13px 15px;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
textarea.cf-input { display: block; margin-bottom: 16px; resize: vertical; min-height: 96px; line-height: 1.55; }
.cf-input::placeholder { color: var(--ink-3); }
.cf-input:focus {
  outline: none;
  border-color: var(--accent-bright);
  background: rgba(15, 20, 32, 0.82);
}
.cf-send {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
}
.cf-send[disabled] { opacity: 0.55; cursor: default; }
.cf-status { margin-top: 14px; min-height: 1.2em; text-align: center; color: var(--ink-3); }
.cf-status.ok { color: var(--accent-bright); }
.cf-status.err { color: #ff9a9a; }
.cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .h-captcha { margin-bottom: 16px; min-height: 78px; }
@media (max-width: 560px) { .cf-row { flex-direction: column; gap: 12px; } }

/* Contact CTA button ------------------------------------------------------- */
.cta-open {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 17px 32px;
  margin-bottom: 26px;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(62, 99, 255, 0.28);
  transition: background 0.25s ease, box-shadow 0.4s ease, transform 0.18s ease;
}
.cta-open:hover { background: var(--accent-bright); box-shadow: 0 12px 46px rgba(62, 99, 255, 0.5); }
.cta-open:active { transform: translateY(1px); }
.cta-open-arrow { font-size: 18px; transition: transform 0.3s ease; }
.cta-open:hover .cta-open-arrow { transform: translateX(5px); }
.cta-open::before {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.65s ease;
}
.cta-open:hover::before { transform: translateX(130%); }

/* Contact modal ------------------------------------------------------------ */
body.modal-open { overflow: hidden; }
.cmodal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cmodal.open { opacity: 1; visibility: visible; }
.cmodal-scrim {
  position: absolute; inset: 0;
  background: rgba(6, 8, 14, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.cmodal-panel {
  position: relative;
  width: 100%; max-width: 476px;
  background: linear-gradient(180deg, #0d1220, #0a0d16);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 38px 34px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.34s ease;
}
.cmodal.open .cmodal-panel { transform: translateY(0) scale(1); opacity: 1; }
.cmodal-close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--ink-3); font-size: 26px; line-height: 1;
  cursor: pointer; border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.cmodal-close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.cmodal-title { font-family: var(--serif); font-weight: 300; font-size: 1.95rem; margin-bottom: 8px; }
.cmodal-sub { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin-bottom: 22px; }
.cmodal .contact-form { margin: 0; max-width: none; }
.cmodal .cf-send { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) {
  .cmodal, .cmodal-panel, .cta-open, .cta-open-arrow, .cta-open::before { transition: none; }
}

/* Footer -------------------------------------------------------------------------- */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 26px 36px;
  background: var(--void);
}

/* Cursor --------------------------------------------------------------------------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 200;
  border-radius: 50%;
}

.cursor-dot {
  width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--accent-bright);
}

.cursor-ring {
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(109, 141, 255, 0.5);
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease;
}

.cursor-ring.big {
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-color: rgba(109, 141, 255, 0.9);
}

@media (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Responsive ------------------------------------------------------------------------ */
@media (max-width: 900px) {
  .caps, .steps { grid-template-columns: 1fr; gap: 26px; }
  .rail { display: none; }
  .hud { left: 20px; bottom: 20px; }
  .hud-right { display: none; }
  .sound-toggle { right: 20px; bottom: 20px; }
  .top { padding: 18px 20px; }
  .top nav { gap: 16px; }
  .measure { padding: 0 22px; }
  #c-hero, #manifesto, #principles, #systems, #presence, #advisory, #method { height: auto; min-height: 160vh; }
  #contact { height: auto; min-height: 110vh; }
}

@media (max-width: 520px) {
  .top nav a:not(:last-child) { display: none; }
}

/* Reduced motion --------------------------------------------------------------------- */
/* Chapter-cut type glitch -------------------------------------------------------- */
body.cut h1, body.cut h2, body.cut .big, body.cut .menu-mark {
  text-shadow: 2px 0 rgba(255, 70, 130, 0.5), -2px 0 rgba(80, 200, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .rev, .rev-blur, .rev-clip { opacity: 1; transform: none; filter: none; clip-path: none; }
  .big .w { color: var(--ink); }
  body { cursor: auto; }
  .scroll-cue { display: none; }
  body.cut h1, body.cut h2, body.cut .big, body.cut .menu-mark { text-shadow: none; }
}
