/* ============================================================
   WILLARD GLOBAL LINKS LTD — Main Stylesheet
   Author: Built with Claude
   Description: Foundation CSS for entire website
   ============================================================ */

/* ── GOOGLE FONTS IMPORT ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS VARIABLES (Design Tokens) ── */
:root {
  /* Brand Colors */
  --navy:           #1a1f6e;
  --navy-dark:      #0f1340;
  --navy-mid:       #252b8a;
  --red:            #c0392b;
  --red-light:      #e74c3c;
  --gold:           #c4973a;
  --gold-light:     #e8c068;

  /* Neutral Palette */
  --cream:          #f7f3ec;
  --cream-dark:     #ede7da;
  --cream-darker:   #ddd5c4;
  --white:          #ffffff;
  --off-white:      #faf9f7;
  --charcoal:       #2c2c2c;
  --charcoal-light: #4a4a4a;
  --gray:           #888888;
  --gray-light:     #cccccc;
  --gray-lighter:   #f0f0f0;

  /* Typography */
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --font-mono:      'DM Mono', monospace;

  /* Font Sizes */
  --text-xs:        0.75rem;    /* 12px */
  --text-sm:        0.875rem;   /* 14px */
  --text-base:      1rem;       /* 16px */
  --text-md:        1.125rem;   /* 18px */
  --text-lg:        1.25rem;    /* 20px */
  --text-xl:        1.5rem;     /* 24px */
  --text-2xl:       2rem;       /* 32px */
  --text-3xl:       2.5rem;     /* 40px */
  --text-4xl:       3.5rem;     /* 56px */
  --text-5xl:       4.5rem;     /* 72px */
  --text-hero:      clamp(3rem, 8vw, 6rem);

  /* Spacing */
  --space-xs:       0.25rem;    /* 4px */
  --space-sm:       0.5rem;     /* 8px */
  --space-md:       1rem;       /* 16px */
  --space-lg:       1.5rem;     /* 24px */
  --space-xl:       2rem;       /* 32px */
  --space-2xl:      3rem;       /* 48px */
  --space-3xl:      4rem;       /* 64px */
  --space-4xl:      6rem;       /* 96px */
  --space-5xl:      8rem;       /* 128px */

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1400px;
  --container-sm:   800px;

  /* Border Radius */
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:      0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg:      0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-navy:    0 8px 40px rgba(26, 31, 110, 0.25);
  --shadow-gold:    0 4px 20px rgba(196, 151, 58, 0.3);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   600ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:         1;
  --z-nav:          100;
  --z-overlay:      200;
  --z-modal:        300;
  --z-toast:        400;
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--charcoal);
  background-color: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--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 {
  line-height: 1.8;
  color: var(--charcoal-light);
}

/* ── LAYOUT UTILITIES ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--sm {
  max-width: var(--container-sm);
}

.section {
  padding: var(--space-5xl) 0;
}

.section--sm {
  padding: var(--space-3xl) 0;
}

.section--lg {
  padding: calc(var(--space-5xl) * 1.5) 0;
}

/* ── FLEX & GRID UTILITIES ── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }
.gap-xl      { gap: var(--space-xl); }
.gap-2xl     { gap: var(--space-2xl); }

.grid        { display: grid; }
.grid-2      { grid-template-columns: repeat(2, 1fr); }
.grid-3      { grid-template-columns: repeat(3, 1fr); }
.grid-4      { grid-template-columns: repeat(4, 1fr); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}

.btn--primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-navy);
}

.btn--secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn--secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border: 2px solid var(--gold);
}

.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn--lg {
  padding: 18px 44px;
  font-size: var(--text-base);
}

.btn--sm {
  padding: 10px 22px;
  font-size: var(--text-xs);
}

/* ── SECTION TITLES ── */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.section-title--light {
  color: var(--white);
}

.section-title--large {
  font-size: var(--text-4xl);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--charcoal-light);
  max-width: 600px;
  line-height: 1.8;
}

.section-subtitle--light {
  color: rgba(255, 255, 255, 0.75);
}

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

/* ── DIVIDER ── */
.divider {
  width: 60px;
  height: 3px;
  background: var(--red);
  margin: var(--space-lg) 0;
  border-radius: var(--radius-full);
}

.divider--center {
  margin: var(--space-lg) auto;
}

.divider--gold {
  background: var(--gold);
}

/* ── BADGES & TAGS ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.badge--navy {
  background: rgba(26, 31, 110, 0.1);
  color: var(--navy);
}

.badge--red {
  background: rgba(192, 57, 43, 0.1);
  color: var(--red);
}

.badge--gold {
  background: rgba(196, 151, 58, 0.15);
  color: var(--gold);
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dark);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.card--cream {
  background: var(--cream);
  border-color: var(--cream-dark);
}

.card--navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy-mid);
}

/* ── BACKGROUNDS ── */
.bg-navy       { background-color: var(--navy); }
.bg-navy-dark  { background-color: var(--navy-dark); }
.bg-cream      { background-color: var(--cream); }
.bg-cream-dark { background-color: var(--cream-dark); }
.bg-white      { background-color: var(--white); }
.bg-off-white  { background-color: var(--off-white); }

/* ── TEXT COLORS ── */
.text-navy     { color: var(--navy); }
.text-red      { color: var(--red); }
.text-gold     { color: var(--gold); }
.text-white    { color: var(--white); }
.text-gray     { color: var(--gray); }
.text-muted    { color: var(--charcoal-light); }

/* ── TEXT ALIGNMENT ── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── PAGE LOADER ── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--white);
  letter-spacing: 2px;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-logo span {
  color: var(--gold);
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── FORM ELEMENTS ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.3px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--charcoal);
  background: var(--white);
  border: 1.5px solid var(--cream-darker);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 31, 110, 0.1);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* ── MISC UTILITIES ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overflow-hidden { overflow: hidden; }
.relative        { position: relative; }
.absolute        { position: absolute; }
.w-full          { width: 100%; }
.h-full          { height: 100%; }

/* ── SEPARATOR LINE ── */
.line-separator {
  width: 100%;
  height: 1px;
  background: var(--cream-dark);
  margin: var(--space-3xl) 0;
}

/* ── RESPONSIVE BREAKPOINTS ── */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
  :root {
    --text-4xl: 3rem;
    --text-3xl: 2.25rem;
    --text-hero: clamp(2.5rem, 6vw, 4.5rem);
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .section {
    padding: var(--space-4xl) 0;
  }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
  :root {
    --text-4xl: 2.5rem;
    --text-3xl: 2rem;
    --text-2xl: 1.75rem;
    --text-hero: clamp(2rem, 8vw, 3.5rem);
  }

  .container {
    padding: 0 var(--space-md);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .btn--lg {
    padding: 14px 28px;
    font-size: var(--text-sm);
  }
}

/* Small mobile: 480px and below */
@media (max-width: 480px) {
  :root {
    --text-hero: clamp(1.75rem, 9vw, 2.75rem);
  }

  .container {
    padding: 0 var(--space-md);
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}