/* ===========================
   EyeScore — base
   Reset, tokens, type and scrollbars. Everything specific to the dial and the
   domain pages lives in portfolio.css; this file is the page chrome underneath
   it, carried over from the Atlas stylesheet when the portfolio was split out
   into its own site.
   =========================== */

@font-face {
  font-family: 'pixer';
  src: url('../assets/fonts/Pixer-Regular.woff2') format('woff2'),
       url('../assets/fonts/Pixer-Regular.woff') format('woff'),
       url('../assets/fonts/Pixer-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

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

/* ── Display scale ───────────────────────────────
   One number the whole interface is built from. At 1 the layout is exactly
   what a laptop has always had; the large-display blocks at the foot of
   portfolio.css raise it, and every size expressed against it follows —
   the dial, the cards, the controls, the gaps.
   Percentages, not pixels, for the root font: a fixed px size would override
   whatever base size the reader has set in their browser. */
:root {
  --ui: 1;

  --bg-primary: #050914;
  --bg-secondary: #0c1428;
  --bg-card: #111c35;
  --bg-card-hover: #162040;
  --accent-blue: #3c9ebf;
  --accent-purple: #1b6072;
  --accent-cyan: #06b6d4;
  --accent-teal: #14b8a6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(60,158,191,0.5);
  --glow-blue: rgba(60,158,191,0.15);
  --glow-purple: rgba(27,96,114,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  /* iOS Safari inflates body text when a phone is turned to landscape, which
     re-wraps the subheading and shoves the dial down the page. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The grey box iOS and Android paint over a control for ~300ms after a tap.
   Every control here already has its own :active state, so the default only
   arrives late and in the wrong colour. */
button, a, [role="button"], label, summary, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: #3c9ebf;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.page-visible {
  opacity: 1;
}

/* ===========================
   SCROLLBAR
   A hairline rail with a capsule thumb riding on it. The rail is what makes
   it read as a designed track rather than a bar floating in empty gutter.
   The thumb is neutral at rest and only takes the brand cyan on interaction —
   an always-on coloured scrollbar competes with the page for attention.
   =========================== */

/* Firefox only. These standard properties must NOT be set in Chrome/Safari:
   once scrollbar-width or scrollbar-color is specified, they take precedence
   and every ::-webkit-scrollbar rule below is ignored, collapsing the styling
   back to a plain native overlay bar. Gating on the pseudo-element's own
   support keeps each engine on the path it can actually render. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(196,222,236,0.3) transparent;
  }
}

/* WebKit / Blink.
   Gated to fine pointers. A touch browser draws an overlay scrollbar that
   costs no layout width and fades out on its own; styling ::-webkit-scrollbar
   opts that document back into a *classic* scrollbar, which permanently
   reserves an 11px gutter down the side of every modal list. On a 360px
   screen that is 3% of the width surrendered to decoration. */
@media (pointer: fine) {
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

/* The rail: a centred 1px hairline drawn with a gradient rather than a filled
   track, so the gutter itself stays transparent over any background. */
::-webkit-scrollbar-track {
  background: linear-gradient(90deg,
    transparent calc(50% - 0.5px),
    rgba(255,255,255,0.09) calc(50% - 0.5px),
    rgba(255,255,255,0.09) calc(50% + 0.5px),
    transparent calc(50% + 0.5px));
}
::-webkit-scrollbar-track:horizontal {
  background: linear-gradient(180deg,
    transparent calc(50% - 0.5px),
    rgba(255,255,255,0.09) calc(50% - 0.5px),
    rgba(255,255,255,0.09) calc(50% + 0.5px),
    transparent calc(50% + 0.5px));
}
::-webkit-scrollbar-corner { background: transparent; }

/* The capsule. A transparent border plus padding-box clip insets it off the
   rail edges; no box-shadow glow, which escapes rounded containers. */
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  background-color: rgba(196,222,236,0.3);
  min-height: 40px;
  transition: background-color 0.18s ease;
}
::-webkit-scrollbar-thumb:horizontal { min-height: 0; min-width: 40px; }
::-webkit-scrollbar-thumb:hover  { background-color: rgba(120,205,235,0.75); }
::-webkit-scrollbar-thumb:active { background-color: rgba(150,225,250,0.92); }
}   /* end @media (pointer: fine) */
