/* ==========================================================================
   Floating Voids — site styles
   Sections: 1 tokens · 2 base · 3 grain · 4 nav · 5 hero · 6 stage · 7 bottom
             8 toast · 9 content sections · 10 responsive · 11 reduced motion
   ========================================================================== */

/* 1 · Tokens ------------------------------------------------------------- */
:root {
  --bg: #070708;
  --ink: #f4f3ef;
  --ink-2: rgba(244, 243, 239, .62);
  --ink-3: rgba(244, 243, 239, .36);
  --line: rgba(255, 255, 255, .08);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --max: 1240px;
  /* live energy palette — rewritten every frame by hero.js */
  --c1: #064500;
  --c2: #3CF522;
  --c3: #ECFF2E;
  --lvl: 1;
  --power: 1;
  --cap-x: 0px; --cap-y: 0px; --cap-w: 0px; --cap-h: 0px;
}

/* 2 · Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* 3 · Film grain --------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-5%, 3%); }
  33% { transform: translate(4%, -6%); }
  50% { transform: translate(-3%, 5%); }
  67% { transform: translate(6%, 2%); }
  83% { transform: translate(-4%, -3%); }
  100% { transform: translate(0, 0); }
}

/* 4 · Navigation --------------------------------------------------------- */
.nav-wrap {
  position: fixed; top: 14px; left: 50%; z-index: 60;
  width: min(100% - 24px, var(--max));
  transform: translateX(-50%);
  transition: transform 1.1s var(--ease);
}
html.js body:not(.on) .nav-wrap { transform: translate(-50%, -160%); }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgba(22, 22, 24, .55);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .7);
}
.logo { display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.logo i { font-style: normal; color: var(--c2); }
.batt { margin-left: 10px; position: relative; width: 28px; height: 13px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 4px; padding: 1.5px; }
.batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2.5px; height: 4px; border-radius: 0 2px 2px 0; background: rgba(255, 255, 255, .55); }
.batt b { display: block; height: 100%; width: calc(var(--lvl) * 100%); background: var(--c2); border-radius: 2px; box-shadow: 0 0 8px var(--c2); }

.links { display: flex; gap: 28px; }
.links a { position: relative; display: inline-flex; align-items: flex-start; gap: 3px; text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 6px 2px; transition: color .3s; }
.links a:hover { color: var(--ink); }
.links sup { font: 400 9px/1 "JetBrains Mono", monospace; color: var(--ink-3); margin-top: 3px; transition: color .3s; }
.links a.current sup { color: var(--c2); }
.roll { display: inline-block; overflow: hidden; height: 1.25em; line-height: 1.25em; vertical-align: top; }
.roll > span { display: block; transition: transform .55s var(--ease); }
a:hover .roll > span, button:hover .roll > span { transform: translateY(-100%); }

.nav-right { display: flex; align-items: center; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 400 11px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 10px var(--c2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
body.low .status { color: #ff6b5c; }
body.low .status .dot { background: #ff2416; box-shadow: 0 0 10px #ff2416; }
.status .alt { display: none; }
body.low .status .alt { display: inline; }
body.low .status .main { display: none; }

.talk {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 5px 5px 5px 18px; border-radius: 999px;
  background: var(--ink); color: #0a0a0a; text-decoration: none; font-weight: 600; font-size: 14px;
}
.talk .chip { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #0a0a0a; color: var(--ink); transition: transform .5s var(--ease); }
.talk:hover .chip { transform: rotate(-45deg); }

.burger { display: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; width: 16px; height: 2px; background: #0a0a0a; border-radius: 2px; transition: transform .4s var(--ease); }
.burger span:first-child { transform: translateY(-3px); }
.burger span:last-child { transform: translateY(3px); }
.nav-wrap.open .burger span:first-child { transform: rotate(45deg); }
.nav-wrap.open .burger span:last-child { transform: rotate(-45deg); }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: none; flex-direction: column; padding: 14px 24px 20px;
  border-radius: 28px; background: rgba(16, 16, 18, .94); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.menu a { text-decoration: none; font-size: 30px; font-weight: 600; letter-spacing: -.03em; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu a:last-child { border: 0; }
.nav-wrap.open .menu { display: flex; }

/* 5 · Hero --------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 104px 20px 28px; cursor: crosshair;
}
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0, transparent 100%);
}
.hero-inner { position: relative; width: 100%; max-width: var(--max); flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.copy { display: flex; flex-direction: column; align-items: center; opacity: var(--power); transition: opacity .6s; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  font: 400 11px/1 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.pill .av { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #0a0a0a; font: 600 11px/1 "Inter Tight", sans-serif; background: linear-gradient(135deg, var(--c3), var(--c2)); }

h1 {
  margin: 28px 0 0; font-weight: 600; letter-spacing: -.055em; line-height: .9;
  font-size: clamp(46px, 7.3vw, 126px);
}
h1 .line { display: block; overflow: hidden; padding: .06em .1em .1em; margin: -.06em -.1em -.1em; }
h1 .line-in { display: block; transform-origin: 0 100%; }
em.bat {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.02em; padding-right: .08em;
  --p: calc(var(--lvl) * 100%);
  color: transparent;
  background-image: linear-gradient(90deg, var(--c1) 0%, var(--c2) calc(var(--p) - 14%), var(--c3) var(--p), rgba(255, 255, 255, .1) var(--p), rgba(255, 255, 255, .1) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .5px rgba(255, 255, 255, .14);
  filter: drop-shadow(0 0 .22em color-mix(in srgb, var(--c2) 55%, transparent));
}
body.low h1 { animation: flicker 2.6s steps(1) infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 8% { opacity: .35; } 10% { opacity: 1; } 46% { opacity: 1; } 48% { opacity: .5; } 50% { opacity: .9; } 52% { opacity: .3; } 54% { opacity: 1; } }

.sub { margin: 26px 0 0; max-width: 54ch; color: var(--ink-2); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; }

/* Entrance choreography: only when JS is available */
html.js .line-in { transform: translateY(110%) rotate(1.8deg); transition: transform 1.3s var(--ease); }
html.js body.on .line-in { transform: none; }
html.js body.on .line:nth-child(1) .line-in { transition-delay: .15s; }
html.js body.on .line:nth-child(2) .line-in { transition-delay: .25s; }
html.js body.on .line { animation: unmask 0s 1.8s forwards; }
@keyframes unmask { from { overflow: hidden; } to { overflow: visible; } }
html.js .fade { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
html.js body.on .fade { opacity: 1; transform: none; }
html.js body.on .sub.fade { transition-delay: .5s; }
html.js body.on .pill.fade { transition-delay: .05s; }
html.js body.on .readout.fade, html.js body.on .ruler.fade { transition-delay: .7s; }
html.js body.on .bottom.fade { transition-delay: .9s; }

/* 6 · Energy stage ------------------------------------------------------- */
.stage { position: relative; width: 100vw; flex-shrink: 0; height: clamp(300px, 44vh, 470px); margin-top: 8px; }
.stage::before {
  content: ""; position: absolute; left: 50%; top: var(--cap-y); width: min(1100px, 110%); aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--c2), transparent);
  opacity: calc(.06 + var(--lvl) * .2); filter: blur(30px);
}
.bigpct {
  position: absolute; left: 0; right: 0; top: var(--cap-y); transform: translateY(-50%);
  text-align: center; pointer-events: none; user-select: none;
  font-weight: 600; font-size: min(30vw, 440px); line-height: 1; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .06);
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.readout, .ruler { position: absolute; left: var(--cap-x); width: var(--cap-w); }
.readout {
  top: calc(var(--cap-y) - var(--cap-h) / 2 - 38px); display: flex; justify-content: space-between; align-items: center;
  font: 400 12px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.readout .st { display: inline-flex; align-items: center; gap: 8px; }
.readout svg { width: 12px; height: 12px; color: var(--c2); filter: drop-shadow(0 0 4px var(--c2)); }
.readout .pc { color: var(--ink); }
.ruler { top: calc(var(--cap-y) + var(--cap-h) / 2 + 18px); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.ruler i { position: relative; display: block; width: 1px; height: 6px; background: rgba(255, 255, 255, .2); transition: background .25s, box-shadow .25s; }
.ruler i.maj { height: 12px; }
.ruler i.lit { background: var(--c2); box-shadow: 0 0 8px var(--c2); }
.ruler i b { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font: 400 10px/1 "JetBrains Mono", monospace; color: var(--ink-3); font-weight: 400; }
.hit {
  position: absolute; left: var(--cap-x); top: calc(var(--cap-y) - var(--cap-h) / 2); width: var(--cap-w); height: var(--cap-h);
  border-radius: 999px; cursor: ew-resize; touch-action: none; outline-offset: 6px;
}

/* 7 · Bottom row --------------------------------------------------------- */
.bottom { margin-top: auto; padding-top: 28px; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.hint { font: 400 11px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.hint.r { justify-self: end; display: inline-flex; align-items: center; gap: 8px; }
.hint kbd { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .18); border-bottom-width: 2px; border-radius: 6px; font: inherit; color: var(--ink-2); }
.ctas { display: flex; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  font: 600 15px/1 "Inter Tight", sans-serif; letter-spacing: -.01em; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .6s var(--ease), background .3s, border-color .3s;
}
.btn.primary { background: var(--ink); color: #0a0a0a; box-shadow: 0 10px 36px -10px color-mix(in srgb, var(--c2) 75%, transparent); }
.btn.primary i { width: 8px; height: 8px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 10px var(--c2); }
.btn.ghost { color: var(--ink); border-color: rgba(255, 255, 255, .18); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }

/* 8 · Low power toast ---------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 220%);
  padding: 12px 20px; border-radius: 999px; pointer-events: none;
  background: rgba(70, 12, 8, .88); border: 1px solid rgba(255, 90, 70, .45); color: #ff9a8e;
  font: 400 12px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .7s var(--ease);
}
body.low .toast { transform: translate(-50%, 0); }

/* 9 · Content sections --------------------------------------------------- */
section.block { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .75rem; letter-spacing: -.04em; line-height: 1.05; }
.lead { color: var(--ink-2); max-width: 62ch; margin: 0 0 2.5rem; font-size: 1.05rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 20px; padding: 1.75rem; transition: border-color .3s, transform .5s var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--c2) 55%, transparent); transform: translateY(-3px); }
.card h3 { margin: 0 0 .5rem; font-size: 1.2rem; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--ink-2); }
.tag { display: inline-block; font: 400 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .15em; color: var(--c2); margin-bottom: .9rem; }
.card.soon { border-style: dashed; background: none; }
.card.soon:hover { transform: none; border-color: var(--line); }
.card a.more { display: inline-block; margin-top: 1rem; color: var(--c2); text-decoration: none; }
.card a.more:hover { text-decoration: underline; }
.contact { text-align: center; }
.contact .lead { margin-inline: auto; }
.mail { font-size: clamp(1.3rem, 4vw, 2.1rem); letter-spacing: -.03em; text-decoration: none; border-bottom: 1px solid var(--c2); padding-bottom: .15rem; }
footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--ink-3); font: 400 11px/1.4 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* 10 · Responsive -------------------------------------------------------- */
@media (max-width: 1080px) { .links { display: none; } }
@media (max-width: 820px) {
  .bottom { grid-template-columns: 1fr; justify-items: center; }
  .hint { display: none; }
}
@media (max-width: 640px) {
  .nav { padding-left: 16px; }
  .pill { font-size: 9.5px; letter-spacing: .06em; white-space: nowrap; }
  .status, .talk { display: none; }
  .burger { display: grid; }
  h1 { font-size: clamp(44px, 12.5vw, 64px); }
  .ctas { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; }
}

/* 11 · Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .line-in, html.js .fade { transform: none; opacity: 1; }
  h1 .line { overflow: visible; }
}
