/* AETHOS v2 · tema del scroll world + secciones bajo el recorrido */
@font-face { font-family: 'Geist'; src: url('../fonts/geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-italic-var.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --ink: #1A1B1D;
  --ink-soft: #5C5A57;
  --paper: #ECEAE4;
  --paper-2: #E2DFD8;
  --fog: #E9E5DE;
  --minio: #EA4E1C;
  --minio-deep: #B23710;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --gutter: clamp(16px, 5vw, 64px);
}
html { background: var(--fog); }
body { margin: 0; background: var(--fog); }

/* ---------- cabecera ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); background: color-mix(in srgb, var(--fog) 72%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.top__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .16em; font-size: .9rem; }
.top__nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.top__nav a { color: var(--ink); text-decoration: none; font-size: .92rem; opacity: .78; }
.top__nav a:hover { opacity: 1; color: var(--minio-deep); }
@media (max-width: 860px) { .top__nav { display: none; } }

/* ---------- lienzo 3D y recorrido ---------- */
#gl { position: fixed; inset: 0 0 auto 0; width: 100%; height: 100%; height: 100lvh; z-index: 0; display: block; opacity: 0; transition: opacity .8s ease; }
.gl-ready #gl { opacity: 1; }
.story { position: relative; z-index: 1; }
.stop { position: relative; min-height: 190vh; padding-inline: var(--gutter); }
.stop__card { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; max-width: min(34rem, 38vw); padding-top: 76px; }
.stop__card::before { content: ""; position: absolute; z-index: -1; inset: 0 auto 0 calc(-1 * var(--gutter)); width: min(62vw, 820px); background: linear-gradient(90deg, color-mix(in srgb, var(--fog) 88%, transparent) 0%, color-mix(in srgb, var(--fog) 55%, transparent) 55%, transparent 100%); pointer-events: none; }
.stop h1, .stop h2 { margin: 0; font-size: clamp(1.8rem, min(5.4vw, 9.5svh), 4.6rem); line-height: 1.0; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; color: var(--ink); }
.stop__body { margin: 22px 0 0; font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.6; color: #3F3D3A; max-width: 32rem; text-wrap: pretty; }
.stop__body strong { color: var(--ink); font-weight: 600; }
.chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 13px; border-radius: 999px; font-size: .84rem; background: color-mix(in srgb, var(--paper) 80%, transparent); border: 1px solid color-mix(in srgb, var(--minio) 28%, transparent); color: var(--minio-deep); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stop .kicker { color: #4A4845; }
/* de dónde sale lo que se ve en la escena: texto real, nítido y legible por lectores de pantalla */
.stop__proof { display: flex; gap: 9px; align-items: baseline; margin: 18px 0 0; font: 500 .75rem/1.45 'Geist Mono', ui-monospace, monospace; letter-spacing: .01em; color: #45433F; }
.stop__proof::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--minio); transform: translateY(-1px); }

@media (max-width: 860px) and (orientation: portrait) {
  .stop { min-height: 170vh; }
  .stop__card { justify-content: flex-end; padding-bottom: max(28px, env(safe-area-inset-bottom)); max-width: none; }
  .stop__card::before { inset: auto calc(-1 * var(--gutter)) 0; width: auto; height: 62%; background: linear-gradient(0deg, color-mix(in srgb, var(--fog) 94%, transparent) 30%, color-mix(in srgb, var(--fog) 60%, transparent) 70%, transparent 100%); }
  .stop h1, .stop h2 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .stop__body { font-size: 1rem; margin-top: 14px; }
  .chips { margin-top: 16px; }
  .stop--inicio .chips { display: none; } /* repiten lo que dice el párrafo: mejor más sitio para la pieza */
}
@media (max-width: 860px) and (orientation: portrait) and (max-height: 700px) {
  .ctas .btn--ghost { display: none; }
}
/* las dos paradas con plano largo miden lo mismo en todas las pantallas */
.stop--inicio { min-height: 210vh; }
.stop--final { min-height: 280vh; }

/* pantallas bajas (portátil con barras, móvil tumbado): el texto cabe siempre; lo honesto no se esconde */
@media (max-height: 760px) {
  .stop .kicker { margin-bottom: 12px; }
  .stop__body { margin-top: 12px; font-size: .95rem; line-height: 1.5; }
  .chips { display: none; }
  .ctas { margin-top: 16px; }
  .drag-hint { display: none; }
  .stop__proof { margin-top: 12px; }
}
@media (max-height: 520px) {
  .stop .kicker, .stop__body { display: none; }
  .stop__card { padding-top: 64px; }
}

/* sin WebGL: imagen fija por sección */
.no-gl #gl { display: none; }
.no-gl .stop { background: var(--fog) center / cover no-repeat fixed; }
.no-gl .stop--inicio { background-image: url('../assets/stills/inicio-169.webp'); }
.no-gl .stop--final { background-image: url('../assets/stills/final-169.webp'); }
@media (max-width: 860px) {
  .no-gl .stop--inicio { background-image: url('../assets/stills/inicio-916.webp'); }
  .no-gl .stop--final { background-image: url('../assets/stills/final-916.webp'); }
}

/* ---------- base ---------- */
body { color: var(--ink); font-family: 'Geist', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--minio); outline-offset: 3px; }
main[tabindex="-1"]:focus, section[tabindex="-1"]:focus { outline: none; }

/* lo que va después del recorrido tapa las capas fijas del motor */
.after, .footer { position: relative; z-index: 2; background: var(--paper); }
.after::before { content: ""; position: absolute; left: 0; right: 0; top: -18vh; height: 18vh; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
.wrap { width: min(1200px, 100% - 2 * clamp(16px, 5vw, 64px)); margin-inline: auto; }
.section { padding-block: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section__head { max-width: 46rem; margin-bottom: clamp(40px, 6vw, 72px); }
.kicker { display: flex; gap: 12px; align-items: baseline; margin: 0 0 18px; font: 500 .78rem/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.kicker b { color: var(--minio-deep); font-weight: 600; }
.section h2 { margin: 0; font-size: clamp(2.2rem, 5.2vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
.serif { font-family: 'Cormorant', Georgia, serif; font-style: italic; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: lining-nums; } /* «3D» sin el 3 colgante */
.lead { margin: 22px 0 0; font-size: clamp(1.02rem, 1.4vw, 1.15rem); line-height: 1.6; color: var(--ink-soft); max-width: 40rem; text-wrap: pretty; }
.nw { white-space: nowrap; }
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--minio); text-underline-offset: 3px; }

/* ---------- proyectos ---------- */
.projects { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(14px, 2vw, 24px); }
.project { grid-column: span 3; display: flex; flex-direction: column; background: #F6F5F1; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.project--wide { grid-column: span 4; }
.project--tall { grid-column: span 2; grid-row: span 2; }
.project--half { grid-column: span 2; }
.project--full { grid-column: 1 / -1; }
.project__media { background: var(--paper-2); overflow: hidden; }
.project__media img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.project--tall .project__media { flex: 1; min-height: 0; background: #08030B; } /* el color del pie del fotograma: el hueco sigue la imagen */
.project--tall .project__media img { aspect-ratio: auto; height: auto; }
.project__body { padding: clamp(18px, 2.2vw, 26px); }
.project__tag { display: block; font: 500 .72rem/1.4 'Geist Mono', ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.project h3 { margin: 10px 0 8px; font-size: 1.3rem; letter-spacing: -.015em; font-weight: 600; }
.project p { margin: 0; line-height: 1.55; color: var(--ink-soft); }
.project--cta { background: var(--ink); color: var(--paper); border-color: var(--ink); text-decoration: none; padding: clamp(22px, 2.6vw, 32px); gap: 10px; align-items: flex-start; justify-content: flex-end; }
.project--cta h3 { margin: 4px 0 0; }
.project--cta .btn { margin-top: 14px; }
.project--cta:hover .btn { background: var(--paper); color: var(--ink); }
@media (min-width: 901px) { .project--full.project--cta { grid-column: span 2; } }
.project--cta p, .project--cta .project__tag { color: color-mix(in srgb, var(--paper) 72%, transparent); }

/* ---------- método ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 3vw, 36px); }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step__n { font: 600 .8rem/1 'Geist Mono', ui-monospace, monospace; color: var(--minio-deep); }
.step__line { display: none; }
.step h3 { margin: 12px 0 8px; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.step p { margin: 0; line-height: 1.55; color: var(--ink-soft); }

/* ---------- preguntas ---------- */
.faq { max-width: 52rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 1.12rem; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--minio); font-weight: 400; transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { margin: 0 0 22px; line-height: 1.6; color: var(--ink-soft); max-width: 44rem; }

/* ---------- contacto ---------- */
.contact { background: var(--ink); color: var(--paper); border-top: 0; }
.contact .kicker, .contact .lead, .contact__note { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.contact .kicker b { color: var(--minio); } /* sobre fondo oscuro el minio vivo da 4,6:1 */
.contact__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.contact__note { margin-top: 22px; font: 500 .78rem/1.5 'Geist Mono', ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
.contact__privacy { margin-top: 28px; max-width: 46rem; font-size: .85rem; line-height: 1.55; color: color-mix(in srgb, var(--paper) 55%, transparent); }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 500; text-decoration: none; transition: transform .16s cubic-bezier(.2, .7, .2, 1), background-color .16s; }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--minio-deep); color: #fff; } /* blanco sobre minio oscuro: 6,1:1 (decisión del Steve, 23/11/2026) */
.btn--solid:hover { background: #8F2C0D; }
.btn--ghost { border: 1px solid currentColor; color: inherit; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }

/* ---------- pie ---------- */
.footer { background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 96px) 0 28px; border-top: 1px solid color-mix(in srgb, var(--paper) 12%, transparent); }
.footer__grid { width: min(1200px, 100% - 2 * clamp(16px, 5vw, 64px)); margin-inline: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; }
.footer .brand img { display: block; width: 180px; height: auto; }
.footer .lead { font-size: .95rem; color: color-mix(in srgb, var(--paper) 62%, transparent); max-width: 30em; }
.footer h3 { margin: 0 0 14px; font: 500 .74rem/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 55%, transparent); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { color: var(--minio); }
.footer__word { width: min(1200px, 100% - 2 * clamp(16px, 5vw, 64px)); margin: clamp(48px, 8vw, 96px) auto 0; color: color-mix(in srgb, var(--paper) 8%, transparent); }
.footer__word svg { display: block; width: 100%; height: auto; }
.footer__legal { width: min(1200px, 100% - 2 * clamp(16px, 5vw, 64px)); margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; color: color-mix(in srgb, var(--paper) 55%, transparent); }
.footer__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .project, .project--wide, .project--half { grid-column: span 2; }
  .project--tall { grid-column: span 2; grid-row: auto; }
  .project--tall .project__media img { aspect-ratio: 4 / 5; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .faq summary::after { transition: none; }
}

/* entrada: el logotipo de la cabecera viaja hasta la pieza 3D */
.logo-ghost { position: fixed; z-index: 70; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; }
.drag-hint { margin: 22px 0 0; font: 500 .74rem/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: #6A6763; }
.drag-hint span { color: var(--minio); margin-right: 6px; }
.can-drag .story { cursor: grab; }
.can-drag .stop__card > * { cursor: auto; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }
.no-gl .drag-hint { display: none; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .drag-hint { display: none; } }

/* vídeos que alimentan las pantallas 3D: presentes en el documento, invisibles */
.gl-video { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
