/* ==========================================================
   Primerline — tactical range HUD
   nero balistico · verde HUD · cartone bersaglio
   ========================================================== */
:root {
  color-scheme: dark;
  --bg: #0c0b0a;
  --bg-2: #13110f;
  --bg-3: #1a1714;
  --bg-4: #231f1b;
  --line: #2a2520;
  --line-2: #3e3730;
  --fg: #efebe5;
  --fg-2: #c5beb4;
  --muted: #978e84;
  --hi: #ff6a1f;
  --hi-a: rgba(255, 106, 31, .1);
  --hi-b: rgba(255, 106, 31, .28);
  --red: #ff3355;
  --gold: #ffcf3d;
  --card: #c9a46c;
  --card-d: #8d6c3e;
  --paper: #ece6d8;
  --wa: #25d366;

  --f-disp: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-sten: "Big Shoulders Stencil Display", var(--f-disp);
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .9), 0 8px 18px -10px rgba(0, 0, 0, .6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-color: var(--line-2) var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 50% at 70% -10%, rgba(255, 106, 31, .07), transparent 60%),
    var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  caret-color: var(--hi);
}
body::before { /* grana */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 99; opacity: .045;
  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='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after { /* vignetta + scanline leggere */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 98;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .5) 100%);
}
::selection { background: var(--hi); color: var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
img, svg { display: block; }
a { color: inherit; text-underline-offset: .25em; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0; font-family: var(--f-disp); font-weight: 900; line-height: .9;
  letter-spacing: -.005em; text-transform: uppercase; text-wrap: balance;
}
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--hi); color: var(--bg); padding: 10px 14px; z-index: 600; font-weight: 600; }
.skip:focus { left: 8px; }
.stencil { font-family: var(--f-sten); color: var(--hi); }

/* staffe d'aggancio sugli angoli */
.brackets { position: relative; }
.brackets::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 1;
  --b: linear-gradient(var(--hi), var(--hi));
  background:
    var(--b) left top / 18px 2px, var(--b) left top / 2px 18px,
    var(--b) right top / 18px 2px, var(--b) right top / 2px 18px,
    var(--b) left bottom / 18px 2px, var(--b) left bottom / 2px 18px,
    var(--b) right bottom / 18px 2px, var(--b) right bottom / 2px 18px;
  background-repeat: no-repeat;
}

/* ---------- Bottoni ---------- */
.btn {
  --bgc: var(--fg); --fgc: var(--bg); --cut: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 13px 22px 12px; border: 0; background: var(--bgc); color: var(--fgc);
  font: 800 17px/1 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), filter .2s, background-color .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; margin-top: -1px; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.btn--hi { --bgc: var(--hi); --fgc: #1a0a02; }
.btn--wa { --bgc: var(--wa); --fgc: #fff; }
.btn--wa:hover { --bgc: #1ebe5d; filter: none; }
.btn--ghost { --bgc: var(--bg-3); --fgc: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { --fgc: var(--hi); box-shadow: inset 0 0 0 1px var(--hi-b); filter: none; }
.btn--sm { --cut: 7px; padding: 10px 14px 9px; font-size: 15px; }
.btn--lg { --cut: 12px; padding: 17px 26px 16px; font-size: 19px; }

kbd {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px;
  font: 500 13px/1 var(--f-mono); color: var(--fg);
  background: var(--bg-3); border: 1px solid var(--line-2); border-bottom-width: 3px; border-radius: 3px;
}
kbd svg { width: 15px; height: 15px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 70; background: rgba(11, 10, 9, .84); backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 900 26px/1 var(--f-disp); letter-spacing: .04em; color: var(--fg); }
.brand b { color: var(--hi); font-weight: 900; }
.brand__mark { width: 38px; height: 38px; color: var(--hi); }
.brand__w { display: grid; line-height: .82; font-size: .78em; }
.brand__w b { display: block; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 10px 12px; text-decoration: none;
  font: 600 14px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2);
  transition: color .2s;
}
.nav__links a::before, .nav__links a::after { position: absolute; top: 9px; color: var(--hi); opacity: 0; transition: opacity .2s, transform .25s var(--ease); font-weight: 500; }
.nav__links a::before { content: "["; left: 0; transform: translateX(4px); }
.nav__links a::after { content: "]"; right: 0; transform: translateX(-4px); }
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::before, .nav__links a:hover::after { opacity: 1; transform: none; }
.nav__cta { display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 72px) 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(255, 106, 31, .07) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 106, 31, .07) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 72% 45%, #000 15%, transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(56px, 7.6vw, 96px); line-height: .86; }
.hero h1 .stencil { display: inline-block; margin-top: .04em; }
.lead { margin-top: 28px; max-width: 54ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--fg-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hint { list-style: none; padding: 22px 0 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; border-top: 1px solid var(--line); max-width: 560px; font: 500 15px/1 var(--f-body); color: var(--fg-2); }
.hint li { display: inline-flex; align-items: center; gap: 9px; }
.hint__note { color: var(--muted); margin-left: auto; }

/* poligono */
.range {
  justify-self: end; width: min(100%, 384px); padding: 16px 22px 20px;
  background:
    radial-gradient(ellipse 80% 45% at 50% 100%, rgba(255, 106, 31, .09), transparent 70%),
    linear-gradient(180deg, #12100e, #0b0a09);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  isolation: isolate;
}
.range__lane { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: var(--line-2); opacity: .75; }
.range__bar { display: flex; justify-content: space-between; font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.range__bar span:last-child { color: var(--hi); }
.timer {
  position: relative; z-index: 2; margin: 0 auto -22px; width: 88%;
  background: #080706; border-radius: 6px; padding: 12px 16px 10px;
  box-shadow: 0 18px 30px -12px #000, inset 0 0 0 1px #332c26, inset 0 0 0 5px #171411;
}
.timer__row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-mono); }
.timer__lbl { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.timer__val { font: 700 46px/1 var(--f-mono); color: var(--hi); text-shadow: 0 0 18px rgba(255, 106, 31, .5); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer__row--sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; border-top: 1px dashed #2e2822; padding-top: 7px; margin-top: 4px; }
.timer__row--sub b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.target { width: 74%; height: auto; margin: 0 auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .65)); }
.t-d { fill: url(#card); stroke: var(--card-d); stroke-width: 1.5; }
.t-line { fill: none; stroke: #8d6c3e; stroke-width: 1.4; stroke-dasharray: 5 3; }
.t-txt { font: 900 34px var(--f-disp); fill: #8d6c3e; text-anchor: middle; opacity: .6; }
.t-txt--s { font-size: 18px; }
.zone { fill: transparent; pointer-events: none; }
.hit { fill: #140d05; stroke: #3b2a14; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: hit .25s ease-out; }
.hit-ring { fill: none; stroke: var(--hi); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring .6s ease-out forwards; }
@keyframes hit { from { transform: scale(2.4); opacity: 0; } }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(3); opacity: 0; } }
.drill { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.range__cap { font: 500 12px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--muted); text-align: right; text-transform: uppercase; }
.range__cap.wait { color: var(--gold); }
.range__cap.go { color: var(--hi); }
.range__cap.bad { color: var(--red); }
.range__cap.done { color: var(--fg); }

.ticker { margin-top: clamp(56px, 7vw, 88px); background: var(--hi); color: #1a0a02; overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: tick 46s linear infinite; }
.ticker span { display: inline-flex; align-items: center; gap: 30px; padding: 15px 30px 13px; font: 900 24px/1 var(--f-sten); letter-spacing: .04em; text-transform: uppercase; }
.ticker span::after { content: ""; width: 9px; height: 9px; background: currentColor; transform: rotate(45deg); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.sec { padding: clamp(84px, 11vw, 144px) 0; }
.sec__head {
  display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 64px); padding-top: 26px;
  background:
    linear-gradient(var(--hi), var(--hi)) left top / 64px 2px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) left top / 100% 1px no-repeat;
}
.sec__head h2 { font-size: clamp(46px, 6.2vw, 88px); }
.sec__head > p { max-width: 58ch; color: var(--fg-2); font-size: 18px; }
.fine { font: 400 13px/1.6 var(--f-mono) !important; color: var(--muted) !important; }

/* ---------- Loadout ---------- */
.loadout {
  display: grid; grid-template-columns: minmax(270px, .78fr) minmax(0, 2fr);
  background: var(--bg-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  min-height: 500px;
}
.lo-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.lo-tab {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) 18px; grid-template-rows: auto auto; column-gap: 16px; row-gap: 6px; align-items: center;
  padding: 20px 22px; text-align: left; color: var(--fg-2);
  background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.lo-tab:last-child { border-bottom: 0; }
.lo-list .lo-tab { flex: 1 1 auto; }
.lo-tab > svg:first-child { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--muted); transition: color .25s; }
.lo-tab__n { font: 800 22px/1 var(--f-disp); letter-spacing: .02em; text-transform: uppercase; color: var(--fg); transition: color .25s; }
.lo-tab__m { grid-column: 2; font-size: 15px; line-height: 1.3; color: var(--muted); }
.lo-tab__c { grid-column: 3; grid-row: 1 / 3; width: 18px; height: 18px; color: var(--hi); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .3s var(--ease); }
.lo-tab:hover { background: var(--bg-3); }
.lo-tab:hover > svg:first-child { color: var(--fg-2); }
.lo-tab[aria-selected="true"] { background: linear-gradient(90deg, var(--hi-a), transparent 85%), var(--bg-3); }
.lo-tab[aria-selected="true"] > svg:first-child, .lo-tab[aria-selected="true"] .lo-tab__n { color: var(--hi); }
.lo-tab[aria-selected="true"] .lo-tab__c { opacity: 1; transform: none; }
.lo-tab:focus-visible { outline-offset: -3px; }

.lo-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(28px, 4vw, 56px); animation: panel .55s var(--ease); }
.lo-panel[hidden] { display: none; }
@keyframes panel { from { opacity: 0; clip-path: inset(0 0 0 12%); transform: translateX(14px); } to { opacity: 1; clip-path: inset(0); transform: none; } }
.lp-text { display: grid; gap: 18px; justify-items: start; }
.lp-text h3 { font-size: clamp(38px, 4vw, 56px); }
.lp-text p { color: var(--fg-2); max-width: 46ch; }
.feats { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.feats li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.feats li::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--hi); transform: rotate(45deg); }
.lp-vis { display: grid; place-items: center; min-height: 300px; }

.label-card { width: min(100%, 330px); background: var(--paper); color: #16140f; padding: 18px 20px; transform: rotate(-2deg); box-shadow: 0 30px 50px -20px #000, 0 2px 0 #bdb4a1; font-family: var(--f-mono); }
.label-card__top { display: flex; justify-content: space-between; font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 2px solid #16140f; padding-bottom: 9px; margin-bottom: 6px; }
.label-card dl { margin: 0; }
.label-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #b9b1a0; font-size: 13px; }
.label-card dt { color: #5f594d; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; align-self: center; }
.label-card dd { margin: 0; font-weight: 500; text-align: right; }
.label-card mark { background: var(--hi); color: #1a0a02; padding: 1px 6px; font-weight: 700; }
.label-card__note { margin-top: 12px; font-size: 11.5px; line-height: 1.5; color: #6d665a; }

.meters { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 22px; }
.meters li { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; align-items: baseline; }
.meters__n { font-weight: 600; font-size: 16px; }
.meters b { font: 500 14px/1 var(--f-mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.seg {
  grid-column: 1 / -1; height: 12px; --c: var(--hi);
  background: linear-gradient(90deg, var(--c) calc(var(--v) * 100%), var(--bg-4) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 12px);
  mask: repeating-linear-gradient(90deg, #000 0 9px, transparent 9px 12px);
}
.meters .is-low { --c: var(--red); }
.meters .is-low b { color: var(--red); }
.meters .is-low .seg { --c: var(--red); }

.formula { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.formula > div { display: grid; gap: 8px; padding: 18px 20px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); text-align: center; }
.formula small { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.formula b { font: 700 34px/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.formula__op { font: 700 30px/1 var(--f-mono); color: var(--muted); }
.formula__res { box-shadow: inset 0 0 0 1px var(--hi-b) !important; background: linear-gradient(180deg, var(--hi-a), transparent), var(--bg) !important; }
.formula__res b { color: var(--hi); }

.mini-plan { width: 100%; max-width: 420px; height: auto; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }

.idcard { width: min(100%, 360px); margin: 0; padding: 22px 24px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; gap: 0; }
.idcard div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.idcard div:last-child { border-bottom: 0; }
.idcard dt { font: 500 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.idcard dd { margin: 0; font: 500 15px/1 var(--f-mono); }
.idcard .ok { color: var(--hi); }
.redact { display: inline-block; width: var(--w); height: 14px; background: repeating-linear-gradient(-45deg, var(--line-2) 0 4px, var(--bg-4) 4px 8px); vertical-align: middle; }

/* ---------- Calcolatore HF ---------- */
.sec--panel { background: linear-gradient(180deg, #12100e, #0b0d0c); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .sec__head { margin-bottom: 0; position: sticky; top: 120px; }
.calc { margin: 0; padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; background: var(--bg-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.seg-ctl { border: 0; margin: 0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg-ctl label { position: relative; cursor: pointer; }
.seg-ctl input { position: absolute; opacity: 0; }
.seg-ctl span { display: block; text-align: center; padding: 12px 10px 11px; font: 800 17px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: background-color .2s, color .2s; }
.seg-ctl label:hover span { color: var(--fg); }
.seg-ctl input:checked + span { background: var(--hi); color: #1a0a02; }
.seg-ctl input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: -4px; }
.calc__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.num { display: grid; gap: 8px; padding: 12px 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; cursor: text; }
.num:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.num:focus-within { box-shadow: inset 0 0 0 1px var(--hi); }
.num span { font: 800 15px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--hi); }
.num--bad span { color: var(--red); }
.num input {
  width: 100%; padding: 0; border: 0; background: none; color: var(--fg);
  font: 700 30px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; -moz-appearance: textfield;
}
.num input::-webkit-inner-spin-button, .num input::-webkit-outer-spin-button { -webkit-appearance: none; }
.num input:focus { outline: none; }
.num--time input { font-size: 40px; }
.readout { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 1px; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.readout div { background: #080706; padding: 16px 12px 14px; text-align: center; }
.readout small { display: block; margin-bottom: 9px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.readout b { display: inline-block; font: 700 28px/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.readout__main b { font-size: clamp(34px, 4vw, 46px); color: var(--hi); text-shadow: 0 0 20px rgba(255, 106, 31, .4); }
.readout .js-pen { color: var(--red); }
.bump { animation: bump .3s var(--ease); }
@keyframes bump { 40% { transform: scale(1.07); } }

/* ---------- Generatore stage ---------- */
.gen { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.gen__ctrl { display: grid; gap: 16px; position: sticky; top: 104px; }
.sel { display: grid; gap: 8px; }
.sel span { font: 800 15px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.sel select {
  appearance: none; width: 100%; padding: 14px 42px 14px 15px; cursor: pointer;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff6a1f' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 15px center;
  color: var(--fg); border: 1px solid var(--line-2); border-radius: 0; font: 500 16px/1.2 var(--f-body);
  transition: border-color .2s;
}
.sel select:hover { border-color: var(--muted); }
.sel select:focus { outline: none; border-color: var(--hi); }
.gen__ctrl .btn { margin-top: 6px; }
.gen__out { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.sheet { padding: 20px; background: var(--bg-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.sheet__head h3 { font-size: clamp(28px, 3vw, 40px); }
.sheet__code { font: 700 13px/1 var(--f-mono); letter-spacing: .06em; background: var(--hi); color: #1a0a02; padding: 8px 10px; }
.plan { width: 100%; height: auto; background: #0a0908; box-shadow: inset 0 0 0 1px var(--line); }
.plan__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font: 500 14px/1 var(--f-body); color: var(--fg-2); }
.plan__legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 12px; height: 12px; display: inline-block; }
.lg--p { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-d); }
.lg--s { background: #8b939b; border-radius: 50%; }
.lg--ns { background: #fff; }
.lg--box { box-shadow: inset 0 0 0 2px var(--hi); }
.plan .p-in { opacity: 0; animation: pin .45s var(--ease) forwards; }
@keyframes pin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.popper { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.5, 0, .75, 0), opacity .25s; }
.popper.down { transform: scaleY(.18); opacity: .45; }
.brief { margin: 0; display: grid; gap: 1px; align-content: start; background: var(--line); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.brief div { background: var(--bg-2); padding: 14px 18px; }
.brief dt { margin-bottom: 7px; font: 800 14px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.brief dd { margin: 0; font-size: 16px; line-height: 1.45; }
.brief dd.big { font: 700 44px/1 var(--f-mono); letter-spacing: -.03em; color: var(--hi); }

/* ---------- Accesso ---------- */
.sec--access { background: radial-gradient(ellipse at 90% 10%, rgba(255, 106, 31, .07), transparent 55%), #100e0c; border-top: 1px solid var(--line); }
.access { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px clamp(32px, 6vw, 96px); align-items: center; }
.access h2 { font-size: clamp(46px, 6.2vw, 88px); }
.access .lead { margin-top: 26px; }
.access__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.steps li { display: flex; gap: 20px; align-items: flex-start; padding: 26px; background: var(--bg-2); }
.steps__n {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font: 900 26px/1 var(--f-disp); color: #1a0a02; background: var(--hi);
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.steps h3 { font-size: 28px; margin: 4px 0 8px; }
.steps p { color: var(--fg-2); font-size: 16px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0; }
.foot__in { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.foot p { color: var(--muted); font-size: 15px; max-width: 62ch; }
.foot__copy { font: 400 13px/1 var(--f-mono) !important; }

/* ==========================================================
   FX — mirino, sparo, HUD
   ========================================================== */
html.has-reticle, html.has-reticle * { cursor: none !important; }
.reticle { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 400; pointer-events: none; opacity: 0; transition: opacity .15s; --s: 7px; --c: var(--hi); }
.reticle.on { opacity: 1; }
.reticle__in { position: absolute; transition: transform .2s var(--ease); }
.reticle i { position: absolute; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); transition: background-color .15s; }
.reticle i:nth-child(1) { width: 2px; height: 10px; left: -1px; top: calc(-10px - var(--s)); }
.reticle i:nth-child(2) { width: 2px; height: 10px; left: -1px; top: var(--s); }
.reticle i:nth-child(3) { width: 10px; height: 2px; top: -1px; left: calc(-10px - var(--s)); }
.reticle i:nth-child(4) { width: 10px; height: 2px; top: -1px; left: var(--s); }
.reticle b { position: absolute; width: 3px; height: 3px; left: -1.5px; top: -1.5px; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); }
.reticle.is-ui { --c: var(--fg); }
.reticle.is-ui .reticle__in { transform: rotate(45deg) scale(.8); }
.reticle.is-hot { --c: var(--red); }

.flash { position: fixed; inset: 0; pointer-events: none; z-index: 97; opacity: 0; background: radial-gradient(circle 240px at var(--x, 50%) var(--y, 50%), rgba(255, 228, 160, .2), transparent 70%); }
.flash.go { animation: flash .09s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.kick { animation: kick .13s ease-out; }
@keyframes kick { 30% { transform: translate(1px, -3px) rotate(-.15deg); } to { transform: none; } }

.holes { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 45; pointer-events: none; }
.hole { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; transform: rotate(var(--r));
  background: radial-gradient(circle, #000 0 26%, #2a2a26 34%, rgba(160, 160, 150, .35) 42%, transparent 62%);
  animation: hole .12s ease-out; transition: opacity .6s; }
.hole::before, .hole::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; background: rgba(180, 180, 170, .3); transform: translate(-50%, -50%) rotate(30deg); }
.hole::after { width: 12px; transform: translate(-50%, -50%) rotate(-55deg); }
.hole.out { opacity: 0; }
@keyframes hole { from { transform: rotate(var(--r)) scale(2); opacity: 0; } }

.hm { position: fixed; z-index: 401; pointer-events: none; width: 0; height: 0; animation: hm .38s ease-out forwards; }
.hm::before, .hm::after { content: ""; position: absolute; left: -11px; top: -1px; width: 22px; height: 2px; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); transform: rotate(45deg); filter: drop-shadow(0 0 1px #000); }
.hm::after { transform: rotate(-45deg); }
.hm--crit::before, .hm--crit::after { background: linear-gradient(90deg, var(--red) 0 35%, transparent 35% 65%, var(--red) 65%); }
@keyframes hm { from { transform: scale(1.5); opacity: 1; } 60% { opacity: 1; } to { transform: scale(1); opacity: 0; } }
.floater { position: fixed; z-index: 401; pointer-events: none; font: 900 30px/1 var(--f-disp); color: #fff; text-shadow: 0 2px 8px #000; transform: translate(14px, -26px); animation: float .9s var(--ease) forwards; }
.floater.crit { color: var(--gold); }
@keyframes float { to { transform: translate(22px, -74px); opacity: 0; } }

.feed { position: fixed; left: 20px; bottom: 20px; z-index: 60; display: grid; gap: 6px; align-content: end; pointer-events: none; }
.feed__it {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 12px;
  background: rgba(10, 9, 8, .86); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 800 15px/1 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2);
  animation: feedin .3s var(--ease); transition: opacity .4s, transform .4s;
}
.feed__it::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--hi); transform: rotate(45deg); }
.feed__it b { color: var(--fg); font-weight: 800; }
.feed__it span { color: var(--hi); font: 500 13px/1 var(--f-mono); letter-spacing: 0; }
.feed__it.crit::before { background: var(--gold); }
.feed__it.crit b, .feed__it.crit span { color: var(--gold); }
.feed__it.bad::before { background: var(--red); }
.feed__it.bad span { color: var(--red); }
.feed__it.gold { box-shadow: inset 0 0 0 1px rgba(255, 207, 61, .45); background: rgba(34, 27, 4, .9); }
.feed__it.gold::before { background: var(--gold); }
.feed__it.gold b { color: var(--gold); }
.feed__it.out { opacity: 0; transform: translateX(-20px); }
@keyframes feedin { from { opacity: 0; transform: translateX(-20px); } }

.hudmsg { position: fixed; left: 50%; top: 92px; transform: translate(-50%, 0); z-index: 61; pointer-events: none; opacity: 0;
  font: 900 30px/1 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); text-shadow: 0 2px 12px #000; padding: 10px 18px 8px; background: rgba(10, 9, 8, .86); box-shadow: inset 0 0 0 1px var(--line-2); transition: opacity .2s, transform .3s var(--ease); }
.hudmsg.show { opacity: 1; transform: translate(-50%, 8px); }
.hudmsg.bad { color: var(--red); }
.hudmsg.gold { color: var(--gold); }

.ammo {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 214px; padding: 12px 14px;
  background: rgba(10, 9, 8, .86); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(8px);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.ammo__top { display: flex; justify-content: space-between; align-items: flex-end; }
.ammo__mag { font: 700 44px/.85 var(--f-mono); letter-spacing: -.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.ammo__mag small { font-size: 18px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.ammo__mag.low span { color: var(--red); animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.ammo__wpn { text-align: right; font: 800 13px/1.25 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ammo__wpn b { color: var(--hi); font-weight: 800; }
.ammo__bar { display: flex; gap: 2px; margin: 10px 0 9px; }
.ammo__bar i { flex: 1; height: 10px; background: var(--hi); transition: background-color .1s; }
.ammo__bar i.spent { background: var(--bg-4); }
.ammo.reloading .ammo__bar i { animation: blink .3s infinite; }
.ammo__meta, .ammo__keys { display: flex; justify-content: space-between; align-items: center; font: 800 12px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ammo__meta b { color: var(--fg); font: 500 12px/1 var(--f-mono); letter-spacing: 0; margin-left: 4px; }
.ammo__keys { margin-top: 8px; }
.ammo__keys kbd { min-width: 22px; height: 22px; font-size: 11px; margin-right: 5px; }
.js-mute { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; background: none; border: 0; color: var(--muted); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.js-mute svg { width: 15px; height: 15px; }
.js-mute:hover { color: var(--hi); }

.boot { position: fixed; inset: 0; z-index: 500; background: #070605; display: grid; place-items: center; transition: opacity .5s var(--ease); }
.boot.out { opacity: 0; pointer-events: none; }
.boot__in { width: max-content; max-width: 90vw; opacity: 0; transition: opacity .15s; }
.boot.ready .boot__in { opacity: 1; }
.boot__t { font: 900 min(110px, 30vw)/.8 var(--f-disp); letter-spacing: .02em; margin: 0 -.02em 0 0; white-space: nowrap; }
.boot__t b { display: block; color: var(--hi); font-weight: 900; }
.boot__bar { height: 3px; margin-top: 22px; background: var(--line); overflow: hidden; }
.boot__bar i { display: block; height: 100%; background: var(--hi); transform-origin: left; animation: load 1.9s cubic-bezier(.3, .1, .2, 1) forwards; }
@keyframes load { from { transform: scaleX(0); } }

/* ==========================================================
   Login
   ========================================================== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login__art {
  position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background:
    linear-gradient(rgba(255, 106, 31, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 106, 31, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    #12100e;
  border-right: 1px solid var(--line);
}
.login__art h1 { position: relative; z-index: 1; font-size: clamp(56px, 7vw, 96px); }
.login__art p { position: relative; z-index: 1; max-width: 40ch; color: var(--fg-2); font-weight: 500; }
.login__bg { position: absolute; right: -14%; bottom: -10%; width: 72%; color: var(--hi); opacity: .07; }
.login__main { display: grid; place-items: center; padding: 48px var(--gut); }
.login__box { width: min(100%, 420px); }
.login__box h2 { font-size: 56px; margin-bottom: 14px; }
.login__box > p { color: var(--fg-2); margin-bottom: 30px; }
.login__box .btn { width: 100%; }
.or { display: flex; align-items: center; gap: 14px; margin: 28px 0; font: 800 14px/1 var(--f-disp); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; font: 800 15px/1 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; }
.back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.back:hover { color: var(--hi); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1120px) {
  .gen { grid-template-columns: 1fr; }
  .gen__ctrl { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
  .gen__ctrl .btn { margin: 0; }
  .lo-panel { grid-template-columns: 1fr; }
  .lp-vis { min-height: 0; }
}
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .hero__grid, .split, .access { grid-template-columns: 1fr; }
  .range { justify-self: center; }
  .split .sec__head { position: static; }
  .loadout { grid-template-columns: 1fr; }
  .lo-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .lo-list::-webkit-scrollbar { display: none; }
  .lo-tab { flex: none; grid-template-columns: 22px auto; padding: 16px 18px; border-bottom: 0; border-right: 1px solid var(--line); }
  .lo-tab > svg:first-child { grid-row: auto; width: 22px; height: 22px; }
  .lo-tab__n { font-size: 19px; white-space: nowrap; }
  .lo-tab__m, .lo-tab__c { display: none; }
  .lo-tab[aria-selected="true"] { background: linear-gradient(0deg, var(--hi-a), transparent), var(--bg-3); box-shadow: inset 0 -2px 0 var(--hi); }
  .gen__out { grid-template-columns: 1fr; }
  .foot__in { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__art { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__cta .btn--ghost { display: none; }
  .nav__cta .btn--wa span { display: none; }
  .nav__cta .btn--wa { padding: 10px; }
  .hero__actions .btn, .access__cta .btn { width: 100%; }
  .hint__note { margin-left: 0; }
  .range { padding: 14px 14px 16px; }
  .drill { flex-direction: column; align-items: stretch; text-align: center; }
  .range__cap { text-align: center; }
  .gen__ctrl { grid-template-columns: 1fr; }
  .calc__grid { gap: 8px; }
  .num { padding: 10px; }
  .num input { font-size: 24px; }
  .num--time input { font-size: 32px; }
  .readout b { font-size: 20px; }
  .readout__main b { font-size: 30px; }
  .formula > div { padding: 14px; }
  .formula b { font-size: 26px; }
  .steps li { padding: 20px; }
  .feed { left: 12px; bottom: 12px; }
  .hudmsg { font-size: 28px; }
}
@media (pointer: coarse) { .ammo { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
