/* ==========================================================================
   Nexus Design Tokens
   Single source of truth for colors, type, spacing, motion, shadows.
   See brand_assets/DESIGN_SYSTEM.md for usage rules.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@100..700&display=swap');

:root {
  /* ----- Color: brand ------------------------------------------------------ */
  --nx:        #FF0200;   /* Nexus Red — canonical, Brand Book §02 */
  --nx2:       #A80000;   /* Deep red — gradient stop toward black */
  --nx-print:  #C71F2D;   /* Deeper carmine — print-only deviation per DO & DONT */

  /* ----- Color: neutrals --------------------------------------------------- */
  --bg:        #000000;   /* Page background */
  --fg:        #FFFFFF;   /* Foreground / body text on dark */
  --mute:      #848484;   /* Secondary text, captions */

  /* ----- Color: surfaces (depth layering) ---------------------------------- */
  --surface-base:     #000000;
  --surface-elevated: #0a0a0a;
  --surface-floating: #111111;
  --border-subtle:    rgba(255,255,255,0.06);
  --border-soft:      rgba(255,255,255,0.12);
  --border-strong:    rgba(255,255,255,0.30);

  /* ----- Signature gradients ---------------------------------------------- */
  --grad-hero:    linear-gradient(45deg, var(--nx) 0%, var(--nx2) 35%, #000 100%);
  --grad-spotlight: radial-gradient(circle at 35% 30%, #FF0200, #660000 55%, #000 100%);
  --grad-photo-dim: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);

  /* ----- Typography: family ------------------------------------------------ */
  --font-sans: 'Antonio', Arial, sans-serif;

  /* ----- Typography: scale ------------------------------------------------- */
  --type-display: clamp(3.5rem, 8vw, 7rem);
  --type-h1:      clamp(2.5rem, 5vw, 4rem);
  --type-h2:      clamp(1.75rem, 3vw, 2.5rem);
  --type-h3:      clamp(1.25rem, 2vw, 1.5rem);
  --type-body:    1rem;
  --type-small:   0.875rem;
  --type-eyebrow: 0.75rem;

  /* ----- Typography: weight ------------------------------------------------ */
  --w-thin: 100;
  --w-light: 300;
  --w-regular: 400;
  --w-semi: 600;
  --w-bold: 700;

  /* ----- Typography: tracking & leading ------------------------------------ */
  --track-tight:  -0.03em;
  --track-snug:   -0.02em;
  --track-normal: 0;
  --track-wide:   0.02em;
  --track-eyebrow: 0.18em;

  --lh-display: 0.95;
  --lh-heading: 1.15;
  --lh-body:    1.7;

  /* ----- Spacing scale (8px base, no random Tailwind steps) ---------------- */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:   12px;
  --s-4:   16px;
  --s-5:   24px;
  --s-6:   32px;
  --s-7:   48px;
  --s-8:   64px;
  --s-9:   96px;
  --s-10:  128px;
  --s-11:  192px;

  /* ----- Radii ------------------------------------------------------------- */
  --r-sharp: 0;
  --r-soft:  4px;
  --r-card:  12px;
  --r-pill:  9999px;

  /* ----- Shadows (layered, color-tinted — never flat) --------------------- */
  --shadow-card:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 12px 30px -10px rgba(0,0,0,0.6);

  --shadow-elevate:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 24px 60px -20px rgba(255,2,0,0.35),
    0 8px 24px rgba(0,0,0,0.6);

  --shadow-cta:
    0 0 0 1px rgba(255,2,0,0.5),
    0 18px 40px -12px rgba(255,2,0,0.55);

  /* ----- Motion ------------------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.64, 0, 0.78, 0);
  --dur-fast: 180ms;
  --dur:      320ms;
  --dur-slow: 640ms;

  /* ----- Layout ------------------------------------------------------------ */
  --container:  1280px;
  --gutter:     var(--s-5);
}

/* --------------------------------------------------------------------------
   Base reset / defaults that lock in the brand
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--nx); color: var(--fg); }

/* Utility classes — composable, on-brand --------------------------------- */

.nx-red       { color: var(--nx); }
.nx-bg        { background: var(--nx); }
.nx-grad      { background: var(--grad-hero); }
.nx-spotlight { background: var(--grad-spotlight); }

.eyebrow {
  font-size: var(--type-eyebrow);
  font-weight: var(--w-semi);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  line-height: 1.4;
}

.display {
  font-size: var(--type-display);
  font-weight: var(--w-bold);
  letter-spacing: var(--track-tight);
  line-height: var(--lh-display);
}

h1, .h1 { font-size: var(--type-h1); font-weight: var(--w-bold); letter-spacing: -0.025em; line-height: 1.05; }
h2, .h2 { font-size: var(--type-h2); font-weight: var(--w-semi); letter-spacing: var(--track-snug); line-height: var(--lh-heading); }
h3, .h3 { font-size: var(--type-h3); font-weight: var(--w-semi); letter-spacing: -0.01em; line-height: 1.25; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-family: var(--font-sans);
  font-weight: var(--w-semi);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.btn:active        { transform: translateY(1px); }

.btn-primary  { background: var(--nx); color: var(--fg); box-shadow: var(--shadow-cta); }
.btn-primary:hover  { background: var(--fg); color: var(--nx); }

.btn-outline { background: transparent; color: var(--fg); border: 1px solid var(--border-strong); }
.btn-outline:hover  { background: var(--nx); border-color: var(--nx); }

.btn-ghost { background: transparent; color: var(--nx); padding-inline: var(--s-2); }
.btn-ghost:hover { filter: brightness(1.15); text-decoration: underline; }

/* Cards ------------------------------------------------------------------ */

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
}
.card-feature {
  background: var(--surface-floating);
  padding: var(--s-7);
  box-shadow: var(--shadow-elevate);
}

/* Logo (CSS-text reproduction; use this on dark surfaces, never the PNG) - */

.nx-logo {
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.nx-logo .nx-red { color: var(--nx); }

/* Reduced motion --------------------------------------------------------- */

@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;
  }
}
