/* guillermolozano.com — hoja de estilo común a todas las páginas.
   Concepto: un escaparate como las páginas de producto de Apple. Bandas que alternan blanco y gris claro,
   titulares grandes, y cada trabajo enseñado como un producto: en su ventana de navegador y en su móvil
   (con la barra de estado arriba; la isla nunca tapa la página). Solo colores claros, letra del sistema
   (en iPhone y Mac es la de Apple) y nada que se cargue de fuera: ni letras de Google, ni scripts, ni cookies. */
:root {
  --bg: #ffffff;
  --band: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --link: #0066cc;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --on-accent: #ffffff;
  --bezel: #1d1d1f;
  --chrome: #e8e8ed;
  --glass: rgba(255, 255, 255, 0.82);
  --shadow: 0 30px 60px -24px rgba(29, 29, 31, 0.28), 0 12px 24px -16px rgba(29, 29, 31, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
          "Segoe UI Variable Display", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter-l: max(22px, env(safe-area-inset-left, 0px));
  --gutter-r: max(22px, env(safe-area-inset-right, 0px));
  color-scheme: light;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* La franja de arriba del iPhone, del color de la barra, para que nada asome por encima de ella. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* Los dibujos de la barra de estado del móvil, una sola vez arriba; no ocupan sitio. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .boton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1068px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.saltar {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
}
.saltar:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* Barra de arriba, fija y translúcida */
.barra {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.barra .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}

.marca {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marca:hover { text-decoration: none; }

.barra nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.barra nav a { padding-block: 10px; color: var(--ink); font-size: 14px; opacity: 0.86; }
.barra nav a:hover { opacity: 1; text-decoration: none; }
.barra nav .boton { opacity: 1; padding: 6px 14px; font-size: 14px; }

/* Botones y enlaces de acción */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 980px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.boton:hover { background: var(--accent-hover); text-decoration: none; }
.barra nav .boton { min-height: 32px; color: var(--on-accent); }

.mas { white-space: nowrap; }
.mas::after { content: " ›"; }
.fuera::after { content: " ↗"; }

/* Portada */
.portada { overflow: hidden; }
.portada .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px);
}

.antetitulo {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  letter-spacing: -0.012em;
}

h1 {
  max-width: 17ch;
  font-size: clamp(40px, 7.2vw, 80px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.entrada {
  max-width: 46ch;
  text-wrap: balance;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.36;
  letter-spacing: -0.018em;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 30px;
  margin-top: 32px;
  font-size: 17px;
}

.credencial {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 0 0 clamp(20px, 3vw, 28px);
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--band);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}
.credencial strong { font-weight: 600; }

/* La página 404: la portada en corto, centrada en la pantalla. */
.error .wrap { justify-content: center; min-height: 64vh; }
.credencial span { color: var(--muted); }
.credencial::after { content: "›"; color: var(--link); }
.credencial:hover { text-decoration: none; }
.credencial:hover strong { text-decoration: underline; }

/* El escaparate: una ventana de navegador y, encima, un móvil */
.escaparate {
  position: relative;
  width: 100%;
  margin-top: clamp(44px, 7vw, 80px);
  padding-right: 9%;
  padding-bottom: 7%;
}

.portada .escaparate { margin-top: clamp(40px, 5vw, 56px); }

.navegador {
  overflow: hidden;
  border-radius: clamp(8px, 1.2vw, 14px);
  background: var(--bg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.navegador-barra {
  display: flex;
  align-items: center;
  gap: 12px;
  height: clamp(22px, 3vw, 36px);
  padding-inline: clamp(8px, 1.4vw, 16px);
  background: var(--chrome);
}

.puntos { display: flex; gap: clamp(4px, 0.6vw, 7px); }
.puntos i {
  display: block;
  width: clamp(6px, 0.9vw, 11px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #c7c7cc;
}

.direccion {
  flex: 0 1 46%;
  margin-inline: auto;
  overflow: hidden;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: clamp(9px, 1.1vw, 12px);
  line-height: 1.5;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navegador img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

/* El marco es el 3,6 % del ancho del móvil. El relleno en % se mide sobre la caja de alrededor, no sobre el móvil:
   por eso va multiplicado por su ancho (con «padding: 3.6%» a secas, en las losetas anchas salía cuatro veces más
   gordo, 29/10). */
.movil {
  --ancho: 25%;
  container-type: inline-size;
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--ancho);
  padding: calc(var(--ancho) * 0.036);
  border-radius: 15% / 7%;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

.movil-pantalla {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  aspect-ratio: 390 / 844;
  border-radius: 11% / 5.2%;
  background: var(--bg);
}

/* La barra de estado ocupa su sitio y la página empieza debajo, como en un iPhone de verdad. */
.estado {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 13cqw;
  padding-inline: 9cqw 7cqw;
  color: #000;
  font-size: 4.6cqw;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.isla { width: 30cqw; height: 8.4cqw; border-radius: 99px; background: #000; }
.iconos { display: flex; align-items: center; gap: 1.6cqw; }
.iconos svg { display: block; height: 3.6cqw; width: auto; }
.movil-pantalla img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: top; }

/* Bandas y títulos de sección. Las secciones alternan blanco y gris solas: si el generador quita una (lo del
   alta), las de debajo siguen alternando y nunca quedan dos del mismo color seguidas. */
main > section:nth-of-type(even) { background: var(--band); }

.seccion { padding-block: clamp(72px, 10vw, 128px); }

.cabeza-seccion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

h2 {
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.032em;
}

.cabeza-seccion p {
  color: var(--muted);
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.016em;
}

/* Trabajos: losetas grandes, como los productos en la portada de Apple */
.losetas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.loseta {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  padding: clamp(40px, 6vw, 64px) clamp(22px, 5vw, 64px) 0;
  border-radius: 28px;
  background: var(--bg);
  text-align: center;
}
.loseta.ancha { grid-column: 1 / -1; }
.loseta .escaparate { margin-top: clamp(32px, 5vw, 52px); }
.loseta.ancha { padding-bottom: clamp(36px, 5vw, 56px); }
/* En las estrechas, el móvil baja al suelo: los dos (Archivo y Regesto™) se cortan a la misma altura. */
.loseta.estrecha .escaparate { margin-top: auto; padding-top: clamp(32px, 5vw, 52px); padding-right: 0; padding-bottom: 0; }

.ficha {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h3 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.loseta.estrecha h3 { font-size: clamp(28px, 3.2vw, 36px); }

.lema-trabajo {
  max-width: 30ch;
  margin-top: 10px;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.texto-trabajo {
  max-width: 54ch;
  margin-top: 14px;
  color: var(--muted);
}

.cifras {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px clamp(24px, 4vw, 48px);
  margin-top: 26px;
}
.cifras div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cifras dt { order: 2; color: var(--muted); font-size: 14px; line-height: 1.3; }
.cifras dd {
  order: 1;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.enlaces-trabajo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-top: 24px;
  font-size: 17px;
}

/* La loseta estrecha enseña solo el móvil, de pie y entero por arriba */
.solo-movil {
  position: relative;
  width: min(62%, 300px);
  margin-inline: auto;
  margin-bottom: -18%;
}
.solo-movil .movil { --ancho: 100%; position: relative; }

/* Más trabajos: tarjetas pequeñas */
.mas-trabajos { margin-top: clamp(56px, 8vw, 96px); }
.mas-trabajos > h3 {
  margin-bottom: 28px;
  font-size: clamp(24px, 2.6vw, 28px);
  letter-spacing: -0.022em;
  text-align: center;
}

/* De tres en tres; si la última fila queda corta (antes de que salga el cartel, por ejemplo), va centrada. */
.tarjetas { --por-fila: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }

.tarjeta {
  display: flex;
  flex: 0 0 calc((100% - (var(--por-fila) - 1) * 20px) / var(--por-fila));
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border-radius: 22px;
  background: var(--bg);
}
.tarjeta-imagen { aspect-ratio: 16 / 9; overflow: hidden; background: var(--chrome); }
.tarjeta-imagen img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-texto { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 22px 24px 26px; }
.tarjeta-texto .ficha { margin-bottom: 2px; }
.tarjeta h4 { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.tarjeta-texto p:not(.ficha) { color: var(--muted); font-size: 15px; line-height: 1.45; }
.tarjeta .mas, .tarjeta .fuera { margin-top: auto; padding-top: 8px; font-size: 15px; }

/* Lo que hago: tres verbos */
.verbos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.verbo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 36px 32px 38px;
  border-radius: 28px;
  background: var(--band);
}
.verbo .ficha { margin-bottom: 0; }
.verbo h3 { font-size: clamp(26px, 2.6vw, 30px); letter-spacing: -0.025em; }
.verbo p { color: var(--muted); }
.verbo ul { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.verbo li { position: relative; padding-left: 18px; font-size: 15px; }
.verbo li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Cómo trabajo: cuatro pasos en orden */
.pasos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: paso;
}
.paso { display: flex; flex-direction: column; gap: 8px; min-width: 0; counter-increment: paso; }
.paso::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 17px;
  font-weight: 600;
}
.paso h3 { font-size: 21px; letter-spacing: -0.02em; }
.paso p { color: var(--muted); font-size: 15px; }

/* El congreso. Sin foto, una columna de lectura centrada; con su <figure class="foto">, dos columnas. */
.congreso { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; max-width: 820px; }
.congreso:has(> .foto) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1068px; }
.congreso .ficha { margin-bottom: 12px; }
.congreso h2 { font-size: clamp(32px, 4.4vw, 48px); }
.congreso-texto { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.congreso-texto p:not(.ficha) { color: var(--muted); font-size: 19px; line-height: 1.45; }
.congreso-texto cite { color: var(--ink); font-style: normal; font-weight: 600; }

.foto { overflow: hidden; border-radius: 28px; }
.foto img { width: 100%; height: 100%; object-fit: cover; }

/* Sobre mí. Sin retrato, una columna; con su <figure class="foto">, el retrato a la izquierda. */
.sobre { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; max-width: 820px; }
.sobre:has(> .foto) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); max-width: 1068px; }
.sobre-texto { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sobre-texto h2 { margin-bottom: 4px; }
.sobre-texto p { font-size: 19px; line-height: 1.5; }
.sobre-texto p + p { color: var(--muted); }
.sobre .foto { aspect-ratio: 4 / 5; }

.cita {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding: 28px 30px;
  border-radius: 24px;
  background: var(--bg);
}
.cita p { color: var(--ink) !important; font-size: 21px; font-weight: 500; line-height: 1.4; letter-spacing: -0.016em; }
.cita footer { color: var(--muted); font-size: 15px; }

/* Contacto */
.contacto .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding-block: clamp(80px, 11vw, 140px);
}
.contacto p { max-width: 40ch; color: var(--muted); font-size: clamp(19px, 2vw, 22px); line-height: 1.4; }
.contacto .correo { color: var(--ink); font-size: clamp(24px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.025em; }
.contacto .acciones { margin-top: 10px; }

/* Aviso legal y privacidad */
.legal .wrap { max-width: 720px; padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px); }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
.legal h2 { margin-top: 36px; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.016em; }
.legal p, .legal ul { margin-top: 10px; }
.legal h1 + p { margin-top: 18px; }
.legal ul { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; }
.legal .fecha { margin-top: 40px; color: var(--muted); font-size: 14px; }
.legal .volver { margin-top: 12px; }

/* Pie, con la raya a todo lo ancho (con el alta, el contacto blanco queda justo encima). */
.pie { border-top: 1px solid var(--line); }
.pie .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 26px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
}
.pie nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pie a { color: var(--ink); }

/* Pantallas medianas y pequeñas */
@media (max-width: 960px) {
  .tarjetas { --por-fila: 2; }
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
}

@media (max-width: 760px) {
  .losetas, .verbos, .congreso:has(> .foto), .sobre:has(> .foto) { grid-template-columns: minmax(0, 1fr); }
  .loseta { border-radius: 22px; }
  .verbo { padding: 30px 26px 32px; }
  .sobre .foto { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .barra nav a:not(.boton) { display: none; }
  .tarjetas { --por-fila: 1; }
  .pasos { grid-template-columns: minmax(0, 1fr); }
  .escaparate { padding-right: 12%; padding-bottom: 10%; }
  .movil { --ancho: 30%; }
  .cita { padding: 24px 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  .portada .wrap > * { animation: subir 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .portada .wrap > :nth-child(2) { animation-delay: 0.04s; }
  .portada .wrap > :nth-child(3) { animation-delay: 0.08s; }
  .portada .wrap > :nth-child(4) { animation-delay: 0.12s; }
  .portada .wrap > :nth-child(5) { animation-delay: 0.18s; }
  html { scroll-behavior: smooth; }
}

@keyframes subir {
  from { transform: translateY(18px); }
  to { transform: none; }
}
