/* ============================================================
   4BITS · Tokens y átomos
   Valores extraídos del Figma "4Bits" (página Diseño a usar).
   ============================================================ */

/* ── Tipografía self-hosted ── */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-latin-400-normal.woff2') format('woff2'),
       url('../fonts/lato-latin-400-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-latin-700-normal.woff2') format('woff2'),
       url('../fonts/lato-latin-700-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/lato-latin-900-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Colores (hex exactos del Figma) ── */
  --fb-red:          #c82127;  /* Rojo de marca */
  --fb-red-dark:     #b21d24;  /* Botón Enviar, borde de tarjeta clara */
  --fb-wine:         #470000;  /* Vino: footer inferior, tarjeta 1, textos de botón */
  --fb-wine-2:       #540000;  /* Fondo del botón secundario del hero */
  --fb-dark:         #1a0000;  /* Fondo del header */
  --fb-gray:         #58595b;  /* Texto gris de marca */
  --fb-gray-card:    #f0f0f0;  /* Fondo de tarjeta clara de servicios */
  --fb-input-bg:     #fafafa;
  --fb-input-border: #dedede;
  --fb-placeholder:  #ababab;
  --fb-card-border:  #d1585d;  /* Borde de la tarjeta del hero */
  --fb-footer-line:  #d1d1d1;
  --fb-white:        #ffffff;

  /* Fondo de secciones claras. Ajusta aquí si el Figma cambia. */
  --fb-surface:      #f5f5f5;

  /* ── Tipografía ── */
  --fb-font: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fb-fs-display:  60px; /* Hero H1 */
  --fb-fs-h1:       50px; /* Subtítulo hero y títulos de sección */
  --fb-fs-h2:       50px;
  --fb-fs-h3:       34px; /* Popup */
  --fb-fs-card:     28px; /* Título de tarjeta */
  --fb-fs-lead:     22px; /* Claim / descripción del hero */
  --fb-fs-body:     18px;
  --fb-fs-eyebrow:  14px;
  --fb-fs-small:    14px;

  /* ── Layout ── */
  --fb-container:   1400px;
  --fb-gutter:      100px;  /* Margen lateral sobre lienzo de 1600 */
  --fb-header-h:    100px;
  --fb-radius:      10px;
  --fb-radius-pill: 90px;
  --fb-gap:         40px;

  /* ── Transiciones ── */
  --fb-t: 240ms cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset acotado ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--fb-header-h); }

body {
  margin: 0;
  font-family: var(--fb-font);
  font-size: var(--fb-fs-body);
  line-height: 1.35;
  color: var(--fb-gray);
  background: var(--fb-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ── Accesibilidad ── */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 10000;
  width: auto; height: auto;
  margin: 0; padding: 12px 20px;
  clip: auto; clip-path: none;
  background: var(--fb-white);
  color: var(--fb-wine);
  font-weight: 700;
  border-radius: var(--fb-radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--fb-red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Layout ── */
.fb-container {
  width: 100%;
  max-width: calc(var(--fb-container) + var(--fb-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--fb-gutter);
}

.fb-main { display: block; }

.fb-section { padding-block: 100px; }

/* ── Encabezado de sección ── */
.fb-section__head { display: flex; flex-direction: column; gap: 30px; }
.fb-section__head--center { align-items: center; text-align: center; }

.fb-eyebrow {
  position: relative;
  display: inline-block;
  margin: 0 0 10px;
  padding-left: 21px;
  color: var(--fb-red);
  font-size: var(--fb-fs-eyebrow);
  font-weight: 400;
  letter-spacing: 1.4px;
  line-height: 1.2;
  text-transform: uppercase;
}
.fb-eyebrow::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}
.fb-eyebrow--light { color: var(--fb-white); }
.fb-eyebrow--center { align-self: center; }

.fb-section__title {
  margin: 0;
  color: var(--fb-gray);
  font-size: var(--fb-fs-h2);
  font-weight: 700;
  line-height: 1.2;
}
.fb-section__title--center { text-align: center; }
.fb-section__title--red { color: var(--fb-red); }
.fb-section__title-line { display: block; }

.fb-section__text {
  margin: 0;
  color: var(--fb-gray);
  font-size: var(--fb-fs-body);
  line-height: 1.35;
}
.fb-section__head--center .fb-section__text { max-width: var(--fb-container); }

/* ── Botones ── */
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: var(--fb-fs-body);
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--fb-radius-pill);
  transition: background-color var(--fb-t), color var(--fb-t),
              border-color var(--fb-t), transform var(--fb-t);
  cursor: pointer;
}
.fb-btn:hover { transform: translateY(-1px); }
.fb-btn:active { transform: translateY(0); }

/* Blanco relleno — botón primario del hero y del banner */
.fb-btn--white {
  padding: 14px 30px;
  background: var(--fb-white);
  color: var(--fb-wine);
  border-color: var(--fb-white);
}
.fb-btn--white:hover { background: #f2e9e9; }

/* Outline sobre vino — botón secundario del hero */
.fb-btn--ghost {
  padding: 13px 29px;
  background: var(--fb-wine-2);
  color: var(--fb-white);
  border: 2px solid var(--fb-white);
}
.fb-btn--ghost:hover { background: var(--fb-wine); }

/* Outline del header */
.fb-btn--outline {
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 400;
  letter-spacing: .36px;
  border-color: currentColor;
}

/* Píldora de tarjeta (servicios, mapa) */
.fb-btn--pill {
  padding: 10px 20px;
  border-radius: 30px;
  letter-spacing: .36px;
  border-color: currentColor;
}

/* Enviar */
.fb-btn--submit {
  width: 100%;
  padding: 20px 35px;
  border-radius: 48px;
  background: var(--fb-red-dark);
  color: var(--fb-white);
}
.fb-btn--submit:hover { background: var(--fb-red); }
.fb-btn--submit[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ── Carrusel (compartido por hero y banner promocional) ── */
.fb-carousel { position: relative; }

.fb-carousel__track { position: relative; }

.fb-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease;
}
.fb-carousel__slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.fb-carousel__arrow {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  color: var(--fb-white);
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background-color var(--fb-t), transform var(--fb-t);
}
.fb-carousel__arrow svg { width: 22px; height: 22px; }
.fb-carousel__arrow:hover { background: rgba(255, 255, 255, .18); transform: scale(1.06); }
.fb-carousel__arrow--prev { left: 160px; }
.fb-carousel__arrow--prev svg { transform: rotate(180deg); }
.fb-carousel__arrow--next { right: 160px; }

.fb-carousel__dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-carousel__dot {
  width: 10px; height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  transition: width var(--fb-t), background-color var(--fb-t);
}
.fb-carousel__dot.is-active { width: 26px; background: var(--fb-white); }

/* Área táctil mínima sin alterar la caja visual */
.fb-carousel__dot::after {
  content: '';
  position: absolute;
  inset: -17px -8px;
}
.fb-carousel__dot { position: relative; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
