/* ═══════════════════════════════════════════════
   MOBILE FIRST — estilos base = celular.
   Se amplía con min-width: 600 / 768 / 900 / 1024
   ═══════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

/* Los campos del formulario sí deben poder editarse (iOS/Safari) */
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

:root {
  --navy:       #012A5E;
  --navy-mid:   #023E8A;
  --navy-light: #1558a8;
  --sand:       #EAE2D8;
  --sand-dark:  #D4C9BC;
  --cream:      #F5F1EC;
  --white:      #ffffff;
  --ink:        #0D0D0D;
  --muted:      #6B6560;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: 20px;      /* margen lateral (crece con el breakpoint) */
  --maxw: 1280px;      /* ancho máximo del contenido en pantallas enormes */
  --nav-h: 64px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

svg { flex-shrink: 0; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Margen lateral común: nunca menos que --gutter, y centrado a --maxw en pantallas anchas */
#navbar,
.hero,
.fundamentos,
.citas,
.contacto,
footer {
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2));
}

/* Evita que el contenido de un grid lo desborde al achicar la ventana */
.hero > *,
.fundamentos > *,
.contacto > *,
.citas-grid > *,
.footer-top > * {
  min-width: 0;
}

/* ─── NAV ─── */
#navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  transition: background 0.35s var(--ease-out), box-shadow 0.35s;
}

#navbar.scrolled {
  background: rgba(1, 42, 94, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 8px 16px;
  border-radius: 100px;
  transition: background 0.2s, border-color 0.2s;
  letter-spacing: 0.2px;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--navy);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding-block: calc(var(--nav-h) + 40px) 48px;
  overflow: hidden;
  gap: 40px;
}

.hero-bg-text {
  position: absolute;
  bottom: -0.12em;
  left: -0.04em;
  font-family: var(--serif);
  font-size: clamp(120px, 38vw, 380px);
  font-weight: 400;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -4px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding-top: 8px;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
}

.hero-name {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 17vw, 96px);
  font-weight: 400;
  line-height: 0.92;
  color: var(--white);
}

.name-line.italic { font-style: italic; color: rgba(255,255,255,0.7); }

.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero-desc {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 14px 28px;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 100px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
  flex-shrink: 0;
}

.hero-side {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--serif);
  font-size: 44px;
  font-style: italic;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-quote {
  order: 3;
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}

.hero-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
}

.scroll-hint {
  display: none;
  position: absolute;
  bottom: 40px;
  right: max(var(--gutter), calc((100% - var(--maxw)) / 2));
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.scroll-hint span {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(255,255,255,0));
}

/* ─── SECTION TAG ─── */
.section-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin-bottom: 24px;
}

.section-tag.light { color: rgba(255,255,255,0.35); }

/* ─── FUNDAMENTOS ─── */
.fundamentos {
  background: var(--cream);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-block: 80px;
  align-items: center;
}

.funda-header h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 9vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
}

.funda-header h2 em {
  font-style: italic;
  color: var(--navy-light);
}

.funda-intro {
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}

.funda-list {
  list-style: none;
}

.funda-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(2,62,138,0.1);
  cursor: default;
}

.funda-item:first-child { border-top: 1px solid rgba(2,62,138,0.1); }

.fi-num {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 1px;
}

.fi-name {
  font-family: var(--serif);
  font-size: clamp(18px, 5vw, 22px);
  font-style: italic;
  color: var(--ink);
  transition: color 0.2s;
}

.fi-arrow {
  font-size: 18px;
  color: var(--navy-mid);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
}

/* ─── CITAS ─── */
.citas {
  background: var(--navy);
  padding-block: 80px;
  display: flex;
  flex-direction: column;
}

.citas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 16px;
  flex: 1;
  margin-top: 16px;
}

.cita-card {
  border-radius: 4px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.25s var(--ease-out);
}

.cita-large {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.cita-accent {
  background: var(--navy-mid);
}

.cita-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
}

.cita-qmark {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 0.7;
  color: rgba(255,255,255,0.12);
  display: block;
}

.cita-card blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 4.8vw, 22px);
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  flex: 1;
}

.cita-card cite {
  font-size: 13px;
  font-style: normal;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}

/* ─── CONTACTO ─── */
.contacto {
  background: var(--sand);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 80px;
  align-items: center;
}

.contacto-left h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 12vw, 64px);
  font-weight: 400;
  line-height: 1.0;
  color: var(--navy);
  margin-bottom: 24px;
}

.contacto-left h2 em {
  font-style: italic;
  color: var(--navy-light);
}

.contacto-sub {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 32px;
}

.contacto-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contacto-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--navy-mid);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: gap 0.2s;
}

/* ─── FORM ─── */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(2,62,138,0.15);
  padding: 20px 0 8px;
  position: relative;
  transition: border-color 0.2s;
}

.field:focus-within {
  border-bottom-color: var(--navy-mid);
}

.field label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy-mid);
  opacity: 0.6;
  margin-bottom: 6px;
  transition: opacity 0.2s;
}

.field:focus-within label { opacity: 1; }

.field input,
.field textarea {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;   /* ≥16px evita el zoom automático en iOS */
  color: var(--ink);
  padding: 4px 0;
  width: 100%;
  resize: none;
  border-radius: 0;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(13,13,13,0.25);
}

.btn-submit {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
  align-self: stretch;
}

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

.form-status {
  min-height: 1.5em;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.form-status.success { color: #1b6b3a; }
.form-status.error   { color: #a12622; }

/* Campo trampa anti-spam: invisible para personas */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ─── FOOTER ─── */
footer {
  background: var(--navy);
  padding-block: 56px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-tagline {
  max-width: 300px;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
}

.footer-col h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a,
.footer-col span {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 24px;
}

.footer-copy {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.3);
}

.footer-top-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

/* ─── HOVER (solo dispositivos con mouse; evita hover "pegado" en touch) ─── */
@media (hover: hover) {
  .nav-links a:hover { color: var(--white); }
  .nav-cta:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.55);
  }
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  }
  .funda-item:hover .fi-name { color: var(--navy-mid); }
  .funda-item:hover .fi-arrow { opacity: 1; transform: translateX(4px); }
  .cita-card:hover { transform: translateY(-3px); }
  .contacto-link:hover { gap: 16px; }
  .btn-submit:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(2,62,138,0.3);
  }
  .footer-col a:hover,
  .footer-top-link:hover { color: var(--white); }
}

/* ═══════════════ ≥ 600px (celular grande / tablet chica) ═══════════════ */
@media (min-width: 600px) {
  :root { --gutter: 32px; }

  .nav-cta { font-size: 13px; padding: 9px 20px; }

  .hero-desc { font-size: 16px; }
  .stat-num { font-size: 52px; }

  .funda-item { grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 20px; }
  .funda-intro { font-size: 16px; }

  .contacto-sub { font-size: 16px; }
  .contacto-link { font-size: 15px; }
  .field input,
  .field textarea { font-size: 20px; }
  .btn-submit { align-self: flex-start; padding: 18px 36px; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ═══════════════ ≥ 768px (tablet) ═══════════════ */
@media (min-width: 768px) {
  .nav-links { display: flex; }

  .hero-bottom {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }

  .citas-grid {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
  }
  .cita-large { grid-row: span 2; }
  .cita-card { padding: 40px; gap: 24px; }
  .cita-qmark { font-size: 72px; }
  .cita-card blockquote { font-size: clamp(18px, 2.2vw, 26px); }
}

/* ═══════════════ ≥ 900px (escritorio) ═══════════════ */
@media (min-width: 900px) {
  :root { --gutter: 48px; --nav-h: 72px; }

  .nav-logo { font-size: 28px; }

  /* Hero */
  .hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    padding-block: 120px 72px;
    gap: 40px;
  }
  .hero-bg-text { font-size: clamp(180px, 26vw, 380px); }
  .hero-name { font-size: clamp(72px, 10vw, 144px); }

  .hero-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-top: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 0 0 8px 40px;
  }
  .stat-num { font-size: 56px; }
  .stat-label { font-size: 12px; }
  .hero-quote {
    order: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
  }
  .scroll-hint { display: flex; }

  /* Fundamentos */
  .fundamentos {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 80px);
    padding-block: 100px;
  }
  .funda-header h2 { font-size: clamp(32px, 3.2vw, 52px); }
  .funda-intro { margin-top: 28px; margin-bottom: 16px; }
  .fi-name { font-size: clamp(18px, 1.6vw, 26px); }

  /* Citas */
  .citas {
    min-height: 100vh;
    min-height: 100svh;
    padding-block: 100px;
  }

  /* Contacto */
  .contacto {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    padding-block: 100px;
  }
  .contacto-left h2 { font-size: clamp(48px, 5vw, 80px); margin-bottom: 28px; }
  .contacto-sub { margin-bottom: 48px; }
  .btn-submit { margin-top: 40px; }

  /* Footer */
  footer { padding-block: 72px 32px; }
  .footer-top {
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
  }
  .footer-brand { grid-column: auto; }
  .footer-bottom { padding-top: 28px; }
}

/* ═══════════════ ≥ 1024px ═══════════════ */
@media (min-width: 1024px) {
  .nav-links { gap: 36px; }
}

/* Pantallas muy bajas en horizontal (celular acostado): evitar que el hero se corte */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-block: calc(var(--nav-h) + 24px) 32px; }
  .hero-name { font-size: clamp(48px, 9vw, 80px); }
}