/* Gestoría Integral — una sola página. Referencia de acomodo: bybang.co
   (marca a la izquierda, menú con comas a la derecha, portada collage, listas con mucho aire). */
:root {
  /* Paleta: fondo Olive Smoke #706C61, texto Chalk Cream #EFE9DC. Un solo tema a propósito. */
  --paper: #706C61;
  --ink: #EFE9DC;
  --ink-2: #D2CCBE;
  --rule: #8A8578;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --head: 56px;
  --section-pad: 72px;
  color-scheme: dark;
}
@media (min-width: 900px) { :root { --section-pad: 120px; } }

* { box-sizing: border-box; }
html { scroll-padding-top: var(--head); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; text-transform: uppercase; }
.muted { color: var(--ink-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}

/* Ancho completo con margen fijo a los lados, como bybang (tope solo para monitores ultra anchos) */
.wrap {
  max-width: 1920px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) {
  .wrap { padding-left: max(clamp(24px, 2.5vw, 48px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(24px, 2.5vw, 48px), env(safe-area-inset-right, 0px)); }
}

/* Barra superior: marca a la izquierda, menú a la derecha */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: var(--head); }
.mark { font-weight: 300; font-size: 15px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.mark { display: block; color: var(--ink); }
.mark svg { display: block; height: 30px; width: auto; }
/* Intro: capa que tapa la página al cargar; script.js mueve el logo al header y la quita.
   Si el JS falla, se oculta sola a los 4 s. */
.intro { position: fixed; inset: 0; z-index: 30; background: var(--paper); color: var(--ink); pointer-events: none; animation: intro-off 0s 4s forwards; }
.intro svg { position: fixed; margin: 0; transform-origin: 0 0; }
@keyframes intro-off { to { visibility: hidden; } }
.nav { display: flex; gap: 1.4em; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; color: var(--ink-2); white-space: nowrap; }
.nav a { text-decoration: none; transition: color .2s; }
@media (max-width: 420px) { .mark, .nav { font-size: 13px; } }
.nav a:hover, .nav a.on { color: var(--ink); }

/* Portada collage */
.cover { position: relative; }
.wordmark {
  font-weight: 300; font-size: clamp(44px, 8vw, 170px); /* proporcional al ancho: así la "g" y la "l" siempre pisan las fotos */
  letter-spacing: -0.055em; line-height: 1; margin: 0;
  text-align: center; white-space: nowrap; color: var(--ink-2);
}
.wordmark b { color: var(--ink); font-weight: 700; letter-spacing: -0.05em; }
/* Al cargar, cada palabra entra girando como la cara de un cubo: "gestoría" hacia adelante, "integral" hacia atrás.
   El origen detrás del texto (-0.5em) hace que gire sobre el centro del cubo. Empieza cuando se va la intro. */
.wordmark { perspective: 4em; }
.wordmark span, .wordmark b { display: inline-block; transform-origin: 50% 50% -0.5em; animation: cube-fwd .9s cubic-bezier(0.23, 1, 0.32, 1) .6s both; }
.wordmark b { animation-name: cube-back; animation-delay: .72s; }
@keyframes cube-fwd { from { transform: rotateX(90deg); opacity: 0; } }
@keyframes cube-back { from { transform: rotateX(-90deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark span, .wordmark b { animation: none; } }
.collage { list-style: none; margin: 0; padding: 0; }
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  filter: sepia(.28) saturate(.62) contrast(.94) brightness(1.04);
  transition: filter .6s ease, transform .6s ease;
}
.shot:hover img { filter: sepia(.1) saturate(.9) contrast(1) brightness(1.02); transform: scale(1.015); }
/* Nombre de la obra. Con mouse: etiqueta que sigue al cursor, arriba de él (script.js).
   En pantallas táctiles no hay cursor: el nombre se ve fijo debajo de la foto. */
.shot figcaption { display: none; margin-top: 8px; }
.shot figcaption span, .cursor-label span { opacity: .65; margin-right: 4px; }
.cursor-label {
  position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; white-space: nowrap;
  background: var(--ink); color: var(--paper); padding: 5px 8px;
  opacity: 0; transition: opacity .2s ease;
}
.cursor-label.on { opacity: 1; }
/* Celular: título arriba y fotos en dos columnas escalonadas */
.cover-center { padding-block: 40px 32px; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; align-items: start; }
.collage li:nth-child(even) { margin-top: 48px; }
.collage .wide { grid-column: span 2; width: 72%; justify-self: center; margin-top: 0; }
.collage .p6 { margin-top: 48px; }
.corners { display: flex; justify-content: space-between; gap: 16px; padding-block: 32px 24px; line-height: 1.6; }
.corners .r { text-align: right; }
.corners a { text-decoration: none; }
.corners a:hover { color: var(--ink-2); }

/* Escritorio: la portada ocupa una pantalla, fotos repartidas alrededor del título */
@media (min-width: 900px) {
  .cover { min-height: calc(100svh - var(--head)); }
  .cover-center {
    position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
    padding: 0; z-index: 2; pointer-events: none;
  }
  .collage { display: block; position: absolute; inset: 0 0 64px; }
  .collage li { position: absolute; margin: 0 !important; }
  .collage .p5 { left: 34%; top: 2%;  width: 19%; }    /* Atena, arriba del título */
  .collage .p4 { left: 66%; top: 3%;  width: 10%; }    /* Torre 1800, chica arriba a la derecha */
  .collage .p1 { left: 12%; top: 34%; width: 13.5%; }  /* Nauna, roza el inicio del título (borde derecho en 25.5%) */
  .collage .p6 { left: 72%; top: 29%; width: 12.5%; }  /* Torre 901: la "l" cae sobre las ventanas oscuras, no sobre el muro claro */
  .collage .p7 { left: 38.5%; top: 64%; width: 17%; }  /* Panorámica, abajo */
  .corners { position: absolute; left: 0; right: 0; bottom: 0; padding-block: 0 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .collage li { animation: drift 1.1s cubic-bezier(.2,.7,.1,1) both; }
  .collage li:nth-child(2) { animation-delay: .06s; } .collage li:nth-child(3) { animation-delay: .12s; }
  .collage li:nth-child(4) { animation-delay: .18s; } .collage li:nth-child(5) { animation-delay: .24s; }
  @keyframes drift { from { transform: translateY(14px); } to { transform: none; } }
}

/* Secciones: todas con la misma cabecera y la misma columna izquierda (3/12) */
.sec { padding-block: var(--section-pad); border-top: 1px solid var(--rule); }
.sec-head, .works, .about { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .sec-head, .works, .about { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; }
}
.sec-head { margin-bottom: 56px; align-items: baseline; }
.sec-head h2 {
  font-weight: 300; font-size: clamp(38px, 5.6vw, 84px);
  letter-spacing: -0.05em; line-height: 0.95; margin: 0;
}
.sec-head h2 b { font-weight: 700; }
.sec-head p { margin: 16px 0 0; max-width: 52ch; }

/* 01 Trámites: línea del tiempo. Celular: vertical. PC (900px+): horizontal, una columna por etapa. */
.group { position: relative; padding-bottom: 48px; }
.group-name .muted { color: var(--ink); } /* encabezado de etapa en un solo tono */
.group:last-child { padding-bottom: 0; }
.group::before { /* la línea que une las etapas */
  content: ""; position: absolute; left: 6px; top: 10px; bottom: -10px; border-left: 1px solid var(--ink);
}
.group:last-child::before { display: none; }
.group-name { position: relative; padding: 0 0 16px 32px; margin-bottom: 0;
  /* difuminado solo detrás del encabezado; empieza después de la línea (celular: a la derecha, PC: debajo) */
  background: linear-gradient(to bottom, rgb(239 233 220 / .10), transparent) 32px 0 / 100% 100% no-repeat;
}
.group-name::before { /* el nodo de cada etapa */
  content: ""; position: absolute; left: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid var(--ink);
  /* hueco; al pasar el cursor por la etapa se rellena del centro hacia afuera, con borde difuminado */
  background: var(--paper) radial-gradient(circle, var(--ink) 0 40%, transparent 70%) center / 0 0 no-repeat;
  transition: background-size .5s ease;
}
.group:hover .group-name::before, .group:focus-within .group-name::before { background-size: 200% 200%; }
/* celular: no hay cursor; el nodo se llena cuando el scroll lo pasa a la mitad de la pantalla (script.js pone .lit) */
@media (max-width: 899px) { .group.lit .group-name::before { background-size: 200% 200%; } }
.group-name .step { display: block; margin-bottom: 4px; }
.group-name h3 { font-weight: 600; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 2px; }
.stops { list-style: none; margin: 0; padding: 0; }
.group .stops { margin-left: 32px; border-top: 1px solid var(--rule); } /* raya que separa encabezado y trámites */
.stop + .stop { border-top: 1px solid var(--rule); }
.stop button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; justify-items: start;
}
/* celular: flecha diagonal a la derecha para indicar que la fila lleva al mensaje; en PC se oculta */
.stop button { position: relative; padding-right: 32px; }
/* \FE0E: sin él, iPhone dibuja la flecha como emoji */
.stop button::after { content: "\2197\FE0E"; position: absolute; right: 0; top: 12px; font-size: 18px; line-height: 1.25; color: var(--ink-2); }
.stop .t { font-weight: 400; font-size: 18px; letter-spacing: -0.02em; line-height: 1.25; transition: color .2s; }
.stop .d { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
/* "Pedir →": píldora llena en crema para que invite a hacer clic */
.stop .go {
  display: none; /* celular: no se muestra, toda la fila ya se puede tocar; en PC aparece al pasar el cursor */
  margin-top: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 0 0 rgb(239 233 220 / .5);
  transition: opacity .2s, transform .2s cubic-bezier(.2, .7, .1, 1), box-shadow .3s, letter-spacing .2s;
}
.stop button:hover .go, .stop button:focus-visible .go {
  transform: translateY(-2px); letter-spacing: .12em; box-shadow: 0 0 0 5px rgb(239 233 220 / .18); /* halo suave */
}
.stop button:active .go { transform: translateY(-2px) scale(.96); }
@media (min-width: 900px) {
  .timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .group { padding: 0; }
  .group::before { /* ahora horizontal: cruza su columna y el espacio hasta la siguiente */
    left: 50%; right: calc(-50% - 32px); top: 10px; bottom: auto; border-left: 0; border-top: 1px solid var(--ink); /* de nodo a nodo; top 10px = centro del nodo */
  }
  /* todo centrado en su columna: nodo, encabezado y trámites */
  .group-name, .stop button { text-align: center; justify-items: center; }
  .group-name::before { left: calc(50% - 6.5px); } /* sin transform: la animación ya lo usa */
  .group-name { padding: 32px 0 20px; background-position: 0 11px; } /* 11px = justo debajo de la línea */
  .group .stops { margin-left: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .stop button { padding-right: 0; }
  .stop button::after { content: none; }
  .stop .go { display: block; opacity: 0; }
  .stop button:hover .go, .stop button:focus-visible .go { opacity: 1; }
}
/* Animación: al llegar a la sección, la línea se dibuja tramo por tramo y cada etapa aparece en orden.
   script.js pone .anim (estado inicial) y luego .play. Sin JS o con movimiento reducido, todo se ve normal. */
.group:nth-child(1) { --i: 0; } .group:nth-child(2) { --i: 1; } .group:nth-child(3) { --i: 2; } .group:nth-child(4) { --i: 3; }
.timeline.anim .group-name, .timeline.anim .stops { opacity: 0; transform: translateY(14px); }
.timeline.anim .group-name::before { transform: scale(0); }
.timeline.anim .group::before { transform: scaleY(0); transform-origin: top; }
@media (min-width: 900px) { .timeline.anim .group::before { transform: scaleX(0); transform-origin: left; } }
.timeline.anim.play .group-name, .timeline.anim.play .stops {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .1, 1);
  transition-delay: calc(var(--i) * .7s);
}
.timeline.anim.play .stops { transition-delay: calc(var(--i) * .7s + .15s); }
.timeline.anim.play .group-name::before {
  transform: none; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i) * .7s), background-size .5s ease; /* el nodo hace un pequeño rebote */
}
.timeline.anim.play .group::before {
  transform: none; transition: transform .7s cubic-bezier(.65, 0, .35, 1) calc(var(--i) * .7s + .2s);
}

.stops:hover .stop .t { color: var(--ink-2); }
.stops .stop button:hover .t, .stop button:focus-visible .t { color: var(--ink); }

/* 02 Obras: lista con una foto que cambia al pasar el cursor */
.preview { display: none; margin: 0; }
@media (min-width: 900px) {
  .preview { display: block; position: sticky; top: calc(var(--head) + 24px); align-self: start; width: 78%; }
}
.preview img { display: block; width: 100%; height: auto; transition: opacity .25s; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li {
  padding: 10px 0; border-top: 1px solid var(--rule); transition: color .2s;
}
.work-list li:last-child { border-bottom: 1px solid var(--rule); }
.work-list .p { font-weight: 300; font-size: clamp(24px, 3vw, 40px); letter-spacing: -0.035em; line-height: 1.15; }
@media (hover: hover) {
  .work-list:hover li { color: var(--ink-2); }
  .work-list li:hover { color: var(--ink); }
}
.work-list li[data-img] { cursor: default; }
.work-list li[data-img] .p::after { content: " ◦"; font-size: .5em; vertical-align: .4em; color: var(--ink-2); }
@media (min-width: 900px) { .work-list img { display: none; } }
/* Celular: carrusel para deslizar; asoma la siguiente tarjeta para que se note */
@media (max-width: 899px) {
  .works > .work-list { display: flex; gap: 16px; min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .work-list li, .work-list li:last-child { flex: 0 0 78%; max-width: 340px; scroll-snap-align: start; border: 0; padding: 0; }
  .work-list img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 10px; }
  .work-list img[src$="panoramica.jpg"] { object-position: right; } /* la torre está a la derecha */
  .work-list img[src$="sonata.webp"] { object-position: 75%; } /* para no cortar el logo */
  .work-list .p { font-size: 22px; }
  .work-list li[data-img] .p::after { content: none; }
}

/* 03 Sobre mí: foto a la izquierda (como la vista previa de Obras), a la derecha cifras, razones y compromiso */
.about { gap: 40px; }
.about-side { width: min(100%, 320px); outline: none; }
/* PC: el texto ocupa las 9 columnas de la izquierda y la foto las 3 de la derecha (espejo de la rejilla, a petición).
   Celular: la foto va primero, como está en el HTML. */
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); }
  .about-side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--head) + 24px); align-self: start; width: 100%; }
  .about-body { grid-column: 1; grid-row: 1; }
}
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; }
/* Cifras debajo de la foto: siempre se ven los 24 años; los dos de 12 se despliegan al pasar el cursor.
   Sin cursor (celular) se despliegan con el botón .facts-more. */
.facts { margin: 20px 0 0; display: grid; grid-template-rows: auto 1fr 1fr; }
.facts div { display: flex; flex-direction: column-reverse; gap: 4px; min-height: 0; overflow: hidden; } /* la cifra arriba, la etiqueta abajo */
.facts div + div { padding-top: 16px; }
.facts dt { font-size: 11px; line-height: 1.4; }
.facts dd { margin: 0; font-weight: 300; font-size: clamp(32px, 3vw, 48px); letter-spacing: -0.05em; line-height: 1; }
/* "años de experiencia" pegado a la cifra, para que no se lea como la edad junto a la foto */
.facts dd small { font-size: .4em; font-weight: 400; letter-spacing: -0.01em; margin-left: .2em; }
.facts-more { display: none; }
@media (hover: none) {
  .facts { grid-template-rows: auto 0fr 0fr; }
  .facts div + div { padding-top: 0; visibility: hidden; }
  .facts.open { grid-template-rows: auto 1fr 1fr; }
  .facts.open div + div { padding-top: 16px; visibility: visible; }
  .facts-wrap { position: relative; }
  .facts-more { display: grid; place-items: center; position: absolute; top: 0; right: 0; width: 40px; height: 40px; padding: 0; color: inherit; background: none; border: 0; cursor: pointer; }
  .facts-more[aria-expanded="true"] svg { transform: rotate(180deg); }
}
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .facts, .facts div + div { transition: grid-template-rows .4s ease, padding-top .4s ease, visibility .4s; }
}
@media (hover: hover) {
  .facts { grid-template-rows: auto 0fr 0fr; }
  .facts div + div { padding-top: 0; opacity: 0; transform: translateY(8px); }
  .about-side:hover .facts, .about-side:focus-visible .facts { grid-template-rows: auto 1fr 1fr; }
  .about-side:hover .facts div + div, .about-side:focus-visible .facts div + div { padding-top: 16px; opacity: 1; transform: none; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .facts { transition: grid-template-rows .5s cubic-bezier(.2, .7, .1, 1); }
  .facts div + div { transition: opacity .4s ease, transform .5s cubic-bezier(.2, .7, .1, 1), padding-top .5s cubic-bezier(.2, .7, .1, 1); }
  .about-side:hover .facts div:nth-child(3), .about-side:focus-visible .facts div:nth-child(3) { transition-delay: .08s; } /* el segundo entra un poco después */
}
/* Compromiso: cierre con la misma voz que la frase grande de Contacto (ligera y gris, lo clave en negrita y crema) */
.pledge { margin-top: 56px; padding-left: 20px; border-left: 1px solid var(--ink); }
.pledge .label { display: block; margin-bottom: 12px; }
.pledge p {
  margin: 0; max-width: 30ch; color: var(--ink-2);
  font-weight: 300; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -0.035em; line-height: 1.15;
}
.pledge b { font-weight: 700; color: var(--ink); }
.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li { padding: 24px 0; border-top: 1px solid var(--rule); }
.reasons li:last-child { border-bottom: 1px solid var(--rule); }
.reasons h3 { font-weight: 600; font-size: clamp(24px, 2.6vw, 36px); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; }
.reasons p { margin: 0; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }

/* 04 Contacto: frase grande al ancho completo (eco del título de la portada) y canales en filas,
   como una lista de proyectos: etiqueta mono | valor grande | acción. */
.contact .label { display: block; margin-bottom: 32px; }
.big-line {
  font-weight: 300; font-size: clamp(38px, 5.6vw, 96px); letter-spacing: -0.055em; line-height: 0.95;
  color: var(--ink-2); margin: 0 0 72px;
}
.big-line b { font-weight: 700; color: var(--ink); letter-spacing: -0.05em; }
/* Canales y formulario lado a lado: el formulario a la izquierda, los canales a la derecha.
   En el HTML los canales van primero, así en celular quedan arriba. */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 72px; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
  .contact-grid .big-form { grid-column: 1; grid-row: 1; }
}
.channels { border-bottom: 1px solid var(--rule); }
.ch {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  padding: 24px 0; border-top: 1px solid var(--rule); text-decoration: none; color: inherit;
}
.ch .k { grid-column: 1 / -1; color: var(--ink-2); }
.ch .v {
  font-weight: 300; font-size: clamp(36px, 3.6vw, 64px); letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums; transition: transform .45s cubic-bezier(.2, .7, .1, 1);
}
.ch .v.long { font-size: clamp(22px, 2.4vw, 40px); overflow-wrap: anywhere; } /* el usuario no cabe al tamaño normal */
.ch .act { justify-self: end; white-space: nowrap; color: var(--ink-2); transition: transform .3s ease, color .3s; }
.ch:hover .v, .ch:focus-visible .v { transform: translateX(12px); }
.ch:hover .act, .ch:focus-visible .act { color: var(--ink); }
a.ch:hover .act { transform: translate(3px, -3px); }
#call-label { border-bottom: 1px solid currentColor; }

/* Formulario: campos con etiqueta, pero en letra grande, en el mismo tono que el resto de la sección */
.big-form { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 700px) { .big-form { grid-template-columns: 1fr 1fr; gap: 48px 32px; } .big-form .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { color: var(--ink-2); }
.big-form input, .big-form select, .big-form textarea {
  font: 300 clamp(22px, 2.2vw, 32px)/1.3 var(--display); letter-spacing: -0.025em; color: var(--ink);
  background-color: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 6px 0 10px; width: 100%; transition: border-color .2s;
}
.big-form input::placeholder, .big-form textarea::placeholder { color: var(--ink-2); opacity: .55; }
.big-form input:hover, .big-form select:hover, .big-form textarea:hover { border-bottom-color: var(--ink-2); }
.big-form select {
  appearance: none; cursor: pointer; padding-right: 1em; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - .45em) 55%, calc(100% - .25em) 55%; background-size: .2em .2em; background-repeat: no-repeat;
}
.big-form select option { font-size: 16px; background: var(--paper); color: var(--ink); }
.big-form textarea { resize: vertical; min-height: 3.4em; }

/* Botón de enviar: ancho completo, letra grande; un bloque crema lo rellena al pasar el cursor */
.send {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 28px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: clamp(22px, 2.4vw, 36px); letter-spacing: -0.03em;
  transition: color .35s ease;
}
.send::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.65, 0, .35, 1);
}
.send:hover, .send:focus-visible { color: var(--paper); }
.send:hover::before, .send:focus-visible::before { transform: scaleX(1); }
.send .arr { transition: transform .45s cubic-bezier(.2, .7, .1, 1); }
.send:hover .arr, .send:focus-visible .arr { transform: translateX(10px); animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .send .arr { animation: nudge 2.4s ease-in-out infinite; } /* la flecha "invita" a dar clic */
  @keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(8px); } 90% { transform: translateX(2px); } }
}
/* Trámite pedido desde la línea del tiempo: un bloque crema barre el campo (como en .send),
   se queda un tono suave y salta la píldora "Seleccionado". El retraso deja terminar el scroll. */
#form { scroll-margin-top: 32px; }
.field { position: relative; isolation: isolate; }
.field.picked::before, .field.picked::after { content: ""; position: absolute; inset: -12px; z-index: -1; pointer-events: none; }
.field.picked::before { background: rgb(239 233 220 / .12); transition: opacity .6s ease; }
/* pasado un momento (script.js pone .done) se va el resaltado y queda solo la palomita */
.field.picked.done::before { opacity: 0; }
/* la píldora se cierra sobre la palomita: el texto queda recortado, no se cambia de golpe */
/* sin padding derecho: overflow recorta por fuera del padding y ahí se asomaba la "S" */
.field.picked.done label::after { max-width: 2ch; padding-right: 0; animation: pick-out .4s ease-out 1.6s forwards; }
@keyframes pick-out { to { opacity: 0; } } /* al final la palomita también se va */
.field.picked::after { background: var(--ink); opacity: 0; }
.field.picked label::after {
  content: "\2713  Seleccionado"; display: inline-block; margin-left: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; white-space: pre;
  max-width: 18ch; overflow: hidden; vertical-align: middle;
}
@media (prefers-reduced-motion: no-preference) {
  .field.picked::before { transform-origin: left; animation: pick-fill .6s cubic-bezier(0.77, 0, 0.175, 1) .25s both; }
  .field.picked::after { animation: pick-shine .9s cubic-bezier(0.23, 1, 0.32, 1) .55s both; }
  /* entra: salta la palomita y se abre el texto; sale: se cierra y la palomita da un latido */
  .field.picked label::after {
    animation: pick-pop .4s cubic-bezier(.3, 1.6, .5, 1) .55s both, pick-open .5s cubic-bezier(0.77, 0, 0.175, 1) .8s backwards;
    transition: max-width .5s cubic-bezier(0.77, 0, 0.175, 1), padding .5s cubic-bezier(0.77, 0, 0.175, 1);
  }
  .field.picked.done label::after { animation: pick-beat .4s cubic-bezier(0.23, 1, 0.32, 1) .45s, pick-out .4s ease-out 1.6s forwards; }
  .field.picked select { animation: pick-nudge .6s cubic-bezier(0.23, 1, 0.32, 1) .55s; }
}
@keyframes pick-fill { from { transform: scaleX(0); } }
@keyframes pick-shine { from { opacity: .45; } to { opacity: 0; } }
@keyframes pick-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes pick-open { from { max-width: 2ch; padding-right: 0; } }
@keyframes pick-beat { 50% { transform: scale(1.3); } }
@keyframes pick-nudge { 40% { transform: translateX(10px); } }

/* Al llegar desde un enlace (script.js): la raya de la sección se traza en crema, como la línea del tiempo,
   y el contenido sube en orden. La línea del tiempo se excluye porque tiene su propia animación. */
.sec { position: relative; }
.sec:focus, .cover:focus { outline: none; }
.sec.wait > * { opacity: 0; }
.sec.enter::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; border-top: 1px solid var(--ink);
  transform-origin: left; pointer-events: none; animation: sec-line 1.2s cubic-bezier(0.77, 0, 0.175, 1) both;
}
.sec.enter > :not(.timeline) { animation: sec-rise .7s cubic-bezier(0.23, 1, 0.32, 1) backwards; }
.sec.enter > :nth-child(2):not(.timeline) { animation-delay: .1s; }
.sec.enter > :nth-child(3) { animation-delay: .2s; }
@keyframes sec-line { from { transform: scaleX(0); } 70% { opacity: 1; } to { opacity: 0; } }
@keyframes sec-rise { from { opacity: 0; transform: translateY(24px); } }

/* Pie: una línea con separadores, como bybang */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; padding-block: 24px 32px; border-top: 1px solid var(--rule); }
.foot .sep { opacity: .5; }
.credit { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.credit:hover { text-decoration: underline; }
.credit svg { height: 14px; width: auto; margin-block: -2px; } /* el margen evita que el logo agrande el renglón */
