/* ═══════════════════════════════════════════════════════
   ENBICI NICARAGUA — Design System
   Réplica arquitectónica de cowboy.com con identidad Enbici
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* ── Brand Colors ── */
  --color-primary: #D42027;
  --color-primary-rgb: 212, 32, 39;
  --color-primary-dark: #B01A20;
  --color-primary-light: #E8474D;
  --color-secondary: #1B2A4A;
  --color-secondary-rgb: 27, 42, 74;
  --color-accent: #E8A830;
  --color-success: #22C55E;

  /* ── Neutrals ── */
  --color-dark: #1a1a1a;
  --color-dark-rgb: 26, 26, 26;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-surface: #F5F5F7;
  --color-surface-elevated: #EEEEF0;
  --color-border: #E0E0E5;
  --color-border-light: #F0F0F2;

  /* ── Text ── */
  --text-primary: #1B2A4A;
  --text-secondary: #5A6577;
  --text-tertiary: #8E95A2;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.6);

  /* ── Typography ── */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Type Scale (cowboy.com-inspired gigantic scale) ── */
  --text-display: clamp(2.75rem, 8vw + 1rem, 8.75rem);  /* 44px → 140px */
  --text-hero: clamp(2.75rem, 6vw + 1rem, 6.25rem);     /* 44px → 100px */
  --text-h1: clamp(2.25rem, 4vw + 0.5rem, 4.125rem);    /* 36px → 66px */
  --text-h2: clamp(1.75rem, 3vw + 0.5rem, 2.625rem);    /* 28px → 42px */
  --text-h3: clamp(1.25rem, 2vw + 0.25rem, 1.75rem);    /* 20px → 28px */
  --text-body: clamp(0.875rem, 1vw + 0.25rem, 1.125rem); /* 14px → 18px */
  --text-body-lg: clamp(1rem, 1.2vw + 0.25rem, 1.25rem); /* 16px → 20px */
  --text-small: 0.8125rem;   /* 13px */
  --text-xs: 0.75rem;        /* 12px */

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

  /* ── Section Spacing (cowboy.com uses these) ── */
  --section-x: clamp(1.25rem, 4vw, 3.75rem);   /* 20px → 60px */
  --section-y: clamp(3rem, 8vw, 6rem);          /* 48px → 96px */
  --nav-height: 4rem;                            /* 64px */
  --header-gutter: calc(var(--nav-height) + var(--section-y));

  /* ── Border Radius ── */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 1rem;      /* 16px */
  --radius-lg: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.16);

  /* ── Transitions (cowboy uses cubic-bezier) ── */
  --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;
  --duration-slowest: 1000ms;

  /* ── Z-index Scale ── */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-nav: 40;
  --z-modal: 50;
  --z-overlay: 60;
  --z-preloader: 100;
}

/* ═══ Modern Reset ═══ */
*, *::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;
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ═══ Typography ═══ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}

.text-display {
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.text-hero {
  font-size: var(--text-hero);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.text-h1 { font-size: var(--text-h1); }
.text-h2 { font-size: var(--text-h2); font-weight: 500; }
.text-h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.3; }

p {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.6;
}

.text-body-lg {
  font-size: var(--text-body-lg);
}

.text-small {
  font-size: var(--text-small);
}

.text-xs {
  font-size: var(--text-xs);
}

/* ═══ Layout Utilities ═══ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--section-x);
}

.section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.section-padded {
  padding: var(--section-y) 0;
}

/* Full viewport section (cowboy.com pattern) */
.section-viewport {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ═══ Grid System ═══ */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* ═══ Buttons (cowboy.com pill style) ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  will-change: transform;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-white);
  color: var(--color-dark);
}

.btn-primary:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.btn-dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.btn-dark:hover {
  background-color: var(--color-white);
  color: var(--color-dark);
}

.btn-red {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-red:hover {
  background-color: var(--color-primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  background-color: var(--color-surface);
}

.btn-lg {
  padding: 1.125rem 1.5rem;
  font-size: 0.9375rem;
}

@media (min-width: 1024px) {
  .btn-lg {
    padding: 1.25rem 1.75rem;
  }
}

/* ═══ Badges/Pills (cowboy.com feature pills) ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  background-color: rgba(var(--color-dark-rgb), 0.05);
  color: var(--text-primary);
}

.badge-outline {
  background-color: transparent;
  border: 1px solid rgba(var(--color-dark-rgb), 0.2);
  border-radius: var(--radius-full);
  padding: 0.375rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge-success::before {
  content: '';
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--color-success);
  border-radius: 50%;
}

/* ═══ Utility Classes ═══ */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-white { color: var(--color-white); }
.text-muted { color: var(--text-secondary); }
.text-primary-color { color: var(--color-primary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.bg-dark { background-color: var(--color-dark); }
.bg-white { background-color: var(--color-white); }
.bg-surface { background-color: var(--color-surface); }

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

/* ═══ Custom Scrollbar ═══ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ═══ Selection ═══ */
::selection {
  background-color: rgba(var(--color-primary-rgb), 0.15);
  color: var(--color-primary);
}
