/* ==========================================================
   Axel · Web personal
   Para cambiar colores o tipografías, edita solo :root.
   ========================================================== */

:root {
  --orange: #FF5B14;
  --orange-deep: #D9450A;     /* naranja para texto pequeño sobre claro (mejor contraste) */
  --ink: #151413;
  --paper: #F7F5F2;
  --paper-2: #EDE9E3;
  --muted: #6B6660;
  --line: rgba(21, 20, 19, .14);
  --line-dark: rgba(247, 245, 242, .16);

  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(80px, 12vw, 160px);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: .98; letter-spacing: -.03em; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--orange); color: var(--ink); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 16px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.hl { color: var(--orange); }

/* Textos pendientes de rellenar: bórralos o sustitúyelos */
.editar { color: var(--orange-deep); }
.section--dark .editar { color: var(--orange); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 242, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, transform .45s cubic-bezier(.2, .7, .2, 1);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { font: 800 28px/1 var(--font-display); letter-spacing: -.04em; text-decoration: none; }
.logo__dot { color: var(--orange); }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:not(.nav__cta):hover { color: var(--orange-deep); }
.nav__cta { padding: 10px 18px; background: var(--ink); color: var(--paper); transition: background-color .2s, color .2s; }
.nav__cta:hover { background: var(--orange); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 5vw, 72px) clamp(64px, 8vw, 112px); }
.hero__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero__title { font-size: clamp(48px, 7vw, 104px); margin-bottom: 28px; }
.hero__lead { max-width: 34em; font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); margin-bottom: 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__photo {
  position: relative; margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  box-shadow: 16px 16px 0 var(--orange);
}
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; z-index: 1; }
.hero__photo-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font: 600 18px/1.4 var(--font-display); color: var(--muted);
}
.hero__photo-placeholder small { font: 400 13px var(--font-body); }

/* ---------- Franja ---------- */
.ticker { background: var(--orange); color: var(--ink); overflow: hidden; border-block: 1.5px solid var(--ink); }
.ticker__track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker span {
  padding: 18px 28px;
  font: 800 clamp(22px, 3vw, 40px)/1 var(--font-display);
  letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
}
.ticker span::after { content: "✦"; margin-left: 56px; font-size: .6em; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section--tight { padding-top: 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .eyebrow { color: rgba(247, 245, 242, .55); }
.section__title { font-size: clamp(36px, 5.2vw, 76px); }
.section__head { margin-bottom: clamp(48px, 7vw, 96px); }
.section__head .section__title { max-width: 12em; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.section__aside { max-width: 22em; color: var(--muted); }
.section--dark .section__aside { color: rgba(247, 245, 242, .7); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.prose { display: grid; gap: 20px; font-size: clamp(17px, 1.3vw, 20px); padding-top: 44px; }

/* Enfoque */
.focus { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1.5px solid var(--ink); }
.focus__item { padding: 28px 28px 0 0; }
.focus__item + .focus__item { padding-left: 28px; border-left: 1px solid var(--line); }
.focus__num { display: block; font: 800 15px var(--font-display); color: var(--orange-deep); margin-bottom: 48px; }
.focus h3 { font-size: clamp(22px, 2vw, 28px); margin-bottom: 14px; letter-spacing: -.02em; }
.focus p { color: var(--muted); font-size: 16px; }

/* Frase personal (Sobre mí) */
.prose__quote {
  margin-top: 12px; padding-left: 24px;
  border-left: 3px solid var(--orange);
  font: 600 clamp(20px, 1.7vw, 25px)/1.35 var(--font-display);
  letter-spacing: -.01em;
}

/* Trayectoria */
.timeline { position: relative; border-top: 1px solid var(--line-dark); }
.timeline__item {
  --pad: clamp(28px, 4vw, 48px);
  position: relative;
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding-block: var(--pad);
  border-bottom: 1px solid var(--line-dark);
}
.timeline__date { font: 600 15px/1.6 var(--font-body); color: rgba(247, 245, 242, .6); padding-top: 6px; }
.timeline__body h3 { font-size: clamp(26px, 3vw, 42px); margin-bottom: 12px; letter-spacing: -.025em; }
.timeline__body p { max-width: 38em; color: rgba(247, 245, 242, .72); }
.timeline__meta { font-weight: 600; margin-bottom: 8px; }
.timeline__item--next .timeline__date { color: var(--orange); }
.timeline__item--next h3 { color: var(--orange); }
.timeline + .subhead { margin-top: clamp(64px, 8vw, 112px); }
.timeline__item--compact { --pad: clamp(20px, 2.4vw, 28px); }
.timeline__item--compact .timeline__date { padding-top: 2px; }
.timeline__item--compact .timeline__body h3 { font-size: clamp(20px, 1.9vw, 26px); margin-bottom: 6px; }
.timeline__item--compact .timeline__meta { margin-bottom: 0; font-weight: 500; }
.timeline__award { color: var(--orange); font-weight: 600; }
.timeline__list { display: grid; gap: 6px; margin-top: 4px; color: rgba(247, 245, 242, .72); }
.timeline__list li { position: relative; padding-left: 22px; }
.timeline__list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 10px; height: 2px; background: var(--orange); }

.section__sub { max-width: 36em; margin-top: 24px; font-size: clamp(17px, 1.3vw, 20px); color: rgba(247, 245, 242, .72); }
.subhead {
  font: 600 13px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 20px;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: clamp(64px, 8vw, 112px); border-top: 1px solid var(--line-dark); }
.stats li { padding: 28px 24px 0 0; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.stats strong { display: block; font: 800 clamp(56px, 8vw, 120px)/.9 var(--font-display); letter-spacing: -.05em; color: var(--orange); margin-bottom: 10px; }
.stats span { font-size: 15px; color: rgba(247, 245, 242, .7); }

.timeline + .subhead, .tools + .subhead { margin-top: clamp(64px, 8vw, 112px); }
.tools { margin: 0; border-top: 1px solid var(--line-dark); }
.tools__row {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center;
  padding-block: 20px; border-bottom: 1px solid var(--line-dark);
}
.tools dt { font-size: 15px; font-weight: 600; color: rgba(247, 245, 242, .6); }
.tools dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 9px 14px; border: 1px solid var(--line-dark); font-size: 14px; font-weight: 500; color: rgba(247, 245, 242, .85); }

/* Proyectos */
.projects { border-top: 1.5px solid var(--ink); }
.project {
  display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 24px;
  padding-block: clamp(24px, 3.5vw, 40px);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.project__num { font: 800 15px var(--font-display); color: var(--muted); }
.project__name { font: 800 clamp(30px, 4.4vw, 64px)/1 var(--font-display); letter-spacing: -.03em; color: rgba(21, 20, 19, .22); }
.project__tag { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
a.project .project__name { color: var(--ink); transition: color .2s; }
a.project:hover .project__name { color: var(--orange); }

/* Ideas (publicaciones de LinkedIn) */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 48px; }
.posts > li { display: flex; }
.post {
  display: flex; flex-direction: column; width: 100%;
  padding: clamp(24px, 2.6vw, 36px);
  background: var(--paper); text-decoration: none;
  transition: background-color .25s;
}
.post__meta { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 40px; }
.post__title { font-size: clamp(22px, 2vw, 30px); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 16px; }
.post__excerpt { color: var(--muted); margin-bottom: 32px; }
.post__link { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--orange-deep); }
.post:hover { background: #FFFFFF; }
/* Versión oscura de las tarjetas (si Ideas vuelve a fondo negro) */
.section--dark .posts { background: var(--line-dark); border-color: var(--line-dark); }
.section--dark .post { background: var(--ink); }
.section--dark .post:hover { background: #1F1D1B; }
.section--dark .post__meta { color: rgba(247, 245, 242, .55); }
.section--dark .post__excerpt { color: rgba(247, 245, 242, .7); }
.section--dark .post__link { color: var(--orange); }
.post:hover .post__link { text-decoration: underline; text-underline-offset: 4px; }
.btn--light { border-color: var(--paper); color: var(--paper); }
.btn--light:hover { background: var(--paper); color: var(--ink); }

/* Contacto */
.contact { background: var(--orange); color: var(--ink); padding-block: var(--section-y); }
.contact .eyebrow { color: rgba(21, 20, 19, .7); }
.contact__grid { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact__title { font-size: clamp(64px, 10.5vw, 168px); line-height: .9; letter-spacing: -.05em; margin-bottom: 32px; }
.contact__photo { position: relative; margin: 0; aspect-ratio: 4 / 5; background: rgba(21, 20, 19, .1); box-shadow: 16px 16px 0 var(--ink); overflow: hidden; }
.contact__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .contact__photo:hover img { transform: scale(1.04); } }
.contact__lead { font-size: clamp(17px, 1.4vw, 21px); max-width: 30em; margin-bottom: 48px; }
.contact__mail {
  display: inline-block;
  font: 800 clamp(24px, 4vw, 56px)/1.1 var(--font-display); letter-spacing: -.03em;
  text-decoration: none; border-bottom: 3px solid var(--ink);
  overflow-wrap: anywhere;
  margin-bottom: 48px; transition: opacity .2s;
}
.contact__mail:hover { opacity: .65; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__links a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border: 1.5px solid var(--ink); font-weight: 600; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.contact__links a:hover { background: var(--ink); color: var(--orange); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(247, 245, 242, .6); font-size: 14px; }
.site-footer__inner { display: flex; justify-content: space-between; padding-block: 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--orange); }

/* ---------- Animación de entrada (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Portada: animación al cargar (no depende del scroll) */
.js .intro { animation: intro .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .intro:nth-child(2) { animation-delay: .08s; }
.js .intro:nth-child(3) { animation-delay: .5s; }
.js .intro:nth-child(4) { animation-delay: .6s; }
.js .hero__photo.intro { animation-delay: .15s; }
@keyframes intro { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  .js .intro { animation: none; }
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__photo { max-width: 380px; width: calc(100% - 16px); }
  .posts { grid-template-columns: 1fr; }
  .post__meta { margin-bottom: 24px; }
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__photo { max-width: 420px; width: calc(100% - 16px); }
  .split { grid-template-columns: 1fr; }
  .prose { padding-top: 0; }
  .focus { grid-template-columns: 1fr 1fr; }
  .focus__item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .focus__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .focus__item:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; }
  .focus__num { margin-bottom: 24px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .nav a:not(.nav__cta) { display: none; }
  .logo { font-size: 24px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .focus { grid-template-columns: 1fr; }
  .focus__item, .focus__item + .focus__item { padding: 24px 0 0; border-left: 0; }
  .focus__item + .focus__item { border-top: 1px solid var(--line); margin-top: 24px; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .timeline__date { padding-top: 0; }
  .stats li, .stats li + li { padding: 20px 12px 0 0; }
  .stats li + li { padding-left: 12px; }
  .stats span { font-size: 13px; }
  .tools__row { grid-template-columns: 1fr; gap: 12px; }
  .project { grid-template-columns: 40px 1fr; }
  .project__tag { grid-column: 2; }
}

/* ==========================================================
   Dinamismo
   ========================================================== */

/* Barra de progreso de lectura */
.progress {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: 100%; height: 3px; background: var(--orange);
  transform: scaleX(var(--progress, 0)); transform-origin: left;
}

/* Cursor (solo ratón) */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 200;
    width: 36px; height: 36px; margin: -18px 0 0 -18px;
    border: 1.5px solid var(--orange); border-radius: 50%;
    pointer-events: none; opacity: 0;
    transition: width .3s, height .3s, margin .3s, background-color .3s, border-color .3s, opacity .3s;
  }
  .js .cursor.is-active { opacity: 1; }
  .js .cursor.is-link { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(255, 91, 20, .14); }
  .js .cursor.on-orange { border-color: var(--ink); }
  .js .cursor.on-orange.is-link { background: rgba(21, 20, 19, .1); }
}

/* Botones magnéticos (JS mueve la propiedad translate) */
.btn, .nav__cta, .contact__links a { transition: background-color .2s, color .2s, border-color .2s, translate .35s cubic-bezier(.2, .7, .2, 1); }

/* Titular de portada: entra línea a línea */
.hero__title .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero__title .line__inner { display: inline-block; }
.js .hero__title .line__inner { animation: lineUp 1s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__title .line:nth-child(2) .line__inner { animation-delay: .1s; }
.js .hero__title .line:nth-child(3) .line__inner,
.js .hero__title .line:nth-child(4) .line__inner { animation-delay: .2s; }
@keyframes lineUp { from { transform: translateY(110%); } }

/* Palabra que rota */
.hero__title .rotator { display: inline-grid; }
.rotator__word { grid-area: 1 / 1; white-space: nowrap; transition: transform .7s cubic-bezier(.7, 0, .2, 1); }
.rotator__word.is-out { transform: translateY(-115%); }
.rotator__word.is-in { transform: translateY(115%); transition: none; }

/* Foto: cortinilla al cargar + leve movimiento con el ratón */
.hero__photo { translate: var(--px, 0) var(--py, 0); transition: translate .6s cubic-bezier(.2, .7, .2, 1); }
.js .hero__photo img { animation: wipe 1.3s cubic-bezier(.7, 0, .2, 1) .35s both; }
@keyframes wipe { from { clip-path: inset(100% 0 0 0); transform: scale(1.15); } to { clip-path: inset(0 0 0 0); transform: scale(1); } }

/* Títulos de sección: suben palabra a palabra */
.js .reveal.split-words { opacity: 1; transform: none; }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .1em .12em 0; margin: 0 -.1em -.12em 0; }
.split-words .w > span { display: inline-block; }
.js .split-words .w > span { transform: translateY(110%); transition: transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 55ms); }
.js .split-words.is-visible .w > span { transform: none; }

/* Frase personal: las palabras se iluminan al hacer scroll */
.js .prose__quote .q { color: rgba(21, 20, 19, .2); transition: color .3s; }
.js .prose__quote .q.on { color: var(--ink); }

/* Trayectoria: línea que se llena al bajar */
.timeline::before, .timeline::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 236px; width: 1px;
}
.timeline::before { background: var(--line-dark); }
.timeline::after { background: var(--orange); transform: scaleY(var(--p, 0)); transform-origin: top; }
.timeline__item::before {
  content: ""; position: absolute; z-index: 1;
  left: 232px; top: calc(var(--pad) + 9px);
  width: 9px; height: 9px; rotate: 45deg;
  background: var(--ink); border: 1.5px solid rgba(247, 245, 242, .45);
  transition: background-color .3s, border-color .3s, scale .3s;
}
.timeline__item.is-passed::before, .timeline__item--next::before { background: var(--orange); border-color: var(--orange); scale: 1.2; }
.timeline__date { transition: color .3s; }
.timeline__item.is-passed .timeline__date { color: var(--paper); }
.timeline__item--next .timeline__date { color: var(--orange); }

/* Proyectos: la fila se rellena de naranja */
.project { position: relative; isolation: isolate; transition: padding .45s cubic-bezier(.2, .7, .2, 1); }
.project::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1);
}
.project:hover { padding-inline: 24px; }
.project:hover::before { transform: scaleX(1); }
.project:hover .project__name, .project:hover .project__num, .project:hover .project__tag { color: var(--ink); }
.project__name, .project__num, .project__tag { transition: color .3s; }

/* Publicaciones: línea naranja superior al pasar */
.post { position: relative; }
.post::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.post:hover::after { transform: scaleX(1); }
.post__link { transition: letter-spacing .3s; }
.post:hover .post__link { letter-spacing: .02em; }

/* Enfoque: el número crece al pasar */
.focus__num { transition: transform .4s cubic-bezier(.2, .7, .2, 1); transform-origin: left; }
@media (hover: hover) { .focus__item:hover .focus__num { transform: scale(2.2); } }


@media (max-width: 640px) {
  .timeline::before, .timeline::after { left: 4px; }
  .timeline__item { padding-left: 28px; }
  .timeline__item::before { left: 0; top: calc(var(--pad) + 6px); }
  .project:hover { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero__title .line__inner, .js .hero__photo img { animation: none; }
  .js .split-words .w > span { transform: none; transition: none; }
  .js .prose__quote .q { color: var(--ink); }
  .timeline::after { transform: none; }
  .hero__photo { translate: none; }
}

/* ==========================================================
   Móvil: menú a pantalla completa
   ========================================================== */
.menu-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 640px) {
  .nav { display: none; }
  .menu-toggle {
    display: grid; place-content: center; gap: 7px;
    width: 48px; height: 48px; margin-right: -4px;
    background: var(--ink); border: 0; padding: 0; cursor: pointer;
    transition: background-color .3s;
  }
  .menu-toggle__bar { display: block; width: 20px; height: 2px; background: var(--paper); transition: transform .4s cubic-bezier(.7, 0, .2, 1); }
  .menu-open .menu-toggle { background: var(--orange); }
  .menu-open .menu-toggle__bar { background: var(--ink); }
  .menu-open .menu-toggle__bar:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-open .menu-toggle__bar:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .menu-open .site-header { background: var(--ink); color: var(--paper); border-bottom-color: transparent; transform: none; }

  .mobile-menu {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; inset: 0; z-index: 45;
    padding: calc(var(--header-h) + 32px) 0 calc(32px + env(safe-area-inset-bottom));
    background: var(--ink); color: var(--paper);
    overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .6s cubic-bezier(.7, 0, .2, 1), visibility 0s .6s;
  }
  .menu-open .mobile-menu { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .6s cubic-bezier(.7, 0, .2, 1); }
  .menu-open { overflow: hidden; }

  .mobile-menu__nav { display: grid; }
  .mobile-menu__nav a {
    display: flex; align-items: baseline; gap: 16px;
    padding-block: 14px; border-bottom: 1px solid var(--line-dark);
    font: 800 clamp(36px, 11vw, 48px)/1 var(--font-display); letter-spacing: -.04em;
    text-decoration: none;
    opacity: 0; transform: translateY(24px);
    transition: opacity .4s, transform .5s cubic-bezier(.2, .7, .2, 1), color .2s;
  }
  .mobile-menu__nav a span { font: 600 13px var(--font-body); letter-spacing: .1em; color: var(--orange); }
  .mobile-menu__nav a:active { color: var(--orange); }
  .menu-open .mobile-menu__nav a { opacity: 1; transform: none; }
  .menu-open .mobile-menu__nav a:nth-child(1) { transition-delay: .2s; }
  .menu-open .mobile-menu__nav a:nth-child(2) { transition-delay: .26s; }
  .menu-open .mobile-menu__nav a:nth-child(3) { transition-delay: .32s; }
  .menu-open .mobile-menu__nav a:nth-child(4) { transition-delay: .38s; }

  .mobile-menu__foot { display: grid; gap: 20px; margin-top: 40px; }
  .mobile-menu__mail { font: 800 22px var(--font-display); letter-spacing: -.02em; color: var(--orange); text-decoration: none; }
  .mobile-menu__social { display: flex; flex-wrap: wrap; gap: 8px; }
  .mobile-menu__social a {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
    border: 1px solid var(--line-dark); font-size: 15px; font-weight: 600; text-decoration: none;
  }

  /* Contacto: botones a lo ancho */
  .contact__links li { flex: 1 1 auto; }
  .contact__links a { width: 100%; justify-content: center; }
  .contact__mail { font-size: clamp(22px, 7vw, 28px); }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .mobile-menu, .menu-open .mobile-menu, .mobile-menu__nav a { transition: none; }
}
