/* ==========================================================
   COHETE CLUB · v04
   Blanco roto con textura, rojo teja y grotesca apretada.
   Colores y tipografía se cambian en :root.
   ========================================================== */

:root {
  --bg: #eeebe7;
  --bg-2: #e5e0da;
  --red: #b5391f;
  --red-dark: #932d17;
  --ink: #2b1d17;
  --muted: #74655d;
  --line: #d5cec6;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.3vw, 2.35rem);
  --step-3: clamp(2.4rem, 1.4rem + 4.2vw, 5.2rem);
  --step-4: clamp(3rem, 0.5rem + 8.4vw, 10rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1440px;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 5rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.08' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.36 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
::selection { background: var(--red); color: var(--bg); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 300; background: var(--red); color: var(--bg); padding: .6rem 1rem; }
.skip:focus { left: .5rem; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.measure { max-width: 58ch; }

/* ---------- Tipografía ---------- */
.display { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: -0.055em; line-height: 0.86; }
.display--xl { font-size: var(--step-4); }
.display--l { font-size: var(--step-3); }
.label { color: var(--red); font-size: var(--step--1); font-weight: 650; text-transform: uppercase; letter-spacing: .015em; line-height: 1.15; }
.h2 { color: var(--red); font-size: var(--step-3); font-weight: 800; text-transform: uppercase; letter-spacing: -0.055em; line-height: 0.88; }
.lead { font-size: var(--step-2); font-weight: 500; line-height: 1.18; letter-spacing: -0.025em; max-width: 26ch; }
.lead--wide { max-width: 34ch; }

/* ---------- Transición entre páginas ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 250; background: var(--red); pointer-events: none;
  transform: scaleY(0); transform-origin: bottom;
}
.js .curtain { animation: curtain-out .7s var(--ease-io) both; transform-origin: top; }
.curtain.is-leaving { animation: curtain-in .45s var(--ease-io) forwards !important; transform-origin: bottom; }
@keyframes curtain-out { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes curtain-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease), border-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 110; background: var(--bg); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 4.75rem; }
.brand { display: inline-flex; color: var(--red); }
.brand svg { height: 1.15rem; width: auto; }
.menu { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); list-style: none; margin: 0; padding: 0; }
.menu a:not(.btn) {
  color: var(--red); text-decoration: none; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2;
}
.menu a:not(.btn) span { display: block; transition: transform .5s var(--ease); }
.menu a:not(.btn) span::after { content: attr(data-t); display: block; }
.menu a:not(.btn):hover span { transform: translateY(-50%); }
.menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 2px; overflow: visible; }
.menu a[aria-current="page"] span::after { display: none; }
.menu a[aria-current="page"]:hover span { transform: none; }
.menu-toggle {
  display: none; background: none; border: 0; color: var(--red); font: inherit; font-size: var(--step--1);
  font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: .5rem 0; cursor: pointer;
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .menu {
    position: fixed; inset: calc(env(safe-area-inset-top, 0px) + 4.75rem) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .6s var(--ease), visibility 0s linear .6s;
  }
  .menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease); }
  .menu li { border-bottom: 1px solid var(--line); }
  .menu li:last-child { border: 0; padding-top: 1.5rem; }
  .menu a:not(.btn) { display: block; height: auto; overflow: visible; padding: .85rem 0; font-size: var(--step-3); font-weight: 800; letter-spacing: -.055em; line-height: .95; }
  .menu a:not(.btn) span::after { display: none; }
  .menu a:not(.btn):hover span { transform: none; }
}

/* ---------- Botones ---------- */
.btn {
  --c: var(--red); --t: var(--bg);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .65em;
  padding: 1em 1.55em; border: 1.5px solid var(--c); border-radius: 999px;
  background: var(--c); color: var(--t);
  font: inherit; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color .45s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: var(--t); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--ease); }
.btn:hover { color: var(--c); }
.btn:hover::before { transform: none; }
.btn--ghost { background: transparent; color: var(--c); }
.btn--ghost::before { background: var(--c); }
.btn--ghost:hover { color: var(--t); }
.btn--small { padding: .75em 1.15em; }
.btn .arr { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(5rem, 11vw, 9.5rem); position: relative; }
.rule { height: 1px; background: var(--line); transform-origin: left; }
.js .rule { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js .rule.is-in { transform: scaleX(1); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(2.25rem, 5vw, 4rem); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(3rem, 8vw, 7.5rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 .line { display: block; }
@media (min-width: 861px) { .hero h1 .line { white-space: nowrap; } }
.hero__aside { text-align: center; display: grid; gap: 1.5em; justify-items: center; font-size: clamp(.9rem, .65rem + .55vw, 1.2rem); line-height: 1.1; }
.hero__aside ul { list-style: none; margin: 0; padding: 0; }
.hero__aside p { margin: 0; max-width: 17ch; }
.hero__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(2.25rem, 5vw, 3.75rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.scroll-hint { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.scroll-hint i { position: relative; width: 1.5px; height: 2.6rem; background: var(--line); overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--red); animation: drop 2.2s var(--ease-io) infinite; }
@keyframes drop { to { top: 100%; } }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__aside { text-align: left; justify-items: start; }
  .hero__aside p { max-width: 34ch; }
}

/* Órbita */
.orbit { position: absolute; z-index: 0; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(66vw, 960px); height: auto; pointer-events: none; overflow: visible; }
.orbit__tilt { transform: rotate(-12deg); transform-origin: 500px 300px; }
.orbit .ring { fill: none; stroke: var(--red); stroke-opacity: .3; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.orbit .ring--2 { stroke-opacity: .14; stroke-dasharray: 2 7; }
.orbit .sat { fill: var(--red); }
.js .orbit .ring { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 2.4s var(--ease) .3s forwards; }
.js .orbit .ring--2 { animation: none; stroke-dasharray: 2 7; stroke-dashoffset: 0; opacity: 0; transition: opacity 1.5s ease 1.2s; }
.js.is-loaded .orbit .ring--2 { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 760px) { .orbit { right: 0; top: auto; bottom: 4%; transform: none; width: 100%; } }

/* ---------- Animaciones de texto ---------- */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em .02em .06em; margin: -.16em -.02em -.06em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.js [data-split].is-in .w > span { transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero .reveal { transition-delay: calc(.6s + var(--d, 0s)); }

/* ---------- Marquesina ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(1rem, 2.2vw, 1.6rem); white-space: nowrap; }
.marquee__track { display: inline-flex; animation: marquee 40s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); padding-right: clamp(1.5rem, 3vw, 2.75rem); color: var(--red); font-size: var(--step-2); font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: 1; }
.marquee__item svg { width: .55em; height: .55em; flex: none; animation: spin 8s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Servicios ---------- */
.services { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--red); }
.service { position: relative; border-bottom: 1px solid var(--line); }
.service > a, .service > div {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1fr) 3rem; gap: clamp(1rem, 3vw, 3rem); align-items: center;
  padding-block: clamp(1.4rem, 2.8vw, 2.25rem); text-decoration: none; color: inherit;
}
.service .n { color: var(--red); font-size: var(--step--1); font-weight: 700; }
.service h3 { color: var(--red); font-size: var(--step-3); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88; transition: transform .6s var(--ease); }
.service p { margin: 0; max-width: 44ch; color: var(--ink); }
.service .go {
  justify-self: end; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red);
  display: grid; place-items: center; font-weight: 700;
  transition: background .4s var(--ease), color .4s var(--ease), transform .5s var(--ease);
}
.service::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.service:hover::before { transform: scaleX(1); }
.service:hover h3 { transform: translateX(.35em); }
.service:hover .go { background: var(--red); color: var(--bg); transform: rotate(-45deg); }
@media (max-width: 760px) {
  .service > a, .service > div { grid-template-columns: 1fr auto; row-gap: .75rem; }
  .service .n { grid-column: 1 / -1; }
  .service p { grid-column: 1 / -1; grid-row: 3; }
  .service .go { grid-column: 2; grid-row: 2; }
}

/* Detalle de servicios */
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); scroll-margin-top: 6rem; }
.svc:first-child { border-top: 1.5px solid var(--red); }
.svc__head .label { margin-bottom: 1rem; display: block; }
.svc__head h2 { color: var(--red); font-size: var(--step-3); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88; }
.svc__body .lead { margin-bottom: 1.5rem; }
.deliver { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.deliver li { break-inside: avoid; padding: .55rem 0 .55rem 1.25rem; border-bottom: 1px solid var(--line); position: relative; }
.deliver li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--red); }
@media (max-width: 860px) { .svc { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .deliver { columns: 1; } }

/* ---------- Cuenta atrás ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { padding-inline: clamp(1rem, 2vw, 1.75rem); border-left: 1px solid var(--line); }
.steps li:first-child { border-left: 0; padding-left: 0; }
.steps .num { display: block; color: var(--red); font-size: clamp(3.5rem, 2rem + 5vw, 7rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; margin-bottom: 1.25rem; }
.steps h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; margin-bottom: .4rem; }
.steps p { color: var(--muted); margin: 0; max-width: 30ch; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; } .steps li:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { border-left: 0; padding-left: 0; } }

/* ---------- Para quién ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--red); }
.duo > div { padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.5rem, 3.5vw, 3rem) 0 0; }
.duo > div + div { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 3.5vw, 3rem); }
.duo h3 { color: var(--red); font-size: var(--step-3); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88; margin-bottom: 1.25rem; }
.duo .lower { text-transform: none; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } .duo > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 2rem; } }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.filters button {
  background: transparent; color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; padding: .55em 1.05em;
  font: inherit; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.filters button[aria-pressed="true"], .filters button:hover { background: var(--red); color: var(--bg); }
.filters .count { opacity: .6; margin-left: .35em; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem); }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .projects { grid-template-columns: 1fr; } }
.project { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.project__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: var(--bg-2); }
.js .project__media { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .project.is-in .project__media { clip-path: inset(0 0 0 0); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--ease); }
.project.is-in .project__media img { transform: scale(1); }
.project:hover .project__media img { transform: scale(1.04); }
.project__ph {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.25rem;
  background: var(--red); color: var(--bg);
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88;
}
.projects > :nth-child(3n+2) .project__ph { background: var(--ink); }
.projects > :nth-child(3n) .project__ph { background: var(--bg-2); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.project__cta {
  position: absolute; right: 1rem; top: 1rem; z-index: 2;
  padding: .55em 1em; border-radius: 999px; background: var(--bg); color: var(--red);
  font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  opacity: 0; transform: translateY(-6px); transition: opacity .4s ease, transform .5s var(--ease);
}
.project:hover .project__cta, .project:focus-visible .project__cta { opacity: 1; transform: none; }
.project__info { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.project__info h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.project__info p { margin: .3rem 0 0; color: var(--muted); font-size: var(--step--1); line-height: 1.4; }
.project__info .label { text-align: right; flex: none; padding-top: .25rem; }
.empty { color: var(--muted); }

/* Ficha de proyecto */
.case-dialog {
  width: min(1100px, 100% - 2rem); max-height: calc(100% - 2rem); padding: 0; border: 0; border-radius: 4px;
  background: var(--bg); color: var(--ink); overflow: auto; overscroll-behavior: contain;
}
.case-dialog::backdrop { background: rgba(43, 29, 23, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.case-dialog[open] { animation: pop .6s var(--ease); }
.case-dialog[open]::backdrop { animation: fadein .4s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(24px); } }
@keyframes fadein { from { opacity: 0; } }
.case__bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1.25rem, 3vw, 2.5rem); background: var(--bg); border-bottom: 1px solid var(--line); }
.case__close { background: none; border: 1.5px solid var(--red); color: var(--red); border-radius: 999px; padding: .5em 1em; font: inherit; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.case__close:hover { background: var(--red); color: var(--bg); }
.case__body { padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3rem); }
.case__title { color: var(--red); font-size: clamp(2.2rem, 1.2rem + 4vw, 4.6rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88; margin-bottom: 1.5rem; }
.case__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.case__grid .lead { max-width: none; font-size: var(--step-1); line-height: 1.4; }
.case__meta { margin: 0; display: grid; gap: .9rem; align-content: start; }
.case__meta div { border-top: 1px solid var(--line); padding-top: .6rem; }
.case__meta dt { margin-bottom: .2rem; }
.case__meta dd { margin: 0; font-weight: 600; }
.case__gallery { display: grid; gap: 1rem; }
.case__gallery img { display: block; width: auto; max-width: 100%; height: auto; max-height: 85vh; margin: 0 auto; border-radius: 3px; }

/* Carrusel de misiones (home) */
.projects--carousel {
  display: grid; grid-auto-flow: column; grid-template-columns: none;
  grid-auto-columns: calc((100% - 2 * clamp(1.25rem, 2.5vw, 2rem)) / 3);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; cursor: grab; padding-bottom: .5rem;
}
.projects--carousel::-webkit-scrollbar { display: none; }
.projects--carousel > .project { scroll-snap-align: start; }
.projects--carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.projects--carousel.is-dragging .project { pointer-events: none; }
.projects--carousel:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
@media (max-width: 960px) { .projects--carousel { grid-template-columns: none; grid-auto-columns: calc((100% - clamp(1.25rem, 2.5vw, 2rem)) / 2); } }
@media (max-width: 560px) { .projects--carousel { grid-template-columns: none; grid-auto-columns: 82%; } }
.carousel-nav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.carousel-btn { width: 2.9rem; height: 2.9rem; border-radius: 999px; border: 1.5px solid var(--red); background: none; color: var(--red); font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer; transition: background .3s, color .3s, opacity .3s; }
.carousel-btn:hover:not(:disabled) { background: var(--red); color: var(--bg); }
.carousel-btn:disabled { opacity: .3; cursor: default; }
@media (max-width: 760px) { .case__grid { grid-template-columns: 1fr; } }

/* ---------- Bloque rojo ---------- */
.houston { position: relative; overflow: hidden; background: var(--red); color: var(--bg); padding-block: clamp(5.5rem, 12vw, 10rem); }
.houston .display, .houston .label, .houston .h2 { color: var(--bg); }
.houston .orbit .ring { stroke: var(--bg); }
.houston .orbit .sat { fill: var(--bg); }
.houston .orbit { width: min(60vw, 860px); }
@media (max-width: 760px) { .houston .orbit { width: 100%; bottom: 2%; } }
.houston .wrap { position: relative; z-index: 1; }
.mail-link {
  display: inline-block; margin-top: clamp(1.75rem, 3vw, 2.5rem);
  font-size: clamp(1.5rem, 0.8rem + 4vw, 4.6rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 3px no-repeat; padding-bottom: .1em;
  transition: background-size .6s var(--ease);
}
.mail-link:hover { background-size: 0% 3px; background-position: right bottom; }
.houston .btn { --c: var(--bg); --t: var(--red); }
.houston :focus-visible { outline-color: var(--bg); }
.houston__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2rem; }

/* ---------- Cabecera de páginas interiores ---------- */
.page-head { position: relative; overflow: hidden; padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.page-head__row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.page-head__row .label { text-align: center; max-width: 19ch; margin: 0; font-size: clamp(.9rem, .65rem + .55vw, 1.2rem); line-height: 1.1; }
.page-head .orbit { width: min(56vw, 780px); }
@media (max-width: 760px) { .page-head .orbit { width: 100%; bottom: 0; } }
@media (max-width: 760px) { .page-head__row { grid-template-columns: 1fr; } .page-head__row .label { text-align: left; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(3rem, 7vw, 7rem); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { display: grid; gap: 2.25rem; align-content: start; }
.contact-card .mail-link { color: var(--red); margin-top: .6rem; font-size: clamp(1.4rem, 1rem + 1.8vw, 2.4rem); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.next-steps { list-style: none; margin: .9rem 0 0; padding: 0; counter-reset: n; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 2rem 1fr; padding: .7rem 0; border-top: 1px solid var(--line); }
.next-steps li::before { content: counter(n); color: var(--red); font-weight: 800; }
.socials { display: flex; gap: 1.5rem; margin-top: .9rem; }
.socials a { color: var(--red); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-decoration: none; }
.socials a:hover { text-decoration: underline; text-underline-offset: 3px; }

.form { display: grid; gap: 1.75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .45rem; position: relative; }
.field label, .field legend { color: var(--red); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 0; }
.field .opt { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: var(--step-1); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: .5rem 0;
  -webkit-appearance: none; appearance: none; transition: border-color .3s ease;
}
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--red); }
.field [aria-invalid="true"] { border-bottom-color: var(--red); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.choice input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.choice label {
  color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; padding: .55em 1em; cursor: pointer;
  font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  transition: background .3s var(--ease), color .3s var(--ease); user-select: none;
}
.choice input:checked + label, .choice label:hover { background: var(--red); color: var(--bg); }
.choice input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 3px; }
.error { color: var(--red); font-size: var(--step--1); font-weight: 600; min-height: 1.2em; margin: 0; }
.form-send { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-note { color: var(--muted); font-size: var(--step--1); margin: 0; max-width: 34ch; }
.status { font-weight: 600; margin: 0; min-height: 1.2em; color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { padding-top: clamp(4rem, 8vw, 6rem); padding-bottom: 2rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
.footer-top .claim { color: var(--red); font-size: var(--step-2); font-weight: 800; text-transform: uppercase; letter-spacing: -.05em; line-height: .92; max-width: 13ch; }
.footer-top h2 { margin-bottom: .9rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-top a { text-decoration: none; font-weight: 500; }
.footer-top a:hover { color: var(--red); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-top > :first-child { grid-column: 1 / -1; } }
.footer-logo { margin-top: clamp(3.5rem, 8vw, 6rem); color: var(--red); }
.footer-logo svg { width: 100%; height: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; color: var(--muted); font-size: var(--step--1); }
.footer-bottom p { margin: 0; }
.to-top { background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-split] .w > span, .js .reveal, .js .rule, .js .project__media { transform: none !important; opacity: 1 !important; clip-path: none !important; }
  .js .orbit .ring { stroke-dashoffset: 0; }
  .marquee__track { animation: none; }
  .curtain { display: none; }
}

/* Formulario: campo trampa anti-spam y estado de envío */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }
.status a { color: inherit; }
