/* HWIDR site - shared design system ("tactical HUD").
   Every page links this file; page-specific components stay inline. */
:root {
  --bg: #07080b;
  --bg2: #0b0d11;
  --panel: #101318;
  --panel2: #161a21;
  --panel3: #1d222b;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --text: #f2f3f5;
  --sub: #a3a9b3;       /* 7.9:1 on --bg */
  --faint: #737a85;     /* decorative / secondary only */
  --red: #ff2e3f;
  --red2: #d62430;
  --red-dim: rgba(255, 46, 63, .12);
  --red-glow: rgba(255, 46, 63, .35);
  --ok: #3ddc84;
  --ok-dim: rgba(61, 220, 132, .12);
  --warn: #f5b83d;
  --discord: #5865f2;
  --r-sm: 6px;          /* controls */
  --r: 12px;            /* panels */
  --display: 'Big Shoulders Display', 'Chakra Petch', sans-serif;
  --body: 'Chakra Petch', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--red); color: #fff; }

/* ── Atmosphere: grid + red orb + grain (fixed, never intercepts clicks) ── */
.atmo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.atmo::before {   /* HUD grid, fading out from the top */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .55;
}
.atmo::after {    /* film grain */
  content: ""; position: absolute; inset: -50%;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .06; animation: grain 1.2s steps(6) infinite;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.orb.a { width: 520px; height: 520px; left: -160px; top: -220px; background: var(--red-glow); opacity: .55; }
.orb.b { width: 420px; height: 420px; right: -180px; top: 30vh; background: rgba(88, 101, 242, .16); }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.section { padding: 88px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 460px; color: var(--sub); }

/* ── Type ───────────────────────────────────────────────────────────────── */
.display { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: .92; margin: 0; }
h2.display { font-size: clamp(38px, 6vw, 68px); }
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sub);
}
.tag::before { content: ""; width: 7px; height: 7px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.red { color: var(--red); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  background: rgba(7, 8, 11, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; min-height: 44px; }
.brand svg { width: 28px; height: 28px; }
.brand span { font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: .06em; }
.navlink {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sub); text-decoration: none; transition: color .2s var(--ease);
}
.navlink:hover, .navlink[aria-current="page"] { color: var(--text); }
.navlink[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--red); }
.nav .btn { margin-left: 6px; }
@media (max-width: 560px) { .nav .hide-sm { display: none; } .navlink { padding: 0 8px; } }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --notch: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--body); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  border-radius: var(--r-sm);
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .3s var(--ease), color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {   /* notched corner = the "tactical" signature on every main action */
  background: var(--red); color: #fff; border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.btn-primary:hover { background: #ff4757; box-shadow: 0 0 32px var(--red-glow); transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .02); color: var(--text); border: 1px solid var(--line2); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: #6b77ff; box-shadow: 0 0 32px rgba(88, 101, 242, .45); transform: translateY(-2px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; --notch: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Panels + the lock-on brackets ──────────────────────────────────────── */
.panel {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 70%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
}
.lock { position: relative; }
.lock::after {   /* four red corner brackets that close in on hover/focus = "target locked" */
  content: ""; position: absolute; inset: -10px; pointer-events: none; opacity: 0;
  transition: inset .45s var(--ease), opacity .25s;
  background:
    linear-gradient(var(--red), var(--red)) left top / 16px 2px no-repeat,
    linear-gradient(var(--red), var(--red)) left top / 2px 16px no-repeat,
    linear-gradient(var(--red), var(--red)) right top / 16px 2px no-repeat,
    linear-gradient(var(--red), var(--red)) right top / 2px 16px no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / 16px 2px no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / 2px 16px no-repeat,
    linear-gradient(var(--red), var(--red)) right bottom / 16px 2px no-repeat,
    linear-gradient(var(--red), var(--red)) right bottom / 2px 16px no-repeat;
}
.lock:hover::after, .lock:focus-within::after { inset: -4px; opacity: 1; }

/* ── Small parts ────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line2); color: var(--sub);
}
.chip.ok { color: var(--ok); border-color: rgba(61, 220, 132, .35); background: var(--ok-dim); }
.chip.red { color: #ff8a93; border-color: rgba(255, 46, 63, .4); background: var(--red-dim); }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.field {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--bg2); border: 1px solid var(--line2); transition: border-color .2s, box-shadow .2s;
}
.field:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
.field::placeholder { color: var(--faint); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--panel3); border: 1px solid var(--line2); border-left: 3px solid var(--ok);
  border-radius: var(--r-sm); padding: 12px 18px; font-size: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
  animation: toastIn .35s var(--ease);
}
.toast.err { border-left-color: var(--red); color: #ffb3b9; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px; }
.foot .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }
.foot nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.foot a { color: var(--sub); text-decoration: none; padding: 10px 8px; }
.foot a:hover { color: var(--text); }

/* ── Scroll reveal (site.js adds .in) ───────────────────────────────────── */
/* Hidden only once JS is known to run (the <head> snippet adds .js): with JS off
   or broken, every block stays visible. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
