/* ============================================================
   BGSS & Associates – Design System & Global Styles
   variables.css  |  v1.0 (Brand Guidelines Aligned)
   ============================================================ */

/* ── 1. CSS Custom Properties (Design Tokens) ── */
:root {
  /* Brand Guidelines v1.0 Palette */
  --crimson-50:         #F8F1F2;
  --crimson-100:        #F2E2E5;
  --crimson-200:        #E4C0C6;
  --crimson-300:        #D2909B;
  --crimson-500:        #A7253A; /* Core Crimson */
  --crimson-700:        #891E30; /* Crimson Deep */
  --crimson-900:        #6B1825; /* Crimson Dark */
  
  --silver:             #DFE0E0; /* Secondary Silver */
  --bg:                 #FCFCFC; /* Base Canvas */
  --ink:                #1E1F21; /* Primary Text */

  --grey-100:           #E6E6E6;
  --grey-200:           #D0D0D0;
  --grey-300:           #A8A8A9;
  --grey-400:           #848586;
  --grey-500:           #616163;
  --grey-600:           #424244;
  --grey-700:           #303133;

  /* Semantic status colors */
  --color-success:      #2F6D4F;
  --color-warning:      #9C6B1F;
  --color-error:        #B3261E;

  /* Standard aliases */
  --color-white:        #FFFFFF;
  --color-off-white:    #FCFCFC;
  --color-cream:        #F8F1F2;
  --color-navy:         #1E1F21;
  --color-navy-mid:     #303133;
  --color-charcoal:     #1E1F21;
  --color-slate:        #616163;
  --color-muted:        #848586;
  --color-border:       #E6E6E6;
  --color-border-light: #F2E2E5;
  
  /* Brand Crimson Palette */
  --color-primary:      #A7253A;
  --color-primary-dark: #891E30;
  --color-primary-light:#D2909B;
  --color-primary-pale: #F8F1F2;
  --color-red:          #A7253A;
  
  /* System Accents — mapped to Brand Crimson */
  --color-gold:         #A7253A;
  --color-gold-light:   #D2909B;
  --color-gold-pale:    #F8F1F2;
  --color-accent:       #A7253A;
  --color-accent-dark:  #891E30;

  /* Typography — Brand Guidelines v1.0 */
  --font-display:  'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:    'Fraunces', 'Georgia', serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;

  /* Font Sizes – fluid scale */
  --text-xs:    clamp(0.75rem,  1vw,  0.8125rem);
  --text-sm:    clamp(0.8125rem,1.1vw,0.9375rem);
  --text-base:  clamp(0.9375rem,1.3vw,1.0625rem);
  --text-md:    clamp(1rem,     1.5vw,1.125rem);
  --text-lg:    clamp(1.125rem, 1.8vw,1.375rem);
  --text-xl:    clamp(1.375rem, 2.2vw,1.75rem);
  --text-2xl:   clamp(1.75rem,  3vw,  2.5rem);
  --text-3xl:   clamp(2.25rem,  4vw,  3.5rem);
  --text-4xl:   clamp(3rem,     5.5vw, 5rem);
  --text-hero:  clamp(2.75rem, 4.8vw, 4.5rem);

  /* Font Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* Line Heights */
  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;
  --lh-loose:   2;

  /* Letter Spacing */
  --ls-tight:   -0.02em;
  --ls-normal:   0;
  --ls-wide:     0.06em;
  --ls-wider:    0.1em;
  --ls-widest:   0.16em;

  /* Spacing Scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;

  /* Section Padding */
  --section-pad-y: clamp(5rem, 10vw, 9rem);

  /* Max Widths */
  --max-w-xs:   20rem;
  --max-w-sm:   30rem;
  --max-w-md:   48rem;
  --max-w-lg:   64rem;
  --max-w-xl:   80rem;
  --max-w-2xl:  90rem;
  --max-w-site: 1400px;

  /* Transitions */
  --ease-out:      cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:      180ms;
  --dur-base:      300ms;
  --dur-slow:      500ms;
  --dur-slower:    700ms;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(30,31,33,0.06);
  --shadow-sm:  0 2px 8px rgba(30,31,33,0.08);
  --shadow-md:  0 8px 24px rgba(30,31,33,0.10);
  --shadow-lg:  0 20px 50px rgba(30,31,33,0.14);
  --shadow-xl:  0 40px 80px rgba(30,31,33,0.18);
  --shadow-gold:0 4px 20px rgba(167,37,58,0.25);

  /* Border Radius */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-full: 9999px;

  /* Z-Indices */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:  10;
  --z-nav:    100;
  --z-modal:  200;
  --z-toast:  300;

  /* Nav height */
  --nav-h:          80px;
  --nav-h-scrolled: 64px;
}

/* ── 2. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Prevent layout shift during GSAP init */
.js-ready .gsap-hidden { opacity: 0; }

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── 3. Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  color: var(--color-slate);
  line-height: var(--lh-relaxed);
  font-size: var(--text-base);
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-charcoal);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-light);
}

/* ── 4. Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--max-w-site);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 5rem);
}

.section-pad { padding-block: var(--section-pad-y); }
.section-pad-sm { padding-block: clamp(3rem, 6vw, 5rem); }

/* Overline label */
.overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}
.overline::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--color-gold);
  flex-shrink: 0;
}

/* Gold rule */
.gold-rule {
  display: block;
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  margin-block: var(--space-6);
}

/* Section titles */
.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-navy);
  margin-bottom: var(--space-6);
}
.section-title em,
.about-heading em,
.why-heading em,
.global-heading em {
  font-style: normal;
  color: var(--color-primary);
  font-weight: 800;
}

/* Clip reveal wrapper for GSAP */
.clip-reveal { overflow: hidden; }
.clip-reveal-inner { display: block; }

/* ── 5. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 2rem;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
  border: 1.5px solid var(--color-navy);
}
.btn-primary:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn-ghost-dark {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-navy);
}
.btn-ghost-dark:hover {
  background: var(--color-navy);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-white);
  border: 1.5px solid var(--color-gold);
}
.btn-gold:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-gold);
  transition: gap var(--dur-base) var(--ease-out), color var(--dur-fast);
}
.arrow-link:hover { gap: var(--space-4); color: var(--color-accent-dark); }
.arrow-link svg { flex-shrink: 0; transition: transform var(--dur-base) var(--ease-out); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ── 6. Custom Cursor ── */
#custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-toast);
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast);
  mix-blend-mode: multiply;
}
#cursor-follower {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: calc(var(--z-toast) - 1);
  transform: translate(-50%, -50%);
  transition: width var(--dur-slow) var(--ease-out),
              height var(--dur-slow) var(--ease-out),
              opacity var(--dur-fast);
  opacity: 0.6;
}
body.cursor-expanded #cursor-follower { width: 60px; height: 60px; opacity: 1; }
@media (hover: none), (max-width: 1024px) {
  #custom-cursor, #cursor-follower { display: none; }
}

/* ── 7. Animated Line ── */
.animated-line {
  height: 1px;
  background: var(--color-border);
  transform-origin: left;
  transform: scaleX(0);
}

/* ── 8. Prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
