/* Blue design system — shared across all Go-served pages.
   Light theme only. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/manrope-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/manrope-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/manrope-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/manrope-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/manrope-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/unbounded-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-600.woff2') format('woff2');
}

/* ---------- Tokens (verbatim from spec Appendix) ---------- */
:root {
  /* Blue scale — primary identity */
  --ps-blue-900: #002061;
  --ps-blue-800: #003087;   /* Brand blue — primary */
  --ps-blue-700: #004CB3;
  --ps-blue-600: #006FCD;
  --ps-blue-500: #2E8FE0;
  --ps-blue-400: #4DA3DD;
  --ps-blue-300: #85B7E9;
  --ps-blue-200: #B8D4F0;
  --ps-blue-100: #E6F0FA;
  --ps-blue-50:  #F4F9FD;

  /* Surface neutrals — warm-cool, blue undertone */
  --canvas: #FAFBFE;
  --surface: #FFFFFF;
  --surface-muted: #F1F4FA;
  --surface-line: #DCE3ED;

  /* Ink */
  --ink: #0A1530;
  --ink-soft: #475569;
  --ink-muted: #8B9AB0;

  /* Iconic shape colors — small accents only, never together except as a 4-shape row */
  --shape-triangle: #10B981;
  --shape-circle:   #EF4444;
  --shape-cross:    #3B82F6;
  --shape-square:   #EC4899;

  /* Gradients */
  --gradient-hero:    linear-gradient(135deg, #003087 0%, #006FCD 55%, #85B7E9 100%);
  --gradient-section: linear-gradient(135deg, #002061 0%, #003087 45%, #004CB3 100%);
  --gradient-bar:     linear-gradient(90deg, #003087 0%, #006FCD 50%, #85B7E9 100%);

  /* Shadows — blue-tinted, NEVER neutral black */
  --shadow-xs: 0 1px 2px rgba(0, 48, 135, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 48, 135, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 48, 135, 0.10);
  --shadow-lg: 0 20px 48px rgba(0, 48, 135, 0.14);
  --shadow-glow: 0 0 0 1px var(--ps-blue-300), 0 16px 40px rgba(0, 111, 205, 0.18);

  /* Spacing */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 20px;
  --space-5: 32px;  --space-6: 48px;  --space-7: 64px;  --space-8: 96px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Fonts */
  --font-sans:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-mono:    'JetBrains Mono', 'Menlo', 'Consolas', monospace;
}

/* ---------- Base reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  line-height: 1.55;
  position: relative;
  isolation: isolate;
}

/* ---------- Headlines ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 var(--space-3);
}
h1 { font-size: 48px; letter-spacing: -0.03em; line-height: 1.0; }
h2 { font-size: 32px; letter-spacing: -0.025em; line-height: 1.02; }
h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.05; }
h4 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.05; }

/* ---------- Display headlines (Unbounded) ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

/* ---------- Atmospheric depth ---------- */
.bloom {
  position: absolute;
  width: 1100px;
  height: 800px;
  background: radial-gradient(
    ellipse 55% 50% at 50% 50%,
    var(--ps-blue-100) 0%,
    var(--ps-blue-50) 40%,
    transparent 78%
  );
  z-index: 0;
  pointer-events: none;
  animation: ps-bloom-breathe 14s ease-in-out infinite alternate;
}
@keyframes ps-bloom-breathe {
  0%, 100% { transform: scale(1.00); opacity: 1; }
  50%      { transform: scale(1.04); opacity: 0.92; }
}
@media (prefers-reduced-motion: reduce) {
  .bloom { animation: none; }
}

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--ps-blue-100);
  color: var(--ps-blue-800);
  border: 1px solid var(--ps-blue-200);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-bar);
}

/* ---------- Blockquote ---------- */
blockquote {
  background: var(--ps-blue-50);
  border-left: 4px solid var(--ps-blue-800);
  border-radius: var(--radius-lg);
  padding: 28px 40px;
  font-weight: 500;
  color: var(--ink);
  margin: var(--space-5) 0;
}

/* ---------- Code blocks ---------- */
pre {
  background: #0A1530;
  border-left: 4px solid var(--ps-blue-300);
  border-radius: var(--radius-lg);
  color: #E6F0FA;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  padding: 20px 24px;
  overflow-x: auto;
  margin: var(--space-4) 0;
  font-variant-numeric: tabular-nums;
}
pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-weight: 500;
  font-size: inherit;
}

/* ---------- Inline code ---------- */
:not(pre) > code {
  background: var(--ps-blue-100);
  color: var(--ps-blue-800);
  border: 1px solid var(--ps-blue-200);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Strong / emphasis ---------- */
strong {
  color: var(--ps-blue-800);
  font-weight: 700;
}

/* ---------- ul rotated-square diamond bullets ---------- */
ul {
  list-style: none;
  margin: var(--space-3) 0;
}
ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: var(--space-2);
}
ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--ps-blue-800);
  transform: rotate(45deg);
}

/* ---------- PS5 menu-tile button ---------- */
.btn-tile {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--ps-blue-800);
  background: var(--surface);
  color: var(--ps-blue-800);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
  font-variant-numeric: tabular-nums;
}
.btn-tile:hover,
.btn-tile:focus-visible {
  background: var(--ps-blue-800);
  color: #FFFFFF;
}

/* ---------- Tabular nums on numeric/code-ish atoms ---------- */
.mono, code, pre, .chip, .num, time {
  font-variant-numeric: tabular-nums;
}
