/* ==========================================================================
   CentPay — design tokens
   --------------------------------------------------------------------------
   The single source of truth for colour, type, spacing and motion.
   Loaded before main.css. Nothing in here selects an element; if you need a
   new value anywhere in the site, add it here rather than hard-coding a hex.
   ========================================================================== */

:root {
  /* --- Brand ---------------------------------------------------------- */
  --color-primary: #ffa608;
  --color-primary-dark: #e08f00;
  --color-primary-light: #ffc65c;
  --color-primary-soft: rgba(255, 166, 8, 0.12);
  --color-primary-line: rgba(255, 166, 8, 0.28);

  /* --- Ground and surfaces -------------------------------------------- */
  --color-bg: #080b18;
  --color-bg-alt: #0b0f21;
  --color-surface: #111631;
  --color-surface-raised: #181e3d;
  --color-surface-hover: #1e2549;

  --color-border: rgba(255, 255, 255, 0.09);
  --color-border-strong: rgba(255, 255, 255, 0.16);

  /* --- Text ------------------------------------------------------------ */
  --color-heading: #ffffff;
  --color-default: #c1c7de;
  --color-muted: #8f97b5;
  --color-faint: #666e8d;
  --color-on-primary: #080b18;

  /* --- Semantic -------------------------------------------------------- */
  --color-success: #2dd98f;
  --color-danger: #ff5d5d;

  /* --- Legacy aliases -------------------------------------------------- */
  /* main.css was authored against these names; keep them pointing at the
     tokens above so old rules stay in sync with the palette. */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-dark: #0f172a;
  --color-gray: #f8f8f8;
  --color-blue: #4a21ef;

  /* --- Elevation ------------------------------------------------------- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.38);
  --shadow-primary: 0 0 32px rgba(255, 166, 8, 0.18);

  /* --- Surface gradients ------------------------------------------------
     Cards across the site used to be cobalt on some pages and violet on
     others. Both now resolve to one brand-consistent surface treatment. */
  --gradient-surface: linear-gradient(
    145deg,
    var(--color-surface) 0%,
    var(--color-surface-raised) 60%,
    var(--color-surface-hover) 100%
  );
  --gradient-surface-hover: linear-gradient(
    145deg,
    var(--color-surface-raised) 0%,
    var(--color-surface-hover) 60%,
    #252c56 100%
  );
  --gradient-primary: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 100%
  );

  /* --- Type ------------------------------------------------------------ */
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-heading: "Manrope", "Segoe UI", system-ui, sans-serif;

  --text-xs: 0.8125rem; /* 13px */
  --text-sm: 0.9375rem; /* 15px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.125rem; /* 18px */
  --text-xl: 1.375rem; /* 22px */
  --text-2xl: 1.75rem; /* 28px */
  --text-3xl: 2.25rem; /* 36px */
  --text-4xl: 3rem; /* 48px */
  --text-5xl: 4rem; /* 64px */

  /* 1.2 is what most headings already resolved to before the fix below —
     the theme's `line-height: -0.02` was invalid, so headings fell back to
     `normal`. Keeping 1.2 preserves the original rhythm while stopping the
     few headings that were inheriting a 60px or 87px line box. */
  --leading-heading: 1.2;
  --leading-body: 1.75;
  --leading-tight: 1.3;

  /* --- Spacing --------------------------------------------------------- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 140px;

  /* --- Radii ----------------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-pill: 50px;

  /* --- Motion ---------------------------------------------------------- */
  --easing: cubic-bezier(0.67, 0.04, 0.3, 0.91);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-base: 0.35s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);

  /* --- Scrollbar --------------------------------------------------------
     Amber is muted at rest so a permanently visible bar does not shout, and
     resolves to the full brand colour on hover. */
  --scrollbar-size: 10px;
  --scrollbar-track: #0c1020;
  --scrollbar-thumb: rgba(255, 166, 8, 0.55);
  --scrollbar-thumb-hover: var(--color-primary);
  --scrollbar-thumb-active: var(--color-primary-light);

  /* --- Layout ---------------------------------------------------------- */
  --container-max: 1290px;
  --measure: 68ch;
  --header-height: 90px;
}

/* Respect a reduced-motion preference across the whole site. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keyboard focus must always be visible. */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Skip link — visible only when focused. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
