/* ==========================================================================
   XX1.LOL — foundation
   Dark glass. Palette sampled from the icon: sign green #36c25a, sign red
   #e8382f, near-black ground. Barlow Condensed for anything that should read
   like a road sign, DM Sans for prose, DM Mono for every number on the page.
   ========================================================================== */

:root {
  --ground: #0b0b0c;
  --ground-2: #0e0e10;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --glass: rgba(14, 14, 16, 0.72);

  --green: #36c25a;
  --green-deep: #2a9c48;
  --green-ink: #062a12;
  --green-tint: rgba(54, 194, 90, 0.12);
  --green-tint-2: rgba(54, 194, 90, 0.22);
  --red: #e8382f;
  --red-tint: rgba(232, 56, 47, 0.14);

  --ink: #f4f4f2;
  --text: #d9d9dd;
  --text-2: #a5a5ae;
  --text-3: #7d7d86;
  --text-4: #5b5b63;

  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.14);
  --rule-green: rgba(54, 194, 90, 0.4);

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max: 1080px;
  --header-h: 72px;
  --r: 16px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms var(--ease);
  --t: 320ms var(--ease);
  --t-slow: 560ms var(--ease);
}

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

html {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; background: var(--ground); line-height: 1.65; overflow-x: hidden; }

::selection { background: var(--green); color: var(--green-ink); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--ink);
}
p { color: var(--text-2); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 500;
  padding: 0.7rem 1.1rem; border-radius: 999px;
  background: var(--green); color: var(--green-ink); font-weight: 600; font-size: 0.875rem;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem;
}
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }

/* Ambient: one green glow top-right, one red ember bottom-left, grain over
   everything. The glass panels pick these up through their blur. */
.ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; height: 100vh; }
.ambient-wash {
  position: absolute; top: -25%; right: -12%;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 194, 90, 0.22), transparent 64%);
  filter: blur(70px);
}
.ambient-ember {
  position: absolute; bottom: -20%; left: -15%;
  width: 55vw; height: 55vw; max-width: 700px; max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 56, 47, 0.14), transparent 64%);
  filter: blur(80px);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.07; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Glass: the one surface treatment on the site. */
.glass {
  background: var(--surface);
  border: 1px solid var(--rule);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 30px 80px -30px rgba(0,0,0,0.7);
}

.rule { height: 1px; width: 100%; background: var(--rule); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cond { font-family: var(--font-display); font-weight: 800; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--rd, 0ms); }
.js .reveal.seen { opacity: 1; transform: none; }

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