/* Alphagenics · Historia de los péptidos
   Se carga después de /pa/peptidos/ficha.css (tokens, header, footer, logo, botones).
   Base 17px en la hoja clara, nada por debajo de 13px, colores de texto AA. */
:root{
  --e1:#8a5a1c; /* Descubrimiento — ámbar de archivo (5.9:1 sobre blanco) */
  --e2:#7a3b8f; /* Síntesis — ciruela (7.4:1) */
  --e3:#1d5ea8; /* Biotecnología — azul (6.4:1) */
  --e4:#0B3A9E; /* Era moderna — teal de marca (4.8:1) */
  --sepia-bg:#efe6d6;
}

/* ---------- hero ---------- */
.h-hero{position:relative;overflow:hidden;padding:calc(var(--nav-h) + 56px) 0 0;background:radial-gradient(ellipse at 20% 30%,#143488 0%,var(--deep) 45%,var(--ink) 100%)}
.h-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:clamp(2rem,5vw,4.5rem);align-items:center}
.h-kicker{display:inline-block;font-size:.95rem;font-weight:500;color:#dee2ee;margin-bottom:1.1rem}
.h-hero h1{font-size:clamp(2.6rem,6.4vw,5.2rem);line-height:.98;font-weight:700;letter-spacing:-.035em;max-width:13ch}
.h-lede{font-size:clamp(1.1rem,1.6vw,1.3rem);line-height:1.6;color:#DEE2EE;max-width:40rem;margin:1.6rem 0 1.8rem}
.h-lede b{color:#fff;font-weight:600}
.era-jump{display:flex;flex-wrap:wrap;gap:.55rem}
.era-jump a{display:inline-flex;align-items:center;gap:.55rem;padding:.5rem .95rem;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:rgba(4,12,36,.5);font-size:.92rem;color:#f3e6ea;transition:border-color .2s,background .2s}
.era-jump a:hover{border-color:var(--c);background:rgba(255,255,255,.05)}
.era-jump i{width:10px;height:10px;border-radius:50%;background:var(--c)}
.era-jump small{font-size:.85rem;color:#a9b2c9}

/* archival print */
.print{position:relative;margin:0;justify-self:center;width:min(100%,380px);background:var(--sepia-bg);padding:14px 14px 0;border-radius:4px;box-shadow:0 40px 80px -30px rgba(0,0,0,.75);rotate:2deg}
.print img{width:100%;aspect-ratio:1000/1392;object-fit:cover;filter:sepia(.45) contrast(1.05) brightness(.97)}
.print figcaption{font-size:.84rem;line-height:1.45;color:#4a3a22;padding:.75rem .2rem .9rem}
.print figcaption b{display:block;color:#2e2413;font-size:.95rem;margin-bottom:.15rem}
.print figcaption a{color:#5b4520;border-bottom:1px solid currentColor}

/* ruler: every milestone plotted on 1900–2026 */
.ruler{position:relative;margin-top:clamp(3rem,6vw,4.5rem);padding:0 0 1.4rem}
.ruler-t{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:.8rem}
.ruler-t p{font-size:.95rem;color:#b9c1d4}
.ruler-track{position:relative;height:64px;border-bottom:1px solid rgba(255,255,255,.22)}
.ruler-track .tick{position:absolute;bottom:0;width:3px;margin-left:-1.5px;border-radius:2px 2px 0 0;background:var(--c);height:var(--h,40px);opacity:.95;transition:height .3s}
.ruler-track .tick:hover{height:62px}
.ruler-track .tick::after{content:"";position:absolute;top:-5px;left:50%;width:9px;height:9px;margin-left:-4.5px;border-radius:50%;background:var(--c);box-shadow:0 0 0 3px rgba(4,12,36,.9)}
.ruler-yrs{position:relative;height:1.6rem;margin-top:.45rem}
.ruler-yrs span{position:absolute;transform:translateX(-50%);font-size:.85rem;color:#a9b2c9;font-variant-numeric:tabular-nums}
.ruler-yrs span:first-child{transform:none}
.ruler-yrs span:last-child{transform:translateX(-100%)}

/* stats */
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid rgba(255,255,255,.1);margin-top:1rem}
.stat{padding:1.8rem 1.4rem 2.2rem 0}
.stat+.stat{padding-left:1.6rem;border-left:1px solid rgba(255,255,255,.1)}
.stat b{display:block;font-size:clamp(2.4rem,4.6vw,3.6rem);line-height:1;font-weight:700;letter-spacing:-.03em;color:var(--teal);font-variant-numeric:tabular-nums}
.stat span{display:block;font-size:1rem;line-height:1.5;color:#DEE2EE;margin-top:.55rem;max-width:26ch}
.stat a{display:inline-block;margin-top:.45rem;font-size:.85rem;color:#a9b2c9;border-bottom:1px solid currentColor}
.stat a:hover{color:var(--teal)}

@media (max-width:900px){
  .h-grid{grid-template-columns:1fr}
  .print{width:min(100%,300px);rotate:1.5deg}
}
@media (max-width:640px){
  .h-hero{padding-top:calc(var(--nav-h) + 32px)}
  .stats{grid-template-columns:1fr}
  .stat,.stat+.stat{padding:1.3rem 0;border-left:0}
  .stat+.stat{border-top:1px solid rgba(255,255,255,.1)}
  .ruler-t{flex-direction:column;gap:.2rem}
  .ruler-track{height:52px}
}

/* ---------- light sheet ---------- */
.paper{background:var(--paper);color:var(--text);font-size:1.0625rem}
.sec{padding:clamp(64px,9vw,112px) 0}
.sec+.sec{border-top:1px solid #e9dde3}
.sec-h{font-size:clamp(1.9rem,3.4vw,2.7rem);line-height:1.1;font-weight:700;letter-spacing:-.025em;color:var(--deep);max-width:22ch}
.sec-lede{font-size:1.2rem;line-height:1.6;color:var(--body);max-width:62ch;margin-top:1rem}

/* por qué */
.why{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(2rem,5vw,5rem);align-items:start}
.why-list{list-style:none;display:grid;gap:1.1rem}
.why-list li{background:#fff;border:1px solid #ebdce0;border-radius:14px;padding:1.2rem 1.35rem}
.why-list b{display:block;font-size:1.15rem;color:var(--deep);margin-bottom:.3rem}
.why-list p{color:var(--body);line-height:1.65}
.why-list .src{margin-top:.5rem}
@media (max-width:900px){.why{grid-template-columns:1fr}}

/* ---------- timeline ---------- */
.tl-intro{margin-bottom:clamp(2.5rem,5vw,4rem)}
.era{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.5fr);gap:clamp(1.5rem,5vw,4.5rem);align-items:start;padding:clamp(2.5rem,5vw,4rem) 0;border-top:1px solid #d6dae5;scroll-margin-top:calc(var(--nav-h) + 8px)}
.era-head{position:sticky;top:calc(var(--nav-h) + 28px)}
.era-yrs{display:inline-flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;color:var(--c);font-variant-numeric:tabular-nums}
.era-yrs::before{content:"";width:28px;height:4px;border-radius:2px;background:var(--c)}
.era-head h2{font-size:clamp(1.6rem,2.3vw,2.3rem);line-height:1.05;letter-spacing:-.03em;color:var(--deep);margin:.35rem 0 .8rem}
.era-head p{color:var(--body);line-height:1.65;max-width:36ch}
.era-fig{margin:1.5rem 0 0;max-width:300px}
.era-fig img,.ms-fig img,.duo img{filter:sepia(.4) contrast(1.04);background:var(--sepia-bg)}
.era-fig img{border-radius:6px;box-shadow:0 24px 44px -28px rgba(4,12,36,.6)}
.cap{font-size:.84rem;line-height:1.5;color:var(--muted);margin-top:.55rem}
.cap a{color:var(--teal-3);border-bottom:1px solid currentColor}
@media (max-width:900px){
  .era{grid-template-columns:1fr}
  .era-head{position:static}
  .era-fig{max-width:240px}
}

/* the backbone: each milestone is a residue on a chain */
.chain{list-style:none;position:relative;padding-left:2.4rem}
.chain::before{content:"";position:absolute;left:9px;top:.6rem;bottom:.6rem;width:3px;border-radius:2px;background:color-mix(in srgb,var(--c) 22%,#ede3e5)}
.chain::after{content:"";position:absolute;left:9px;top:.6rem;width:3px;border-radius:2px;background:var(--c);height:calc((100% - 1.2rem) * var(--p,1));transition:height .15s linear}
.ms{position:relative;padding:0 0 2.1rem}
.ms:last-child{padding-bottom:0}
.ms::before{content:"";position:absolute;left:calc(-2.4rem + 1px);top:.35rem;width:19px;height:19px;border-radius:50%;background:#fff;border:3px solid var(--c);box-sizing:border-box;z-index:1}
.ms.key::before{background:var(--c)}
.ms-y{font-size:clamp(1.6rem,2.6vw,2.1rem);line-height:1.05;font-weight:700;letter-spacing:-.03em;color:var(--c);font-variant-numeric:tabular-nums}
.ms-y small{font-size:.95rem;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:.5rem}
.ms h3{font-size:1.25rem;line-height:1.3;color:var(--deep);margin:.35rem 0 .45rem;letter-spacing:-.01em}
.ms p{color:var(--body);line-height:1.7;max-width:62ch}
.ms-links{display:flex;flex-wrap:wrap;gap:.35rem 1.1rem;margin-top:.6rem}
.src{display:inline-block;font-size:.875rem;color:var(--teal-3);border-bottom:1px solid rgba(34, 80, 181,.35)}
.src:hover{color:var(--c,var(--teal-3));border-bottom-color:currentColor}
.to-cat{font-size:.875rem;font-weight:600;color:var(--deep);border-bottom:2px solid var(--c)}
.ms-fig{margin:1rem 0 0;max-width:260px}
.ms-fig img{border-radius:6px}
.duo{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin-top:1rem;max-width:380px}
.duo figure{margin:0}
.duo img{border-radius:6px;aspect-ratio:4/5;object-fit:cover;object-position:top}
.duo .cap{margin-top:.4rem}

/* ---------- de la glándula al laboratorio ---------- */
.lab{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:clamp(2rem,5vw,4.5rem);align-items:start;margin-top:2.5rem}
.steps{list-style:none;counter-reset:s;display:grid;gap:1rem}
.step{counter-increment:s;display:grid;grid-template-columns:3.2rem 1fr;gap:1rem;background:#fff;border:1px solid #ebdce0;border-radius:16px;padding:1.3rem 1.4rem}
.step::before{content:counter(s);display:grid;place-items:center;width:3.2rem;height:3.2rem;border-radius:50%;font-weight:700;font-size:1.25rem;color:#fff;background:var(--c)}
.step h3{font-size:1.2rem;color:var(--deep);line-height:1.3}
.step .when{display:block;font-size:.92rem;font-weight:600;color:var(--c);margin:.15rem 0 .4rem}
.step p{color:var(--body);line-height:1.65}
.lab-figs{display:grid;gap:1.4rem;position:sticky;top:calc(var(--nav-h) + 28px)}
.lab-figs figure{margin:0}
.lab-figs img{border-radius:8px;filter:sepia(.4) contrast(1.04);background:var(--sepia-bg);box-shadow:0 24px 44px -30px rgba(4,12,36,.6)}
@media (max-width:900px){.lab{grid-template-columns:1fr}.lab-figs{position:static;grid-template-columns:1fr 1fr}}
@media (max-width:520px){.lab-figs{grid-template-columns:1fr}.step{grid-template-columns:1fr;gap:.6rem}.step::before{width:2.6rem;height:2.6rem;font-size:1.1rem}}

/* ---------- nobel ---------- */
.nobel{background:linear-gradient(180deg,var(--paper),#e7f0f0)}
.nb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(330px,100%),1fr));gap:1.2rem;margin-top:2.4rem}
.nb{background:#fff;border:1px solid #ebdce0;border-top:5px solid var(--c);border-radius:6px 6px 16px 16px;padding:1.4rem 1.4rem 1.3rem;display:flex;flex-direction:column}
.nb-y{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}
.nb-y b{font-size:2.4rem;line-height:1;font-weight:700;letter-spacing:-.03em;color:var(--deep);font-variant-numeric:tabular-nums}
.nb-y span{font-size:.9rem;font-weight:600;color:var(--c);text-align:right}
.nb-who{display:flex;align-items:center;gap:.8rem;margin:1.1rem 0 .8rem;min-height:56px}
.faces{display:flex;flex:none}
.faces img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:top;border:3px solid #fff;filter:sepia(.35) grayscale(.2);background:var(--sepia-bg)}
.faces img+img{margin-left:-14px}
.nb-who p{font-size:1.05rem;font-weight:600;line-height:1.4;color:var(--deep)}
.nb q{display:block;font-size:1rem;line-height:1.6;color:var(--body);quotes:"«" "»"}
.nb .src{margin-top:auto;padding-top:.9rem;align-self:flex-start;border-bottom:0;text-decoration:underline;text-underline-offset:3px}
.nb-note{font-size:.95rem;line-height:1.6;color:var(--muted);max-width:75ch;margin-top:1.6rem}
.also{margin-top:1.6rem;background:#fff;border:1px dashed #b9c1d3;border-radius:14px;padding:1.1rem 1.3rem;max-width:760px}
.also b{color:var(--deep)}
.also p{color:var(--body);line-height:1.6}

/* ---------- fuentes ---------- */
.refs{columns:2 420px;column-gap:3rem;margin-top:1.6rem;padding-left:1.4rem}
.refs li{break-inside:avoid;font-size:.95rem;line-height:1.55;color:var(--body);margin-bottom:.7rem}
.refs a{color:var(--teal-3);border-bottom:1px solid rgba(34, 80, 181,.35);overflow-wrap:anywhere}
.refs a:hover{border-bottom-color:currentColor}
.credits{margin-top:2.4rem;font-size:.9rem;line-height:1.6;color:var(--muted);max-width:85ch}

/* ---------- motion ---------- */
.rv{opacity:0;transform:translateY(22px);transition:opacity .7s ease,transform .9s cubic-bezier(.16,1,.3,1)}
.rv.in{opacity:1;transform:none}
.h-rise{animation:rise .9s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--d,0) * 90ms)}
@keyframes rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
.ruler-track .tick{animation:grow .7s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(400ms + var(--i,0) * 28ms);transform-origin:bottom}
@keyframes grow{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@media (prefers-reduced-motion:reduce){
  .rv{opacity:1;transform:none;transition:none}
  .h-rise,.ruler-track .tick{animation:none}
  .chain::after{transition:none}
}

.nb-group{font-size:1.35rem;font-weight:700;letter-spacing:-.01em;color:var(--deep);margin:2.2rem 0 0}
.nb-grid+.nb-note+.nb-group{margin-top:3rem}
.nb-why{font-size:.95rem;line-height:1.6;color:var(--body);margin-top:.8rem;padding-top:.8rem;border-top:1px dashed #d3d7e3}
.nb-why strong{color:var(--deep)}

/* ===== color + motion pass (2026-09-26) ===== */
/* hero: slow drifting era-colored glows behind the headline */
.h-hero::before,.h-hero::after{content:"";position:absolute;border-radius:50%;filter:blur(70px);pointer-events:none;z-index:0;opacity:.55}
.h-hero::before{width:46vw;height:46vw;left:-10vw;top:8%;background:radial-gradient(circle,rgba(216,164,92,.45),transparent 65%);animation:drift1 22s ease-in-out infinite alternate}
.h-hero::after{width:40vw;height:40vw;right:-8vw;top:28%;background:radial-gradient(circle,rgba(196,138,214,.38),rgba(255,107,125,.22) 45%,transparent 70%);animation:drift2 26s ease-in-out infinite alternate}
.h-hero>*{position:relative;z-index:1}
@keyframes drift1{to{transform:translate(12vw,6vh) scale(1.15)}}
@keyframes drift2{to{transform:translate(-10vw,-8vh) scale(.9)}}
.h-hero h1{background:linear-gradient(100deg,#fff 0%,#fff 55%,#dbe0ee 75%,#f1d4a3 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:sheen 9s ease-in-out infinite alternate}
@keyframes sheen{from{background-position:100% 0}to{background-position:0 0}}

/* eras: each section gets a light tint of its era color */
#era-1{background:linear-gradient(180deg,#fbf5ec,rgba(251,245,236,0))}
#era-2{background:linear-gradient(180deg,#f8f0fb,rgba(248,240,251,0))}
#era-3{background:linear-gradient(180deg,#eef4fc,rgba(238,244,252,0))}
#era-4{background:linear-gradient(180deg,#f8f3f7,rgba(248, 243, 247,0))}
.era{border-radius:24px;padding-inline:clamp(1rem,3vw,2rem)}
.era-head h2{background:linear-gradient(90deg,var(--deep),var(--c));-webkit-background-clip:text;background-clip:text;color:transparent}

/* Nobel: warmer, more colorful section */
.nobel{background:radial-gradient(ellipse at 10% 0%,rgba(201,162,39,.12),transparent 45%),radial-gradient(ellipse at 95% 60%,rgba(255,107,125,.12),transparent 50%),linear-gradient(180deg,var(--paper),#e7f0f0)}
.nb-group{display:flex;align-items:center;gap:.7rem}
.nb-group::before{content:"";width:34px;height:34px;flex:none;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3c4,#d9ae3c 45%,#8a6a12 100%);box-shadow:0 4px 12px -4px rgba(138,106,18,.7)}
.nb{position:relative;overflow:hidden;transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s;box-shadow:0 18px 40px -34px rgba(4,12,36,.6)}
.nb::after{content:"";position:absolute;inset:0 0 auto 0;height:90px;background:linear-gradient(180deg,color-mix(in srgb,var(--c) 10%,transparent),transparent);pointer-events:none}
.nb>*{position:relative;z-index:1}
.nb:hover{transform:translateY(-6px);box-shadow:0 30px 50px -30px color-mix(in srgb,var(--c) 70%,#000)}
.nb.rv{transition-delay:calc(var(--i,0) * 70ms)}
.nb-y{align-items:center}
.medal{width:26px;height:26px;flex:none;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3c4,#d9ae3c 45%,#8a6a12 100%);box-shadow:inset 0 0 0 2px rgba(255,255,255,.35),0 3px 8px -3px rgba(138,106,18,.8);margin-right:.2rem}
.nb-y b{flex:1}

/* portraits: vintage by default, full color on hover */
.faces img,.faces .ini{width:64px;height:64px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 2px var(--c),0 8px 18px -10px rgba(4,12,36,.6);background:var(--sepia-bg)}
.faces img{object-fit:cover;object-position:center 30%;filter:sepia(.6) contrast(1.05) brightness(.98);transition:filter .45s,transform .35s}
.faces img+img,.faces img+.ini,.faces .ini+.ini{margin-left:-12px}
.nb:hover .faces img{filter:none}
.faces img:hover{transform:scale(1.12) translateY(-2px);position:relative;z-index:2}
.faces .ini{display:grid;place-items:center;font-size:.95rem;font-weight:700;color:#5b4520;letter-spacing:.02em}
.nb-who{min-height:64px}
@media (max-width:480px){.faces img,.faces .ini{width:52px;height:52px}}

@media (prefers-reduced-motion:reduce){
  .h-hero::before,.h-hero::after,.h-hero h1{animation:none}
  .nb,.faces img{transition:none}
  .nb:hover,.faces img:hover{transform:none}
}

