/* =========================================================
   Camino Seguros — main stylesheet
   Design tokens, reset, base, components, sections.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Colors */
  --green-500: #2DB87A;
  --green-700: #1F8B5C;
  --green-50:  #E8F7EF;
  --gray-900:  #1A1A1A;
  --gray-700:  #374151;
  --gray-500:  #6B7280;
  --gray-300:  #D1D5DB;
  --gray-100:  #F5F5F5;
  --white:     #FFFFFF;

  /* Typography */
  --font-heading: "Nunito", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

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

  /* Layout */
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --transition: 200ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }
input, textarea, select { font: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gray-900);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* Focus states */
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (max-width: 768px) {
  .container { padding: 0 var(--space-3); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-pill);
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--green-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(45, 184, 122, 0.3);
}
.btn-primary:hover { background: var(--green-700); box-shadow: 0 6px 20px rgba(45, 184, 122, 0.4); }
.btn-secondary {
  background: transparent;
  color: var(--green-700);
  border: 2px solid var(--green-500);
}
.btn-secondary:hover { background: var(--green-50); }
.btn-lg { padding: 18px 36px; font-size: 18px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  z-index: 100;
  backdrop-filter: saturate(1.1) blur(8px);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
}
.header__logo img { height: 96px; width: auto; }
@media (max-width: 768px) {
  .header__logo img { height: 60px; }
}
.header__nav { display: flex; gap: var(--space-5); }
.header__nav a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 16px;
  position: relative;
}
.header__nav a:hover { color: var(--green-700); }
.header__nav a.active { color: var(--green-700); font-weight: 700; }
.header__cta { display: inline-flex; }
.header__menu-btn { display: none; }

@media (max-width: 900px) {
  .header__nav { display: none; }
  .header__cta .btn-text { display: none; }
  .header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    color: var(--gray-900);
  }
  .header__menu-btn:hover { background: var(--gray-100); }
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  padding: var(--space-5) var(--space-4);
}
.mobile-menu.is-open { display: flex; flex-direction: column; }
.mobile-menu__close {
  align-self: flex-end;
  width: 44px; height: 44px;
  font-size: 24px;
}
.mobile-menu__nav { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-5); }
.mobile-menu__nav a { font-size: 24px; font-weight: 700; color: var(--gray-900); }

/* ---------- Footer ---------- */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-7) 0 var(--space-4);
  margin-top: var(--space-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }
}
.footer__logo img { height: 50px; margin-bottom: var(--space-3); }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.footer__col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer__col a:hover { color: var(--white); }
.footer__social { display: flex; gap: var(--space-3); margin-top: var(--space-3); }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  transition: background var(--transition);
}
.footer__social a:hover { background: var(--green-500); }
.footer__social svg { width: 18px; height: 18px; }
.footer__legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--gray-500);
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-8) 0 var(--space-7);
  background: linear-gradient(180deg, var(--green-50) 0%, var(--white) 100%);
}
.hero--small { padding: var(--space-7) 0 var(--space-6); }
.hero__title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 900;
  font-style: italic;
  margin-bottom: var(--space-4);
  max-width: 14ch;
}
.hero--small .hero__title { font-size: clamp(32px, 4vw, 56px); max-width: none; }
.hero__subtitle {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--gray-700);
  max-width: 60ch;
  margin-bottom: var(--space-5);
}
.hero__ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: var(--space-8) 0; }
.section--alt { background: var(--gray-100); }
.section--green { background: var(--green-700); color: var(--white); }
.section__head { margin-bottom: var(--space-6); max-width: 60ch; }
.section__eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-700);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.section__title {
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: var(--space-3);
}
.section__lead { font-size: 18px; color: var(--gray-700); }

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  background: var(--gray-100);
}
.card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card__title { font-size: 22px; }
.card__desc { color: var(--gray-700); font-size: 15px; flex: 1; }
.card__cta {
  margin-top: var(--space-3);
  color: var(--green-700);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.card__cta:hover { gap: var(--space-2); }

/* ---------- Value props ---------- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.value__num {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 900;
  color: var(--green-500);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.value h3 { font-size: 22px; margin-bottom: var(--space-2); }
.value p { color: var(--gray-700); font-size: 15px; }

/* ---------- Logos grid (seguradoras) ---------- */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
  align-items: center;
}
.logos-grid img {
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter var(--transition), opacity var(--transition);
  max-height: 50px;
  width: auto;
  margin: 0 auto;
}
.logos-grid img:hover { filter: grayscale(0); opacity: 1; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--green-700);
  color: var(--white);
  padding: var(--space-7) 0;
  text-align: center;
}
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: var(--space-3);
}
.cta-banner p { font-size: 18px; margin-bottom: var(--space-4); opacity: 0.9; }
.cta-banner .btn-primary { background: var(--white); color: var(--green-700); }
.cta-banner .btn-primary:hover { background: var(--gray-100); }

/* ---------- Forms ---------- */
.form-grid { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field label { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.field input, .field textarea, .field select {
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(45, 184, 122, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info {
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.contact-info h3 { font-size: 24px; margin-bottom: var(--space-3); }
.contact-info p { color: var(--gray-700); margin-bottom: var(--space-4); }
.contact-info dl { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); }
.contact-info dt { font-weight: 700; font-size: 14px; color: var(--gray-700); }
.contact-info dd { font-size: 16px; }

/* ---------- Visually-hidden util ---------- */
.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;
}
