/* =========================================================================
   global.css
   GoldBridge — design tokens, reset, base typography, utility classes
   Loaded on every page before components.css and the page-specific stylesheet.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Fonts (Google Fonts only — see brand spec)
   ------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=DM+Sans:wght@400;500&family=DM+Mono:wght@400&display=swap');

/* -------------------------------------------------------------------------
   Design tokens
   Color tokens come from the brand spec; structural tokens (radii, spacing,
   easing, durations) are tuned for the "Liquid Glass" style — fluid, slow,
   restrained motion as recommended by the design-system master file.
   ------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:           #07070C;
  --bg-surface:   #0D0D15;
  --bg-card:      #111120;

  /* Gold accents */
  --gold:         #E0B73E;
  --gold-light:   #F5D26B;
  --gold-deep:    #B8852A;
  --gold-dim:     rgba(224, 183, 62, 0.10);
  --gold-glow:    rgba(224, 183, 62, 0.06);

  /* Warm complements — used sparingly: signature gradients + ambient blobs */
  --copper:       #E07B3A;
  --amber:        #FF9D3D;

  /* Type */
  --text:         #F5F0E4;
  --muted:        #6E6C7E;

  /* Borders */
  --border:       rgba(224, 183, 62, 0.15);
  --border-dim:   rgba(255, 255, 255, 0.05);

  /* Font families */
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:  'DM Mono', ui-monospace, 'SF Mono', monospace;

  /* Spacing scale (4/8 rhythm) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* Layout */
  --container:    1180px;
  --container-md: 920px;
  --container-sm: 680px;
  --nav-height:   64px;

  /* Radii — tight, premium-feeling */
  --radius-sm: 2px;
  --radius:    3px;
  --radius-lg: 6px;
  --radius-pill: 999px;

  /* Motion — Liquid Glass: slow, fluid */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    180ms;
  --dur-base:    280ms;
  --dur-slow:    480ms;
  --dur-slower:  720ms;

  /* Shadows — gold accents are restrained */
  --shadow-card:  0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-gold:  0 0 0 1px rgba(224, 183, 62, 0.2), 0 12px 40px rgba(224, 183, 62, 0.12);
  --shadow-lift:  0 18px 40px rgba(0, 0, 0, 0.55);

  /* Z-index ladder */
  --z-base:    1;
  --z-sticky:  20;
  --z-nav:     50;
  --z-overlay: 90;
  --z-modal:   100;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}

a:hover { color: var(--gold-light); }

ul, ol { list-style: none; }

/* -------------------------------------------------------------------------
   Selection / focus
   ------------------------------------------------------------------------- */
::selection {
  background: var(--gold);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------- */
.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }
.mono  { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow-muted {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.h-display {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.01em;
}

.h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
}

.h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
}

.italic { font-style: italic; }

.body-lg {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}

.body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.caption {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.gold      { color: var(--gold); }
.gold-light{ color: var(--gold-light); }
.text      { color: var(--text); }
.muted     { color: var(--muted); }

/* Signature gradient — gold-light → gold → copper. Used sparingly: the hero
   italic line and one section title only. Don't apply globally to all H2s. */
.text-gradient-gold {
  background: linear-gradient(120deg, var(--gold-light) 0%, var(--gold) 50%, var(--copper) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.container-md { max-width: var(--container-md); }
.container-sm { max-width: var(--container-sm); }

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tight {
  padding-block: clamp(48px, 7vw, 88px);
}

main { display: block; }

/* -------------------------------------------------------------------------
   Reveal animations (driven by js/animations.js)
   ------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variant: scale + opacity. Use on cards/grids — feels more "instrument
   panel zooming into focus" than "slide up from below". */
.reveal--scale {
  transform: translateY(0) scale(0.86);
  filter: blur(4px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slower) var(--ease-out),
    filter var(--dur-slow) var(--ease-out);
}
.reveal--scale.is-visible {
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }
.reveal[data-delay="6"] { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  height: 1px;
  background: var(--border-dim);
  border: 0;
}

.divider-gold {
  height: 1px;
  background: var(--border);
  border: 0;
}

/* Locked body when mobile menu is open */
body.is-locked { overflow: hidden; }
