/* =============================================
   base.css — Reset + Typography + Utilities
   ============================================= */

/* ----- Reset moderno ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ocultar scrollbar nativo en todos los navegadores */
html {
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE / Edge legacy */
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  padding-top: 72px; /* Fixed navbar height */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--bg);
}

img, video {
  max-width: 100%;
  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;
}

/* ----- Clases tipográficas ----- */
.h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h1-hero {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 54px);
  font-weight: 500;
  color: var(--text-inverse);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-size: clamp(17px, 3vw, 24px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.body-lg {
  font-family: var(--font-body);
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 400;
  line-height: 1.7;
}

.body {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 400;
  line-height: 1.65;
}

.body-sm {
  font-size: 13px;
  color: var(--text-muted);
}

.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
}

.label-muted {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 2.5vw, 20px);
  line-height: 1.75;
}

/* ----- Utilidades de layout ----- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(var(--s4), env(safe-area-inset-left));
  padding-right: max(var(--s4), env(safe-area-inset-right));
}

.container-narrow {
  max-width: 780px;
  margin-inline: auto;
  padding-left: max(var(--s4), env(safe-area-inset-left));
  padding-right: max(var(--s4), env(safe-area-inset-right));
}

.section {
  padding-block: clamp(var(--s20), 10vw, 140px);
}

.section-sm {
  padding-block: clamp(var(--s16), 7vw, var(--s24));
}

/* ----- Fondos de sección ----- */
.bg-green  { background-color: var(--green-light); }
.bg-blue   { background-color: var(--blue-light); }
.bg-amber  { background-color: var(--amber-light); }
.bg-dark   { background-color: var(--dark); color: var(--text-inverse); }
.bg-alt    { background-color: var(--bg-alt); }
.bg-brand  { background-color: var(--green); color: var(--text-inverse); }

/* ----- Encabezado de sección ----- */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s2);
  margin-bottom: clamp(var(--s12), 6vw, var(--s20));
}

.section-header .label {
  margin-bottom: var(--s1);
}

.section-header--left {
  align-items: flex-start;
  text-align: left;
}

/* ----- Stars ----- */
.stars {
  color: #F59E0B;
  letter-spacing: 2px;
}

/* ----- Screen reader ----- */
.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;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
  background: var(--green);
  color: #fff;
  padding: var(--s2) var(--s4);
  z-index: 9999;
  display: block;
}

/* ----- Responsive container ----- */
@media (min-width: 640px) {
  .container,
  .container-narrow {
    padding-inline: var(--s6);
  }
}

@media (min-width: 768px) {
  .container,
  .container-narrow {
    padding-inline: var(--s10);
  }
}

@media (min-width: 1200px) {
  .container,
  .container-narrow {
    padding-inline: var(--s12);
  }
}

/* ----- Mobile typography scale ----- */
@media (max-width: 480px) {
  .h1 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .h1-hero {
    font-size: clamp(22px, 6vw, 30px);
  }

  .h2 {
    font-size: clamp(18px, 6vw, 26px);
  }

  .h3 {
    font-size: clamp(16px, 5vw, 20px);
  }

  .body-lg {
    font-size: 15px;
    line-height: 1.6;
  }

  .body {
    font-size: 14px;
  }

  .section {
    padding-block: clamp(var(--s12), 8vw, var(--s20));
  }

  .section-sm {
    padding-block: clamp(var(--s10), 6vw, var(--s16));
  }

  .section-header {
    margin-bottom: clamp(var(--s8), 5vw, var(--s12));
  }
}
