@import url("dwarf-ui.css");

/* ============================================================
   DWARF — dwarf.rip
   design language: clean dark monospace. skeuomorphism is
   rationed: plastic keys, LED dots, amber VFD displays, and
   one calculator. everything else is quiet.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #0a0a0b;
  --bg-raise: #101012;
  --hairline: #232327;
  --hairline-soft: #19191c;

  /* type — soft/faint still read as hierarchy but clear AA contrast
     on the near-black board; grey-on-grey is a firing offence */
  --ink: #eceae5;
  --ink-soft: #aca9a0;
  --ink-faint: #7d7a72;

  /* the five letters */
  --red: #f5252b;
  --orange: #f77706;
  --yellow: #fbca05;
  --green: #50ba34;
  --blue: #1b70c4;

  /* vfd display */
  --vfd-bg: #131110;
  --vfd: #ffb000;
  --vfd-dim: rgba(255, 176, 0, 0.28);

  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pixel: "VT323", "Space Mono", monospace;

  --maxw: 1180px;
  --pad: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.dw {
  --dw-surface: #242326;
  --dw-ink-base: #ece8dc;
  --dw-accent: var(--orange);
  /* moulded caps in the LOGO letter colours — the D red, not the
     muddy default granulate */
  --dw-cap-red: var(--red);
  --dw-cap-orange: var(--orange);
  --dw-cap-yellow: var(--yellow);
  --dw-cap-green: var(--green);
  --dw-cap-blue: var(--blue);
  /* derived inks run brighter on the dark board — engraving has to
     be legible, not tasteful-invisible */
  --dw-ink-soft: color-mix(in srgb, var(--dw-ink-base) 76%, var(--dw-surface));
  --dw-ink-faint: color-mix(in srgb, var(--dw-ink-base) 50%, var(--dw-surface));
  --dw-depth: 0.82;
  --dw-shade: 1.35;
  --dw-well: #050506;
  --dw-field: #111113;
  --dw-field-ink: var(--ink);
  --dw-gl: color-mix(in srgb, var(--dw-surface) 72%, #f1eee6);
  --dw-hi: color-mix(in srgb, var(--dw-surface) 82%, #f1eee6);
  --dw-pop-sm:
    color-mix(in srgb, var(--dw-sh) calc(18% * var(--dw-shade)), transparent)
      calc(0.5px * var(--dw-depth)) calc(0.5px * var(--dw-depth)) 0.6px -0.6px,
    color-mix(in srgb, var(--dw-sh) calc(19% * var(--dw-shade)), transparent)
      calc(1.8px * var(--dw-depth)) calc(1.8px * var(--dw-depth)) 1.8px -1px,
    color-mix(in srgb, var(--dw-sh) calc(22% * var(--dw-shade)), transparent)
      calc(6px * var(--dw-depth)) calc(6px * var(--dw-depth)) 7px -1.8px,
    color-mix(in srgb, var(--dw-sh) 14%, transparent) -1px -1px 0px 0px inset,
    color-mix(in srgb, var(--dw-hi) 38%, transparent) 1px 1px 0px 0px inset;
  --dw-pop-md:
    color-mix(in srgb, var(--dw-hi) 48%, transparent)
      calc(-2px * var(--dw-depth)) calc(-2px * var(--dw-depth)) 3px -0.7px,
    color-mix(in srgb, var(--dw-sh) calc(34% * var(--dw-shade)), transparent)
      calc(0.8px * var(--dw-depth)) calc(0.8px * var(--dw-depth)) 1px -0.5px,
    color-mix(in srgb, var(--dw-sh) calc(32% * var(--dw-shade)), transparent)
      calc(1.8px * var(--dw-depth)) calc(1.8px * var(--dw-depth)) 2.4px -0.9px,
    color-mix(in srgb, var(--dw-sh) calc(29% * var(--dw-shade)), transparent)
      calc(3.2px * var(--dw-depth)) calc(3.2px * var(--dw-depth)) 4.4px -1.4px,
    color-mix(in srgb, var(--dw-sh) calc(25% * var(--dw-shade)), transparent)
      calc(5.2px * var(--dw-depth)) calc(5.2px * var(--dw-depth)) 7.5px -2px,
    color-mix(in srgb, var(--dw-sh) calc(20% * var(--dw-shade)), transparent)
      calc(8px * var(--dw-depth)) calc(8px * var(--dw-depth)) 12px -2.6px;
  --dw-pop-lg:
    color-mix(in srgb, var(--dw-sh) calc(10% * var(--dw-shade)), transparent)
      calc(1px * var(--dw-depth)) calc(1px * var(--dw-depth)) 2.4px -0.2px,
    color-mix(in srgb, var(--dw-sh) calc(11% * var(--dw-shade)), transparent)
      calc(2.4px * var(--dw-depth)) calc(2.4px * var(--dw-depth)) 5.8px -0.45px,
    color-mix(in srgb, var(--dw-sh) calc(12% * var(--dw-shade)), transparent)
      calc(4.2px * var(--dw-depth)) calc(4.2px * var(--dw-depth)) 10px -0.75px,
    color-mix(in srgb, var(--dw-sh) calc(13% * var(--dw-shade)), transparent)
      calc(7px * var(--dw-depth)) calc(7px * var(--dw-depth)) 18px -1px,
    color-mix(in srgb, var(--dw-sh) calc(14% * var(--dw-shade)), transparent)
      calc(12px * var(--dw-depth)) calc(12px * var(--dw-depth)) 30px -1.4px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 14px; }
h1 { font-size: clamp(26px, 3.6vw, 40px); }
h2 { font-size: clamp(19px, 2.4vw, 26px); }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: var(--mono); cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
main { display: block; padding-bottom: 100px; }
section { margin-top: clamp(56px, 8vw, 104px); }

::selection { background: var(--yellow); color: #000; }

/* ------------------------------------------------------------
   micro-label — engraved replacement, plain and quiet
   ------------------------------------------------------------ */

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.fine { font-size: 12px; color: var(--ink-faint); line-height: 1.7; }

/* section head: index number + title + hairline */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
}
.section-head .idx { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; }
.section-head h1, .section-head h2 { margin: 0; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.section-head a, .section-head .tail {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  text-decoration: none;
}
.section-head a:hover { color: var(--ink); }

/* UI kit buttons live in dwarf-ui.css; site CSS only positions sockets. */
/* CTA sockets run DEEP — the key stands well proud of the board and
   drops a long stroke into the pocket when pressed */
.dw-socket.dw-cta,
.dw-socket.dw-fill { --side: 11; --taper: 4; }
.dw-socket.dw-cta > .dw-key,
.dw-socket.dw-fill > .dw-key { --travel: 6; }
.dw-socket.dw-fill,
.dw-socket.dw-fill > .dw-key { width: 100%; }
.dwarf-site-ui .dw-socket {
  background: linear-gradient(180deg, #020203 0%, #050506 48%, #09090a 100%);
}
.dw-socket .px,
.dw-key .px { flex: none; }
.paneltop,
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 16px;
}
.product-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: var(--dw-r-slot);
  background: #050506;
  box-shadow: var(--dw-cavity);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.product-tag-drop { color: #ffd2a6; }
.product-tag-standard { color: #dcefd3; }
.product-tag-red { color: #ffd0d0; }
.money-display {
  align-items: center;
  justify-content: flex-end;
}
.money-value {
  font-family: var(--mono);
  color: var(--dw-amber);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.42);
  white-space: nowrap;
}
.compact-money .money-value { font-size: 13px; }
.card-money .money-value { font-size: 14px; }
.pdp-money {
  min-width: 112px;
  justify-content: center;
}
.pdp-money .money-value { font-size: 22px; }
.summary-money .money-value { font-size: 17px; }
.big-money {
  max-width: min(210px, 52vw);
  overflow: hidden;
}
.big-money .money-value { font-size: clamp(12px, 1.35vw, 16px); }

/* ------------------------------------------------------------
   LED dot — product colour indicator
   ------------------------------------------------------------ */

.led {
  --c: var(--ink-faint);
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.75), var(--c) 55%);
  box-shadow: 0 0 7px var(--c), inset 0 -1px 1px rgba(0, 0, 0, 0.45);
}
.led-red    { --c: var(--red); }
.led-orange { --c: var(--orange); }
.led-yellow { --c: var(--yellow); }
.led-green  { --c: var(--green); }
.led-blue   { --c: var(--blue); }

/* ------------------------------------------------------------
   VFD / LCD — amber glow displays
   ------------------------------------------------------------ */

.lcd {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px),
    var(--vfd-bg);
  color: var(--vfd);
  font-family: var(--pixel);
  border: 1px solid var(--hairline-soft);
  border-radius: 6px;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.8),
    inset 0 0 24px rgba(255, 176, 0, 0.05);
  text-shadow: 0 0 7px rgba(255, 176, 0, 0.55);
  padding: 4px 12px;
}
.lcd img.px {
  filter: sepia(1) saturate(4) hue-rotate(-8deg) drop-shadow(0 0 4px rgba(255, 176, 0, 0.5));
}

/* pixel icons */
.px { image-rendering: pixelated; display: inline-block; vertical-align: middle; }
/* white icon sprites re-inked dark, for light caps (yellow, bone) */
.px-dark { filter: brightness(0) opacity(0.72); }
.meta-ico { opacity: 0.8; flex: none; }

/* ------------------------------------------------------------
   header
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px var(--pad);
}
/* the logo: planet + per-letter wordmark (inlined svg). scroll down
   and the letters slide left in a knock-on chain — F shunts R shunts
   A shunts W shunts D — pile into the earth (the svg's own viewBox
   clips them, so they read as sliding BEHIND it), give it a knock;
   the earth springs back. scroll up: they shoot back out, D first. */
.site-header .logo {
  --logoh: 38px;
  display: flex;
  align-items: center;
  gap: calc(var(--logoh) * 0.08);
  flex: none;
}
.site-header .logo .logo-planet {
  position: relative;
  z-index: 2; /* the letters duck under it */
  height: var(--logoh);
  width: auto;
}
.site-header .logo.bump .logo-planet {
  /* delayed until the word actually arrives */
  animation: logo-bump 0.45s cubic-bezier(0.3, 0.7, 0.4, 1) 0.15s;
}
@keyframes logo-bump {
  0% { transform: none; }
  35% { transform: translateX(calc(var(--logoh) * -0.14)) rotate(-6deg); }
  65% { transform: translateX(calc(var(--logoh) * 0.04)) rotate(2deg); }
  100% { transform: none; }
}
.site-header .logo .logo-wordbox {
  display: block;
  position: relative;
  z-index: 1;
}
.site-header .logo .logo-word {
  display: block;
  height: calc(var(--logoh) * 0.64);
  width: auto;
  max-width: none;
  margin-top: calc(var(--logoh) * 0.06);
}
/* the word slides left as ONE unit and vanishes behind the earth —
   the svg's own viewBox clips it, so no letter is ever visibly cut:
   the whole thing just ducks under the planet. -3100 clears the F
   (viewBox units). fast in, springy back out. */
.logo-word .lw-word {
  transition: transform 0.26s cubic-bezier(0.55, 0, 0.8, 0.4);
}
.compact .logo-word .lw-word { transform: translateX(-3100px); }
.site-header:not(.compact) .logo-word .lw-word {
  transition: transform 0.42s cubic-bezier(0.3, 1.15, 0.5, 1);
}
/* fallback <img> (svg fetch failed): plain fade */
.site-header .logo img.logo-word { transition: opacity 0.25s ease; }
.site-header.compact .logo img.logo-word { opacity: 0; }
.site-header nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.site-header nav a:not(.dw-key) {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.site-header nav a:not(.dw-key):hover { color: var(--ink); }
.cart-key { --side: 4; --taper: 2; }
.cart-key > .dw-key { min-height: 40px; padding-inline: 1em; }
.cart-key .lcd { line-height: 1; padding: 2px 8px 0; min-width: 34px; text-align: right; }

/* hamburger — hidden on desktop */
.menu-key { display: none; width: 42px; height: 42px; }
.menu-key .burger { display: flex; flex-direction: column; gap: 5px; }
.menu-key .burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.6);
}

/* mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(10, 10, 11, 0.97);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  padding: 14px var(--pad) 30px;
  transform: translateY(-105%);
  transition: transform 0.22s ease;
}
.mobile-menu.open { transform: none; }
.mobile-menu .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.mobile-menu .head img { height: 30px; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 2px;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu nav a:active { background: var(--bg-raise); }
.mobile-menu .fine { margin-top: auto; }

/* amber ticker under the header */
.marquee {
  overflow: hidden;
  max-width: var(--maxw);
  margin: 22px auto 0;
  padding: 0 var(--pad);
}
.marquee .dw-screen {
  min-height: 0;
  padding: 7px 0 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.marquee .track {
  display: inline-block;
  min-width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee .track span {
  display: inline-block;
  margin: 0 16px;
}
/* track holds 3 identical repetitions; shifting one third loops seamlessly */
@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* banner variant: full-bleed strip above the header, scrolls away */
.marquee-banner {
  max-width: none;
  margin: 0;
  padding: 0;
}
.marquee-banner .dw-screen {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

/* ------------------------------------------------------------
   hero
   ------------------------------------------------------------ */

.hero { margin-top: clamp(40px, 6vw, 80px); }
.hero .split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
}
/* copy sits on the same baseline as the dummy, console gets air */
.hero .copy { align-self: end; padding-bottom: clamp(14px, 2.5vw, 34px); }
.hero .copy .logo-big { width: min(500px, 94%); height: auto; margin-bottom: 24px; }
/* the hero lockup re-printed by a CRT in coloured half-blocks:
   burning earth + wordmark, tagline typed out underneath */
.hero-console {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 18px 20px 14px;
  margin-bottom: 28px;
  overflow: hidden;
}
.hero-console::after {
  /* scanlines over the whole tube face */
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    repeating-linear-gradient(to bottom,
      transparent 0 2px,
      rgba(0, 0, 0, 0.3) 2px 3px);
  pointer-events: none;
}
.logo-blocks {
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.09));
}
.console-tag {
  margin: 12px 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  /* the console prints it a row of cells at a time... */
  .logo-blocks {
    animation: print-in 0.8s steps(var(--rows, 24)) 0.15s both;
  }
  /* ...then types the tagline */
  .console-tag {
    animation: tag-type 0.9s steps(42) 1.05s both;
  }
}
@keyframes print-in {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0); }
}
@keyframes tag-type {
  from { max-width: 0; }
  to { max-width: 42ch; }
}
/* outranks the generic .hero .copy p rules */
.hero .copy p.console-tag {
  font-family: var(--dw-pixel, "VT323", monospace);
  font-size: 21px;
  color: #56c93e;
  max-width: 100%;
}
.hero .copy p { font-size: clamp(15px, 1.5vw, 18px); color: var(--ink-soft); max-width: 36ch; }
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
/* figure runs flush into the hero's bottom hairline; edges dissolve into the page */
.hero .figure {
  display: flex;
  justify-content: center;
  align-self: end;
  margin-bottom: calc(-1 * clamp(36px, 5vw, 60px));
}
.hero .figure img { width: min(440px, 96%); }
.hero .meta-row {
  position: relative;
  display: flex;
  gap: 14px 22px;
  margin-top: clamp(36px, 5vw, 60px);
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-wrap: wrap;
  align-items: center;
}
.meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.meta-stat .dw-lcd {
  padding: 6px 9px 3px;
}
.meta-stat .dw-seg { font-size: 18px; }

/* ------------------------------------------------------------
   product grid
   ------------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 24px);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  padding: 14px;
  transition: transform 0.18s ease;
}
.card:hover { transform: translateY(-3px); }
.card .ph {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--dw-r-slot);
  border: 0;
  background: #000;
  transition: border-color 0.15s ease;
  box-shadow: var(--dw-cavity);
}
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .ph { filter: brightness(1.06); }
.card .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  padding: 0;
  font-size: 13px;
  min-width: 0;
}
.card .meta .name { font-weight: 700; }
.card .meta .price { margin-left: auto; }
.card.sold .ph img { filter: grayscale(1) brightness(0.55); }
.card.sold .meta .price { opacity: 0.55; }

/* ------------------------------------------------------------
   calculator DW-01 — the one true panel
   ------------------------------------------------------------ */

.calc-section .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 70px);
  align-items: center;
}
.calc-blurb p { max-width: 36ch; color: var(--ink-soft); }
.calc-blurb .label { display: block; margin-bottom: 14px; }

.calc {
  width: min(350px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}
.calc .model { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calc-logo {
  width: 86px;
  height: auto;
}
.calc .lcd {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  overflow: hidden;
  border-radius: var(--dw-r-slot);
}
.calc .lcd .msg {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  font-size: 32px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.calc .lcd .msg img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.calc .lcd .msg.result {
  font-family: var(--pixel);
  font-size: 28px;
  white-space: nowrap;
  line-height: 1.25;
  letter-spacing: 0.05em;
  color: var(--vfd);
  text-shadow: 0 0 7px rgba(255, 176, 0, 0.42);
  gap: 10px;
}
.calc .keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.calc .keys .dw-socket,
.calc .keys .dw-key {
  width: 100%;
  aspect-ratio: 1;
}
.calc .keys .dw-key {
  --r: 8px;
  padding: 0;
  min-height: 0;
  font-size: 20px;
}

/* ------------------------------------------------------------
   crash test slideshow
   ------------------------------------------------------------ */

.slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 320px);
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides a {
  scroll-snap-align: start;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.slides .ph {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
  background: #000;
  transition: border-color 0.15s ease;
}
.slides a:hover .ph { border-color: #3a3a40; }
.slides .ph img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.slides .cap {
  padding: 10px 2px 0;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  gap: 9px;
  align-items: center;
}
.slides-nav { display: flex; gap: 10px; }
.slides-nav .dw-key { width: 40px; height: 40px; padding: 0; }

/* ------------------------------------------------------------
   product page
   ------------------------------------------------------------ */

.crumbs { margin: 26px 0 18px; font-size: 12px; color: var(--ink-faint); }
.crumbs a { text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }

.pdp {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.pdp .gallery .ph {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
  background: #000;
}
.pdp .gallery .ph img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.pdp .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pdp .thumbs .th {
  width: 68px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  cursor: pointer;
  opacity: 0.55;
  background: #000;
  padding: 0;
}
.pdp .thumbs .th.active { opacity: 1; border-color: var(--red); }
.pdp .thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }

.pdp .buy { display: grid; gap: 12px; padding-top: 20px; }
.pdp .buy h1 {
  overflow-wrap: anywhere;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}
.pdp .price-row { display: flex; align-items: center; gap: 14px; margin: 10px 0 20px; }
.pdp .price-row .lcd { padding: 3px 14px 0; }
.pdp .blurb { color: var(--ink-soft); max-width: 44ch; }

.qty { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; }
.qty .lcd { min-width: 56px; text-align: center; padding-top: 4px; }
.qty .dw-seg { font-size: 20px; }

.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.buy-row .dw-fill { flex: 1; min-width: 220px; }

.accordion { margin-top: 30px; border-top: 1px solid var(--hairline); }
.accordion details { border-bottom: 1px solid var(--hairline); }
.accordion summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 13px 2px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--ink-faint); }
.accordion details[open] summary::after { content: "\2212"; }
.accordion .acc-body { padding: 0 2px 16px; color: var(--ink-soft); font-size: 13.5px; }

/* wash tag — stays paper-white, it's a printed object */
.washtag {
  background: #f4f2ec;
  border-radius: 4px;
  padding: 14px 16px;
  max-width: 260px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #33312c;
  position: relative;
}
.washtag::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed #b5b1a5;
  border-radius: 3px;
  pointer-events: none;
}

/* ------------------------------------------------------------
   info pages
   ------------------------------------------------------------ */

.info-page {
  max-width: 720px;
  margin: clamp(40px, 6vw, 70px) auto 0;
  display: grid;
  gap: 18px;
}
.info-page h1 { font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.info-page table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 18px 0; }
.info-page th, .info-page td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--hairline); }
.info-page th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.info-page .content > p { color: var(--ink-soft); }

.faq-list { display: grid; gap: 8px; }
.faq-list details {
  border: 0;
  border-radius: var(--dw-r-slot);
  background: var(--dw-well);
  box-shadow: var(--dw-cavity);
}
.faq-list summary { list-style: none; padding: 12px 14px; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--ink-faint); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list .a { padding: 0 14px 14px; color: var(--ink-soft); }

/* about — one line, left-aligned like everything else */
.about-hero {
  min-height: 62vh;
  display: grid;
  align-content: center;
}
.about-hero p { font-size: clamp(20px, 3vw, 32px); font-weight: 700; margin: 0; max-width: 24ch; }

/* 404 */
.notfound { padding-top: 30px; }
.notfound .lcd { display: inline-flex; align-items: center; gap: 18px; font-size: 60px; padding: 12px 30px 6px; margin-bottom: 26px; }
.notfound .cheerio { width: 130px; margin: 0 0 26px; }
.notfound .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------
   checkout / confirmation
   ------------------------------------------------------------ */

.checkout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 30px;
}
.checkout aside { padding-left: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); margin-bottom: 6px; }
.field .dw-input:invalid:not(:placeholder-shown):not(:focus) { outline: 2px solid var(--dw-red); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.summary-lines { font-size: 13.5px; }
.summary-lines .line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hairline); color: var(--ink-soft); }
.summary-lines .total { font-weight: 700; color: var(--ink); border-bottom: none; padding-top: 14px; align-items: center; }
.summary-lines .total .dw-lcd { padding: 2px 10px 0; }

.confirm-hero { padding-top: 30px; }
.confirm-hero .lcd {
  display: inline-block;
  font-size: clamp(36px, 7vw, 72px);
  padding: 16px 36px 8px;
  margin: 26px 0;
}
.confirm-hero .order-no { color: var(--ink-soft); }
.confirm-hero .figure { width: min(300px, 70%); margin: 30px 0 0; }
.confirm-hero .figure img { border-radius: 10px; border: 1px solid var(--hairline-soft); }

/* ------------------------------------------------------------
   cart drawer
   ------------------------------------------------------------ */

.drawer-veil {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg-raise);
  border-left: 1px solid var(--hairline);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}
.cart-drawer.open { transform: none; }
.cart-drawer .head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}
.cart-drawer .head h3 { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.cart-drawer .head .dw-socket { margin-left: auto; }
.cart-drawer .head .dw-key { width: 36px; height: 36px; }
.cart-drawer .items { flex: 1; overflow-y: auto; padding: 6px 20px; }
.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}
.cart-item .th { border-radius: 6px; overflow: hidden; border: 1px solid var(--hairline-soft); background: #000; }
.cart-item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.cart-item .nm { font-weight: 700; font-size: 13px; }
.cart-item .sub { font-size: 12px; color: var(--ink-faint); }
.cart-item .qty-mini { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.cart-item .qty-mini .dw-key { min-height: 25px; width: 25px; padding: 0; font-size: 13px; }
.cart-item .price { display: flex; justify-content: flex-end; }
.cart-drawer .foot { padding: 14px 20px 20px; border-top: 1px solid var(--hairline); }
.cart-drawer .subtotal { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-drawer .subtotal .dw-lcd { padding: 3px 12px 0; }
.cart-drawer .foot .dw-fill { width: 100%; }
.cart-empty { color: var(--ink-soft); padding: 60px 0 0; }

/* ------------------------------------------------------------
   popups: cookie + newsletter
   ------------------------------------------------------------ */

.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 110;
  width: min(640px, calc(100vw - 24px));
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.cookie-bar p { margin: 0; font-size: 13px; flex: 1; min-width: 220px; }
.cookie-bar .fine { display: block; margin-top: 3px; }
.cookie-bar .dw-key { min-height: 34px; padding: 0.45em 1.25em; }

.modal-veil {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}
.newsletter-modal {
  width: min(440px, 100%);
  position: relative;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
}
.newsletter-modal .inner { padding: 30px 30px 24px; }
.newsletter-modal .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; }
.newsletter-modal h3 { font-size: 20px; }
.newsletter-modal form { display: flex; gap: 10px; margin: 18px 0 14px; }
.newsletter-modal input { flex: 1; }
.newsletter-modal .contract {
  max-height: 96px;
  overflow-y: auto;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}

/* newsletter inline */
.newsletter-inline .box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
}
.newsletter-inline .txt { flex: 1; min-width: 240px; }
.newsletter-inline .txt h3 { margin-bottom: 6px; }
.newsletter-inline .txt .fine { margin: 0; }
.newsletter-inline form { display: flex; gap: 10px; flex: 1; min-width: 280px; }
.newsletter-inline input { flex: 1; }

/* ------------------------------------------------------------
   footer
   ------------------------------------------------------------ */

.site-footer { margin-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--hairline); }
.site-footer .cols {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(30px, 4vw, 50px) var(--pad) 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 26px;
}
.site-footer .brand img { height: 44px; margin-bottom: 14px; }
.site-footer .brand .earth-spin { height: 54px; margin-top: 18px; animation: earthspin 14s linear infinite; }
@keyframes earthspin { to { transform: rotate(360deg); } }
.site-footer .legal img { height: 20px; opacity: 0.7; }
.site-footer .brand p { font-size: 13px; color: var(--ink-soft); max-width: 26ch; }
.site-footer h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal {
  max-width: var(--maxw);
  margin: 30px auto 0;
  padding: 16px var(--pad) 26px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline-soft);
  font-size: 11px;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------
   microinteractions — subtle, physical, occasionally stupid
   ------------------------------------------------------------ */

/* the ticker pauses while you read it */
.marquee:hover .track { animation-play-state: paused; }

/* panel screws loosen a touch when you hover the panel */
.dw-screw::after { transition: transform 0.4s ease; }
.dw-panel:hover > .paneltop .dw-screw::after,
.card.dw-panel:hover .card-top .dw-screw::after {
  transform: translate(-50%, -50%) rotate(calc(var(--turn, 20deg) + 18deg));
}

/* nav links hover in the letter colours */
.site-header nav a:not(.dw-key):nth-of-type(1):hover { color: var(--red); }
.site-header nav a:not(.dw-key):nth-of-type(2):hover { color: var(--green); }
.site-header nav a:not(.dw-key):nth-of-type(3):hover { color: var(--yellow); }
.site-header nav a:not(.dw-key):nth-of-type(4):hover { color: var(--blue); }

/* keys glint on hover — never while pressed */
.dwarf-site-ui .dw-key:not([disabled]):hover:not(:active):not(.is-pressed) {
  filter: brightness(1.07);
}

.site-footer a { transition: color 0.15s ease; }

/* the 404 cheerio wobbles if you get near it */
.notfound .cheerio { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.notfound:hover .cheerio { transform: rotate(14deg); }

/* ------------------------------------------------------------
   misc
   ------------------------------------------------------------ */

/* mushroom cloud puff on add-to-cart */
@keyframes puff {
  0%   { transform: translate(-50%, 0) scale(0.4); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translate(-50%, -46px) scale(1.5); opacity: 0; }
}
.puff {
  position: absolute;
  left: 50%;
  top: -6px;
  pointer-events: none;
  animation: puff 0.8s ease-out forwards;
}

/* icons riding the amber ticker */
.marquee img.px {
  height: 19px;
  width: auto;
  margin: 0 20px;
  vertical-align: -3px;
}

/* ------------------------------------------------------------
   the earth — 3D globe, click to nuke
   ------------------------------------------------------------ */

.globe-section .split {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(340px, 1.18fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}
.globe-blurb,
.globe-control {
  display: grid;
  gap: 14px;
}
.globe-blurb p { max-width: 42ch; color: var(--ink-soft); }
.globe-blurb .label { display: block; margin-bottom: 14px; }
.globe-stage {
  position: relative;
  aspect-ratio: 1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  padding: 12px;
  background: #020203;
}
.globe-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: crosshair;
}
.globe-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.globe-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.globe-stat .dw-lcd {
  width: 100%;
  justify-content: flex-end;
  align-items: baseline;
  gap: 5px;
  padding: 8px 10px 5px;
  overflow: hidden;
}
.globe-stat .dw-seg { font-size: clamp(14px, 1.45vw, 20px); }
.globe-count { font-size: clamp(17px, 1.8vw, 24px); line-height: 1; }

/* one-line status console, chevron + blinking cursor */
.globe-status.dw-screen {
  min-height: 0;
  padding: 9px 14px 8px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* fire controls: arm switch · yield fader · siren grille */
.globe-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
}
.globe-arm { display: grid; gap: 8px; justify-items: start; }
.globe-arm .armrow { display: flex; align-items: center; gap: 10px; }
.globe-yield { display: grid; gap: 2px; }
.globe-yield .dw-label { margin-bottom: 6px; }
.globe-siren { display: grid; gap: 8px; }
.globe-siren .dw-grille { width: 84px; height: 46px; min-height: 0; }

.globe-meter-row { display: grid; gap: 8px; margin-top: 6px; }
.globe-annunciators { display: flex; gap: 10px; flex-wrap: wrap; }
@keyframes led-blink { 50% { opacity: 0.3; } }
.dw-led.led-blink { animation: led-blink 0.9s steps(1) infinite; }

.globe-hint { font-size: 11px; color: var(--ink-faint); margin: 0; }

/* strike log — amber terminal */
.globe-log {
  display: block;
  margin-top: 22px;
  padding: 12px 14px 10px;
  font-size: 17px;
  line-height: 1.5;
  min-height: 130px;
  max-width: 430px;
}
.globe-log div { overflow: hidden; text-overflow: ellipsis; }
.globe-log div:first-child { color: var(--vfd); }
.globe-log div:not(:first-child) { color: var(--vfd-dim); text-shadow: none; }
.globe-log:empty::before { content: "> NO STRIKES LOGGED. SUSPICIOUS."; color: var(--vfd-dim); text-shadow: none; }

/* home teaser for the earth page */
.earth-teaser {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
}
.earth-teaser p { max-width: 40ch; color: var(--ink-soft); }
.earth-teaser .label { display: block; margin-bottom: 14px; }
.earth-teaser .earth-thumb { display: flex; justify-content: center; }
.earth-teaser .earth-thumb img { width: min(420px, 96%); transition: transform 0.25s ease; }
.earth-teaser .earth-thumb:hover img { transform: rotate(-4deg) translateY(-6px); }
@media (max-width: 820px) { .earth-teaser { grid-template-columns: 1fr; } }

@media (max-width: 820px) {
  .globe-section .split { grid-template-columns: 1fr; }
  .globe-hud { grid-template-columns: 1fr 1fr; }
  .globe-controls { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   DWARF UI library integration
   ------------------------------------------------------------ */

/* themed sub-boards (calc, orbital control) re-derive their inks;
   re-raise them there too — legibility beats tastefulness */
.dwarf-site-ui [class^="dw-theme-"],
.dwarf-site-ui [class*=" dw-theme-"] {
  --dw-ink-soft: color-mix(in srgb, var(--dw-ink-base) 76%, var(--dw-surface));
  --dw-ink-faint: color-mix(in srgb, var(--dw-ink-base) 50%, var(--dw-surface));
}
.dwarf-site-ui .dw-label {
  color: color-mix(in srgb, var(--dw-ink-base) 74%, var(--dw-surface));
}

.dwarf-site-ui .dw-lcd,
.dwarf-site-ui .dw-screen,
.dwarf-site-ui .dw-input,
.dwarf-site-ui .dw-well,
.dwarf-site-ui dwarf-meter,
.dwarf-site-ui .dw-progress {
  --dw-gl: var(--dw-hi);
}
.dwarf-site-ui .dw-lcd {
  font-family: var(--pixel);
  line-height: 1;
  text-shadow: 0 0 7px rgba(255, 176, 0, 0.42);
}
.dwarf-site-ui .dw-lcd.lcd {
  border: 0;
  background: linear-gradient(160deg, #1b1711 0%, #15120e 55%, #0c0b09 100%);
  box-shadow:
    rgba(0, 0, 0, 0.72) 1.5px 2px 4px -0.5px inset,
    rgba(0, 0, 0, 0.46) 4px 5px 10px -2px inset,
    rgba(255, 176, 0, 0.12) -1px -1.5px 1px -0.5px inset;
}
.dwarf-site-ui .dw-input.text,
.dwarf-site-ui .field input.dw-input,
.dwarf-site-ui textarea.dw-input {
  border: 0;
  border-radius: 4px;
  background: var(--dw-field);
  color: var(--dw-field-ink);
  caret-color: var(--dw-accent);
  box-shadow: var(--dw-cavity);
}
.dwarf-site-ui .dw-input.text:focus,
.dwarf-site-ui .field input.dw-input:focus,
.dwarf-site-ui textarea.dw-input:focus {
  outline: 2px solid var(--dw-accent);
  outline-offset: 1px;
  box-shadow: var(--dw-cavity);
}
.cart-key .dw-lcd {
  padding: 5px 8px 3px;
  min-width: 36px;
  text-align: right;
}
.cart-key .dw-seg { font-size: 14px; }
/* any LCD can blink bright when its value changes */
@keyframes lcd-flash {
  0% { transform: scale(1.18); filter: brightness(2); }
  100% { transform: none; filter: none; }
}
.dw-lcd.flash { animation: lcd-flash 0.45s ease; }
.calc .dw-lcd {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  overflow: hidden;
  border-radius: 6px;
}
.pdp .price-row .dw-lcd {
  padding: 8px 14px 5px;
}
.pdp-size-bank {
  margin: 10px 0 22px;
  flex-wrap: wrap;
}
#pay-methods {
  margin: 10px 0 22px;
  flex-wrap: wrap;
}
.qty .dw-lcd {
  min-width: 56px;
  text-align: center;
  padding: 7px 10px 4px;
}
.buy-row .dw-socket { flex: 1; min-width: 220px; }
.summary-lines .total .dw-lcd {
  padding: 6px 10px 3px;
}
.notfound .dw-lcd {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 60px;
  padding: 14px 30px 9px;
  margin-bottom: 26px;
}
.confirm-hero .dw-lcd {
  display: inline-block;
  font-size: clamp(36px, 7vw, 72px);
  padding: 18px 36px 12px;
  margin: 26px 0;
}
.cart-drawer .subtotal .dw-lcd {
  padding: 7px 12px 4px;
}
.cart-drawer .subtotal .dw-seg { font-size: 18px; }
.globe-log.dw-screen {
  display: block;
  margin-top: 22px;
  padding: 12px 14px 10px;
  min-height: 130px;
  max-width: 430px;
}
.globe-log.dw-screen div { overflow: hidden; text-overflow: ellipsis; }
.globe-log.dw-screen div:first-child { color: var(--vfd); }
.globe-log.dw-screen div:not(:first-child) { color: var(--vfd-dim); text-shadow: none; }
.globe-log.dw-screen:empty::before {
  content: "> NO STRIKES LOGGED. SUSPICIOUS.";
  color: var(--vfd-dim);
  text-shadow: none;
}
.chat-launcher .tag.dw-lcd {
  font-size: 10px;
  padding: 4px 8px 2px;
}
.chat-card .pr.dw-lcd {
  font-size: 16px;
  padding: 5px 8px 3px;
  align-self: flex-start;
}

/* ------------------------------------------------------------
   responsive
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero .split, .calc-section .split, .pdp, .checkout { grid-template-columns: 1fr; }
  .checkout aside { border-left: none; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 24px; }
  .hero .figure { order: -1; margin-bottom: 0; }
  .hero .copy { padding-bottom: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-header nav { gap: 14px; }
}
@media (max-width: 640px) {
  /* header: logo left, hamburger + cart right; links live in the overlay */
  .site-header .bar { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .site-header nav { gap: 10px; }
  .site-header nav a:not(.dw-key) { display: none; }
  .menu-key { display: inline-flex; }
  .site-header .logo { --logoh: 30px; }
  .cart-key > .dw-key { padding-inline: 0.75em; }
  .section-head { flex-wrap: wrap; }
  .section-head a, .section-head .tail { white-space: normal; text-align: right; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .meta { font-size: 12px; }
  .card .meta .price { font-size: 16px; }
  .site-footer .cols { grid-template-columns: 1fr; }
}

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

/* ------------------------------------------------------------
   grift — a real ai (fake)
   ------------------------------------------------------------ */

.chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--bg-raise);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s ease;
}
.chat-launcher:hover { transform: translateY(-2px); }
.chat-launcher img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.chat-launcher .tag {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  font-size: 10px;
  padding: 1px 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chat-launcher .ping {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
  animation: chat-ping 1.4s ease infinite;
}
@keyframes chat-ping {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

.chat-panel {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 105;
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.chat-panel.open { opacity: 1; pointer-events: auto; transform: none; }

.chat-panel .head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}
.chat-panel .head .pfp {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--hairline);
}
.chat-panel .head .who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chat-panel .head .who strong { font-size: 14px; letter-spacing: 0.04em; }
.chat-panel .head .who .fine { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chat-panel .head .who .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green, #3fae5a);
  box-shadow: 0 0 6px rgba(70, 190, 100, 0.8);
  flex: none;
}
.chat-panel .head .dw-socket { margin-left: auto; }
.chat-panel .head .dw-key { width: 34px; height: 34px; }

.chat-panel .msgs {
  height: min(330px, 48vh);
  overflow-y: auto;
  padding: 14px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-panel .msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.chat-panel .msg.bot {
  align-self: flex-start;
  background: var(--vfd-bg);
  border: 1px solid rgba(255, 176, 0, 0.18);
  color: var(--vfd);
  border-bottom-left-radius: 4px;
  text-shadow: 0 0 6px var(--vfd-dim);
}
.chat-panel .msg.bot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-panel .msg.user {
  align-self: flex-end;
  background: #1c1c1f;
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.chat-panel .typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.chat-panel .typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vfd);
  opacity: 0.35;
  animation: chat-typing 1s infinite;
}
.chat-panel .typing i:nth-child(2) { animation-delay: 0.18s; }
.chat-panel .typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes chat-typing {
  0%, 60%, 100% { opacity: 0.35; transform: none; }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-panel .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 4px;
}

.chat-panel .bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--hairline);
}
.chat-panel .bar .text { flex: 1; min-width: 0; }
.chat-panel .bar .dw-key { min-height: 38px; padding: 0.45em 1.1em; }

@media (max-width: 640px) {
  .chat-launcher { right: 12px; bottom: 12px; width: 56px; height: 56px; }
  .chat-panel { right: 12px; bottom: 80px; }
}

/* globe failure state */
.globe-fail {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 30px;
}

/* chat product cards */
.chat-panel .msg.card-msg {
  padding: 0;
  background: none;
  border: none;
  max-width: 94%;
  text-shadow: none;
}
.chat-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.chat-card .th img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}
.chat-card .inf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.chat-card .inf strong { font-size: 13px; color: var(--ink); line-height: 1.3; }
.chat-card .pr { font-size: 12px; padding: 1px 8px; align-self: flex-start; }
.chat-card .row { display: flex; gap: 8px; margin-top: 2px; }
.chat-card .row .dw-key { min-height: 30px; padding: 0.4em 1.1em; font-size: 11px; }
.chat-panel .head .who .fine { overflow: hidden; text-overflow: ellipsis; }
