/* ============================================================
   denko — atmospheric lightning detection instruments
   Aesthetic: scientific instrument panel. Charcoal-blue field,
   electric-cyan spark, amber instrument-LED readouts.
   Brand: 電 seal + Besley slab wordmark (see /brand/README.md).
   ============================================================ */

@font-face {
  font-family: "Besley";
  src: url("fonts/besley-var-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg:        #0a0d12;
  --bg-2:      #0c1017;
  --panel:     #11161f;
  --panel-2:   #141b25;
  --line:      #1e2733;
  --line-2:    #2a3543;

  --ink:       #e3e9f0;
  --ink-soft:  #aab4c2;
  --ink-mute:  #6b7686;

  --spark:     #56d3ff;   /* electric cyan — the lightning */
  --spark-dim: #2b8fb8;
  --violet:    #8c7bff;   /* secondary discharge tint */
  --amber:     #ffb43c;   /* instrument LED / price readout */
  --amber-dim: #b87d22;

  --ok:        #4ad6a0;

  --maxw: 1180px;
  --r:    14px;

  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --disp: "Besley", "Superclarendon", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Schematic graph-paper field + storm glow, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(86,211,255,.10), transparent 55%),
    radial-gradient(90% 70% at 8% 110%, rgba(140,123,255,.08), transparent 55%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 85%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 85%);
  opacity: .5;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- instrument readout chip ---------- */
.readout {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: .5em;
  box-shadow: 0 0 0 0 rgba(74,214,160,.6);
  animation: pulse 2.4s ease-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,214,160,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(74,214,160,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,214,160,0); }
}

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10,13,18,.88), rgba(10,13,18,.66));
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand .mark-img { height: 30px; width: auto; display: block; }
.brand .sub {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
header nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
header nav a {
  font-family: var(--mono);
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); transition: color .2s;
}
header nav a:hover { color: var(--spark); }
.status { display: flex; align-items: center; }
@media (max-width: 720px) { .status, header nav a.navlink { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 28px; }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 880px) { .hero .grid { grid-template-columns: 1fr; gap: 28px; } }

.kicker {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--spark); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--spark); }
.hero p.lede {
  margin-top: 20px; max-width: 46ch;
  color: var(--ink-soft); font-size: 1.06rem;
}
.cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  --c: var(--spark);
  font-family: var(--mono);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .55em;
  padding: 13px 20px; border-radius: 10px;
  border: 1px solid var(--line-2);
  color: var(--ink); background: var(--panel);
  cursor: pointer; transition: border-color .2s, transform .12s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  border-color: color-mix(in srgb, var(--spark) 55%, transparent);
  background: linear-gradient(180deg, rgba(86,211,255,.16), rgba(86,211,255,.05));
  color: #d8f4ff;
  box-shadow: 0 0 0 1px rgba(86,211,255,.06), 0 10px 30px -12px rgba(86,211,255,.5);
}
.btn.primary:hover { box-shadow: 0 0 0 1px rgba(86,211,255,.25), 0 14px 36px -10px rgba(86,211,255,.65); }

/* hero scope */
.scope {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(140% 120% at 50% 0%, rgba(86,211,255,.07), transparent 60%),
    var(--bg-2);
  overflow: hidden;
  box-shadow: inset 0 0 60px -30px rgba(86,211,255,.4);
}
.scope .hud {
  position: absolute; inset: 12px 14px auto 14px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute); z-index: 2;
}
.scope .hud .live { color: var(--amber); }
canvas#scope { display: block; width: 100%; height: 260px; }
.scope .foot {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  color: var(--ink-mute); z-index: 2;
}

/* ---------- catalog ---------- */
.catalog { padding: 40px 0 30px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-head h2 {
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em;
}
.sec-head h2 span { color: var(--ink-mute); font-weight: 800; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-soft);
  background: transparent; cursor: pointer; transition: all .18s;
}
.chip:hover { color: var(--ink); border-color: var(--spark-dim); }
.chip[aria-pressed="true"] {
  color: #061018; background: var(--spark); border-color: var(--spark);
  font-weight: 600;
}

.grid-products {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden;
  transition: border-color .22s, transform .18s, box-shadow .22s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--spark) 45%, var(--line));
  box-shadow: 0 18px 40px -22px rgba(86,211,255,.6);
}
.card .art {
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(86,211,255,.08), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.card .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); background: rgba(10,13,18,.6);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px;
}
.card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-family: var(--disp); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.card .sku { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--spark-dim); margin-top: 2px; }
.card .summary { margin-top: 10px; color: var(--ink-soft); font-size: .9rem; }
.card .specs { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.card .specs li { list-style: none; font-family: var(--mono); font-size: .72rem; color: var(--ink-mute); display: flex; gap: .5em; }
.card .specs li::before { content: "›"; color: var(--spark-dim); }

.card .buy {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.price { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; color: var(--amber); letter-spacing: .01em; }
.price small { color: var(--amber-dim); font-size: .68rem; font-weight: 400; }

.buy-btn {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 11px 16px; border-radius: 9px; cursor: pointer;
  color: #061018; background: var(--spark); border: 1px solid var(--spark);
  transition: transform .12s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.buy-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -12px rgba(86,211,255,.8); }
.buy-btn[data-pending] { background: transparent; color: var(--ink-mute); border-color: var(--line-2); cursor: not-allowed; }
.buy-btn[data-pending]:hover { transform: none; box-shadow: none; }
.soldout { color: var(--ink-mute); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

.buy-btn.ghost {
  background: transparent; color: var(--spark);
  border-color: color-mix(in srgb, var(--spark) 45%, var(--line-2));
}
.buy-btn.ghost:hover { background: rgba(86,211,255,.08); box-shadow: 0 10px 26px -14px rgba(86,211,255,.7); }
.price.enquire {
  color: var(--ink-soft); font-family: var(--mono); font-weight: 500;
  font-size: .84rem; letter-spacing: .02em;
}

/* ---------- info strip ---------- */
.strip { margin: 36px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .strip { grid-template-columns: 1fr; } }
.strip .item { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px; background: var(--panel); }
.strip .item h4 { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--spark); }
.strip .item p { margin-top: 8px; color: var(--ink-soft); font-size: .9rem; }

/* ---------- notice ---------- */
.notice {
  margin: 24px 0; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line));
  border-radius: 10px; background: rgba(255,180,60,.06);
  font-family: var(--mono); font-size: .76rem; color: var(--amber);
  display: flex; gap: .7em; align-items: flex-start;
}
.notice b { color: var(--amber); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 60px; }
.foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer .foot-mark { height: 15px; width: auto; opacity: .85; }
footer .meta { font-family: var(--mono); font-size: .72rem; color: var(--ink-mute); letter-spacing: .06em; }
footer a:hover { color: var(--spark); }

/* ---------- builds ladder ---------- */
.builds { padding: 30px 0 6px; }
.ladder {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  align-items: stretch;
}
.build {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 22px 18px 18px;
  transition: border-color .22s, transform .18s, box-shadow .22s;
}
.build:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--spark) 40%, var(--line)); box-shadow: 0 18px 40px -24px rgba(86,211,255,.6); }
.build::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--spark), var(--violet));
  opacity: .75;
}
.build-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.build .tier { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--spark); }
.build h3 { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; margin-top: 12px; }
.build .tagline { color: var(--ink-soft); font-size: .92rem; margin-top: 8px; }
.build .includes { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.build .includes li { list-style: none; font-family: var(--mono); font-size: .74rem; color: var(--ink-mute); display: flex; gap: .55em; }
.build .includes li::before { content: "+"; color: var(--spark-dim); }
.build-cta { margin-top: 18px; }
.build-cta .buy-btn { width: 100%; justify-content: center; }

/* ---------- slot sections ---------- */
.slot { margin-bottom: 38px; scroll-margin-top: 84px; }
.slot-head { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.slot-head h3 { font-family: var(--disp); font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.slot-head p { color: var(--ink-soft); font-size: .92rem; max-width: 72ch; }
.req, .opt {
  font-family: var(--mono); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2);
}
.req { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, var(--line-2)); }
.opt { color: var(--ink-mute); }

.filters .chip { text-decoration: none; }

/* ---------- in-development state ---------- */
.badge.dev {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-family: var(--mono); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet); background: rgba(140,123,255,.12);
  border: 1px solid color-mix(in srgb, var(--violet) 40%, var(--line)); border-radius: 6px;
  padding: 4px 8px;
}
.build-top .badge.dev { position: static; }
.card.is-dev .art { opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}

.vat-breakdown { display:block; font-size:.72rem; opacity:.6; margin-top:.15rem; }

/* ---------- flagship page ---------- */
.stage {
  margin: 0; position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #0b0d12;
  overflow: hidden;
  box-shadow: inset 0 0 60px -30px rgba(86,211,255,.35);
}
.stage img { display: block; width: 100%; height: auto; }
.stage .foot {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute);
}

.reserve-card {
  margin: 48px 0 30px;
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 36px; align-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 36px 38px;
}
@media (max-width: 820px) { .reserve-card { grid-template-columns: 1fr; } }
.reserve-card h2 { font-family: var(--disp); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; margin: 10px 0 4px; }
.reserve-notes { margin: 18px 0 0; padding: 0; }
.reserve-notes li {
  list-style: none; font-family: var(--mono); font-size: .78rem; color: var(--ink-mute);
  display: flex; gap: .55em; margin-bottom: 7px;
}
.reserve-notes li::before { content: "›"; color: var(--spark-dim); }

.price-box {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-2); padding: 26px 26px 22px; text-align: center;
}
.price-big { font-family: var(--disp); font-weight: 800; font-size: 2.6rem; color: var(--amber); letter-spacing: -.01em; }
.price-box .vat-breakdown { margin: 4px 0 18px; }
.price-box .buy-btn { display: block; text-align: center; padding: 14px 16px; font-size: .84rem; }
.reserve-fine { margin-top: 12px; font-family: var(--mono); font-size: .66rem; color: var(--ink-mute); letter-spacing: .06em; }

.ds-link { margin-top: 14px; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; }
.ds-link a { color: var(--ink-mute); border-bottom: 1px dotted var(--line-2); }
.ds-link a:hover { color: var(--spark); }
