/* ======================================================================
   Baryon design system — adopted 2026-09-28 from the CINQ "Premium Refresh"
   (CINQ DESIGN.md, approved 2026-09-09). Greyscale, hairlines, soft depth.

   Tokens (all on :root):
     --paper #ffffff        page ground
     --ink #141414          text, filled buttons, selected chips
     --graphite #4a4845     secondary text
     --ink-soft #6f6c67     tertiary text, labels, meta (never below 12px; 5.2:1 on paper)
     --surface #f6f5f2      panels, bands, hover fills, active nav pill
     --hair  rgba(20,20,20,.12)   every border and divider
     --hair-2 rgba(20,20,20,.22)  inputs, ghost buttons, chips
     --line                  alias of --hair (older pages use var(--line))
     --glass                 sticky bars + floating map panels: rgba(255,255,255,.72) + blur(18px)
     --accent #e4572e        ONLY .live-dot, .badge and online dots. Never text, never eyebrows.
     --shadow-card / --shadow-poster / --shadow-float   depth by role

   Rules: 1px hairline borders; the only 2px lines are the focus ring and a selected
   chip's solid ink fill. Corners: cards and floating windows 20px, media 12px,
   thumbnails 10px, inputs/buttons/chips pill. Poppins everywhere; display 600 with
   -0.025em tracking; body 400; long copy 300. The Baryon mark is never redrawn.
   ====================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --paper: #ffffff;
  --ink: #141414;
  --graphite: #4a4845;
  --ink-soft: #6f6c67;
  --surface: #f6f5f2;
  --hair: rgba(20, 20, 20, 0.12);
  --hair-2: rgba(20, 20, 20, 0.22);
  --line: var(--hair);
  --glass: rgba(255, 255, 255, 0.72);
  --accent: #e4572e;
  --shadow-card: 0 12px 32px -18px rgba(20, 20, 20, 0.35);
  --shadow-poster: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 24px -14px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 30px 70px -30px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.06);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --max: 1180px;
  /* older pages referenced these; map them onto the greyscale system */
  --black: var(--ink);
  --gray: var(--graphite);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
.display {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.display-wide { font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; }
.eyebrow {
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lede { font-weight: 300; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--graphite); }
.lede b, .lede strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--graphite); }
.soft { color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.35rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 500 0.95rem/1 var(--font-sans); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 120ms var(--ease-out-soft), background-color 160ms, border-color 160ms, color 160ms;
}
.btn:active { transform: scale(0.965); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: #2c2c2c; border-color: #2c2c2c; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.btn-ghost:hover { background: var(--surface); border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
.btn-glass {
  background: var(--glass); color: var(--ink); border-color: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.86); }
.btn-sm { min-height: 2.25rem; padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn .arrow { display: inline-block; transition: transform 240ms var(--ease-out-soft); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Links ---------- */
.link-ul {
  position: relative; display: inline-block; font-weight: 500; text-decoration: none; color: var(--ink);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat;
  background-size: 0% 1px; background-position: 0 100%;
  transition: background-size 260ms var(--ease-out-soft);
}
.link-ul:hover, .link-ul:focus-visible { background-size: 100% 1px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.38rem 0.75rem; border: 1px solid var(--hair-2); border-radius: 999px;
  font: 500 0.78rem/1 var(--font-sans); letter-spacing: 0.01em; white-space: nowrap;
  color: var(--ink); background: var(--paper); text-decoration: none;
}
.chip-soft { border-color: transparent; background: var(--surface); }
.chip-btn { cursor: pointer; transition: transform 120ms var(--ease-out-soft), background-color 140ms, color 140ms, border-color 140ms; }
.chip-btn:hover { background: var(--surface); border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
.chip-soft.chip-btn:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border-color: transparent; }
.chip-btn:active { transform: scale(0.96); }
.chip-on, .chip-btn.chip-on:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Inputs ---------- */
.input {
  width: 100%; min-height: 2.75rem; padding: 0.6rem 1rem;
  border: 1px solid var(--hair-2); border-radius: 999px; background: var(--paper);
  font: 400 1rem var(--font-sans); color: var(--ink); transition: border-color 140ms;
}
.input:hover { border-color: color-mix(in srgb, var(--ink) 34%, transparent); }
.input::placeholder { color: var(--ink-soft); }
.input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--hair-2); }
textarea.input { min-height: 6rem; border-radius: 14px; resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 1.1rem;
}

/* ---------- Cards ---------- */
.card { border: 1px solid var(--hair); border-radius: 20px; background: var(--paper); }
.card-surface { background: var(--surface); border-color: transparent; }
.card-hover { transition: transform 200ms var(--ease-out-soft), box-shadow 200ms var(--ease-out-soft), border-color 200ms; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.float { box-shadow: var(--shadow-float); }

/* ---------- Live dot + badge (the only accent) ---------- */
.live-dot { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--accent); flex: none; }
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 999px;
  border: 1.5px solid var(--accent); opacity: 0; animation: bx-ring 2.6s ease-out infinite;
}
@keyframes bx-ring { 0% { transform: scale(0.5); opacity: 0.55; } 70%, 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Site header (every public page) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms, border-color 200ms;
}
.site-header.is-scrolled, .site-header.is-solid {
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom-color: var(--hair);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand .word { font-weight: 600; letter-spacing: 0.32em; font-size: 0.82rem; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a.nl {
  padding: 0.5rem 0.85rem; border-radius: 12px; color: var(--graphite); text-decoration: none;
  font-weight: 500; font-size: 0.9rem; transition: background-color 140ms, color 140ms;
}
.site-nav a.nl:hover { background: var(--surface); color: var(--ink); }
.site-nav a.nl[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 600; }
.site-nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .site-nav a.nl { padding: 0.45rem 0.6rem; font-size: 0.82rem; }
}
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
    border: 1px solid var(--hair-2); border-radius: 999px; background: var(--paper); cursor: pointer;
  }
  .site-nav {
    position: absolute; top: 64px; left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch;
    padding: 10px; border: 1px solid var(--hair); border-radius: 20px; background: var(--paper);
    box-shadow: var(--shadow-float);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a.nl { padding: 0.75rem 0.9rem; font-size: 0.95rem; }
  .site-nav .btn { margin: 6px 0 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--hair); }
.section:first-of-type { border-top: 0; }
.section h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin: 0; }
.section .lede { margin-top: 18px; max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hair); padding: 34px 0 44px; }
.site-footer .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-soft); }
.site-footer a { color: var(--graphite); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Browser-framed screenshot (landing) ---------- */
.shot-frame {
  border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; background: #0b0b0d;
  box-shadow: var(--shadow-float);
}
.shot-frame .chrome {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--hair);
}
.shot-frame .chrome i { width: 10px; height: 10px; border-radius: 999px; background: rgba(20,20,20,.14); }
.shot-frame .chrome .url {
  margin-left: 12px; flex: 1; max-width: 360px; height: 22px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--hair); font: 400 0.7rem/20px var(--font-sans); color: var(--ink-soft); padding: 0 12px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.shot-frame picture { display: block; }
.shot-frame img { display: block; width: 100%; height: auto; }

/* ---------- Concept-render tag ---------- */
/* Every render of Baryon hardware carries this, so no render reads as a field photograph. */
.render-tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font: 500 0.68rem/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  pointer-events: none;
}
.pending > .render-tag { display: none; }

/* ---------- Reveal on scroll ---------- */
/* Hidden only while JavaScript runs (pages set html.js inline), so content never
   disappears without JS, when site.js fails, or in print. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out-soft), transform 700ms var(--ease-out-soft); transition-delay: var(--reveal-delay, 0ms); }
@media print { .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
  .live-dot::after { display: none; }
  .btn, .chip-btn, .card-hover { transform: none !important; }
}
