/* ============================================================
   XAINT — Know First · Gold on Void
   Brand v2 · 2026 — single gold accent, dark-first
   Themes driven by [data-theme]; accent (gold pick) on :root
   ============================================================ */

/* ---- Fonts (loaded in HTML via <link>) ---- */
:root {
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  /* gold — overridden inline by tweaks (Pick the Gold) */
  --accent: #F3B43B;        /* text / border / icon gold (theme-aware) */
  --accent-fill: #F3B43B;   /* button + chip fills (always bright Aurum) */
  --accent-ink: #0A0E1A;    /* text on gold fills (Void) */

  /* semantic states (Color System v2) */
  --success: #18B98A;       /* Resolve */
  --warning: #F87A1C;       /* Caution */
  --danger:  #F0384E;       /* Fault */
  --info:    #6B7896;       /* Note */

  --maxw: 1280px;
  --gut: clamp(20px, 5vw, 72px);

  /* easing */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Dark (default) — Gold on Void ---- */
:root,
[data-theme="dark"] {
  --bg:        #0A0E1A;   /* Void */
  --bg-2:      #11162A;   /* Panel */
  --surface:   #1A2138;   /* Surface — sidebars, wells */
  --ink:       #FFFFFF;   /* Pure */
  --ink-2:     #8A94B2;   /* Slate — secondary text */
  --ink-3:     #5A6480;   /* faint — tertiary */
  --line:      #2E3550;   /* border */
  --line-2:    #3C456A;   /* stronger border */
  --grid:      rgba(46, 53, 80, 0.55);
  --glow:      color-mix(in srgb, var(--accent) 26%, transparent);
  color-scheme: dark;
}

/* ---- Light — deep gold on near-white (rare light surface) ---- */
[data-theme="light"] {
  --bg:        #F4F5F8;
  --bg-2:      #ECEEF3;
  --surface:   #FFFFFF;
  --ink:       #11162A;
  --ink-2:     #4A5267;
  --ink-3:     #7A839E;
  --line:      #D9DDE7;
  --line-2:    #C2C8D6;
  --grid:      rgba(120, 130, 160, 0.22);
  --accent:    #94620C;   /* deep gold — AA-safe text/icon on light */
  --glow:      color-mix(in srgb, #F3B43B 22%, transparent);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---- Type scale ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.h-xl { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.h-lg { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.h-md { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }
p { margin: 0; }
.lead {
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---- Mono technical label ---- */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.tag-accent { color: var(--accent); }

/* ---- Layout primitives ---- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section { padding-block: clamp(72px, 11vw, 148px); }
.section-tight { padding-block: clamp(48px, 7vw, 92px); }

/* ---- Hairline + grid motifs ---- */
.rule { height: 1px; background: var(--line); border: 0; }
.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
}
.crosshair { position: relative; }
.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: var(--line-2);
  pointer-events: none;
}

/* corner ticks helper */
.ticked { position: relative; }
.ticked::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0/10px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 0 0/1px 10px no-repeat;
  opacity: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 0.85em 1.4em;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  transition: all .22s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover {
  color: var(--accent-ink);
  filter: brightness(1.08);
  box-shadow: 0 8px 28px -8px var(--glow);
}
.btn-sm { padding: 0.6em 1em; font-size: 0.74rem; }
.btn .arr { transition: transform .22s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---- Status dot ---- */
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulse 2.4s var(--ease) infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--glow); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.card:hover { border-color: var(--line-2); }

/* ---- Placeholder image ---- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 11px,
      color-mix(in oklch, var(--ink) 6%, transparent) 11px 12px),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ph .ph-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.5em 0.9em;
  border-radius: 2px;
  text-align: center;
  z-index: 1;
}
.ph::before, .ph::after {
  content: ""; position: absolute; z-index: 0;
}

/* ---- Reveal animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--rd, 0ms);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---- Marquee strip ---- */
.strip {
  border-block: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-2);
}
.strip-track {
  display: inline-flex;
  gap: 3.5rem;
  padding-block: 0.9rem;
  animation: scroll-x 32s linear infinite;
}
.strip:hover .strip-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.strip-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.7rem;
}

/* ---- Utility ---- */
.muted { color: var(--ink-2); }
.tabnum { font-variant-numeric: tabular-nums; }
.divider-v { width: 1px; background: var(--line); align-self: stretch; }

/* ---- Store download badges ---- */
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: #0A0E1A; color: #FFFFFF;
  border: 1px solid #2E3550; border-radius: 8px;
  padding: 9px 16px; min-width: 168px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.store-badge:hover { transform: translateY(-2px); border-color: var(--accent); }
.store-badge-txt { display: flex; flex-direction: column; line-height: 1.05; }
.store-badge-sm {
  font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.04em;
  opacity: 0.82; text-transform: none; white-space: nowrap;
}
.store-badge-lg {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---- Frozen footer bar (mirrors sticky header) ---- */
body { padding-bottom: 52px; }
.footer-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: 52px; display: flex; align-items: center;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.footer-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%;
}
.fb-copy { font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink-3); white-space: nowrap; }
.fb-links { display: flex; gap: 26px; }
.fb-links a {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
}
.fb-cta { padding: 0.5em 1em; }
@media (max-width: 700px) {
  .fb-links { display: none; }
}
@media (max-width: 420px) {
  .fb-copy span { display: none; }
}
