@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   Infinity Insiders — Brand Design System
   Colors are HSL only.
   Palette: Biscay (primary) · Clementine (accent) · Olivine ·
            Primrose · Gallery · Cod Gray · Cream paper
   ============================================================ */

:root {
  /* Brand palette */
  --biscay: 208 66% 23%;          /* #143D60 */
  --biscay-deep: 210 70% 14%;
  --clementine: 23 100% 46%;      /* #EB5B00 */
  --clementine-soft: 23 100% 55%;
  --olivine: 90 42% 63%;          /* #A0C878 */
  --primrose: 71 66% 77%;         /* #DDEB9D */
  --gallery: 0 0% 93%;            /* #EEEEEE */
  --cod-gray: 0 0% 4%;            /* #0A0A0A */
  --cream: 42 45% 96%;            /* warm paper */
  --cream-deep: 38 38% 92%;

  /* Semantic tokens */
  --background: var(--cream);
  --foreground: var(--biscay-deep);

  --card: 0 0% 100%;
  --card-foreground: var(--biscay-deep);

  --popover: 0 0% 100%;
  --popover-foreground: var(--biscay-deep);

  --primary: var(--biscay);
  --primary-foreground: var(--cream);

  --secondary: var(--primrose);
  --secondary-foreground: var(--biscay-deep);

  --muted: var(--cream-deep);
  --muted-foreground: 208 20% 38%;

  --accent: var(--clementine);
  --accent-foreground: 0 0% 100%;

  --destructive: 0 75% 50%;
  --destructive-foreground: 0 0% 100%;

  --border: 38 25% 86%;
  --input: 38 25% 86%;
  --ring: var(--biscay);

  --radius: 0.25rem;

  /* Typographic system */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Gradients & effects */
  --gradient-warm: linear-gradient(180deg, hsl(var(--cream)) 0%, hsl(var(--cream-deep)) 100%);
  --gradient-primrose: linear-gradient(135deg, hsl(var(--primrose)) 0%, hsl(var(--olivine) / 0.6) 100%);
  --gradient-deep: linear-gradient(160deg, hsl(var(--biscay)) 0%, hsl(var(--biscay-deep)) 100%);
  --gradient-ember: linear-gradient(135deg, hsl(var(--clementine)) 0%, hsl(23, 95%, 38%) 100%);

  --shadow-soft: 0 1px 2px hsl(var(--biscay) / 0.04), 0 8px 24px -8px hsl(var(--biscay) / 0.12);
  --shadow-card: 0 1px 0 hsl(var(--biscay) / 0.06), 0 24px 48px -24px hsl(var(--biscay) / 0.18);
  --shadow-deep: 0 30px 80px -30px hsl(var(--biscay) / 0.45);
  --shadow-ember: 0 16px 40px -12px hsl(var(--clementine) / 0.45);

  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base resets */
* {
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4, h5, .font-display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

::selection {
  background: hsl(var(--clementine));
  color: hsl(var(--cream));
}

/* Typography Utilities */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

.display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: hsl(var(--primary) / 0.7);
}

/* Layout Utilities */
.container-tight {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1280px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .container-tight {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, hsl(var(--primary) / 0.25), transparent);
}

/* Backgrounds & Colors */
.bg-primary { background-color: hsl(var(--primary)) !important; }
.bg-cream { background-color: hsl(var(--cream)) !important; }
.bg-cream-deep { background-color: hsl(var(--cream-deep)) !important; }
.bg-primrose { background-color: hsl(var(--primrose)) !important; }
.text-primary { color: hsl(var(--primary)) !important; }
.text-cream { color: hsl(var(--cream)) !important; }
.text-accent { color: hsl(var(--accent)) !important; }
.bg-accent { background-color: hsl(var(--accent)) !important; }

/* Gradients */
.bg-gradient-warm { background: var(--gradient-warm); }
.bg-gradient-primrose { background: var(--gradient-primrose); }
.bg-gradient-deep { background: var(--gradient-deep); }
.bg-gradient-ember { background: var(--gradient-ember); }

/* Shadows */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-deep { box-shadow: var(--shadow-deep); }
.shadow-ember { box-shadow: var(--shadow-ember); }

/* Effects */
.bg-grain {
  background-image: radial-gradient(hsl(var(--biscay) / 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Animations */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  min-width: fit-content;
  animation: marquee 38s linear infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.animate-float { 
  animation: float-slow 7s ease-in-out infinite; 
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { 
  animation: fade-up 0.9s var(--transition-smooth) both; 
}
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* Custom Overrides for Bootstrap to match Tailwind sizing where needed */
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

.min-h-screen { min-height: 100vh; }

.w-fit { width: fit-content; }
.max-w-prose { max-width: 65ch; }

.gap-x-4 { column-gap: 1rem; }
.gap-y-4 { row-gap: 1rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-8 { row-gap: 2rem; }

/* Interactive Hover States */
.hover-bg-primary:hover { background-color: hsl(var(--primary-foreground)) !important; color: hsl(var(--primary)) !important; }
.hover-bg-cream-deep:hover { background-color: hsl(var(--cream-deep) / 0.4) !important; }
.hover-shadow-card:hover { box-shadow: var(--shadow-card) !important; }

/* Button Hover Effects */
.btn { transition: all 0.2s var(--transition-smooth); }
.group:hover .lucide-arrow-up-right,
.group:hover svg { transform: translate(4px, -4px); }

/* Missing Backgrounds and Object Fit */
.bg-cream-deep-40 { background-color: hsl(var(--cream-deep) / 0.4) !important; }
.bg-primrose-60 { background-color: hsl(var(--primrose) / 0.6) !important; }
.object-fit-cover { object-fit: cover !important; }

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: hsl(var(--cream-deep));
  z-index: 50;
  transform: translateY(-100%);
  transition: transform 0.5s var(--transition-smooth);
}
.mobile-nav-overlay.active {
  transform: translateY(0);
}

/* Fix Bootstrap Container sizing if necessary */
.container { max-width: 1280px; }
