/* =========================================================
   Alex Rivero · Portafolio
   "Casa de cal": las casas de César Manrique en Lanzarote.
   Cal blanca, zócalo de picón, verde de carpintería
   canaria, rojo teja y azul océano. Las capturas se ven por huecos curvos
   abiertos en la pared.
   ========================================================= */

@font-face {
  font-family: "Archivo";
  src: url("fuentes/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --cal: #e7e3dc;        /* arena volcánica */
  --cal-sombra: #d8d3ca; /* arena a la sombra */
  --picon: #1c1d1e;      /* roca volcánica */
  --picon-suave: #2b2a28;
  --tinta: #1c1d1e;      /* texto */
  --tinta-2: #4a4a47;    /* texto secundario sobre cal */
  --atlantico: #1f6142;  /* verde de carpintería canaria: enlaces y detalles */
  --atlantico-hondo: #164a32;
  --oceano: #143f6b;     /* azul océano: contacto */
  --teja: #b4462e;       /* rojo teja */
  --teja-clara: #f0937a; /* teja sobre picón */
  --sol: #f3c3b6;        /* teja muy clara: selección */
  
  --ancho: 76rem;
  --margen: clamp(1.25rem, 5vw, 3.5rem);
  --texto: 1.0625rem;
  --ancho-dentro: calc(var(--ancho) - 2 * var(--margen)); /* mismo borde que las secciones con relleno */
  --fuente: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --suave: cubic-bezier(0.16, 1, 0.3, 1);

  /* grano de cal: ruido muy leve para que la pared no sea un blanco plano */
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .32 0 0 0 0 .28 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  /* picón: grano más gordo y claro sobre negro */
  --grano-picon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .8 0 0 0 0 .72 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #b9b2a6 var(--cal);
  accent-color: var(--atlantico);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cal) var(--grano);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: var(--texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

html, body { overflow-x: clip; } /* la línea de la cabecera sale a todo el ancho sin crear scroll lateral */

::selection { background: var(--sol); color: var(--picon); }

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

a {
  color: var(--atlantico);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 0.2s, color 0.2s;
}
a:hover { text-decoration-thickness: 2px; color: var(--atlantico-hondo); }

:focus-visible {
  outline: 3px solid var(--atlantico);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--picon);
  color: var(--cal);
  border-radius: 999px;
  z-index: 10;
}
.saltar:focus { top: 1rem; }

/* ---------- Cabecera ---------- */

.cabecera {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 1.5rem var(--margen) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--tinta);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.marca:hover { color: var(--tinta); }
.marca-hueco { width: 1.6rem; height: 1.6rem; fill: var(--atlantico); }

.cabecera ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}
.cabecera nav a {
  color: var(--tinta);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0;
  background: linear-gradient(var(--teja), var(--teja)) left 92% / 0 3px no-repeat;
  transition: background-size 0.35s var(--suave);
}
.cabecera nav a:hover { background-size: 100% 3px; color: var(--tinta); }

/* ---------- Botones: piedras redondeadas ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: var(--picon);
  color: var(--cal);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--picon);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--suave);
}
.boton:hover { background: var(--atlantico); border-color: var(--atlantico); color: #fff; transform: translateY(-2px); }
.boton:active { transform: translateY(0); }
.boton-sec { background: transparent; color: var(--tinta); }
.boton-sec:hover { background: var(--picon); border-color: var(--picon); color: var(--cal); }

/* ---------- Huecos en la pared ---------- */

.hueco {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--cal-sombra);
  isolation: isolate;
}
.hueco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform 1.2s var(--suave);
}
/* grosor del muro: la luz entra desde arriba a la izquierda */
.hueco::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 14px 18px 22px -8px rgba(40, 32, 22, 0.42),
    inset 0 0 0 1px rgba(22, 32, 38, 0.08),
    inset -3px -4px 0 rgba(255, 255, 255, 0.35);
}
a.hueco:hover img { transform: scale(1.035); }

.hueco-arco     { border-radius: 50% 50% 18px 18px / 38% 38% 18px 18px; }
.hueco-guijarro { border-radius: 58% 42% 52% 48% / 52% 46% 54% 48%; }
.hueco-ventana  { border-radius: 24px 24px 50% 50% / 24px 24px 34% 34%; }
.hueco-ojo      { border-radius: 50%; }

.hueco-grupo { margin: 0; }
.hueco-grupo figcaption,
.proyecto-figura figcaption {
  margin-top: 0.8rem;
  font-size: 0.875rem;
  color: var(--tinta-2);
}

/* ---------- Portada ---------- */

.portada {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--margen) clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.portada h1 {
  font-size: clamp(2.3rem, 1.2rem + 3.4vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.entradilla {
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.5;
  color: var(--tinta-2);
}

.portada-acciones {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portada-huecos {
  position: relative;
  padding-bottom: 5.5rem;
}
.grupo-grande .hueco { aspect-ratio: 733 / 560; }
.grupo-grande .hueco img { object-position: center bottom; }
.grupo-grande figcaption { text-align: right; padding-right: 1rem; }
.grupo-chico {
  position: absolute;
  left: -2.5rem;
  bottom: 0;
  width: 46%;
}
.grupo-chico .hueco {
  aspect-ratio: 1 / 1;
  outline: 10px solid var(--cal);
}
.grupo-chico .hueco img { object-position: 14% top; }
.grupo-chico figcaption { text-align: center; }

/* el único momento: al cargar, la vista se asienta dentro del hueco */
@media (prefers-reduced-motion: no-preference) {
  .portada-huecos .hueco img { animation: asentar 1.6s var(--suave) backwards; }
  .portada-huecos .grupo-chico .hueco img { animation-delay: 0.15s; }
  @keyframes asentar {
    from { transform: scale(1.12); filter: brightness(1.18) saturate(0.85); }
    to   { transform: scale(1); filter: none; }
  }
}

/* ---------- Bordes orgánicos ---------- */

.borde {
  display: block;
  width: 100%;
  height: clamp(28px, 4vw, 60px);
}

/* ---------- Zócalo de picón ---------- */

.zocalo { color: var(--cal); }
.zocalo .borde { fill: var(--picon); }
.zocalo .borde-arriba { margin-bottom: -1px; }
.zocalo .borde-abajo { margin-top: -1px; }

.zocalo-dentro {
  background: var(--picon) var(--grano-picon);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--margen);
}
.zocalo-dentro > * { max-width: var(--ancho-dentro); margin-inline: auto; }

.zocalo h2 {
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

.normas {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
}
.normas > div {
  padding: 1.25rem 0 1.4rem;
  border-top: 1px solid rgba(251, 250, 247, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}
.normas dt { font-size: 1.05rem; line-height: 1.45; }
.normas dd { margin: 0; font-size: 0.9rem; font-weight: 600; }
.normas a { color: var(--teja-clara); }
.normas a:hover { color: #f7b6a3; }

/* ---------- Secciones generales ---------- */

.proyectos,
.herramientas {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--margen) 0;
}

.seccion-titulo {
  font-size: clamp(2.6rem, 1.4rem + 4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- Proyectos ---------- */

.proyecto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-bottom: clamp(4rem, 9vw, 7.5rem);
}
.proyecto-invertido .proyecto-texto { order: 2; }
.proyecto-invertido > :last-child { order: 1; }

.proyecto h3 {
  font-size: clamp(2rem, 1.3rem + 2.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.que-es {
  margin-top: 0.9rem;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 500;
}
.proyecto-texto > p:not(.que-es):not(.stack):not(.enlaces) {
  margin-top: 1rem;
  color: var(--tinta-2);
  max-width: 38rem;
}
.proyecto h4 {
  margin-top: 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--atlantico);
}
.proyecto ul {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 38rem;
}
.proyecto li {
  position: relative;
  padding-left: 1.35rem;
  margin-top: 0.55rem;
  line-height: 1.55;
}
.proyecto li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 58% 42% 52% 48% / 52% 46% 54% 48%;
  background: var(--teja);
}

.stack {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--tinta-2);
  max-width: 38rem;
}
.stack span {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--picon);
  color: var(--cal);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 0.08em;
}

.enlaces {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.proyecto-figura { margin: 0; }
.proyecto-figura .hueco-arco    { aspect-ratio: 733 / 560; }
.proyecto-figura .hueco-arco img { object-position: center bottom; }
.proyecto-figura .hueco-ventana { aspect-ratio: 5 / 4; }
.proyecto-figura .hueco-ventana img { object-position: 0 0; }
.proyecto-figura-chica { justify-self: center; width: min(100%, 26rem); }
.proyecto-figura-chica .hueco { aspect-ratio: 1 / 1; }
.proyecto-figura-chica .hueco img { object-position: center; }
.proyecto-figura-chica figcaption { text-align: center; }

/* Ficha de Brami: hornacina amarilla */
.ficha {
  justify-self: center;
  width: min(100%, 25rem);
  padding: clamp(2.6rem, 5vw, 3.6rem) clamp(2rem, 4vw, 3rem) clamp(2.2rem, 4vw, 3rem);
  background: var(--teja);
  color: #fff;
  border-radius: 50% 50% 28px 28px / 26% 26% 28px 28px;
  box-shadow: inset 10px 14px 20px -8px rgba(70, 20, 8, 0.45);
}
.ficha-titulo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 1.2rem;
}
.ficha dl { margin: 0; }
.ficha dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.ficha dt { font-size: 0.9rem; }
.ficha dd { margin: 0; font-weight: 700; text-align: right; }
.ficha-nota {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Otros proyectos */
.otros {
  padding-top: 0.5rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.otros-titulo {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.otros-lista {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
}
.otros-lista article { border-top: 3px solid var(--picon); padding-top: 1.2rem; }
.otros-lista h4 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.otros-lista p:not(.stack) { margin-top: 0.7rem; color: var(--tinta-2); }
.otros-lista .stack { margin-top: 1rem; }

/* ---------- Herramientas ---------- */

.herramientas { padding-bottom: clamp(3rem, 7vw, 5.5rem); }

.herramientas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.herramientas-grid h3 {
  font-size: 1.15rem;
  font-weight: 700;
  padding-bottom: 0.7rem;
  margin-bottom: 0.8rem;
  border-bottom: 3px solid var(--atlantico);
}
.herramientas-grid p { font-size: 0.95rem; color: var(--tinta-2); }

.forma {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.forma h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.forma ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
}
.forma li {
  font-size: 1.05rem;
  line-height: 1.5;
  padding-top: 1rem;
  border-top: 1px solid #c6bfb3;
}

/* ---------- Contacto: el Atlántico ---------- */

.contacto { color: #fff; }
.contacto .borde { fill: var(--oceano); margin-bottom: -1px; height: clamp(36px, 5vw, 80px); }
.contacto-dentro {
  background: var(--oceano);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--margen) clamp(4rem, 9vw, 7rem);
}
.contacto-dentro > * { max-width: var(--ancho-dentro); margin-inline: auto; }
.contacto h2 {
  font-size: clamp(2.4rem, 1.3rem + 4vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.contacto p { margin-top: 1.2rem; font-size: 1.2rem; line-height: 1.5; color: #dbe6f2; }
.contacto-lista {
  list-style: none;
  padding: 0;
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contacto-lista a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--cal);
  color: var(--picon);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.25s, transform 0.25s var(--suave);
}
.contacto-lista a:hover { background: var(--sol); color: var(--picon); transform: translateY(-2px); }
.contacto :focus-visible { outline-color: #fff; }

/* ---------- Pie ---------- */

.pie {
  background: var(--picon) var(--grano-picon);
  color: #c9cdcf;
  padding: 1.6rem var(--margen);
  font-size: 0.875rem;
}
.pie p { max-width: var(--ancho-dentro); margin: 0 auto; }

/* ---------- Pantallas medianas ---------- */

@media (max-width: 960px) {
  .portada { grid-template-columns: 1fr; }
  .portada-huecos { max-width: 38rem; margin-left: auto; }
  .grupo-chico { left: -1rem; width: 44%; }
  .normas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proyecto { grid-template-columns: 1fr; }
  .proyecto-invertido .proyecto-texto,
  .proyecto-invertido > :last-child { order: 0; }
  .proyecto-figura { max-width: 40rem; }
  .herramientas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forma { grid-template-columns: 1fr; }
}

/* ---------- Móvil ---------- */

@media (max-width: 600px) {
  .cabecera { padding-top: 1.1rem; }
  .cabecera ul { gap: 0.1rem 1.1rem; font-size: 0.95rem; }
  .portada-huecos { padding-bottom: 4rem; }
  .grupo-chico { left: -0.25rem; width: 48%; }
  .grupo-chico .hueco { outline-width: 7px; }
  .grupo-chico figcaption { display: none; }
  .normas,
  .otros-lista,
  .herramientas-grid,
  .forma ul { grid-template-columns: 1fr; }
  .boton, .contacto-lista a { padding-inline: 1.25rem; }
}

/* =========================================================
   Movimiento
   Idea: pasar junto a una pared encalada con ventanas. Lo que
   se ve por cada hueco se desplaza al hacer scroll y la luz
   del muro cambia de ángulo. Todo en CSS; sin JavaScript.
   ========================================================= */

/* ---------- Cabecera fija ---------- */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 1rem;
  padding-top: 1rem;
  background: var(--cal);
  /* fondo a todo el ancho aunque la cabecera esté centrada */
  box-shadow: 0 0 0 100vmax var(--cal);
  clip-path: inset(0 -100vmax -2px);
}
.cabecera::after {
  content: "";
  position: absolute;
  left: -100vmax;
  right: -100vmax;
  bottom: 0;
  height: 1px;
  background: rgba(28, 29, 30, 0.14);
  opacity: 0;
}
[id] { scroll-margin-top: 5.5rem; }

/* ---------- Flecha de los botones ---------- */

.boton::after,
.contacto-lista a::after {
  content: "";
  width: 1em;
  height: 1em;
  margin-left: 0.55rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate 0.3s var(--suave);
}
.boton:hover::after,
.contacto-lista a:hover::after { translate: 0.25rem 0; }
.portada-acciones .boton:first-child::after { rotate: 90deg; }
.portada-acciones .boton:first-child:hover::after { translate: 0 0.2rem; }

@media (prefers-reduced-motion: no-preference) {

  /* ---------- Entrada de la portada ---------- */
  .portada h1,
  .entradilla,
  .portada-acciones {
    animation: subir 0.9s var(--suave) backwards;
  }
  .entradilla { animation-delay: 0.12s; }
  .portada-acciones { animation-delay: 0.22s; }
  @keyframes subir {
    from { opacity: 0; translate: 0 1.5rem; filter: blur(6px); }
  }

  @supports (animation-timeline: view()) {

    /* ---------- Las vistas por los huecos ---------- */
    .hueco img {
      height: 118%;
      max-height: none;
      animation: mirar linear both;
      animation-timeline: view();
    }
    .portada-huecos .hueco img {
      animation: asentar 1.6s var(--suave) backwards, mirar linear both;
      animation-timeline: auto, view();
    }
    .portada-huecos .grupo-chico .hueco img { animation-delay: 0.15s, 0s; }
    @keyframes mirar {
      from { translate: 0 0; }
      to   { translate: 0 -14%; }
    }

    /* la luz del muro cambia de ángulo al pasar */
    .hueco::after {
      animation: luz linear both;
      animation-timeline: view();
    }
    @keyframes luz {
      from {
        box-shadow:
          inset 22px 22px 24px -8px rgba(40, 32, 22, 0.46),
          inset 0 0 0 1px rgba(40, 32, 22, 0.08),
          inset -3px -4px 0 rgba(255, 255, 255, 0.35);
      }
      to {
        box-shadow:
          inset -12px 20px 24px -8px rgba(40, 32, 22, 0.4),
          inset 0 0 0 1px rgba(40, 32, 22, 0.08),
          inset 3px -4px 0 rgba(255, 255, 255, 0.35);
      }
    }

    /* ---------- Títulos grandes que salen de la línea ---------- */
    .seccion-titulo,
    .contacto h2 {
      animation: brotar linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
    @keyframes brotar {
      from { clip-path: inset(0 0 100% 0); translate: 0 0.6em; }
      to   { clip-path: inset(0 0 -0.2em 0); translate: 0 0; }
    }
  }

  /* ---------- Línea bajo la cabecera al hacer scroll ---------- */
  @supports (animation-timeline: scroll()) {
    .cabecera::after {
      animation: linea linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120px;
    }
    @keyframes linea { to { opacity: 1; } }
  }
}

/* sin soporte de scroll-driven: la línea se ve siempre */
@supports not (animation-timeline: scroll()) {
  .cabecera::after { opacity: 1; }
}
