/* ============================================================
   FonoMom · Guía 0 a 12 Meses + Bonus Musical
   style.css  –  Mobile-first · Premium · Minimalista
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --cream:      #FAF7F4;
  --warm-white: #FDFBF9;
  --blush:      #F2DDD5;
  --blush-mid:  #E8C9BE;
  --rose:       #C97D6E;
  --rose-dark:  #A86050;
  --taupe:      #9E8880;
  --text-main:  #3D2F2A;
  --text-soft:  #7A6560;
  --text-light: #B0968F;
  --border:     #EAD9D3;
  --border-focus: #C97D6E;
  --shadow-card: 0 4px 32px rgba(180, 120, 100, 0.10);
  --shadow-btn:  0 6px 24px rgba(180, 100, 80, 0.28);
  --radius-card: 20px;
  --radius-field: 12px;
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Nunito', system-ui, sans-serif;
  --transition: 0.22s ease;
}

/* ── Reset base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--ff-body);
  background-color: var(--cream);
  color: var(--text-main);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  overflow-x: hidden;
}

/* ── Blobs de fondo ──────────────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.blob-1 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #F2DDD5 0%, transparent 70%);
  top: -100px;
  right: -80px;
}
.blob-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #E8C9BE 0%, transparent 70%);
  bottom: -60px;
  left: -80px;
}

/* ── Layout central ──────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 32px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── Marca ───────────────────────────────────────────────── */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.brand-name {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--rose-dark);
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Tarjeta ─────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--warm-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Encabezado de tarjeta */
.card-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #FDFBF9 0%, #FAF4F0 100%);
}

.pill-label {
  display: inline-block;
  background: var(--blush);
  color: var(--rose-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.heading-main {
  font-family: var(--ff-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 8px;
}

.subtext {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.55;
  font-weight: 400;
}

/* ── Formulario ──────────────────────────────────────────── */
.form {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Grupo de campo */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

/* Input base */
.field-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-main);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-field);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.field-input::placeholder {
  color: var(--text-light);
  font-weight: 300;
}

.field-input:focus {
  border-color: var(--border-focus);
  background: var(--warm-white);
  box-shadow: 0 0 0 3px rgba(201, 125, 110, 0.12);
}

/* Input tipo date — limpio, sin texto solapado */
.field-input--date {
  cursor: pointer;
  /* fuerza layout correcto en iOS/Safari */
  min-height: 46px;
  line-height: 1.2;
  /* quita el ícono nativo en algunos navegadores */
  -webkit-appearance: none;
}

/* Color del placeholder nativo de date en Webkit */
.field-input--date::-webkit-datetime-edit-fields-wrapper {
  color: var(--text-main);
}
.field-input--date::-webkit-datetime-edit-text {
  color: var(--text-light);
}
.field-input--date::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}
/* Estado vacío (fecha no seleccionada) */
.field-input--date.empty {
  color: var(--text-light);
}

/* Select wrapper */
.select-wrapper {
  position: relative;
  display: block;
}

.field-input--select {
  cursor: pointer;
  padding-right: 38px;
}

.select-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--taupe);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}

/* Estado de error en campo */
.field-input.has-error {
  border-color: #D96C6C;
  background: #FFF8F8;
}

.field-error {
  font-size: 0.75rem;
  color: #C0504A;
  font-weight: 500;
  min-height: 0;
  display: none;
}

.field-error.visible {
  display: block;
}

/* ── Checkbox ────────────────────────────────────────────── */
.check-group {
  gap: 0;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

/* Ocultar checkbox nativo */
.check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Caja visual del checkbox */
.check-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-focus);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

/* Tick */
.check-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity var(--transition);
}

/* Estado marcado */
.check-input:checked + .check-box {
  background: var(--rose);
  border-color: var(--rose);
}

.check-input:checked + .check-box::after {
  opacity: 1;
}

.check-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.3;
}

/* ── Botón principal ─────────────────────────────────────── */
.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
  border: none;
  border-radius: var(--radius-field);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(180, 100, 80, 0.34);
  outline: none;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform var(--transition);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ── Nota de seguridad ───────────────────────────────────── */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.4;
}

.security-icon {
  font-size: 0.8rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.page-footer {
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── Animaciones de entrada ──────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.55s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive: tablet/desktop ──────────────────────────── */
@media (min-width: 520px) {
  .page-wrapper {
    padding: 48px 24px 56px;
    gap: 24px;
  }

  .card-header {
    padding: 32px 32px 24px;
  }

  .form {
    padding: 28px 32px 36px;
    gap: 18px;
  }

  .heading-main {
    font-size: 1.75rem;
  }
}

/* ── Ajustes Safari / iOS ────────────────────────────────── */
@supports (-webkit-touch-callout: none) {
  .field-input {
    font-size: 16px; /* evita zoom automático en iOS */
  }
  .btn-primary {
    padding: 16px 24px;
  }
}
