/* ============================================================
   SPUTNIK LABS — DESIGN TOKENS
   A build-log aesthetic: dark chassis background, teal signal
   accent (from brand mark), monospace for specs/data, a clean
   grotesk for everything else. Structure borrows from PC build
   sheets — spec rows, slot numbers, status pills.
   ============================================================ */

:root {
  /* ---- Brand teal (sampled from logo) ---- */
  --teal-500: #1FC7BD;
  --teal-400: #3FDCD1;
  --teal-300: #7CEAE1;
  --teal-600: #16A39B;
  --teal-glow: rgba(31, 199, 189, 0.35);

  /* ---- Chassis (neutrals) ---- */
  --ink-950: #0A0D0F;
  --ink-900: #0F1417;
  --ink-800: #161C20;
  --ink-700: #1E262B;
  --ink-600: #2A343A;
  --ink-500: #48555C;
  --ink-400: #6B7A81;
  --paper-300: #9BAAAF;
  --paper-200: #C7D1D4;
  --paper-100: #E8EDEE;
  --paper-050: #F5F8F8;

  /* ---- Fixed regardless of theme: text sitting ON a teal-filled
     button/pill/badge needs to stay dark even when --ink-950 flips
     light, so it gets its own token rather than reusing the ink scale. ---- */
  --on-accent: #061012;

  /* ---- Header glass background (page chrome, not a photo overlay —
     these adapt per theme; photo overlays elsewhere stay dark on
     purpose in both themes, since they sit on top of images). ---- */
  --header-bg: rgba(10, 13, 15, 0.86);

  /* ---- Status ---- */
  --amber: #E8A23D;
  --red: #E15B4F;
  --green: #4FBF7A;

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* ---- Scale ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --gutter: clamp(20px, 5vw, 64px);

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 30px -14px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 0 1px var(--teal-500), 0 0 24px -4px var(--teal-glow);

  /* ---- Ambient background glows (very low opacity, sit behind all
     page content, give otherwise-flat sections a bit of depth) ---- */
  --ambient-glow-1: rgba(31, 199, 189, 0.055);
  --ambient-glow-2: rgba(31, 199, 189, 0.04);
  --ambient-grid-line: rgba(255, 255, 255, 0.025);
}

/* ============================================================
   LIGHT THEME
   Toggled via [data-theme="light"] on <html>. Photo treatments
   (hero, page-head banners, product-card overlays, gallery
   controls) intentionally stay dark in both themes — only the
   page chrome (backgrounds, text, borders, cards) flips.
   ============================================================ */
[data-theme="light"] {
  --teal-500: #0E8F86;
  --teal-400: #0B7A72;
  --teal-300: #14A199;
  --teal-600: #0A6D66;
  --teal-glow: rgba(14, 143, 134, 0.18);

  --ink-950: #EEF2F3;
  --ink-900: #FFFFFF;
  --ink-800: #FFFFFF;
  --ink-700: #DEE5E7;
  --ink-600: #C7D0D3;
  --ink-500: #8A9599;
  --ink-400: #63706F;
  --paper-300: #566063;
  --paper-200: #313A3C;
  --paper-100: #14191B;
  --paper-050: #05080A;

  --on-accent: #FFFFFF;
  --header-bg: rgba(255, 255, 255, 0.86);

  --shadow-card: 0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 24px -14px rgba(20,35,40,0.16);
  --shadow-glow: 0 0 0 1px var(--teal-500), 0 0 20px -6px rgba(14,143,134,0.3);

  --ambient-glow-1: rgba(14, 143, 134, 0.07);
  --ambient-glow-2: rgba(14, 143, 134, 0.05);
  --ambient-grid-line: rgba(10, 20, 22, 0.035);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background:
    url('../img/bg-pattern.svg'),
    radial-gradient(760px circle at 12% 8%, var(--ambient-glow-1), transparent 55%),
    radial-gradient(680px circle at 88% 38%, var(--ambient-glow-2), transparent 55%),
    radial-gradient(700px circle at 15% 78%, var(--ambient-glow-2), transparent 55%),
    linear-gradient(to right, var(--ambient-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ambient-grid-line) 1px, transparent 1px),
    var(--ink-950);
  background-size: 900px 900px, auto, auto, auto, 46px 46px, 46px 46px, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

img, video { max-width: 100%; display: block; }

@media (max-width: 640px) {
  body { background-size: 560px 560px, auto, auto, auto, 46px 46px, 46px 46px, auto; }
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--paper-200); }

.mono { font-family: var(--font-mono); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---- Focus states (accessibility floor) ---- */
:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Eyebrow / kicker labels ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--teal-400);
  border-radius: 1px;
  display: inline-block;
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal-500);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--teal-400); box-shadow: var(--shadow-glow); }

.btn-ghost {
  background: transparent;
  border-color: var(--ink-600);
  color: var(--paper-100);
}
.btn-ghost:hover { border-color: var(--teal-500); color: var(--teal-400); }

.btn-whatsapp {
  background: var(--teal-500);
  color: var(--on-accent);
}
.btn-whatsapp svg { width: 16px; height: 16px; }
.btn-whatsapp:hover { background: var(--teal-400); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- Pills / status ---- */
.pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink-600);
  color: var(--paper-200);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-in-stock { color: var(--green); border-color: rgba(79,191,122,0.3); background: rgba(79,191,122,0.08); }
.pill-low { color: var(--amber); border-color: rgba(232,162,61,0.3); background: rgba(232,162,61,0.08); }
.pill-out { color: var(--red); border-color: rgba(225,91,79,0.3); background: rgba(225,91,79,0.08); }
.pill-build { color: var(--teal-400); border-color: rgba(31,199,189,0.3); background: rgba(31,199,189,0.08); }

/* ---- Cards ---- */
.card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* ---- Section spacing ---- */
.section { padding: clamp(56px, 9vw, 108px) 0; }
.section-tight { padding: clamp(36px, 5vw, 56px) 0; }

/* ---- Divider rule ---- */
.rule { height: 1px; background: var(--ink-700); border: 0; margin: 0; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--teal-500); color: var(--on-accent);
  padding: 10px 16px; z-index: 999; border-radius: 0 0 6px 0;
  font-family: var(--font-mono); font-size: 13px;
}
.skip-link:focus { left: 0; }

/* ---- Lazy image fade-in ---- */
img[loading="lazy"] {
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .45s cubic-bezier(.2,.7,.3,1), transform .5s cubic-bezier(.2,.7,.3,1);
  background: linear-gradient(90deg, var(--ink-800) 25%, var(--ink-700) 37%, var(--ink-800) 63%);
  background-size: 400% 100%;
  animation: skel-shine 1.4s ease infinite;
}
img.loaded, img[loading="lazy"].loaded {
  opacity: 1;
  transform: scale(1);
  animation: none;
  background: none;
}

/* ---- Utility ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-muted { color: var(--paper-300); }
.mt-0 { margin-top: 0; }
