/* anselmabenitez.com — hoja de estilos
   Identidad compartida con el CV: lino, azul empolvado y ocre; Newsreader + Hanken Grotesk.
   La jornada del aula (panel de rutinas con pictogramas) es el eje visual. */

:root {
  /* Neutros cálidos (nunca blanco ni negro puros) */
  --paper:      oklch(0.988 0.005 245);
  --lino:       oklch(0.962 0.013 80);
  --lino-deep:  oklch(0.928 0.02 78);
  --rule:       oklch(0.88 0.018 75);
  --ink:        oklch(0.26 0.008 60);
  --text:       oklch(0.35 0.01 60);
  --muted:      oklch(0.49 0.012 60);

  /* Acentos */
  --blue:       oklch(0.47 0.06 245);
  --blue-deep:  oklch(0.36 0.055 248);
  --blue-ink:   oklch(0.3 0.05 250);
  --on-blue:    oklch(0.96 0.012 85);
  --on-blue-2:  oklch(0.84 0.03 230);
  --ochre:      oklch(0.66 0.11 72);
  --ochre-ink:  oklch(0.49 0.1 62);
  --ochre-soft: oklch(0.82 0.09 80);

  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  text-wrap: pretty;
  font-variant-numeric: tabular-nums;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 450; text-wrap: balance; }

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

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px;
}
.skip:focus { left: 12px; color: var(--paper); }

.hand { font-family: var(--hand); font-weight: 400; color: var(--ochre-ink); line-height: 1.25; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--lino);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; padding: 8px 0;
}
.brand:hover { color: var(--ink); }
.brand { opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility .35s; }
.site-header.show-brand .brand { opacity: 1; visibility: visible; transform: none; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav ul { list-style: none; display: flex; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav ul a { position: relative; }
.nav ul a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; border-radius: 2px;
  background: var(--ochre); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav ul a:hover { color: var(--ink); }
.nav ul a:hover::after, .nav ul a.is-active::after { transform: scaleX(1); }
.nav ul a.is-active { color: var(--ink); }
.nav .lang-link { margin-left: 8px; color: var(--blue-deep); }
.nav .lang-link span { border-bottom: 1px solid currentColor; }

.menu-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; margin: auto; }

@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--lino); border-bottom: 1px solid var(--rule);
    padding: 4px var(--gutter) 16px;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 0; min-height: 52px; font-size: 18px; border-bottom: 1px solid var(--rule); }
  .nav ul a::after { display: none; }
  .nav .lang-link { margin-left: 0; border-bottom: 0; }
}

/* ---------- Portada ---------- */
.hero { background: var(--lino); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: end;
  padding-top: clamp(28px, 5vw, 64px);
}
.hero-text { padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(46px, 7.2vw, 92px); line-height: 0.98; letter-spacing: -0.025em;
}
.hero .role { margin-top: 22px; font-size: 18px; font-weight: 600; color: var(--blue-deep); }
.hero .role { display: flex; flex-wrap: wrap; row-gap: 2px; }
.hero .role span { white-space: nowrap; }
.hero .role span + span::before { content: "·"; margin: 0 .5em; color: var(--ochre); }
.hero .lead {
  margin-top: 18px; max-width: 30ch;
  font-family: var(--serif); font-size: clamp(21px, 2.3vw, 25px); line-height: 1.42; color: var(--text);
}
.hero .proof {
  display: block; margin-top: 26px; max-width: 34ch;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--ochre); text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.hero .proof svg { display: inline-block; vertical-align: -3px; margin-left: 6px; }
.hero .proof:hover { color: var(--ochre-ink); }
.hero .proof svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.hero .proof:hover svg { transform: translateX(4px); }

.actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--paper); }
.btn:not(.btn-primary):hover { background: var(--paper); color: var(--ink); }

.hero-photo { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-photo .frame {
  flex: 1 1 auto; min-height: 540px; max-height: 720px;
  border-radius: 18px 18px 0 0; overflow: hidden; background: var(--lino-deep);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; padding-left: 0; padding-right: 0; }
  .hero-photo { order: -1; }
  .hero-photo .frame { min-height: 0; max-height: none; aspect-ratio: 4 / 4.4; border-radius: 0; }
      .hero-text { padding: 36px var(--gutter) 56px; }
}

/* Sello del 10 */
.seal svg { width: 100%; height: 100%; overflow: visible; color: var(--ochre-ink); }
.seal .disc { fill: var(--paper); }
.seal .ring-text { font-family: var(--sans); font-weight: 600; font-size: 7.4px; fill: currentColor; }
.seal .num { font-family: var(--serif); font-weight: 500; font-size: 33px; fill: currentColor; }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section h2 {
  font-family: var(--serif); font-weight: 430;
  font-size: clamp(34px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -0.018em;
}

/* Sobre mí */
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(36px, 6vw, 96px); }
.about h2 { max-width: 15ch; }
.about .prose { margin-top: 32px; max-width: 62ch; }
.about .prose p + p { margin-top: 1em; }
.about .prose .first { font-family: var(--serif); font-size: 23px; line-height: 1.45; color: var(--ink); }
.about aside { padding-top: 10px; }
.about aside h3 {
  font-size: 16px; font-weight: 700; color: var(--ink);
  padding-bottom: 10px; border-bottom: 1.5px solid var(--ink);
}
.about aside h3 + * { margin-top: 14px; }
.about aside * + h3 { margin-top: 40px; }
.skills { list-style: none; display: grid; gap: 10px; }
.skills li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; line-height: 1.45; }
.skills svg { width: 16px; height: 16px; margin-top: 4px; color: var(--ochre-ink); }
.langs { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.langs dt { font-weight: 600; color: var(--ink); }
.langs dd { color: var(--muted); }

@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* Proyecto: presentación */
.project-intro { background: var(--lino); }
.project-intro .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px); align-items: center;
}
.project-intro .label { font-weight: 600; color: var(--ochre-ink); }
.project-intro h2 { margin-top: 10px; }
.project-intro .story { margin-top: 26px; max-width: 58ch; font-size: 18px; }
.project-intro .story p + p { margin-top: 1em; }
.project-intro .story strong { color: var(--ink); font-weight: 600; }


.project-head { display: flex; align-items: center; gap: 22px; }
.project-head .seal { flex: none; width: 104px; height: 104px; }
.project-head h2 { margin-top: 4px; }
.project-intro .btn { margin-top: 30px; }

.classroom { position: relative; margin: 0; }
.classroom > img { width: 100%; height: auto; border-radius: 14px; }
.pepo-badge { position: absolute; left: -28px; bottom: 64px; width: 128px; text-align: center; }
.pepo-badge img {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  border: 5px solid var(--lino); box-shadow: 0 10px 22px oklch(0.3 0.03 60 / 0.18);
}
.pepo-badge .hand { display: block; margin-top: 2px; font-size: 24px; transform: rotate(-4deg); }
.classroom figcaption { margin-top: 14px; padding-left: 112px; font-size: 15px; color: var(--muted); }
.classroom figcaption span { display: block; color: var(--text); }

@media (max-width: 860px) {
  .project-intro .wrap { grid-template-columns: minmax(0, 1fr); }
  .project-head { gap: 16px; }
  .project-head .seal { width: 84px; height: 84px; }
  .pepo-badge { left: 12px; bottom: auto; top: calc(100% - 80px); width: 104px; }
  .pepo-badge img { width: 104px; height: 104px; }
  .classroom figcaption { padding-left: 128px; min-height: 96px; }
}

/* Un día en el aula: el panel de rutinas */
.day { background: var(--blue-deep); color: var(--on-blue); }
.day h2 { color: var(--on-blue); max-width: 18ch; }
.day .intro { margin-top: 18px; max-width: 56ch; color: var(--on-blue-2); font-size: 18px; }
.day a { color: var(--on-blue); }
.day a:hover { color: var(--ochre-soft); }
.day :focus-visible { outline-color: var(--ochre-soft); }

.rail {
  list-style: none; margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0;
  position: relative;
}
.rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 59px; height: 0;
  border-top: 2px dashed var(--on-blue-2); opacity: .55;
}
.rail li { position: relative; padding: 0 14px 0 0; }
.rail time { display: block; font-size: 15px; font-weight: 600; color: var(--ochre-soft); letter-spacing: 0.02em; }
.rail .picto {
  width: 52px; height: 52px; margin: 10px 0 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue-deep);
  border: 2px solid var(--on-blue-2); color: var(--on-blue); position: relative; z-index: 1;
}
.rail .picto svg { width: 28px; height: 28px; }
.rail .moment { margin-top: 16px; font-size: 15px; font-weight: 600; color: var(--on-blue-2); }
.rail .phrase {
  margin-top: 4px; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.25; color: var(--on-blue);
}
.rail .phrase a { text-decoration-color: var(--ochre-soft); }

@media (max-width: 980px) {
  .rail { grid-template-columns: 1fr; gap: 26px; }
  .rail::before {
    left: 25px; right: auto; top: 30px; bottom: 30px; width: 0; height: auto;
    border-top: 0; border-left: 2px dashed var(--on-blue-2);
  }
  .rail li { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; padding: 0; }
  .rail .picto { grid-row: 1 / span 3; margin: 0; }
  .rail time, .rail .moment, .rail .phrase { grid-column: 2; }
  .rail .moment { margin-top: 0; }
}

/* Trayectoria */
.path .wrap > h2 { margin-bottom: clamp(32px, 5vw, 56px); }
.path-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); }
.path h3 { font-size: 16px; font-weight: 700; color: var(--ink); padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); margin-bottom: 26px; }
.timeline { list-style: none; display: grid; gap: 28px; }
.timeline > li { display: grid; grid-template-columns: 5.4em 1fr; gap: 18px; }
.timeline .when { font-size: 15px; font-weight: 600; color: var(--blue); padding-top: 3px; }
.timeline h4 { font-size: 19px; font-weight: 650; line-height: 1.35; }
.timeline li.quiet h4 { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--text); }
.timeline .where { font-size: 15px; color: var(--muted); }
.timeline .where b { color: var(--text); font-weight: 600; }
.timeline ul { list-style: none; margin-top: 8px; display: grid; gap: 5px; font-size: 16px; }
.timeline ul li { position: relative; padding-left: 16px; }
.timeline ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1.5px; background: var(--ochre); }

@media (max-width: 860px) {
  .path-grid { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: 2px; }
}

/* Contacto */
.contact { background: var(--lino-deep); }
.contact h2 { max-width: 22ch; }
.contact .actions { margin-top: 30px; }
.contact .facts { margin-top: 22px; color: var(--muted); }

.site-footer { background: var(--lino-deep); border-top: 1px solid var(--rule); }
.site-footer .wrap {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 15px; color: var(--muted);
}

/* Entrada de la portada */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: reveal .9s var(--ease-out) forwards; }
  .reveal.d1 { animation-delay: .08s; }
  .reveal.d2 { animation-delay: .18s; }
  .reveal.d3 { animation-delay: .28s; }
  .reveal.d4 { animation-delay: .38s; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.notfound { min-height: 100vh; display: grid; place-items: center; background: var(--lino); }
.notfound .wrap { text-align: center; }
.notfound img { margin: 0 auto 24px; }
.notfound h1 { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); }
.notfound p { margin-top: 8px; color: var(--muted); }
.notfound .actions { justify-content: center; }
.hero-photo picture { display: block; height: 100%; }
@media (max-width: 520px) {
  .hero .role { flex-direction: column; row-gap: 0; }
  .hero .role span + span::before { content: none; }
}
.notfound .pepo-404 { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
