/* ============================================================
   BACK TO BASICS · Jaime Tacher
   Concepto: HIERRO Y LINAJE
   ============================================================ */

:root {
  --iron: #0b0a09;      /* fondo: negro cálido de hierro fundido */
  --soot: #16130f;      /* superficies */
  --ash: #2a241d;       /* bordes / tiles */
  --bone: #efe6d8;      /* texto principal */
  --dust: #a99d8b;      /* texto secundario (7.4:1 sobre iron) */
  --ember: #e8a24a;     /* dorado atardecer */
  --blood: #b81d31;     /* rojo de marca, solo para acción */
  --blood-hi: #d42a40;

  --f-display: "Big Shoulders Display", "Oswald", Impact, sans-serif;
  --f-serif: "Fraunces", Georgia, serif;
  --f-body: "Instrument Sans", "Helvetica Neue", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
main { overflow-x: clip; }
body {
  margin: 0;
  background: var(--iron);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
::selection { background: var(--ember); color: var(--iron); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }

/* Grano de película sobre todo el sitio */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ember); color: var(--iron); padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -.01em;
  margin: 0;
}
.h1 { font-size: clamp(3.4rem, 11vw, 11rem); }
.h2 { font-size: clamp(2.6rem, 7vw, 6.5rem); }
.h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: .95; }
.ember { color: var(--ember); }
.red { color: var(--blood-hi); }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--bone); }

.kicker {
  display: inline-flex; align-items: center; gap: .8em;
  font-family: var(--f-body); font-size: .78rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--ember);
  margin: 0 0 1.4rem;
}
.kicker::before { content: ""; width: 38px; height: 1px; background: currentColor; }

.quote {
  font-family: var(--f-serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 3.4rem); line-height: 1.12;
  letter-spacing: -.01em; margin: 0;
}
.lead { font-size: clamp(1.1rem, 1.4vw + .6rem, 1.4rem); line-height: 1.55; color: var(--bone); max-width: 38ch; }
.muted { color: var(--dust); }
p { margin: 0 0 1.1em; }
.prose { max-width: 62ch; }
.prose p { color: #d9cfbf; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; padding: 1em 1.2em; margin: 0 0 1.4em; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; }
.prose pre code { font-size: .8rem; line-height: 1.6; overflow-wrap: normal; white-space: pre; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--blood); --fg: #f4ede2;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 0 1.6em;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-weight: 700; font-size: .92rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover { background: var(--blood-hi); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--ghost { --bg: transparent; --fg: var(--bone); border-color: rgba(239, 230, 216, .45); clip-path: none; }
.btn--ghost:hover { background: var(--bone); color: var(--iron); }
.btn--ember { --bg: var(--ember); --fg: var(--iron); }
.btn--ember:hover { background: #f2b86a; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6em; color: var(--ember);
  font-weight: 600; text-decoration: none; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem;
  border-bottom: 1px solid rgba(232, 162, 74, .4); padding-bottom: 4px;
  transition: gap .3s var(--ease), border-color .3s;
}
.link-arrow:hover { gap: 1em; border-color: var(--ember); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center;
  transition: background .4s var(--ease), border-color .4s, transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: rgba(11, 10, 9, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: rgba(239, 230, 216, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: auto; }
.brand span { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.brand small { display: block; font-family: var(--f-body); font-size: .75rem; letter-spacing: .2em; color: var(--dust); font-weight: 500; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); }
.nav a:not(.btn) {
  position: relative; text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone); padding: 8px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 100%;
  background: var(--ember); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--ember); }
.nav .btn { min-height: 44px; font-size: .78rem; padding: 0 1.2em; }

.menu-btn {
  display: none; width: 48px; height: 48px; background: none; border: 1px solid rgba(239, 230, 216, .3);
  color: var(--bone); cursor: pointer; position: relative; z-index: 60;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  position: absolute; left: 50%; width: 20px; height: 2px; background: currentColor; transform: translateX(-50%);
  transition: transform .35s var(--ease), background .2s;
}
.menu-btn span { top: 50%; margin-top: -1px; }
.menu-btn span::before, .menu-btn span::after { content: ""; left: 0; transform: none; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 55; flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 6px; padding: 96px var(--gutter) 40px; background: var(--iron);
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav a:not(.btn) { font-family: var(--f-display); font-size: clamp(2.4rem, 11vw, 3.6rem); letter-spacing: 0; font-weight: 800; padding: 2px 0; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 24px; min-height: 54px; font-size: .9rem; }
  body.menu-open { overflow: hidden; }
  /* backdrop-filter crea un bloque contenedor y encerraría al menú fijo en el header */
  body.menu-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--iron); }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 12vw, 180px) 0; position: relative; }
.section--tight { padding: clamp(56px, 8vw, 110px) 0; }
.section--soot { background: var(--soot); }
.rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(239, 230, 216, .18), transparent); border: 0; margin: 0; }

.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.split > .media { grid-column: 1 / span 6; }
.split > .copy { grid-column: 8 / span 5; }
.split--rev > .media { grid-column: 7 / span 6; order: 2; }
.split--rev > .copy { grid-column: 1 / span 5; }
@media (max-width: 860px) {
  .split > .media, .split > .copy, .split--rev > .media, .split--rev > .copy { grid-column: 1 / -1; order: initial; }
}

.frame { position: relative; overflow: hidden; background: var(--soot); }
.frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--ease); }
.frame.is-in img { transform: scale(1); }
.frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(239, 230, 216, .08); pointer-events: none; }
.frame figcaption, .tag {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 600;
  background: rgba(11, 10, 9, .78); padding: 7px 10px; color: var(--bone);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; } .reveal[data-delay="2"] { transition-delay: .24s; } .reveal[data-delay="3"] { transition-delay: .36s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- HERO scroll-scrub (index) ---------- */
.scrub { position: relative; height: 520vh; background: var(--iron); }
.scrub__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scrub__canvas, .scrub__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrub__poster { z-index: 0; }
.scrub__canvas { z-index: 1; }
.scrub__shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11,10,9,.55) 0%, rgba(11,10,9,0) 22%, rgba(11,10,9,0) 55%, rgba(11,10,9,.9) 100%),
    linear-gradient(90deg, rgba(11,10,9,.72) 0%, rgba(11,10,9,.15) 55%, rgba(11,10,9,0) 100%);
}
@media (max-aspect-ratio: 1/1) {
  .scrub__shade { background: linear-gradient(180deg, rgba(11,10,9,.55) 0%, rgba(11,10,9,0) 16%, rgba(11,10,9,0) 30%, rgba(11,10,9,.78) 55%, rgba(11,10,9,.94) 100%); }
  .chapter .kicker { letter-spacing: .2em; }
}
.chapter {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: clamp(88px, 14vh, 150px);
  max-width: 980px; opacity: 0; transform: translateY(30px); pointer-events: none;
  transition: opacity .6s var(--ease), transform .8s var(--ease);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
.chapter.is-on { opacity: 1; transform: none; pointer-events: auto; }
.chapter .h1 { margin-bottom: .18em; }
.chapter .sub { font-size: clamp(1.05rem, 1.3vw + .6rem, 1.4rem); max-width: 34ch; color: var(--bone); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(4, auto); gap: clamp(20px, 4vw, 64px); justify-content: start; }
.stat b { display: block; font-family: var(--f-display); font-weight: 800; font-size: clamp(3.2rem, 8vw, 7.5rem); line-height: .9; color: var(--bone); }
.stat b sup { color: var(--ember); font-size: .5em; vertical-align: .6em; }
.stat > span { display: block; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dust); font-weight: 600; margin-top: .6em; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, auto); gap: 22px 36px; } }

.scrub__hud {
  position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; align-items: center; gap: 18px; font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--dust); font-weight: 600;
}
.scrub__bar { flex: 1; height: 1px; background: rgba(239, 230, 216, .18); position: relative; overflow: hidden; }
.scrub__bar i { position: absolute; inset: 0; background: var(--ember); transform-origin: left; transform: scaleX(0); }
.scrub__hint { display: inline-flex; align-items: center; gap: 10px; }
.scrub__hint::after { content: ""; width: 1px; height: 22px; background: var(--ember); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scrub__load { position: absolute; z-index: 4; right: var(--gutter); top: calc(var(--header-h) + 16px); font-size: .78rem; letter-spacing: .2em; color: var(--dust); text-transform: uppercase; transition: opacity .6s; }
.scrub__load.is-done { opacity: 0; }

/* ---------- Page hero (subpáginas) ---------- */
.page-hero { position: relative; min-height: 88vh; min-height: 88svh; display: flex; align-items: flex-end; padding: calc(var(--header-h) + 60px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; z-index: 0; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: slowzoom 18s var(--ease) forwards; }
.page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,9,.35), rgba(11,10,9,.2) 40%, rgba(11,10,9,.95)), linear-gradient(90deg, rgba(11,10,9,.75), rgba(11,10,9,0) 70%); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .h1 { font-size: clamp(3.2rem, 10vw, 9.5rem); text-shadow: 0 2px 40px rgba(0,0,0,.5); }
.page-hero .lead { margin-top: 1.4rem; text-shadow: 0 1px 20px rgba(0,0,0,.6); }
@keyframes slowzoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.crumbs { font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--dust); margin-bottom: 1.4rem; font-weight: 600; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ember); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid rgba(239, 230, 216, .1); padding: 22px 0; background: var(--iron); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 3.4rem); text-transform: uppercase; padding-right: .9em; white-space: nowrap; line-height: 1; }
.marquee__track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ember); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Pilares / tarjetas ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(239, 230, 216, .1); border: 1px solid rgba(239, 230, 216, .1); }
.pillar { background: var(--iron); padding: clamp(28px, 3vw, 44px); position: relative; transition: background .4s var(--ease); }
.pillar:hover { background: var(--soot); }
.pillar__n { font-family: var(--f-display); font-size: 1rem; color: var(--ember); letter-spacing: .1em; font-weight: 700; }
.pillar h3 { margin: .9rem 0 .7rem; }
.pillar p { color: var(--dust); margin: 0; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Mentores ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 24vw, 300px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 24px; scrollbar-width: thin; scrollbar-color: var(--ash) transparent; }
.rail > * { scroll-snap-align: start; }
/* El imán del carrusel respeta el margen lateral: ninguna tarjeta queda pegada al borde */
.rail { scroll-padding-inline: var(--gutter); }
.mentor { position: relative; text-decoration: none; display: block; }
.mentor__img { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--soot); }
.mentor__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.85); transition: filter .6s var(--ease), transform .8s var(--ease); }
.mentor:hover .mentor__img img, .mentor:focus-visible .mentor__img img { filter: grayscale(0) contrast(1) brightness(1); transform: scale(1.04); }
.mentor h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; line-height: 1; margin: 14px 0 4px; }
.mentor p { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ember); margin: 0; font-weight: 600; }

.mentor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 3vw, 40px); }
.mentor-card { display: grid; grid-template-rows: auto 1fr; background: var(--soot); border: 1px solid rgba(239,230,216,.07); }
.mentor-card .mentor__img { aspect-ratio: 4 / 3; }
.mentor-card:hover .mentor__img img { filter: none; transform: scale(1.03); }
.mentor-card .body { padding: 24px; }
.mentor-card h3 { font-family: var(--f-display); font-size: 2rem; font-weight: 800; text-transform: uppercase; line-height: 1; margin: 0 0 6px; }
.mentor-card .role { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ember); font-weight: 600; margin-bottom: 14px; }
.mentor-card p:last-child { color: #cfc4b3; font-size: .95rem; margin: 0; }

/* ---------- Timeline certificaciones ---------- */
.timeline { position: relative; }
.year { display: grid; grid-template-columns: minmax(90px, 200px) 1fr; gap: clamp(16px, 4vw, 60px); padding: 34px 0; border-top: 1px solid rgba(239,230,216,.1); }
.year__n { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 7vw, 5.5rem); line-height: .85; color: transparent; -webkit-text-stroke: 1px var(--ember); position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.cert { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--soot); border: 1px solid rgba(239,230,216,.06); transition: border-color .3s; }
.cert:hover { border-color: rgba(232,162,74,.45); }
.cert__logo { flex: 0 0 52px; height: 52px; background: var(--ash); padding: 7px; display: grid; place-items: center; overflow: hidden; }
.cert__logo img { width: 100%; height: 100%; object-fit: contain; }
.cert__logo--txt { padding: 0; font-family: var(--f-display); font-weight: 800; color: var(--ember); font-size: 1.1rem; }
.cert strong { display: block; font-size: .98rem; line-height: 1.3; }
.cert small { color: var(--dust); font-size: .8rem; }
@media (max-width: 600px) { .year { grid-template-columns: 1fr; gap: 14px; } .year__n { position: static; } }

/* ---------- Libros ---------- */
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.book { display: flex; flex-direction: column; }
.book__cover { display: block; position: relative; aspect-ratio: 2 / 3; perspective: 1200px; margin-bottom: 26px; }
.book__cover img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06); transform: rotateY(-8deg) rotateX(2deg); transform-origin: left center; transition: transform .8s var(--ease); }
.book:hover .book__cover img { transform: rotateY(0) translateY(-6px); }
.book__cover::before { content: ""; position: absolute; inset: 8% 0 -4% 6%; background: radial-gradient(closest-side, rgba(232,162,74,.28), transparent); filter: blur(30px); z-index: -1; }
.book h3 { margin: 0 0 4px; }
.book .role { color: var(--ember); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.book p { color: #cfc4b3; flex: 1; }
.book .btn-row .btn { min-height: 48px; padding: 0 1.2em; font-size: .82rem; }
@media (max-width: 860px) { .books { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }

/* ---------- Marcas ---------- */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1px; }
.brand-card { background: var(--iron); outline: 1px solid rgba(239,230,216,.1); padding: 28px; display: flex; flex-direction: column; gap: 14px; transition: background .4s var(--ease); }
.brand-card:hover { background: var(--soot); }
.brand-card__logo { height: 112px; display: grid; place-items: center; background: radial-gradient(closest-side, #2a241d, transparent 90%); }
.brand-card__logo img { max-height: 80px; max-width: 78%; width: auto; object-fit: contain; }
.brand-card__logo--big img { max-height: 108px; }
.brand-card h3 { margin: 6px 0 0; font-size: 1.9rem; }
.brand-card p { color: var(--dust); margin: 0; flex: 1; font-size: .96rem; }

/* ---------- Timeline historia ---------- */
.chapters { counter-reset: ch; }
.chap { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 4vw, 60px); padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid rgba(239,230,216,.1); align-items: start; }
.chap__when { grid-column: 1 / span 3; font-family: var(--f-display); font-weight: 800; font-size: clamp(2.6rem, 6vw, 5rem); line-height: .85; color: var(--ember); }
.chap__when small { display: block; font-family: var(--f-body); font-size: .78rem; letter-spacing: .24em; color: var(--dust); font-weight: 600; margin-top: 10px; text-transform: uppercase; }
.chap__body { grid-column: 4 / span 5; }
.chap__media { grid-column: 9 / span 4; }
.chap__body h3 { margin: 0 0 1rem; }
@media (max-width: 860px) { .chap__when, .chap__body, .chap__media { grid-column: 1 / -1; } }

/* ---------- Banner / CTA ---------- */
.banner { position: relative; min-height: min(80vh, 760px); display: flex; align-items: center; overflow: hidden; }
.banner__bg { position: absolute; inset: 0; }
.banner__bg img { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.banner__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,10,9,.88) 0%, rgba(11,10,9,.45) 50%, rgba(11,10,9,.1) 100%), linear-gradient(0deg, rgba(11,10,9,.6), transparent 40%); }
.banner .wrap { position: relative; z-index: 1; }
.banner .h2 { max-width: 12ch; }
.banner .lead { margin: 1.4rem 0 2rem; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } .contact > :first-child { order: 2; } }
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--dust); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--bone); background: var(--soot); border: 1px solid rgba(239,230,216,.16);
  padding: 14px 16px; border-radius: 0; min-height: 52px; transition: border-color .3s, background .3s;
  appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ember) 50%), linear-gradient(135deg, var(--ember) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ember); background: #1b1712; }
.field [aria-invalid="true"] { border-color: var(--blood-hi); }
.field .err { color: #ff8a97; font-size: .85rem; min-height: 1.2em; }
.form-status { font-size: .95rem; color: var(--ember); min-height: 1.5em; }
.channels { display: grid; gap: 1px; background: rgba(239,230,216,.1); border: 1px solid rgba(239,230,216,.1); margin-top: 32px; }
.channel { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; background: var(--iron); text-decoration: none; transition: background .3s; }
.channel:hover { background: var(--soot); }
.channel span { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dust); font-weight: 600; }
.channel strong { font-weight: 600; word-break: break-word; }
.channel svg { width: 20px; height: 20px; color: var(--ember); flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: #070605; padding: clamp(64px, 9vw, 120px) 0 36px; position: relative; overflow: hidden; }
.site-footer__giant { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: min(calc((100vw - 2 * var(--gutter)) / 5.8), calc(var(--max) / 5.8)); line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(239,230,216,.14); white-space: nowrap; margin: 0 0 56px; letter-spacing: -.02em; user-select: none; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ember); margin: 0 0 16px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: #d9cfbf; }
.footer-grid a:hover { color: var(--ember); }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(239,230,216,.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--dust); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Utilidades ---------- */
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-3 { margin-bottom: 3rem; }
.center { text-align: center; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  body::after { animation: none; }
}

/* ---------- Sistemas (logos monocromos) ---------- */
.h2--long { font-size: clamp(2.3rem, 4.6vw, 4.6rem); text-wrap: balance; }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: .9; letter-spacing: .04em; color: var(--bone); text-align: center; }
.wordmark small { font-family: var(--f-body); font-size: .62em; font-weight: 600; letter-spacing: .2em; color: var(--dust); margin-top: .35em; }

.systems { list-style: none; margin: 0; padding: 1px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 1px; }
.sys-tile { position: relative; outline: 1px solid rgba(239,230,216,.1); background: var(--iron); padding: 26px 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; transition: background .4s var(--ease); }
.sys-tile:hover { background: var(--soot); }
.sys-tile__mark { height: 72px; width: 100%; display: grid; place-items: center; }
.sys-tile__mark img { max-height: 64px; max-width: 78%; width: auto; object-fit: contain; opacity: .88; transition: opacity .3s; }
.sys-tile:hover .sys-tile__mark img { opacity: 1; }
.sys-tile__mark--wide img { max-width: 100%; }
.sys-tile p { margin: 0; display: grid; gap: 2px; }
.sys-tile strong { font-size: .95rem; }
.sys-tile p span { font-size: .8rem; color: var(--dust); }

.mentor-card__sys { height: 44px; display: flex; align-items: center; margin-bottom: 16px; }
.mentor-card__sys img { max-height: 40px; max-width: 170px; width: auto; object-fit: contain; }
.mentor-card__sys .wordmark { font-size: 1.35rem; align-items: flex-start; text-align: left; }

.sys-strip { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; background: rgba(239,230,216,.1); border: 1px solid rgba(239,230,216,.1); }
.sys-strip li { background: var(--soot); height: 96px; display: grid; place-items: center; padding: 14px; }
.sys-strip img { max-height: 46px; max-width: 86%; width: auto; object-fit: contain; opacity: .85; }
@media (max-width: 900px) { .sys-strip { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Documento de archivo (diploma) ---------- */
.doc { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 60px); align-items: center; padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid rgba(239,230,216,.1); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc__paper { grid-column: 1 / span 7; margin: 0; position: relative; }
.doc__paper a { display: block; transform: rotate(-1.4deg); transition: transform .8s var(--ease); box-shadow: 0 40px 80px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4); }
.doc__paper a:hover, .doc__paper a:focus-visible { transform: rotate(0) scale(1.01); }
.doc__paper img { width: 100%; }
.doc__paper::before { content: ""; position: absolute; inset: 10% 6% -6%; background: radial-gradient(closest-side, rgba(232,162,74,.22), transparent); filter: blur(40px); z-index: -1; }
.doc__paper figcaption { margin-top: 22px; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dust); font-weight: 600; }
.doc__data { grid-column: 9 / span 4; }
.doc__data h2 { margin: 0 0 1.6rem; }
.doc__list { margin: 0; display: grid; gap: 14px; }
.doc__list div { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid rgba(239,230,216,.08); }
.doc__list dt { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ember); font-weight: 600; }
.doc__list dd { margin: 0; color: #d9cfbf; font-size: .98rem; line-height: 1.5; }
.doc__note { font-family: var(--f-serif); font-style: italic; font-weight: 300; font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.3; margin: 1.8rem 0 0; }
@media (max-width: 960px) { .doc__paper, .doc__data { grid-column: 1 / -1; } }

/* ---------- Mi padre: primer mentor, siempre a color ---------- */
/* Mi padre: mismo efecto blanco y negro → color, más lento y con marco dorado */
.mentor--color .mentor__img img, .mentor-card--lead .mentor__img img { transition: filter 1.6s var(--ease), transform 1.2s var(--ease); }
.mentor--color .mentor__img { outline: 1px solid rgba(232,162,74,.55); outline-offset: 4px; margin: 5px; }
.mentor-card--lead { border-color: rgba(232,162,74,.35); }
.mentor-card--lead .mentor__img { aspect-ratio: 4 / 5; }
.mentor-card--lead .mentor__img img { object-position: 50% 20%; }
.mentor-card--lead .role { color: var(--ember); }
.mentor-card__meta { margin-top: 1rem !important; font-size: .85rem !important; color: var(--dust) !important; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
@media (min-width: 700px) {
  .mentor-card--lead { grid-column: span 2; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .mentor-card--lead .mentor__img { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .mentor-card--lead .body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3vw, 40px); }
  .mentor-card--lead h3 { font-size: clamp(2.2rem, 3vw, 3rem); }
}

/* Pantallas táctiles (sin hover): la foto pasa a color al entrar en pantalla */
@media (hover: none) {
  .mentor.is-in .mentor__img img, .mentor-card.is-in .mentor__img img { filter: none; transition-delay: .35s; }
}

/* Kicker dentro del H1 del inicio (SEO: la palabra clave vive en el H1) */
.h1 > .kicker { display: flex; line-height: 1.4; margin: 0 0 1.4rem; }

/* ---------- Ficha de la clase de IA (contacto) ---------- */
.course-card { margin-top: 2rem; padding: clamp(24px, 3vw, 36px); background: var(--soot); border: 1px solid rgba(232,162,74,.35); }
.course-card .kicker { margin-bottom: 1rem; }
.course-card h2 { margin: 0 0 .8rem; }
.course-card > p { color: #d9cfbf; margin-bottom: 1.4rem; }
.course-card__facts { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(239,230,216,.1); border: 1px solid rgba(239,230,216,.1); }
.course-card__facts li { background: var(--iron); padding: 14px 16px; display: grid; gap: 2px; }
.course-card__facts strong { font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--ember); }
.course-card__facts span { font-size: .85rem; color: var(--dust); }
@media (max-width: 520px) { .course-card__facts { grid-template-columns: 1fr; } }

/* Trampa para bots del formulario (invisible para personas y lectores de pantalla) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* In memoriam (Steve Cotter, 1970–2025): moño negro sobre la foto y en el sistema IKFF */
.memoriam { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 7px; background: rgba(7, 6, 5, .78); border: 1px solid rgba(239,230,216,.28); color: var(--bone); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.memoriam__ribbon { width: 12px; height: 16px; fill: #000; stroke: var(--bone); stroke-width: 1.3; flex: none; }
.sys-tile .memoriam { left: auto; bottom: auto; top: 8px; right: 8px; padding: 4px; background: none; border: 0; }
.sys-tile .memoriam > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sys-tile .memoriam__ribbon { width: 20px; height: 27px; stroke-width: 1.1; }

/* Visor de imagen en grande (diploma) */
.zoom { border: 0; padding: 0; background: none; max-width: min(96vw, 1400px); max-height: 94vh; overflow: visible; }
.zoom::backdrop { background: rgba(7, 6, 5, .9); }
.zoom img { display: block; max-width: min(96vw, 1400px); max-height: 94vh; width: auto; height: auto; box-shadow: 0 30px 80px -20px #000; }
.zoom__close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(239,230,216,.4); background: rgba(7,6,5,.7); color: var(--bone); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.zoom__close:hover, .zoom__close:focus-visible { background: var(--blood); border-color: var(--blood); }
a[data-zoom] { cursor: zoom-in; }

/* En celular, un toque = un clic (sin esperar el doble toque para zoom) */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }

/* Portada en celular: el héroe ocupa una pantalla y avanza por escenas con video (hero-escenas.js) */
.scrub__video { display: none; }
@media (max-aspect-ratio: 1/1) {
  .scrub[data-escenas] { height: 100vh; height: 100svh; }
  .scrub[data-escenas] .scrub__video { display: block; position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
  .scrub[data-escenas] .scrub__canvas, .scrub[data-escenas] .scrub__load { display: none; }
  .scrub[data-escenas] .scrub__hint { cursor: pointer; }
}
html.escenas { overscroll-behavior-y: none; }
