/* ============================================
   INFINITY INTERNATIONAL — Hoja base
   Paleta: derivada del logo real (#6FCACC, H181°)
   Tipografía: Newsreader (títulos) + Source Sans 3 (cuerpo)

   Esta hoja define los primitivos compartidos por el sitio público
   y el campus: tipografía, botones, formularios y avisos.
   panel.css sólo agrega lo específico del panel.
   ============================================ */

:root {
  /* Marca */
  --ink: #25282A;          /* texto principal, color real del wordmark */
  --teal-950: #103637;     /* secciones oscuras */
  --teal-800: #185253;     /* acento primario: CTAs, links */
  --teal-700: #206D6F;     /* hover */
  --teal-400: #69D1D3;     /* turquesa del logo, uso mínimo */

  /* Neutros (grises cálidos, no crema) */
  --paper: #F7F6F3;
  --paper-raised: #FFFFFF;
  --stone-300: #E3E0D9;
  --stone-600: #63645F;

  /* Semánticos */
  --ok-text: #1B6B4A;   --ok-border: #A8CFBC;   --ok-bg: #EDF6F1;
  --warn-text: #8A5A12; --warn-border: #E0C79A; --warn-bg: #FBF4E7;
  --err-text: #8C3A34;  --err-border: #DDB2AE;  --err-bg: #FAEFEE;

  --content-width: 1120px;
  --gutter: 32px;
  --focus-ring: 0 0 0 3px rgba(24,82,83,.28);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* height: auto es imprescindible ahora que los <img> declaran width y height:
   sin esto, cuando el CSS fija el ancho, el alto del atributo se mantiene
   y la imagen se deforma. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* Foco visible y consistente para todo lo interactivo. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal-800);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

em { font-style: italic; font-weight: 400; }

.eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-800);
  margin: 0 0 16px;
}

/* ============================================
   BOTONES
   Dos escalas, nunca mezcladas en una misma fila:
   .btn    → acciones de página y formulario (49px de alto)
   .btn-sm → acciones dentro de tablas y tarjetas (38px)
   ============================================ */
.btn {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--teal-800); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--stone-300); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-block { display: block; width: 100%; }

/* ============================================
   FORMULARIOS
   Un solo sistema para sitio público y campus.
   ============================================ */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field .hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--stone-600);
  font-weight: 400;
  margin: 0 0 8px;
}
.field input[type=text],
.field input[type=email],
.field input[type=url],
.field input[type=password],
.field select,
.field textarea {
  width: 100%;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--stone-300);
  border-radius: 3px;
  padding: 11px 13px;
}
.field textarea { min-height: 90px; resize: vertical; }
/* Una aclaración puesta DESPUÉS del campo no corre el campo hacia abajo,
   así dos columnas de .field-row mantienen etiquetas e inputs alineados. */
.field input + .hint,
.field select + .hint,
.field textarea + .hint { margin: 6px 0 0; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-800);
  box-shadow: var(--focus-ring);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* Campo suelto que debe medir lo mismo que una columna de .field-row. */
.field-half { max-width: calc(50% - 8px); }
@media (max-width: 640px) { .field-half { max-width: none; } }

.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 28px; }

/* Honeypot antispam: fuera de pantalla, nunca visible ni enfocable. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================
   AVISOS (única definición, la usan ambos contextos)
   ============================================ */
.notice {
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 3px;
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.notice-ok    { color: var(--ok-text);   border-color: var(--ok-border);   background: var(--ok-bg); }
.notice-error { color: var(--err-text);  border-color: var(--err-border);  background: var(--err-bg); }
.notice-info  { color: var(--teal-800);  border-color: #B4D5D5;            background: #EDF5F5; }
.notice .notice-strong { font-size: 16px; font-weight: 600; }
.notice .notice-hint { display: block; margin-top: 4px; font-size: 13px; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--stone-300);
  background: var(--paper-raised);
  position: relative;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-header .logo { display: flex; align-items: center; gap: 10px; }
.site-header .logo img { height: 32px; width: auto; }
.site-header nav.primary-links { display: flex; align-items: center; gap: 36px; }
.site-header nav.primary-links a {
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink);
}
.site-header nav.primary-links a:hover { color: var(--teal-800); }
.site-header .nav-actions { display: flex; align-items: center; gap: 12px; }

/* Botón hamburguesa: sólo existe en pantallas chicas. */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--stone-300);
  border-radius: 3px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.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(-5.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--stone-300);
  background: var(--paper-raised);
  padding: 8px var(--gutter) 20px;
}
.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--stone-300);
}
.nav-mobile a:last-child { border-bottom: none; }

@media (max-width: 860px) {
  .site-header nav.primary-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile:not([hidden]) { display: block; }
}

/* ============================================
   HERO
   padding: 0 anula la regla genérica de section, que si no
   le suma 88px arriba y abajo sin que se note el porqué.
   ============================================ */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--teal-950);
  padding: 0;
}
.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,26,26,.35) 0%, rgba(9,26,26,.62) 42%, rgba(7,18,18,.95) 100%);
}
/* Mismo ancho y gutter que .wrap: el hero alinea con el resto de la página. */
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 96px var(--gutter) 84px;
}
.hero .eyebrow { color: var(--teal-400); text-shadow: 0 1px 12px rgba(4,14,14,.7); }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  color: #fff;
  max-width: 660px;
  margin-bottom: 22px;
  text-shadow: 0 2px 24px rgba(4,14,14,.6);
}
.hero p.lede {
  font-size: 17px;
  line-height: 1.65;
  color: #E7ECEA;
  max-width: 480px;
  margin: 0 0 32px;
  text-shadow: 0 1px 16px rgba(4,14,14,.55);
}
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================
   SECCIONES
   ============================================ */
section { padding: 88px 0; }
.section-head { max-width: 560px; margin: 0 0 56px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 34px); }
.section-head p { color: var(--stone-600); margin: 16px 0 0; font-size: 16px; }

/* ---------- Equipo ----------
   Lista editorial en vez de tarjetas con foto: sólo tenemos retrato
   de Florencia, y los avatares con iniciales son el recurso genérico
   que estamos evitando en todo el sitio. */
.team-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}
.team-layout .section-head { margin: 0; max-width: none; }

.team-list { border-top: 1px solid var(--stone-300); }
.team-row { padding: 26px 0; border-bottom: 1px solid var(--stone-300); }
.team-row h3 { font-size: 20px; margin-bottom: 2px; }
.team-row .role {
  margin: 0 0 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-800);
}
.team-row p:last-child { margin: 0; color: var(--stone-600); max-width: 62ch; }
@media (max-width: 900px) {
  .team-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Banda de foto ----------
   Respiro visual entre el bloque de "quiénes somos" y el de dudas
   prácticas. No lleva texto: la imagen es el contenido. */
.photo-band { margin: 0; }
.photo-band picture { display: block; }
.photo-band img {
  width: 100%;
  /* Más alta que antes: con la foto de cuerpo entero hace falta altura
     para que entren cabezas y pies sin recortar. */
  height: clamp(320px, 38vw, 560px);
  object-fit: cover;
  object-position: center 58%;
}
@media (max-width: 700px) {
  .photo-band img { height: clamp(300px, 72vw, 420px); object-position: center 50%; }
}

/* ---------- Guía descargable ---------- */
.guide {
  background: var(--paper-raised);
  border-top: 1px solid var(--stone-300);
  border-bottom: 1px solid var(--stone-300);
}
.guide-layout {
  display: grid;
  grid-template-columns: 200px 1fr 340px;
  gap: 48px;
  align-items: start;
}
.guide-cover {
  width: 100%;
  border: 1px solid var(--stone-300);
}
.guide-intro h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 16px; }
.guide-intro p { color: var(--stone-600); margin: 0; max-width: 56ch; }
.guide-form-wrap {
  background: var(--paper);
  border: 1px solid var(--stone-300);
  padding: 28px;
}
@media (max-width: 1000px) {
  .guide-layout { grid-template-columns: 160px 1fr; gap: 36px; }
  .guide-form-wrap { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-cover {
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(16, 54, 55, .18);
  }
}

/* ---------- Proceso ----------
   La numeración es información real: son etapas en orden. */
.process {
  background: var(--paper-raised);
  border-top: 1px solid var(--stone-300);
  border-bottom: 1px solid var(--stone-300);
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  /* Fijo en 3: las 6 etapas llenan 2 filas exactas, sin celdas huérfanas. */
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--stone-300);
  border: 1px solid var(--stone-300);
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step;
  background: var(--paper-raised);
  padding: 28px 26px 30px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--teal-800);
  margin-bottom: 14px;
}
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--stone-600); font-size: 14.5px; line-height: 1.6; }
.steps .step-detail {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--teal-800);
}

/* ---------- Fundadora ---------- */
.founder {
  background: var(--paper-raised);
  border-top: 1px solid var(--stone-300);
  border-bottom: 1px solid var(--stone-300);
}
.founder .wrap {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: center;
}
.founder img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
}
.founder blockquote {
  margin: 0 0 24px;
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink);
}
.founder .signature { font-size: 15px; color: var(--stone-600); }
.founder .signature strong { color: var(--ink); font-weight: 600; }
@media (max-width: 780px) {
  .founder .wrap { grid-template-columns: 1fr; }
  /* Sigue siendo un retrato vertical: forzarlo a 4/3 le cortaba medio cuerpo.
     Se achica el ancho en vez de cambiar la proporción.
     Apilada y angosta, alineada a la izquierda quedaba desbalanceada. */
  .founder img {
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(16, 54, 55, .18);
  }
}

/* ---------- Preguntas frecuentes ---------- */
.faq-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}
.faq-layout .section-head { margin: 0; max-width: none; }
.faq-list { border-top: 1px solid var(--stone-300); }
.faq-list details { border-bottom: 1px solid var(--stone-300); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  position: relative;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 19px;
  line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 20px;
  color: var(--teal-800);
}
.faq-list details[open] summary::after { content: "\2013"; }
.faq-list summary:hover { color: var(--teal-800); }
.faq-list details p { margin: 0 0 24px; color: var(--stone-600); max-width: 64ch; }
@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Contacto ---------- */
.contact { background: var(--teal-950); color: #fff; }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-intro .eyebrow { color: var(--teal-400); }
.contact-intro h2 { color: #fff; font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 16px; }
.contact-intro > p { color: #C4D3D2; max-width: 42ch; }
.contact-alt {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 14.5px;
  color: #A9C0BF;
}
.contact-alt a { color: #fff; }

.contact-form-wrap {
  background: var(--paper-raised);
  padding: 32px;
  color: var(--ink);
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--stone-300);
  padding: 56px 0 32px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.site-footer .brand { max-width: 320px; }
.site-footer .brand img { height: 28px; width: auto; margin-bottom: 14px; }
.site-footer .brand p { color: var(--stone-600); font-size: 14.5px; }
.site-footer .cols { display: flex; gap: 64px; flex-wrap: wrap; }
.site-footer .col h4 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stone-600);
  margin: 0 0 14px;
}
.site-footer .col a {
  display: block;
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 10px;
}
.site-footer .col a:hover { color: var(--teal-800); }
.site-footer .legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--stone-300);
  font-size: 13px;
  color: var(--stone-600);
}

/* ---------- Acceso al campus ---------- */
.auth-section {
  display: flex;
  justify-content: center;
  padding: 88px var(--gutter) 104px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--paper-raised);
  border: 1px solid var(--stone-300);
  padding: 40px;
}
.auth-box h1 { font-size: 27px; margin-bottom: 8px; }
.auth-box .auth-lede { color: var(--stone-600); font-size: 15px; margin: 0 0 28px; }
.auth-foot {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--stone-600);
  text-align: center;
}
.auth-foot a { color: var(--teal-800); font-weight: 600; }

/* ============================================
   MOVIMIENTO
   Todo va prefijado con .js: sin JavaScript nada se oculta,
   así la página siempre es legible aunque el script falle.
   ============================================ */

/* ---------- Aparición al entrar en pantalla ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- Entrada del hero ----------
   Arranca al cargar, no al scrollear: ya está en pantalla. */
.js .hero-content > * {
  opacity: 0;
  animation: subir .8s cubic-bezier(.22,.61,.36,1) forwards;
}
.js .hero-content > *:nth-child(1) { animation-delay: .15s; }
.js .hero-content > *:nth-child(2) { animation-delay: .28s; }
.js .hero-content > *:nth-child(3) { animation-delay: .41s; }
.js .hero-content > *:nth-child(4) { animation-delay: .54s; }

@keyframes subir {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Ken Burns ----------
   Un solo zoom lentísimo que se detiene. Un bucle que va y viene
   se lee como "respiración" y distrae; esto sólo da profundidad. */
.hero img.hero-bg {
  animation: ken-burns 32s ease-out forwards;
  transform-origin: center 35%;
}
@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

/* ---------- Hover ---------- */
.steps li { transition: background .22s ease; }
.steps li:hover { background: var(--paper); }

.team-row { transition: border-color .22s ease; }

/* ---------- Respeto por quien pidió menos movimiento ----------
   Mareo, vestibulares y preferencia del sistema operativo. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js .hero-content > * {
    opacity: 1;
    animation: none;
  }
  .hero img.hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}
