/* Soltando Ideas — sitio. Línea gráfica del manual de marca. */
@font-face { font-family: "Sporting Grotesque"; src: url("assets/fonts/SportingGrotesque-Bold-web.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Avara"; src: url("assets/fonts/Avara-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Necto Mono"; src: url("assets/fonts/NectoMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("assets/fonts/Ronzino-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("assets/fonts/Ronzino-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --sumi: #0B0A09;
  --noche: #060505;
  --papel: #F4EFE9;
  --idea: #FFC814;
  --bermellon: #FF2B3A;
  --tenue: rgba(244, 239, 233, 0.62);
  --linea: rgba(244, 239, 233, 0.16);
  --margen: clamp(18px, 4vw, 64px);
  --suave: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--noche); scroll-behavior: smooth; }
body { margin: 0; background: transparent; color: var(--papel); font-family: "Ronzino", Georgia, serif; font-size: 18px; line-height: 1.5; overflow-x: clip; /* clip y no hidden: hidden rompería las secciones fijas (sticky) */ -webkit-font-smoothing: antialiased; }
body.cargando, body.visor-abierto { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--idea); color: var(--sumi); }

.mono { font-family: "Necto Mono", ui-monospace, monospace; font-size: clamp(14px, 1.15vw, 19px); letter-spacing: 0.06em; color: var(--tenue); }
.titular { font-family: "Sporting Grotesque", "Arial Black", sans-serif; font-weight: 700; letter-spacing: -0.047em; line-height: 0.9; text-transform: lowercase; margin: 0; }
.acento { font-family: "Avara", Georgia, serif; font-style: italic; font-weight: 700; color: var(--idea); letter-spacing: -0.012em; }
.punto { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--idea); margin-right: 0.6em; vertical-align: 0.05em; }
.sello { display: inline-flex; justify-content: center; align-items: center; width: 1em; height: 1em; border-radius: 11%; background: var(--idea); color: var(--sumi); font-family: "Avara", serif; font-style: italic; font-weight: 700; font-size: 1em; line-height: 1; rotate: 6deg; }

#tinta { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .pie { position: relative; z-index: 1; }

/* ---------- Entrada ---------- */
.entrada { position: fixed; inset: 0; z-index: 90; background: var(--noche); display: grid; place-items: center; transition: clip-path 0.9s var(--suave); clip-path: inset(0 0 0 0); }
.entrada.fuera { clip-path: inset(0 0 100% 0); pointer-events: none; }
.entrada__enso { grid-area: 1 / 1; width: min(52vmin, 440px); aspect-ratio: 1; background: url("assets/img/enso.png") center / contain no-repeat; -webkit-mask-image: conic-gradient(from 8deg, transparent calc(360deg - var(--a)), #000 0); mask-image: conic-gradient(from 8deg, transparent calc(360deg - var(--a)), #000 0); animation: trazo 1.5s cubic-bezier(0.45, 0, 0.2, 1) 0.15s forwards; }
@keyframes trazo { to { --a: 360deg; } }
.entrada__num { grid-area: 1 / 1; font-family: "Avara", serif; font-style: italic; font-weight: 700; font-size: min(11vmin, 92px); color: var(--idea); }
.entrada__txt { position: absolute; bottom: var(--margen); left: 50%; translate: -50% 0; }

/* ---------- Cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--idea); pointer-events: none; display: none; place-items: center; transition: width 0.25s var(--suave), height 0.25s var(--suave), margin 0.25s var(--suave); will-change: transform; }
.cursor span { font-family: "Necto Mono", monospace; font-size: 12.5px; letter-spacing: 0.04em; color: var(--sumi); opacity: 0; white-space: nowrap; transition: opacity 0.15s; }
.cursor.grande { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.cursor.grande span { opacity: 1; }
.cursor.medio { width: 34px; height: 34px; margin: -17px 0 0 -17px; mix-blend-mode: difference; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: grid; }
  body, a, button, input, textarea { cursor: none; }
}
.flotante { position: fixed; left: 0; top: 0; z-index: 40; width: clamp(150px, 15vw, 240px); aspect-ratio: 9 / 16; overflow: hidden; pointer-events: none; opacity: 0; scale: 0.6; rotate: -6deg; transition: opacity 0.25s, scale 0.35s var(--suave); will-change: transform; border-radius: 6px; }
.flotante.visible { opacity: 1; scale: 1; }
.flotante video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Navegación ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 18px var(--margen) 34px; background: linear-gradient(rgba(6, 5, 5, 0.9), rgba(6, 5, 5, 0.55) 55%, transparent); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav__logo img { height: clamp(46px, 4.8vw, 76px); width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 36px); color: var(--papel); }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--idea); scale: 0 1; transform-origin: left; transition: scale 0.3s var(--suave); }
.nav__links a:hover::after { scale: 1 1; }
.sonido { display: inline-flex; align-items: flex-end; gap: 4px; height: 22px; font-family: inherit; font-size: inherit; letter-spacing: inherit; color: var(--tenue); }
.sonido i { display: block; width: 4px; height: 5px; background: var(--idea); }
.sonido span { margin-left: 8px; align-self: center; }
.sonido[aria-pressed="true"] { color: var(--papel); }
.sonido[aria-pressed="true"] i { animation: barra 0.7s ease-in-out infinite alternate; }
.sonido[aria-pressed="true"] i:nth-child(2) { animation-delay: -0.3s; }
.sonido[aria-pressed="true"] i:nth-child(3) { animation-delay: -0.55s; }
@keyframes barra { from { height: 4px; } to { height: 20px; } }

/* ---------- Portada ---------- */
.portada { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 150px var(--margen) 90px; }
.esquinas b { position: absolute; width: 34px; height: 34px; border: 0 solid rgba(244, 239, 233, 0.4); }
.esquinas b:nth-child(1) { left: var(--margen); top: 118px; border-left-width: 3px; border-top-width: 3px; }
.esquinas b:nth-child(2) { right: var(--margen); top: 118px; border-right-width: 3px; border-top-width: 3px; }
.esquinas b:nth-child(3) { left: var(--margen); bottom: 28px; border-left-width: 3px; border-bottom-width: 3px; }
.esquinas b:nth-child(4) { right: var(--margen); bottom: 28px; border-right-width: 3px; border-bottom-width: 3px; }
.portada__sobre { margin: 0 0 3vh; padding-left: 0.4em; }
.portada__titular { font-size: clamp(40px, 10.4vw, 210px); }
.portada__titular .linea { display: block; white-space: nowrap; }
.portada__titular .linea:nth-child(2) { padding-left: 0.35em; }
.portada__titular .linea:nth-child(3) { padding-left: 0.18em; font-size: 1.12em; line-height: 0.82; }
.pal { display: inline-block; white-space: nowrap; }
.letra { display: inline-block; translate: 0 115%; opacity: 0; transition: translate 0.9s var(--suave), opacity 0.4s; will-change: transform; }
body:not(.cargando) .letra { translate: 0 0; opacity: 1; }
.portada__pie { position: absolute; left: calc(var(--margen) + 54px); right: calc(var(--margen) + 54px); bottom: 34px; display: flex; justify-content: space-between; align-items: center; }
.portada__baja { display: inline-flex; align-items: center; gap: 10px; }
.portada__baja i { display: block; width: 1px; height: 34px; background: var(--idea); transform-origin: top; animation: baja 1.6s var(--suave) infinite; }
@keyframes baja { 0% { scale: 1 0; } 50% { scale: 1 1; } 100% { scale: 1 1; translate: 0 34px; opacity: 0; } }

/* ---------- Cinta ---------- */
.cinta { position: relative; z-index: 1; overflow: hidden; border-block: 1px solid var(--linea); padding: clamp(14px, 2vw, 28px) 0; background: rgba(6, 5, 5, 0.55); rotate: -1.4deg; margin: 2vh -2vw; }
.cinta__pista { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 44px); width: max-content; font-family: "Sporting Grotesque", sans-serif; font-weight: 700; font-size: clamp(34px, 6vw, 96px); letter-spacing: -0.047em; line-height: 1; white-space: nowrap; will-change: transform; }
.cinta__pista .sello { font-size: 0.42em; }

/* ---------- La caja ---------- */
.caja { height: 320vh; position: relative; --p: 0; }
.caja__fija { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
/* El titular vive arriba y la caja empieza debajo: se leen los dos. Al bajar, la caja sube y lo cubre todo. */
.caja__titular { position: absolute; left: 0; right: 0; top: 15svh; display: flex; flex-direction: column; align-items: center; font-size: clamp(44px, 10.5vw, 200px); white-space: nowrap; opacity: calc(1 - var(--p) * 2.2); }
.caja__titular span:nth-child(1) { translate: calc(var(--p) * -24vw) 0; }
.caja__titular span:nth-child(2) { translate: calc(var(--p) * 24vw) 0; font-size: 1.12em; line-height: 0.86; }
.caja__marco { position: absolute; z-index: 2; left: 50%; top: calc(74svh - 24svh * var(--p)); translate: -50% -50%; overflow: hidden; width: calc(30vw + (100vw - 30vw) * var(--p)); height: calc(16.9vw + (100svh - 16.9vw) * var(--p)); max-height: calc(34svh + 66svh * var(--p)); outline: calc((1 - var(--p)) * 3px) solid var(--papel); outline-offset: calc((1 - var(--p)) * 10px); rotate: calc((1 - var(--p)) * -4deg); min-width: 220px; min-height: 124px; }
.caja__marco video { width: 100%; height: 100%; object-fit: cover; }
.caja__play { position: absolute; left: 50%; bottom: 8vh; translate: -50% 0; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--idea); color: var(--sumi); border-radius: 999px; opacity: clamp(0, calc((var(--p) - 0.82) * 8), 1); }
.caja__play i { display: block; width: 0; height: 0; border-left: 10px solid var(--sumi); border-block: 6px solid transparent; }
.caja__nota { position: absolute; bottom: 34px; left: var(--margen); opacity: calc(1 - var(--p) * 3); }

/* ---------- Piezas ---------- */
.piezas { position: relative; height: 420vh; background: var(--noche); }
.piezas__fija { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 4vh; padding-top: 70px; }
.piezas__cab { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 var(--margen); }
.piezas__cab .titular { font-size: clamp(40px, 6.4vw, 120px); }
.piezas__cab p { margin: 0; }
.piezas__pista { display: flex; gap: clamp(16px, 2.4vw, 40px); padding: 0 var(--margen); width: max-content; will-change: transform; }
.pieza { position: relative; flex: none; height: min(62svh, 720px); aspect-ratio: 9 / 16; overflow: hidden; text-align: left; border-radius: 8px; background: var(--sumi); transform-style: preserve-3d; transition: transform 0.5s var(--suave); will-change: transform; }
.pieza:nth-child(even) { margin-top: 5vh; }
.pieza video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.2) brightness(0.72); scale: 1.06; transition: filter 0.5s, scale 0.8s var(--suave); }
.pieza:hover video, .pieza.activa video { filter: none; scale: 1; }
.pieza::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 5, 5, 0.85), transparent 45%); }
.pieza span { position: absolute; z-index: 2; left: 18px; right: 18px; }
.pieza__n { top: 16px; color: var(--idea); }
.pieza__t { bottom: 48px; font-family: "Sporting Grotesque", sans-serif; font-weight: 700; font-size: clamp(22px, 2.3vw, 38px); letter-spacing: -0.047em; line-height: 0.95; text-transform: lowercase; }
.pieza__d { bottom: 18px; font-size: clamp(12px, 0.95vw, 15px); }

/* ---------- Qué hacemos ---------- */
.hago { position: relative; padding: 18vh 0 12vh; }
.hago__sobre { margin: 0 var(--margen) 4vh; }
.fila { position: relative; display: grid; grid-template-columns: 5ch 1fr minmax(200px, 30ch); align-items: center; gap: 2vw; padding: clamp(14px, 2.4vw, 36px) var(--margen); border-top: 1px solid var(--linea); overflow: hidden; transition: color 0.3s; }
.fila:last-child { border-bottom: 1px solid var(--linea); }
.fila::before { content: ""; position: absolute; inset: 0; background: var(--idea); scale: 1 0; transform-origin: bottom; transition: scale 0.45s var(--suave); }
.fila > * { position: relative; }
.fila__t { white-space: nowrap; font-size: clamp(25px, 6vw, 120px); transition: translate 0.45s var(--suave); }
.fila__d { font-size: clamp(17px, 1.5vw, 24px); color: var(--tenue); transition: color 0.3s; }
.fila:hover { color: var(--sumi); }
.fila:hover::before { scale: 1 1; }
.fila:hover .fila__t { translate: 2vw 0; }
.fila:hover .fila__d, .fila:hover .fila__n, .fila:hover .acento { color: var(--sumi); }
.fila .acento { font-size: 1.1em; transition: color 0.3s; }
.hago__como { margin: 5vh var(--margen) 0; }

/* ---------- Manifiesto ---------- */
.manifiesto { height: 260vh; position: relative; }
.manifiesto__fija { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: 0 var(--margen); }
.manifiesto__txt { font-size: clamp(40px, 8.6vw, 170px); text-align: center; }
.manifiesto__txt span { display: inline-block; opacity: 0.13; transition: opacity 0.35s; }
.manifiesto__txt span.dicha { opacity: 1; }
.tachada { position: relative; }
.tachada::after { content: ""; position: absolute; left: -3%; right: -3%; top: 52%; height: 0.11em; background: var(--bermellon); rotate: -3deg; scale: var(--t, 0) 1; transform-origin: left; transition: scale 0.4s var(--suave); }

/* ---------- Quiénes somos ---------- */
.sobre { position: relative; display: grid; grid-template-columns: minmax(220px, 0.8fr) 1.2fr; align-items: center; gap: 6vw; padding: 14vh var(--margen); }
.sobre__enso { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; display: grid; place-items: center; }
.sobre__enso img { grid-area: 1 / 1; width: 100%; animation: gira 60s linear infinite; }
.sobre__enso .sello { grid-area: 1 / 1; font-size: clamp(60px, 9vw, 140px); }
@keyframes gira { to { rotate: -360deg; } }
.sobre__grande { font-family: "Sporting Grotesque", sans-serif; font-weight: 700; font-size: clamp(34px, 5.2vw, 96px); letter-spacing: -0.047em; line-height: 0.98; margin: 2vh 0 3vh; text-transform: lowercase; }
.sobre__grande .acento { font-size: 1.12em; }
.sobre__chico { color: var(--tenue); max-width: 40ch; font-size: clamp(18px, 1.6vw, 26px); }

/* ---------- Contacto ---------- */
.contacto { position: relative; padding: 16vh var(--margen) 12vh; display: grid; gap: 6vh; }
.contacto__titular { font-size: clamp(52px, 12.4vw, 240px); }
.contacto__titular .acento { display: block; font-size: 1.12em; padding-left: 0.5em; }
.formulario { position: relative; display: grid; gap: 26px; max-width: 880px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.campo { display: grid; gap: 8px; }
.campo input, .campo textarea { width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--linea); color: var(--papel); font-family: "Ronzino", serif; font-size: clamp(22px, 2.3vw, 36px); padding: 10px 0 14px; outline: none; resize: vertical; transition: border-color 0.25s; }
.campo input:focus, .campo textarea:focus { border-color: var(--idea); }
.formulario__botones, .contacto__redes { display: flex; flex-wrap: wrap; gap: 14px; }
.formulario__aviso { min-height: 1.4em; margin: 0; color: var(--idea); }
.boton { display: inline-flex; align-items: center; padding: 18px 30px; border: 2px solid var(--papel); border-radius: 999px; font-family: "Sporting Grotesque", sans-serif; font-weight: 700; font-size: clamp(16px, 1.35vw, 22px); letter-spacing: -0.03em; text-transform: lowercase; transition: background 0.25s, color 0.25s, border-color 0.25s; will-change: transform; }
.boton:hover { background: var(--papel); color: var(--sumi); }
.boton--red { gap: 12px; padding: 14px 26px 14px 20px; }
.boton--red svg { width: 1.45em; height: 1.45em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boton--red svg .lleno { fill: currentColor; stroke: none; }
.boton--red[hidden] { display: none; }
@media (max-width: 767px) {
  .contacto__redes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .boton--red { justify-content: center; gap: 8px; padding: 13px 10px; min-width: 0; font-size: 15px; }
}
.boton--lleno { background: var(--idea); border-color: var(--idea); color: var(--sumi); }
.boton--lleno:hover { background: var(--papel); border-color: var(--papel); }
.boton:focus-visible, .pieza:focus-visible, .caja__marco:focus-visible, .nav a:focus-visible, .sonido:focus-visible { outline: 3px solid var(--idea); outline-offset: 4px; }

/* ---------- Pie ---------- */
.pie { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding: 30px var(--margen); border-top: 1px solid var(--linea); background: var(--noche); }
.pie img { height: clamp(52px, 5vw, 72px); width: auto; }

/* ---------- Visor ---------- */
.visor { position: fixed; inset: 0; z-index: 80; background: rgba(6, 5, 5, 0.96); display: grid; place-items: center; padding: 64px 4vw 4vh; animation: abre 0.45s var(--suave); }
.visor[hidden] { display: none; }
@keyframes abre { from { clip-path: circle(0% at var(--x, 50%) var(--y, 50%)); } to { clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); } }
.visor video { max-width: 100%; max-height: calc(100svh - 64px - 4vh); border-radius: 6px; background: #000; }
.visor__cerrar { position: absolute; top: 20px; right: var(--margen); color: var(--papel); padding: 8px 0; }

/* ---------- Aparición al bajar ---------- */
.revela { opacity: 0; translate: 0 40px; transition: opacity 0.8s var(--suave), translate 0.8s var(--suave); }
.revela.visto { opacity: 1; translate: 0 0; }

/* ---------- Celular ---------- */
@media (max-width: 820px) {
  .nav__links a { display: none; }
  .portada__pie { left: var(--margen); right: var(--margen); bottom: 22px; }
  .portada__pie span:first-child { display: none; }
  .esquinas { display: none; }
  .portada__titular .linea:nth-child(2) { padding-left: 0.3em; }
  .caja { height: 240vh; }
  .piezas { height: auto; }
  .piezas__fija { position: static; height: auto; padding: 12vh 0 8vh; }
  .piezas__cab { flex-direction: column; align-items: flex-start; gap: 10px; }
  .piezas__pista { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; padding-bottom: 14px; }
  .pieza { height: 60svh; scroll-snap-align: center; }
  .pieza:nth-child(even) { margin-top: 0; }
  .pieza video { filter: none; }
  .fila { grid-template-columns: 4ch 1fr; }
  .fila__d { grid-column: 2; }
  .sobre { grid-template-columns: 1fr; }
  .sobre__enso { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .letra, .revela { transition: none; translate: 0 0; opacity: 1; }
  .entrada__enso, .sobre__enso img, .portada__baja i, .sonido i { animation: none; --a: 360deg; }
  .cinta__pista { transform: none !important; }
}
