/* =========================================================
   CÓRTEX CREATIVO — Hoja de estilos principal
   Editar con cuidado. Los colores y tamaños se controlan
   desde las variables de :root (justo debajo).
   ========================================================= */

:root {
  /* ---- Paleta ---- */
  --navy:        #14314F;   /* Azul Córtex — color corporativo principal */
  --navy-deep:   #0C1F34;   /* Azul muy oscuro para fondos */
  --navy-soft:   #2E5375;   /* Azul intermedio */
  --white:       #FFFFFF;
  --off-white:   #F7F5F1;   /* Blanco roto */
  --sand:        #E9DFCE;   /* Arena cálido */
  --sand-soft:   #F3EDE2;
  --sage:        #6E9188;   /* Acento línea educativa */
  --sage-soft:   #E4EDEA;
  --terra:       #B15C43;   /* Acento línea literaria */
  --terra-soft:  #F5E6E0;
  --ink:         #17202B;
  --muted:       #5B6B7C;
  --line:        #E2DED7;

  /* ---- Tipografía ---- */
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  /* ---- Medidas ---- */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
button { font-family: inherit; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow--terra { color: var(--terra); }
.eyebrow--light { color: var(--sand); }

.lead {
  font-size: clamp(1.075rem, 1.6vw, 1.28rem);
  line-height: 1.65;
  color: var(--muted);
}
.measure { max-width: 62ch; }
.measure-narrow { max-width: 48ch; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section--tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--off  { background: var(--off-white); }
.section--sand { background: var(--sand-soft); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy .lead { color: rgba(255,255,255,0.72); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--navy); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn--ghost-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap .3s var(--ease);
}
.link-arrow:hover { gap: 0.9rem; }
.link-arrow--sage { color: var(--sage); }
.link-arrow--terra { color: var(--terra); }
.link-arrow--light { color: var(--white); }

/* ---------- Isotipo (la C de Córtex) ---------- */
.iso { width: 1em; height: 1em; flex: none; color: inherit; }

.iso-mark { color: var(--navy); font-size: 2.4rem; margin-bottom: 1.4rem; display: block; }
.iso-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; color: var(--line); padding: 0.5rem 0;
}
.iso-divider::before, .iso-divider::after {
  content: ""; height: 1px; background: var(--line); flex: 1; max-width: 200px;
}
.iso-divider .iso { font-size: 1.35rem; color: var(--sand); }

/* Patrón discreto de isotipos de fondo */
.iso-pattern { position: relative; overflow: hidden; }
.iso-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%2314314F' stroke-width='6' stroke-linecap='round'%3E%3Cpath d='M72.8 77.2A35.5 35.5 0 1 1 72.8 22.8'/%3E%3Cpath d='M50 50 L30 50'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='9' fill='%2314314F'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.045;
  pointer-events: none;
}

/* ---------- Cabecera / navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
  flex: none;
}
.brand .iso { font-size: 2.15rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.4rem 0;
  position: relative;
  transition: color .25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--navy);
  transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.nav-cta { flex: none; }
.nav-cta .btn { padding: 0.7rem 1.25rem; font-size: 0.875rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 46px; height: 42px;
  cursor: pointer;
  position: relative;
  flex: none;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px;
  background: var(--navy);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--off-white);
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -25%;
  width: 62vw;
  height: 130%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%2314314F' stroke-width='8' stroke-linecap='round'%3E%3Cpath d='M72.8 77.2A35.5 35.5 0 1 1 72.8 22.8'/%3E%3Cpath d='M50 50 L29 50'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='11' fill='%2314314F'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { max-width: 60ch; }
.hero-kicker {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 0.9rem;
}

/* Hero interior (páginas secundarias) */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,0.75); }
.page-hero .eyebrow { color: var(--sand); }
.page-hero::after {
  content: "";
  position: absolute;
  right: -6%; bottom: -55%;
  width: 44vw; height: 150%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='8' stroke-linecap='round'%3E%3Cpath d='M72.8 77.2A35.5 35.5 0 1 1 72.8 22.8'/%3E%3Cpath d='M50 50 L29 50'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='11' fill='%23FFFFFF'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 820px; }

/* ---------- Tarjetas de concepto ---------- */
.concept {
  border-top: 2px solid var(--navy);
  padding-top: 1.4rem;
}
.concept h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.concept p { color: var(--muted); font-size: 0.975rem; }
.concept--sage { border-color: var(--sage); }
.concept--terra { border-color: var(--terra); }
.concept--light { border-color: var(--sand); }
.section--navy .concept p { color: rgba(255,255,255,0.72); }

/* ---------- Bloques de universo editorial ---------- */
.universe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
}
.universe-col { padding: clamp(2rem, 4vw, 3.5rem); }
.universe-col--edu { background: var(--sage-soft); }
.universe-col--lit { background: var(--terra-soft); }
.universe-col h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin-bottom: 0.7rem; }
.universe-col p { color: var(--muted); font-size: 1rem; }
.tag-list {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  list-style: none; padding: 0; margin: 1.5rem 0 0;
}
.tag-list li {
  font-size: 0.815rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(20,49,79,0.16);
  border-radius: 100px;
  color: var(--navy);
  background: rgba(255,255,255,0.5);
}

/* ---------- Recorrido / flujo ---------- */
.journey {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  counter-reset: step;
  margin-top: 1rem;
}
.journey-step {
  flex: 1 1 150px;
  padding: 1.5rem 1.2rem 1.5rem 0;
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.22);
}
.journey-step span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.journey-step strong {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
}

/* ---------- Cita destacada ---------- */
.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.35;
  letter-spacing: -0.018em;
  color: var(--navy);
  max-width: 24ch;
  position: relative;
}
.pullquote--wide { max-width: 30ch; }
.pullquote--light { color: var(--white); }
.pullquote-block {
  border-left: 2px solid var(--sand);
  padding-left: clamp(1.2rem, 3vw, 2.5rem);
}

/* ---------- Marcos de imagen / placeholders ---------- */
.figure {
  background: var(--sand-soft);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--wide { aspect-ratio: 16 / 9; }
.figure--square { aspect-ratio: 1 / 1; }
.figure-note {
  font-size: 0.775rem;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
  max-width: 26ch;
}
.figure-note strong { display: block; color: var(--navy); font-size: 0.8rem; margin-bottom: 0.3rem; }

.figure-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.9rem;
}
.figure-mosaic .figure:nth-child(1) { grid-row: span 2; aspect-ratio: auto; }

/* ---------- Listas ---------- */
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.check-list li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.98rem; color: var(--muted);
}
.check-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sage);
  margin-top: 0.62em;
  flex: none;
}
.check-list--terra li::before { background: var(--terra); }
.check-list--navy li::before { background: var(--navy); }

.phase-list { list-style: none; padding: 0; margin: 0; counter-reset: phase; }
.phase-list li {
  counter-increment: phase;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.phase-list li:last-child { border-bottom: 1px solid var(--line); }
.phase-list li::before {
  content: "0" counter(phase);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sage);
  padding-top: 0.35em;
}
.phase-list h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.phase-list p { color: var(--muted); font-size: 0.975rem; margin: 0; }

/* ---------- Aviso / nota ---------- */
.note {
  background: var(--off-white);
  border-left: 2px solid var(--sand);
  padding: 1.3rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}
.note strong { color: var(--navy); }
.section--navy .note {
  background: rgba(255,255,255,0.06);
  border-left-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
}
.section--navy .note strong { color: var(--white); }

/* ---------- Proyecto destacado ---------- */
.project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
}
.project-body { padding: clamp(1.8rem, 3.2vw, 3rem); }
.project--solo { grid-template-columns: 1fr; }
.project-visual {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  min-height: 320px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
}
.project-visual .figure-note { color: rgba(255,255,255,0.55); }
.project-visual .figure-note strong { color: rgba(255,255,255,0.85); }
.project-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.section--navy .project h2,
.section--navy .project h3 { color: var(--navy); }
.section--navy .project p  { color: var(--muted); }
.section--navy .project .serif { color: var(--navy); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.field .hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 0.97rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(20,49,79,0.09);
}
.field input[type="file"] { padding: 0.65rem; font-size: 0.88rem; background: var(--off-white); }
.field-full { grid-column: 1 / -1; }
.consent {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.88rem; color: var(--muted); line-height: 1.55;
}
.consent input { width: 17px; height: 17px; margin-top: 0.22em; flex: none; accent-color: var(--navy); }
.consent a { color: var(--navy); }
.fieldset {
  border: none; padding: 0; margin: 0;
  display: grid; gap: 1.4rem;
}
.fieldset legend {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  padding: 0 0 1.1rem;
  width: 100%;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.4rem;
}
.form-honeypot { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Contacto ---------- */
.contact-areas { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.contact-areas li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
  display: flex; gap: 0.9rem; align-items: baseline;
}
.contact-areas li:first-child { border-top: 1px solid var(--line); }
.contact-areas strong { color: var(--navy); font-weight: 600; min-width: 0; }

/* ---------- Franja CTA ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--white); }
.cta-band .lead { color: rgba(255,255,255,0.72); margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.62);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  font-size: 0.92rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer .brand { color: var(--white); margin-bottom: 1.1rem; }
.site-footer .brand-sub { color: rgba(255,255,255,0.5); }
.footer-claim {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: rgba(255,255,255,0.8);
  max-width: 26ch;
  line-height: 1.45;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.footer-col a { text-decoration: none; transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }
.footer-group {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.82rem;
}
.footer-group .iso { font-size: 1.1rem; color: rgba(255,255,255,0.4); }
.social { display: flex; gap: 1.2rem; }

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }
.reveal[data-delay="4"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.8rem 1.3rem;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Contenido legal ---------- */
.legal h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.08rem; margin-top: 1.8rem; }
.legal ul { color: var(--muted); padding-left: 1.2rem; }
.legal li { margin-bottom: 0.5rem; }
.pending {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--navy);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  vertical-align: middle;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .universe { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project-visual { min-height: 240px; order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 840px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 78px 0 auto;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.75rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -24px rgba(12,31,52,0.35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a::after { display: none; }
  .nav-cta { display: none; }
  .split { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 1.0125rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .figure-mosaic { grid-template-columns: 1fr 1fr; }
  .figure-mosaic .figure:nth-child(1) { grid-row: auto; aspect-ratio: 4/3; }
  .journey-step { flex: 1 1 100%; padding-right: 0; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .footer-top { grid-template-columns: 1fr; }
  .phase-list li { grid-template-columns: 1fr; gap: 0.4rem; }
  .brand-sub { display: none; }
}

/* =========================================================
   LIBROS
   ========================================================= */
.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
}
.book { display: flex; flex-direction: column; }
.book-cover {
  background: var(--off-white);
  border: 1px solid var(--line);
  aspect-ratio: 5 / 7;
  overflow: hidden;
  margin-bottom: 1.1rem;
  position: relative;
  box-shadow: 0 18px 32px -26px rgba(12,31,52,0.55);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.book:hover .book-cover {
  transform: translateY(-5px);
  box-shadow: 0 26px 44px -26px rgba(12,31,52,0.6);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.book-status {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
}
.book-status--soon { background: var(--sand); color: var(--navy); }
.book-line {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.45rem;
}
.book-line--lit { color: var(--terra); }
.book h3 { font-size: 1.06rem; line-height: 1.25; margin-bottom: 0.25rem; }
.book-sub {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--navy);
  font-weight: 600;
  margin: 0 0 0.45rem;
}
.book-author {
  font-family: var(--serif);
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.book p.book-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}
.book-meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
}
.book-buy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color .25s var(--ease), gap .25s var(--ease);
  align-self: flex-start;
}
.book-buy:hover { border-color: var(--navy); gap: 0.75rem; }
.book-soon {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  align-self: flex-start;
}

/* =========================================================
   NEWSLETTER
   ========================================================= */
.newsletter {
  background: var(--sand-soft);
  border: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.newsletter h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 0.5rem; }
.newsletter p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.newsletter-form { display: grid; gap: 0.85rem; }
.newsletter-row { display: flex; gap: 0.6rem; }
.newsletter-row input {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.97rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
}
.newsletter-row input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,49,79,0.09); }
.newsletter-row .btn { flex: none; }

@media (max-width: 840px)  { .newsletter { grid-template-columns: 1fr; } }
@media (max-width: 520px)  { .newsletter-row { flex-direction: column; } .newsletter-row .btn { justify-content: center; } }
