/* ============================================================
   Glyboo — estilos de la landing
   BLOQUE 1: base (reset · variables · tipografía)
   Los estilos de cada sección se irán añadiendo por bloques.
   ============================================================ */

/* ---------- 1. Variables / tokens ---------- */
:root {
  /* Paleta de marca */
  --navy:  #1D3557;   /* principal / texto */
  --sky:   #6EC1FF;   /* detalles */
  --mint:  #7EDBB5;   /* acento */
  --cream: #FFF3E6;   /* fondo cálido */
  --white: #FFFFFF;

  /* Tokens semánticos */
  --color-text:        var(--navy);
  --color-text-muted:  #52627A;   /* navy desaturado, contraste AA sobre blanco */
  --color-bg:          var(--white);
  --color-bg-warm:     var(--cream);
  --color-primary:     var(--navy);
  --color-accent:      var(--mint);
  --color-detail:      var(--sky);
  --color-border:      #E4E9F0;

  /* Tipografía */
  --font-base: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Escala de espaciado (ritmo de 4/8) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Radios y contenedor */
  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --container: 1120px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  font-size: 1rem;              /* 16px base */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

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

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

ul, ol { list-style: none; padding: 0; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; color: var(--navy); }

/* ---------- 3. Tipografía base ---------- */
h1 { font-size: clamp(2rem, 5vw + 1rem, 3.25rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--color-text-muted); }

/* ---------- 4. Utilidades de layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Salto de contenido para teclado */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: var(--space-4); }

/* Foco visible coherente en toda la página */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 5. Botón (base + variantes) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;                 /* touch target cómodo */
  padding: var(--space-3) var(--space-6);
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

/* Variante primaria: relleno navy */
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: #16293f;             /* navy un punto más oscuro */
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(29, 53, 87, .22);
}
.btn-primary:active { transform: translateY(0); }

/* Variante secundaria: contorno navy */
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: #EEF3F9;             /* tinte navy muy suave */
  transform: translateY(-1px);
}
.btn-secondary:active { transform: translateY(0); }

/* Variante ghost: contorno del color actual (para barras de color) */
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-ghost:active { transform: translateY(0); }

/* Botón compacto (cabecera) */
.btn-sm {
  min-height: 42px;
  padding: var(--space-2) var(--space-4);
  font-size: 0.95rem;
}

/* Botón a todo el ancho (tarjetas, formulario) */
.btn-block { width: 100%; }

/* ---------- 6. Cabecera / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 92px;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; }

/* Compensa la cabecera fija al saltar a #anclas */
html { scroll-padding-top: 108px; }

/* ---------- 7. Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 70%);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  text-align: center;
  overflow: hidden;
}

.hero-inner {
  max-width: 760px;
}

/* Eyebrow: pastilla suave */
.eyebrow {
  display: inline-block;
  background: rgba(110, 193, 255, .18);   /* tinte sky */
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  margin-bottom: var(--space-6);
}

/* Titular con presencia */
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--navy);
}

.hero-title .heart {
  display: inline-block;
  color: var(--mint);
  vertical-align: baseline;
  animation: heartbeat 2.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.15); }
  30%      { transform: scale(1); }
}

.hero-subtitle {
  max-width: 620px;
  margin: var(--space-6) auto 0;
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-8);
}

/* Banner protagonista */
.hero-banner {
  margin-top: var(--space-16);
}
.banner-img {
  display: block;
  width: 100%;
  max-width: 760px;                /* tamaño nativo de la foto: nítida, sin estirar */
  margin-inline: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(29, 53, 87, .16);
}

/* ---------- 8. Título de sección (reutilizable) ---------- */
.section-title {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-12);
}

/* ---------- 9. Barra de ciudad ---------- */
.city-band {
  background: var(--mint);
  padding-block: var(--space-8);
}
.city-band-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  text-align: center;
}
.city-band p {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
}

/* ---------- 10. Dos lados (tarjetas) ---------- */
.sides { padding-block: var(--space-24); }

.sides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.side-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 8px 24px rgba(29, 53, 87, .06);
}
.side-card h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.side-card > p { margin-bottom: var(--space-6); }

/* Tarjeta destacada (Cuidador Fundador) */
.side-card-featured {
  background: #F1FBF6;                 /* tinte menta muy suave */
  border: 2px solid var(--mint);
  box-shadow: 0 16px 40px rgba(126, 219, 181, .28);
}

/* Lista con check en SVG */
.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-grow: 1;                        /* empuja el botón al fondo → botones alineados */
}
.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--color-text);
  font-weight: 600;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.25rem;
  height: 1.25rem;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D3557' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- 11. Cómo funciona (3 pasos) ---------- */
.how { padding-block: var(--space-24); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: var(--space-4);
}
.step h3 { margin-bottom: var(--space-2); }
.step p { max-width: 34ch; margin-inline: auto; }

/* ---------- 12. Confianza (4 señales) ---------- */
.trust {
  background: var(--cream);
  padding-block: var(--space-24);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.trust-item { text-align: center; }
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(110, 193, 255, .18);   /* chip celeste */
  color: var(--navy);
  margin-bottom: var(--space-4);
}
.trust-icon svg { width: 30px; height: 30px; }
.trust-item h3 { font-size: 1.15rem; margin-bottom: var(--space-2); }
.trust-item p { font-size: 0.95rem; }

/* ---------- 13. Formulario waitlist ---------- */
.waitlist {
  background: linear-gradient(180deg, var(--white) 0%, #EAF5FF 100%);
  padding-block: var(--space-24);
}
.waitlist-inner { text-align: center; }
.waitlist-lead {
  max-width: 520px;
  margin: 0 auto var(--space-8);
  font-size: 1.1rem;
}

.waitlist-form,
.waitlist-success {
  max-width: 560px;
  margin-inline: auto;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 16px 44px rgba(29, 53, 87, .10);
}

/* Selector de rol (radios como segmentos) */
.role-field { border: 0; padding: 0; margin: 0 0 var(--space-6); }
.role-field legend {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
  padding: 0;
}
.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.role-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.role-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.role-option:has(input:checked) {
  border-color: var(--navy);
  background: #EEF3F9;
  color: var(--navy);
}
.role-option:has(input:focus-visible) {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

/* Campos de texto y selector */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.field label .optional { font-weight: 600; color: var(--color-text-muted); font-size: 0.85rem; }
.field input,
.field select {
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--color-text);
  transition: border-color .2s ease;
}
/* Selector de provincia: chevron propio y placeholder atenuado */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D3557' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 1.1rem;
}
.field select:invalid { color: var(--color-text-muted); }   /* muestra el placeholder atenuado */
.field input:focus, .field select:focus { border-color: var(--sky); outline: none; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--sky); }

/* Casilla de consentimiento */
.consent-field { margin-top: var(--space-2); margin-bottom: var(--space-2); }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.consent-label input {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1em;
  accent-color: var(--navy);        /* el tick usa el navy de marca */
  cursor: pointer;
}
.consent-label a { color: var(--navy); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.consent-label a:hover { color: var(--sky); }

.waitlist-form .btn-block { margin-top: var(--space-4); }
.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  text-align: center;
}

/* Mensaje de error de envío del formulario (oculto hasta que falla la escritura) */
.form-error {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid #F0C6C6;
  background: #FCEDED;
  border-radius: var(--radius-sm);
  color: #B23A3A;
  font-size: 0.9rem;
  text-align: center;
}

/* Estado de éxito */
.waitlist-success:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--navy);
  margin-bottom: var(--space-2);
}
.success-icon svg { width: 32px; height: 32px; }

/* ---------- 14. FAQ ---------- */
.faq { padding-block: var(--space-24); }
.faq-inner { max-width: 720px; }

.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D3557' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p {
  padding-bottom: var(--space-6);
  max-width: 62ch;
}

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding-block: var(--space-16);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.footer-logo {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);     /* logo navy → blanco sobre fondo navy */
}
.footer-slogan {
  margin-top: var(--space-4);
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
}
.footer-meta { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-email {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  transition: color .2s ease;
}
.footer-email:hover { color: var(--sky); }
.footer-rgpd {
  color: rgba(255, 255, 255, .7);
  font-size: 0.9rem;
  max-width: 46ch;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.footer-links a {
  color: rgba(255, 255, 255, .8);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.footer-bottom p {
  color: rgba(255, 255, 255, .6);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .sides-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); }
  /* Botones del hero simétricos (mismo ancho) en móvil */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

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