/* ============================================================
   VOLCN — shared design system
   Tokens, atmosphere, header/footer, forms, page layouts.
   ============================================================ */

:root {
  --bg: #05090c;
  --bg-2: #0a1116;
  --panel: #0c141a;
  --line: #1a2831;
  --text: #e9f2ef;
  --dim: #78908a;
  --faint: #3d5049;
  --mint: #35f0c0;
  --mint-dim: rgba(53, 240, 192, 0.14);
  --alarm: #ff3b5c;
  --amber: #ffb03b;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mint); color: #04110c; }

/* ---------- atmosphere ---------- */
.field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(53,240,192,0.055), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 115%, rgba(24,90,110,0.12), transparent 65%),
    var(--bg);
}
.grid-fine {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(140,190,180,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,190,180,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 100%);
}
.grain {
  position: fixed; inset: -100px; z-index: 40; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sweep {
  position: fixed; top: 0; bottom: 0; width: 220px; z-index: 1; pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(53,240,192,0.05), transparent);
  animation: sweep 11s linear infinite;
}
@keyframes sweep {
  0%   { left: -260px; }
  100% { left: 110vw; }
}

.wrap {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ---------- header ---------- */
header {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
  animation: fadeDown 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand svg { width: 30px; height: 30px; display: block; }
.brand .logo-img { height: 42px; width: auto; display: block; }
.brand .word {
  font-weight: 800; letter-spacing: 0.22em; font-size: 17px;
  font-variation-settings: "wdth" 118;
}
.brand .word span { color: var(--mint); }
.brand .sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em;
  color: var(--dim); margin-top: 3px;
}
.head-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
nav.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 26px); }
nav.nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--dim); text-decoration: none; transition: color 0.2s; white-space: nowrap;
}
nav.nav a:hover, nav.nav a:focus-visible { color: var(--mint); }
nav.nav a[aria-current="page"] { color: var(--mint); }
.status {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--dim); display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 10px var(--mint);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--mint); color: #04110c;
  border: 1px solid var(--mint); cursor: pointer; text-decoration: none;
  font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: 0.24em;
  padding: 15px 26px; transition: filter 0.2s;
}
.btn:hover, .btn:focus-visible { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--mint); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--mint-dim); filter: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- home hero / instrument ---------- */
main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vh, 90px) 0 24px; position: relative; }

/* ghosted render of the cell behind the hero — a silhouette, not a reveal */
.hero-backdrop { position: absolute; inset: 0; z-index: -1; overflow: visible; pointer-events: none; }
.hero-backdrop img {
  position: absolute; right: -8%; top: 42%; transform: translateY(-50%);
  width: min(72vw, 980px); opacity: 0.22;
  filter: saturate(0.5) brightness(0.85);
  mask-image: radial-gradient(ellipse 58% 62% at 58% 50%, black 25%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 58% 50%, black 25%, transparent 74%);
  animation: backdropIn 1.6s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes backdropIn {
  from { opacity: 0;    transform: translateY(-46%); }
  to   { opacity: 0.22; transform: translateY(-50%); }
}

.eyebrow {
  font-family: var(--mono); font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.4em; color: var(--mint);
  display: flex; align-items: center; gap: 16px;
  animation: fadeUp 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.eyebrow::after { content: ""; height: 1px; flex: 0 0 72px; background: linear-gradient(to right, var(--mint), transparent); }

.instrument { margin-top: clamp(30px, 5vh, 56px); position: relative; }

.plate {
  position: relative;
  border-left: 1px solid var(--line);
  padding-left: clamp(18px, 3vw, 36px);
}
.plate::before, .plate::after {
  content: ""; position: absolute; left: -1px; width: 14px; height: 1px; background: var(--mint);
}
.plate::before { top: 0; }
.plate::after { bottom: 0; }

.beam-label {
  font-family: var(--mono); font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.34em; color: var(--dim); margin-bottom: 10px;
}
.beam-word {
  font-weight: 850; line-height: 0.92; letter-spacing: -0.015em;
  font-size: clamp(34px, 6.4vw, 84px);
  font-variation-settings: "wdth" 112;
  text-transform: uppercase; white-space: nowrap;
}
.beam-word .thin { font-weight: 300; font-variation-settings: "wdth" 80; color: var(--dim); }

#beamIntent   { animation: fadeUp 1s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
#beamReality  { animation: fadeUp 1s 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
#beamIntent .inner, #beamReality .inner { will-change: transform; }

.gap-zone {
  position: relative;
  height: var(--gap-h, 110px);
  display: flex; align-items: center;
}
.hairline {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, var(--mint), rgba(53,240,192,0.15) 70%, transparent);
}
.hairline.top { top: 0; }
.hairline.bottom { bottom: 0; }
.hairline::before {
  content: ""; position: absolute; left: 0; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 12px rgba(53,240,192,0.8);
}

.readout {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  text-align: right; font-family: var(--mono);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.readout .val {
  font-size: clamp(20px, 3vw, 34px); font-weight: 600; letter-spacing: 0.04em;
  color: var(--alarm); font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.readout .cap { font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }
.readout .chip {
  font-size: 10px; letter-spacing: 0.26em; padding: 5px 10px;
  border: 1px solid var(--mint); color: var(--mint); background: var(--mint-dim);
  opacity: 0; transform: translateY(4px); transition: opacity 0.5s, transform 0.5s;
}
.readout .chip.on { opacity: 1; transform: translateY(0); }

.mission {
  margin-top: clamp(34px, 5vh, 58px);
  max-width: 620px;
  font-size: clamp(15px, 1.7vw, 19px);
  font-weight: 300; line-height: 1.65; color: var(--dim);
  animation: fadeUp 1s 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.mission strong { color: var(--text); font-weight: 600; }
.mission-cta { animation: fadeUp 1s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ---------- loop ticker ---------- */
.ticker {
  margin-top: clamp(44px, 7vh, 80px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 15px 0;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  animation: fadeUp 1s 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ticker .rail {
  display: flex; gap: 0; width: max-content;
  animation: rail 30s linear infinite;
}
.ticker .cell {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.42em;
  color: var(--faint); white-space: nowrap; padding: 0 16px;
  display: flex; align-items: center; gap: 32px;
}
.ticker .cell b { color: var(--dim); font-weight: 500; }
.ticker .cell i { color: var(--mint); font-style: normal; }
@keyframes rail { to { transform: translateX(-50%); } }

/* ---------- home signup ---------- */
.signup {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: clamp(24px, 4vw, 64px);
  padding: clamp(40px, 6vh, 64px) 0;
  animation: fadeUp 1s 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.signup .lead { max-width: 380px; }
.signup .lead h2 {
  font-size: clamp(20px, 2.4vw, 27px); font-weight: 800;
  font-variation-settings: "wdth" 110; letter-spacing: 0.01em; line-height: 1.15;
}
.signup .lead p { margin-top: 10px; font-size: 14px; font-weight: 300; color: var(--dim); line-height: 1.6; }

form.notify { flex: 1; min-width: 280px; max-width: 520px; }
.fieldrow { display: flex; border: 1px solid var(--line); background: rgba(10, 17, 22, 0.7); }
.fieldrow:focus-within { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint-dim), 0 0 24px rgba(53,240,192,0.07); }
.fieldrow input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 13px; letter-spacing: 0.05em;
  padding: 16px 18px;
}
.fieldrow input::placeholder { color: var(--faint); }
.fieldrow button {
  background: var(--mint); color: #04110c; border: 0; cursor: pointer;
  font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: 0.24em;
  padding: 0 26px; transition: filter 0.2s;
}
.fieldrow button:hover { filter: brightness(1.15); }
.form-note { margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); }
.form-note a { color: var(--dim); }
.form-note a:hover { color: var(--mint); }

/* honeypot — visually removed, still in DOM for bots */
.form-hidden {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- subpages ---------- */
main.page-main {
  flex: 1; justify-content: flex-start;
  padding: clamp(44px, 7vh, 80px) 0 clamp(48px, 7vh, 80px);
  max-width: 780px;
  animation: fadeUp 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.page-title {
  margin-top: clamp(22px, 3.5vh, 34px);
  font-weight: 850; line-height: 0.95; letter-spacing: -0.015em;
  font-size: clamp(32px, 5vw, 58px);
  font-variation-settings: "wdth" 112;
  text-transform: uppercase;
}
.page-title .thin { font-weight: 300; font-variation-settings: "wdth" 80; color: var(--dim); }
.page-intro {
  margin-top: 20px; max-width: 640px;
  font-size: clamp(15px, 1.6vw, 17px); font-weight: 300; line-height: 1.7; color: var(--dim);
}
.page-intro strong { color: var(--text); font-weight: 600; }
.page-intro .mail-link { color: var(--mint); text-decoration: none; font-family: var(--mono); font-size: 0.92em; }
.page-intro .mail-link:hover, .page-intro .mail-link:focus-visible { text-decoration: underline; }

.expectations {
  margin-top: 28px; display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); background: rgba(10, 17, 22, 0.5);
}
.expectations li {
  list-style: none; display: flex; gap: 16px; align-items: baseline;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 300; color: var(--dim); line-height: 1.55;
}
.expectations li:last-child { border-bottom: 0; }
.expectations li .idx { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--mint); flex: 0 0 auto; }

/* ---------- lead form ---------- */
.lead-form {
  margin-top: clamp(30px, 5vh, 44px);
  border: 1px solid var(--line); background: rgba(10, 17, 22, 0.7);
  padding: clamp(22px, 3.5vw, 38px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; }
.f-field.wide { grid-column: 1 / -1; }
.f-field label {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.28em; color: var(--dim); margin-bottom: 9px;
}
.f-field .req { color: var(--mint); }
.f-field input, .f-field select, .f-field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em;
  padding: 13px 14px; outline: none; border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.f-field input::placeholder, .f-field textarea::placeholder { color: var(--faint); }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 1px var(--mint-dim), 0 0 20px rgba(53,240,192,0.06);
}
.f-field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2378908a' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 34px;
}
.f-field select option { background: var(--bg-2); color: var(--text); }
.f-field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.form-actions {
  margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
}
.form-caution {
  margin-top: 18px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; line-height: 1.8; color: var(--faint);
}

/* ---------- prose (privacy) ---------- */
.prose { margin-top: clamp(28px, 4vh, 40px); max-width: 680px; }
.prose h2 {
  margin: 38px 0 12px;
  font-family: var(--mono); font-weight: 600; font-size: 12px;
  letter-spacing: 0.32em; color: var(--mint); text-transform: uppercase;
}
.prose p, .prose li { font-size: 15px; font-weight: 300; line-height: 1.8; color: var(--dim); }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--mint); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose .flag {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 2px solid var(--amber);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  line-height: 1.8; color: var(--dim);
}

/* ---------- thank-you / 404 ---------- */
.statement { margin-top: clamp(26px, 4vh, 40px); }
.big-mono {
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(56px, 11vw, 130px); line-height: 1; letter-spacing: -0.02em;
  color: var(--mint); font-variant-numeric: tabular-nums;
}
.state-chip {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; padding: 6px 12px;
  border: 1px solid var(--mint); color: var(--mint); background: var(--mint-dim);
}
.state-chip.warn { border-color: var(--alarm); color: var(--alarm); background: rgba(255, 59, 92, 0.08); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; color: var(--faint);
}
footer .sectors { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer .foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer .foot-nav a { color: var(--faint); text-decoration: none; transition: color 0.2s; }
footer .foot-nav a:hover, footer .foot-nav a:focus-visible { color: var(--mint); }

@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .status { display: none; }
  .brand .logo-img { height: 34px; }
  .hero-backdrop { display: none; }
}
@media (max-width: 640px) {
  .beam-word { white-space: normal; }
  .readout .val { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  :root { --gap-h: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sweep { display: none; }
}
