/* ==========================================================================
   Seisdedos Design — Luis Gómez Seisdedos
   Blanco y minimalista. Titulares en Bitter, texto en Poppins y el rosa de
   la marca como único acento. Contraste verificado WCAG 2.2 AA.
   ========================================================================== */

/* Bitter (variable) — titulares */
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-var-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
/* Poppins — texto */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #f5f5f4;        /* fondo de imágenes y bloques */
  --text: #1c1c1e;
  --muted: #5f5f64;          /* 6.4:1 sobre blanco */
  --line: #e8e8e6;
  --accent: #c42a5a;         /* rosa Seisdedos, oscurecido para 5.5:1 sobre blanco */
  --accent-hover: #a51f4a;
  --accent-soft: #fbeef2;
  --on-accent: #ffffff;
  --success: #1d6b3a;
  --error: #b42318;
  --focus: #c42a5a;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bitter", Georgia, "Times New Roman", serif;

  --step--2: 0.75rem;
  --step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-0: clamp(0.9375rem, 0.91rem + 0.15vw, 1rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.5rem + 1.8vw, 3rem);
  --step-4: clamp(2.375rem, 1.7rem + 3.4vw, 4.5rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 80rem;
  --measure: 38rem;
  --radius: 0.75rem;
  --space-section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

/* Iconos Remix en línea */
.ri { display: inline-block; flex: none; width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; }

main:focus { outline: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-weight: 450; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }
strong { font-weight: 600; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--text); }

ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 0.5rem;
  background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--bg); }

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

.section { padding-top: var(--space-section); }
.hero + .section--first { padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.muted { color: var(--muted); }

/* Título de sección: versalitas + línea fina que llega hasta el borde */
.label {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 2rem;
  font-family: var(--font);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.section-intro { max-width: var(--measure); margin: -0.75rem 0 2.5rem; color: var(--muted); }

/* ---------- Cabecera ---------- */
:root { --header-h: 5rem; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: stretch; justify-content: space-between; gap: 1rem;
  height: var(--header-h); padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: auto; height: 3rem; }

.nav, .nav ul { display: flex; align-items: stretch; }
.nav ul { gap: clamp(1.25rem, 3vw, 2.75rem); }
.nav li { display: flex; }
.nav a {
  position: relative; display: flex; align-items: center;
  font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
/* Línea de 2px que se apoya exactamente sobre la línea gris de la cabecera */
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a:focus-visible { outline-offset: -2px; }

.menu-toggle { display: none; }

@media (max-width: 47.99rem) {
  .brand img { height: 2.5rem; }
  .js .menu-toggle {
    display: grid; place-items: center; align-self: center;
    width: 3rem; height: 3rem; margin-right: -0.5rem; padding: 0;
    border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer;
  }
  .js .menu-toggle .ri { width: 1.6rem; height: 1.6rem; }
  .menu-toggle__close, .menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__close { display: grid; }
  .menu-toggle__open { display: grid; }

  .js .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    display: block; padding: 0.5rem var(--gutter) 2rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.25);
  }
  .js .nav:not(.is-open) { display: none; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav li { display: block; border-bottom: 1px solid var(--line); }
  .js .nav a { padding-block: 1.25rem; font-size: var(--step-0); color: var(--text); }
  .js .nav a::after { bottom: -1px; }
  .js .nav a[aria-current="page"] { color: var(--accent); }
  .nav ul { gap: 1rem; }
}

.to-top {
  position: fixed; right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s, background 0.2s, color 0.2s, border-color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }


/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0; }
.hero .eyebrow, .intro .eyebrow { margin-bottom: 1.25rem; color: var(--accent); font-size: var(--step--2); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.hero .lead { margin-top: 1.5rem; max-width: 36rem; font-size: var(--step-1); color: var(--muted); line-height: 1.6; }

/* Portada de la home: contenido centrado en la primera pantalla, aviso de scroll abajo */
.intro {
  display: flex; flex-direction: column;
  min-height: calc(100svh - var(--header-h));
}
.intro__content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 2.5rem 1rem; }
.intro h1 { font-size: var(--step-4); font-weight: 450; line-height: 1.08; max-width: 16ch; }
.intro h1 .role { color: var(--accent); }
.intro .lead { max-width: 34rem; margin-top: 1.5rem; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.45; color: var(--text); }

.intro .eyebrow { margin-bottom: 10px; }
.intro .disciplines { margin-top: 40px; padding-top: 0; }
.intro .actions { margin-top: 40px; }

.scroll-cue {
  align-self: center; display: inline-flex; flex-direction: column; align-items: center; gap: 0.6rem;
  margin-block: 1rem clamp(1.25rem, 0.75rem + 2vh, 2.25rem);
  font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue:hover .icon-btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Botón redondo con icono (volver arriba, descubrir proyectos, redes) */
.icon-btn {
  display: grid; place-items: center; width: 3rem; height: 3rem; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg); color: var(--text); text-decoration: none;
  box-shadow: 0 8px 24px -12px rgb(0 0 0 / 0.3);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn .ri { width: 1.3rem; height: 1.3rem; }
a.icon-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Botones ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.6rem;
  border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button--ghost { background: transparent; color: var(--text); border-color: #c9c9c6; }
.button--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button .ri { width: 1.15rem; height: 1.15rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 500; text-decoration: none; }
.link-arrow::after { content: "→" / ""; transition: transform 0.2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Tarjetas de proyecto ---------- */
.projects { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 2rem); }
@media (min-width: 48rem) { .projects { grid-template-columns: repeat(2, 1fr); } }

.project-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease);
}
.project-card:hover { border-color: #d6d6d3; box-shadow: 0 12px 32px -18px rgb(0 0 0 / 0.25); }
.project-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.03); }
.project-card__body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 1.5rem 1.75rem; flex: 1; }
.project-card .sector { font-size: var(--step--2); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.project-card h3 { font-size: var(--step-2); }
.project-card h3 a, .project-card h3 a:hover { color: inherit; text-decoration: none; }
/* Un único enlace por tarjeta que la cubre entera */
.project-card h3 a::after { content: ""; position: absolute; inset: 0; }
.project-card h3 a:focus-visible { outline: none; }
.project-card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
.project-card p { color: var(--muted); font-size: var(--step--1); }
.project-card .tags { padding-top: 1.75rem; }

/* Etiquetas: rectángulo de 8px de radio y línea fina, para no confundirlas con botones */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 1.5rem; }
.tags li {
  padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--step--2); font-weight: 500; line-height: 1.5; color: var(--muted); background: var(--bg);
}

/* ---------- Servicios (desplegables) ---------- */
.services { border-top: 1px solid var(--line); }
.services details { border-bottom: 1px solid var(--line); }
.services summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0.25rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 600;
}
.services summary::-webkit-details-marker { display: none; }
.services .plus { display: grid; color: var(--accent); transition: transform 0.25s var(--ease); }
.services .plus .ri { width: 1.4rem; height: 1.4rem; }
.services details[open] .plus { transform: rotate(45deg); }
.services summary:hover { color: var(--accent); }
.services details p { max-width: var(--measure); padding: 0 0.25rem 1.5rem; color: var(--muted); }

/* ---------- Experiencia ---------- */
.timeline > li {
  display: grid; gap: 0.25rem 2rem;
  padding-block: 1.5rem; border-top: 1px solid var(--line);
}
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .timeline > li { grid-template-columns: 10rem 1fr; } }
.timeline .period { padding-top: 0.15rem; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: var(--step-1); }
.timeline .org { display: block; margin-top: 0.25rem; font-size: var(--step--1); color: var(--accent); font-weight: 500; }
.timeline p, .timeline ul { margin-top: 0.75rem; color: var(--muted); max-width: var(--measure); font-size: var(--step--1); }
.timeline ul { padding-left: 1.1em; }
.timeline ul li + li { margin-top: 0.35rem; }

/* ---------- Herramientas ---------- */
.tools { display: grid; gap: 0.75rem; }
.tools li { display: flex; align-items: center; gap: 1rem; }
.tools__logo { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 0.75rem; background: var(--surface); }
.tools__logo .brand-logo { width: 1.5rem; height: 1.5rem; }
.tools__logo--figma { color: #f24e1e; }
.tools__logo--adobe { color: #fa0f00; }
.tools__logo--claude { color: #d97757; }
.tools strong { display: block; font-weight: 600; }
.tools span:not(.tools__logo) { display: block; font-size: var(--step--1); color: var(--muted); }

.columns { display: grid; gap: 2.5rem var(--gutter); }
@media (min-width: 48rem) { .columns { grid-template-columns: repeat(2, 1fr); } }
.columns h3 { font-size: var(--step-1); margin-bottom: 1rem; }

/* ---------- Valores (Sobre mí) ---------- */
.values { display: grid; gap: clamp(1rem, 0.75rem + 1vw, 1.5rem); }
@media (min-width: 48rem) { .values { grid-template-columns: repeat(3, 1fr); } }
.values li { padding: clamp(1.5rem, 1.25rem + 1vw, 2.25rem); border-radius: var(--radius); background: var(--surface); }
.values__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; margin-bottom: 1.5rem; border-radius: 50%; background: var(--bg); color: var(--accent); }
.values__icon .ri { width: 1.5rem; height: 1.5rem; }
.values h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.values p { color: var(--muted); font-size: var(--step--1); }

/* ---------- Experiencia (línea de tiempo) ---------- */
.xp { position: relative; max-width: 50rem; }
.xp__item { position: relative; padding: 0 0 clamp(2.5rem, 2rem + 1.5vw, 3.5rem) 2.5rem; }
.xp__item::before { /* raíl */
  content: ""; position: absolute; left: 0.5rem; top: 0.6rem; bottom: -0.6rem; width: 1px; background: var(--line);
}
.xp__item:last-child { padding-bottom: 0; }
.xp__item:last-child::before { display: none; }
.xp__item::after { /* hito */
  content: ""; position: absolute; left: 0.125rem; top: 0.3rem; width: 0.75rem; height: 0.75rem;
  border: 2px solid var(--muted); border-radius: 50%; background: var(--bg);
}
.xp__item.is-current::after { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.xp__when { font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-variant-numeric: tabular-nums; }
.xp h3 { margin-top: 0.5rem; font-size: var(--step-2); }
.xp__org { margin-top: 0.25rem; font-weight: 500; }
.xp__org + p, .xp ul { margin-top: 1rem; color: var(--muted); font-size: var(--step--1); }
.xp ul { padding-left: 1.1em; }
.xp ul li + li { margin-top: 0.4rem; }
.xp ul li::marker { color: var(--accent); }

/* ---------- Formación ---------- */
.schools { display: grid; gap: clamp(1rem, 0.75rem + 1vw, 1.5rem); }
@media (min-width: 40rem) { .schools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .schools { grid-template-columns: repeat(3, 1fr); } }
.school { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.school__logo { display: grid; place-items: center; flex: none; width: 4rem; height: 4rem; overflow: hidden; border-radius: 0.75rem; background: var(--bg); border: 1px solid var(--line); }
.school__logo img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.school__logo--initials { background: var(--surface); border-color: transparent; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text); }
.school__when { font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.school h3 { margin-top: 0.35rem; font-size: var(--step-0); line-height: 1.3; }
.school p { margin-top: 0.35rem; font-size: var(--step--1); color: var(--muted); }

/* ---------- Sobre mí: portada e historia ---------- */
.about-hero { display: grid; gap: 2.5rem var(--gutter); align-items: center; }
@media (min-width: 56rem) { .about-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.about-hero .lead { margin-top: 1.5rem; max-width: 34rem; }
.portrait { margin: 0; max-width: 28rem; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.story { display: grid; gap: 1.5rem var(--gutter); }
@media (min-width: 56rem) { .story { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.story__lead { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; max-width: 20ch; }

/* ---------- Prosa ---------- */
.prose { max-width: var(--measure); }
.prose p { color: var(--muted); }
.prose .big { font-size: var(--step-1); color: var(--text); line-height: 1.6; }

/* ---------- Invitación a «Sobre mí» ---------- */
.about-teaser { display: grid; gap: 1.5rem var(--gutter); align-items: end; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (min-width: 56rem) { .about-teaser { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.about-teaser h2 { font-size: var(--step-3); max-width: 18ch; }
.about-teaser p { color: var(--muted); max-width: 30rem; }
.about-teaser .actions { margin-top: 1.5rem; }

/* ---------- Banner de contacto ---------- */
.cta-box {
  margin-top: var(--space-section);
  padding: clamp(3rem, 2rem + 4vw, 5rem) var(--gutter);
  border-radius: var(--radius); background: var(--surface); text-align: center;
}
.cta-box h2 { font-size: var(--step-3); font-weight: 450; max-width: 18ch; margin-inline: auto; }
.cta-box p { max-width: 30rem; margin: 1rem auto 0; color: var(--muted); }
.cta-box .actions { justify-content: center; }

/* ---------- Caso de estudio ---------- */
.case-head { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0; }
.back { display: inline-flex; align-items: center; gap: 0.4em; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); font-size: var(--step--1); font-weight: 500; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.case-head .overline { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 1.25rem; font-size: var(--step--2); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.case-head .overline .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.case-head h1 { font-size: var(--step-4); line-height: 1.05; max-width: 18ch; }
.case-head .lead { margin-top: 1.5rem; max-width: 40rem; font-size: var(--step-1); color: var(--muted); line-height: 1.6; }

/* Ficha horizontal: columnas separadas por líneas finas */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0 0; border-top: 1px solid var(--text);
}
.facts div { padding: 1rem 1.25rem 1.25rem 0; }
.facts div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.facts dt { margin-bottom: 0.35rem; font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: var(--step--1); font-weight: 500; line-height: 1.5; }
@media (max-width: 40rem) {
  .facts div, .facts div + div { padding: 0.9rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* Portada a sangre (todo el ancho) */
.case-cover { margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0; background: var(--surface); }
.case-cover img { width: 100%; max-height: 82vh; object-fit: cover; }

/* Resumen rápido */
.tldr { display: grid; gap: 2rem var(--gutter); padding-top: clamp(3rem, 2rem + 3vw, 5rem); }
@media (min-width: 48rem) { .tldr { grid-template-columns: repeat(3, 1fr); } }
.tldr h2 { margin-bottom: 0.6rem; font-family: var(--font); font-size: var(--step--2); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tldr p { font-size: var(--step-0); }


/* Bloque de texto del caso: título a la izquierda, texto a la derecha */
.block { display: grid; gap: 1rem var(--gutter); padding-top: clamp(3.5rem, 2.5rem + 3vw, 6rem); }
@media (min-width: 60rem) { .block { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.block h2 { font-size: var(--step-2); }
.block .kicker { display: block; margin-bottom: 0.5rem; font-family: var(--font); font-size: var(--step--2); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.block .prose p.big { color: var(--text); }
.block .prose em { font-style: normal; color: var(--text); font-weight: 500; }
.block .prose > h3 { margin: 2rem 0 0.5rem; font-size: var(--step-1); }
.block .prose > h3:first-child { margin-top: 0; }

/* Pasos del proceso (secuencia real, por eso numerada) */
.steps { display: grid; gap: 2rem var(--gutter); margin-top: 2.5rem; }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0 0.85rem; align-content: start; }
.steps .n {
  grid-row: span 2; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: var(--step--1); font-variant-numeric: tabular-nums;
}
.steps h3 { padding-top: 0.3rem; font-family: var(--font); font-size: var(--step-0); font-weight: 600; letter-spacing: 0; }
.steps p { margin-top: 0.35rem; color: var(--muted); font-size: var(--step--1); }

/* Galerías */
.gallery { display: grid; gap: clamp(1rem, 0.75rem + 1vw, 1.5rem); margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 40rem) { .gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shot { margin: 0; }
.shot > img { width: 100%; border-radius: var(--radius); background: var(--surface); }
.shot--bordered > img { border: 1px solid var(--line); }
.shot .panel {
  display: flex; justify-content: center; align-items: center; gap: clamp(1rem, 0.5rem + 3vw, 3.5rem);
  padding: clamp(1.5rem, 1rem + 3vw, 4rem); border-radius: var(--radius); background: var(--surface);
}
.shot .panel img { min-width: 0; max-height: 38rem; width: auto; }
.shot figcaption { margin-top: 0.75rem; font-size: var(--step--1); color: var(--muted); }

/* Navegación entre proyectos */
.project-nav { margin-top: var(--space-section); border-top: 1px solid var(--line); }
.project-nav ul { display: grid; }
.project-nav li + li { border-top: 1px solid var(--line); }
@media (min-width: 48rem) {
  .project-nav ul { grid-template-columns: 1fr 1fr; }
  .project-nav li + li { border-top: 0; border-left: 1px solid var(--line); text-align: right; }
}
.project-nav a { display: block; padding: clamp(2rem, 1.5rem + 2vw, 3.25rem) var(--gutter); text-decoration: none; transition: background 0.2s; }
.project-nav a:hover { background: var(--surface); color: var(--text); }
.project-nav a:focus-visible { outline-offset: -3px; }
.project-nav .dir { display: inline-flex; align-items: center; gap: 0.4em; margin-bottom: 0.5rem; font-size: var(--step--1); color: var(--muted); }
.project-nav .title { display: block; font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.2; }
.project-nav a:hover .title { color: var(--accent); }

/* ---------- Contacto y formulario ---------- */
.contact-grid { display: grid; gap: 3rem var(--gutter); }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 500; font-size: var(--step--1); }
.field .hint { margin-top: -0.25rem; font-size: var(--step--1); color: var(--muted); }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 3rem; padding: 0.75rem 1rem;
  border: 1px solid #8a8a8e;   /* 3.4:1 contra el fondo (WCAG 1.4.11) */
  border-radius: 0.5rem; background: var(--bg); color: var(--text); font: inherit;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--text); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field .error { display: none; color: var(--error); font-size: var(--step--1); font-weight: 500; }
.field .error:not(:empty) { display: flex; gap: 0.4em; }
.field .error:not(:empty)::before { content: "⚠" / ""; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; min-height: 0; margin-top: 0.2rem; accent-color: var(--accent); }
.check label { font-weight: 400; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 1rem 1.25rem; border: 1px solid currentColor; border-radius: 0.5rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }
.form-note { font-size: var(--step--1); color: var(--muted); }

.contact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list__label { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: var(--step--1); }
.contact-list__label .ri { width: 1.25rem; height: 1.25rem; color: var(--accent); }
.contact-list a { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Pie ---------- */
.site-footer { margin-top: clamp(3.5rem, 2.5rem + 4vw, 6rem); background: var(--surface); font-size: var(--step--1); color: var(--muted); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  padding: clamp(2rem, 1.5rem + 2vw, 3rem) var(--gutter) calc(clamp(2rem, 1.5rem + 2vw, 3rem) + 3.5rem);
}
@media (min-width: 48rem) { .site-footer__inner { padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); padding-right: calc(var(--gutter) + 4rem); } }
.footer-claim { font-family: var(--font-display); font-size: var(--step-1); font-weight: 450; line-height: 1.3; color: var(--text); }
.footer-copy { margin-top: 0.35rem; }
.social { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.social .icon-btn { box-shadow: none; }
.social .brand-logo { width: 1.25rem; height: 1.25rem; }
.icon-btn--iso { background: var(--text); border-color: var(--text); color: #fff; }
.icon-btn--iso .iso { width: auto; height: 1.6rem; }

/* ---------- Páginas simples (privacidad, 404) ---------- */
.page-title { font-size: var(--step-3); max-width: 20ch; }
.legal { max-width: var(--measure); }
.legal p { color: var(--muted); }
.legal p strong { color: var(--text); }

/* Contenido pendiente de completar: elimina la clase .todo al rellenarlo */
.todo { background: #fff3c4; border-radius: 3px; }

/* ---------- Aparición suave (visible por defecto; solo se anima con JS) ---------- */
.reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .button, .tags li, .project-card, .field input, .field textarea { border: 1px solid CanvasText; }
  .project-card:has(a:focus-visible) { outline: 3px solid Highlight; }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header, .site-footer, .skip-link, .actions, .project-nav, .cta-box, .scroll-cue, .to-top { display: none !important; }
  .intro { min-height: 0; }
  body { font-size: 10.5pt; }
  .section { padding-top: 1.5rem; }
  .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* Utilidades */
.stack { margin-top: 2.25rem; }
