/* Nosotros: the institute's story told on scroll. Hero with the logo's three bars,
   counting stats, who we are, a timeline whose rail fills as you read, values,
   and the Marca País seal with the LSQA certificate. Uses tokens from styles.css. */

.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.page-nosotros .eyebrow { display: block; }
.page-nosotros .section-head .eyebrow { font-size: var(--step--1); color: var(--accent); line-height: 1.4; }

/* Hero */
.about-hero { position: relative; overflow: hidden; padding-block: clamp(64px, 11vw, 140px) clamp(56px, 8vw, 104px); }
.about-hero-inner { position: relative; z-index: 1; }
.about-hero h1 { font-size: clamp(3rem, 1.6rem + 7vw, 7rem); margin-top: 18px; max-width: 10ch; line-height: .98; }
.about-hero h1 em { font-style: italic; color: var(--accent); }
.about-hero .hero-lead { margin-top: 28px; max-width: 44ch; }
.about-pills { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.about-pills li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 0.92rem; font-weight: 500; }
.about-pills li.is-hi { background: var(--brand); border-color: var(--brand); color: var(--on-accent); }
.about-bars {
  position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 0;
  display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 26px); height: 78%; pointer-events: none;
}
.about-bars i {
  width: clamp(40px, 6vw, 92px); border-radius: 999px 999px 0 0; transform: skewX(-14deg); transform-origin: bottom;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, transparent), color-mix(in srgb, var(--accent) 22%, transparent));
  animation: grow 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.about-bars i:nth-child(1) { height: 42%; animation-delay: .1s; }
.about-bars i:nth-child(2) { height: 68%; animation-delay: .25s; }
.about-bars i:nth-child(3) { height: 96%; animation-delay: .4s; }
@keyframes grow { from { transform: skewX(-14deg) scaleY(0); } }
@media (max-width: 760px) { .about-bars { opacity: .5; height: 48%; } }

/* Stats */
.stats { background: var(--deep); color: var(--on-deep); }
.stat-row { list-style: none; margin: 0; padding: clamp(28px, 4vw, 44px) 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.stat-row li { display: grid; gap: 6px; padding-left: 18px; border-left: 1px solid color-mix(in srgb, var(--on-deep) 18%, transparent); }
.stat-row strong { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem); letter-spacing: -0.03em; line-height: 1; color: var(--on-deep-accent); font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 0.92rem; color: color-mix(in srgb, var(--on-deep) 75%, transparent); }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-row li:last-child { grid-column: 1 / -1; } }

/* Who */
.who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(40px, 7vw, 96px); padding-block: clamp(64px, 10vw, 128px); align-items: start; }
.who-intro { position: sticky; top: 110px; }
.who-quote { font-size: var(--step-3); margin-top: 16px; line-height: 1.08; }
.who-quote em { font-style: italic; color: var(--accent); }
.who-note { margin-top: 24px; color: var(--muted); line-height: 1.55; max-width: 42ch; }
.who-note strong { color: var(--ink); }
.who-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.who-list li { display: flex; gap: 18px; padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.who-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--sky); color: var(--accent); }
.who-ico svg { width: 24px; height: 24px; }
.who-list h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
.who-list p { color: var(--muted); margin-top: 8px; line-height: 1.55; }
@media (max-width: 860px) { .who { grid-template-columns: minmax(0, 1fr); } .who-intro { position: static; } }

/* Timeline */
.timeline-sec { padding-block: clamp(56px, 8vw, 104px); background: color-mix(in srgb, var(--sky) 55%, var(--bg)); border-block: 1px solid var(--line); }
.timeline { position: relative; max-width: 760px; }
.tl-rail { position: absolute; left: 28px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--line); }
.tl-fill { position: absolute; inset: 0 0 auto 0; height: 0; border-radius: inherit; background: linear-gradient(180deg, var(--accent), var(--teal)); }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(28px, 4vw, 44px); }
.tl-item { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: start; opacity: .38; transition: opacity .4s; }
.tl-item.on { opacity: 1; }
.tl-year {
  position: relative; justify-self: start; font-family: var(--f-data); font-weight: 500; font-size: 0.9rem; color: var(--accent);
  padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); transition: border-color .4s;
}
.tl-item.on .tl-year { border-color: var(--accent); }
.tl-item h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.tl-item p { color: var(--muted); margin-top: 8px; line-height: 1.55; max-width: 48ch; }

/* Values */
.values { padding-block: clamp(64px, 10vw, 128px) clamp(48px, 7vw, 88px); }
.val-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.val-grid li { padding: 26px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; transition: transform .3s, box-shadow .3s; }
.val-grid li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.val-n { font-family: var(--f-data); font-size: 0.85rem; color: var(--accent); }
.val-grid h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
.val-grid p { color: var(--muted); line-height: 1.5; }

/* Marca País */
.mp { background: var(--deep); color: var(--on-deep); padding-block: clamp(64px, 10vw, 128px); }
.mp-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px clamp(40px, 6vw, 88px); align-items: center; }
.mp .eyebrow { color: var(--on-deep-accent); }
.mp h2 { font-size: var(--step-3); margin-top: 14px; }
.mp h2 em { font-style: italic; color: var(--on-deep-accent); }
.mp-text > p { margin-top: 18px; color: color-mix(in srgb, var(--on-deep) 80%, transparent); line-height: 1.6; max-width: 54ch; }
.mp-text strong { color: var(--on-deep); }
.mp-values { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-values li { padding: 6px 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--on-deep) 28%, transparent); font-size: 0.9rem; }
.mp-media img { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
@media (max-width: 900px) { .mp-inner { grid-template-columns: minmax(0, 1fr); } .mp-media { max-width: 460px; } }

/* Certificate, shown large */
.cert { padding-block: clamp(64px, 9vw, 112px) clamp(32px, 5vw, 56px); display: grid; gap: 32px; justify-items: center; text-align: center; }
.cert-head { display: grid; gap: 12px; justify-items: center; }
.cert-head h2 { font-size: var(--step-3); }
.cert-head p:not(.eyebrow) { color: var(--muted); font-family: var(--f-data); font-size: 0.9rem; }
.cert-frame {
  position: relative; width: min(100%, 1040px); padding: clamp(10px, 1.6vw, 18px); border-radius: 20px; cursor: zoom-in;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 50px 90px -50px rgba(16, 42, 67, .45); transition: transform .35s;
}
.cert-frame:hover { transform: translateY(-4px); }
.cert-frame img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.cert-zoom {
  position: absolute; right: 26px; bottom: 26px; padding: 7px 13px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--brand); color: var(--on-accent); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.cert-frame:hover .cert-zoom, .cert-frame:focus-visible .cert-zoom { opacity: 1; transform: none; }

/* Gallery */
.gallery { padding-block: clamp(32px, 5vw, 56px) clamp(64px, 9vw, 112px); }
.gal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 17vw, 230px); gap: 14px; }
.gal-grid li { min-width: 0; }
.gal-grid .g-wide { grid-column: span 2; }
.gal-grid .g-tall { grid-row: span 2; }
.gal-grid button { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--sky); }
.gal-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gal-grid button:hover img { transform: scale(1.04); }
.gal-grid span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; text-align: left; color: #fff; font-size: 0.86rem; font-weight: 500; line-height: 1.3;
  background: linear-gradient(transparent, rgba(8, 21, 33, .78));
}
@media (max-width: 760px) {
  .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
  .gal-grid .g-wide { grid-column: 1 / -1; }
}

/* CTA */
.about-cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; padding-block: clamp(56px, 8vw, 96px); }
.about-cta h2 { font-size: var(--step-3); margin-top: 12px; }
.about-cta p:not(.eyebrow) { color: var(--muted); margin-top: 12px; max-width: 46ch; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .about-bars i { animation: none; }
  .tl-item { opacity: 1; }
}

/* En pantallas táctiles no hay hover: mostrar siempre el aviso de que se puede ampliar */
@media (hover: none) { .cert-zoom { opacity: 1; transform: none; } }

/* Números centrados */
.stat-row li { justify-items: center; text-align: center; padding-left: 0; }
/* Galería con 3 fotos: la ancha ocupa dos filas */
.gal-grid .g-big { grid-row: span 2; }
@media (max-width: 760px) { .gal-grid .g-big { grid-row: auto; } }
