/* =====================================================================
   Almira · almiraproduccion.es
   Diseño basado en el ident: noche azul, el azul del plasma de la TV,
   el arcoíris del símbolo y los haces Λ que salen de la mirada.
   ===================================================================== */

/* Jost (SIL Open Font License, ver assets/fonts/OFL-Jost.txt) — alojada en el propio servidor */
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night-0: #060a14;
  --night-1: #0a1020;
  --night-2: #101a30;
  --night-3: #18243f;
  --ink: #f4f0e8;
  --ink-2: #c9cdd7;
  --muted: #8c96aa;
  --line: rgba(244, 240, 232, 0.12);
  --line-2: rgba(244, 240, 232, 0.22);
  --plasma: #8fc7f5;
  --magenta: #cd00ec;
  /* arcoíris muestreado del símbolo del logotipo */
  --spectrum: linear-gradient(90deg, #f300c1 0%, #f30900 12%, #f67200 22%, #f7c800 31%, #70e900 40%,
              #00c010 50%, #00e26e 58%, #00ebe2 66%, #00b7f6 74%, #0051f5 82%, #1500f6 89%, #6e00f5 95%, #a900f3 100%);
  --font: "Jost", "Futura", "Century Gothic", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night-1);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { color: var(--ink); font-weight: 300; line-height: 1.08; letter-spacing: -0.012em; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h3 { font-size: 1.3rem; font-weight: 400; line-height: 1.25; letter-spacing: 0; }
em { font-style: normal; color: var(--ink); }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }   /* :where = sin especificidad */
:focus-visible { outline: 2px solid var(--plasma); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(143, 199, 245, 0.35); color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100; padding: 0.8em 1.2em; border-radius: 999px;
  background: var(--ink); color: var(--night-1); font-weight: 500; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }

.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ etiquetas y botones */
.label {
  display: inline-flex; align-items: center; gap: 0.9em; margin: 0 0 1.5rem;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted);
}
.label::before { content: ""; width: 32px; height: 1px; background: var(--spectrum); }
.label--center { justify-content: center; }
.label--center::after { content: ""; width: 32px; height: 1px; background: var(--spectrum); transform: scaleX(-1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75em;
  min-height: 52px; padding: 0 1.7em; border-radius: 999px; border: 1px solid transparent;
  font: 500 0.78rem/1.2 var(--font); letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--night-1); }
.btn--primary:hover { background: #fff; box-shadow: 0 12px 40px -12px rgba(143, 199, 245, 0.75); }
/* Borde arcoíris en bucle. En reposo está quieto (--cinta: 0%); al pasar el puntero circula como una cinta
   transportadora partiendo exactamente de esa misma posición. */
@property --cinta { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.btn--spectrum {
  color: var(--ink);
  background: linear-gradient(var(--night-1), var(--night-1)) padding-box,
              repeating-linear-gradient(90deg, #f300c1 calc(0% + var(--cinta)), #f30900 calc(11% + var(--cinta)), #f67200 calc(20% + var(--cinta)), #f7c800 calc(29% + var(--cinta)), #70e900 calc(37% + var(--cinta)), #00c010 calc(46% + var(--cinta)), #00e26e calc(54% + var(--cinta)), #00ebe2 calc(61% + var(--cinta)), #00b7f6 calc(69% + var(--cinta)), #0051f5 calc(76% + var(--cinta)), #1500f6 calc(83% + var(--cinta)), #6e00f5 calc(88% + var(--cinta)), #a900f3 calc(93% + var(--cinta)), #f300c1 calc(100% + var(--cinta))) border-box;
}
.btn--spectrum:hover, .btn--spectrum:focus-visible { animation: borde-cinta 2.4s linear infinite; }
@keyframes borde-cinta { from { --cinta: 0%; } to { --cinta: -100%; } }

/* ------------------------------------------------------------------ cabecera */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; border-bottom: 1px solid transparent;
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s;
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -48px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 10, 20, 0.7), rgba(6, 10, 20, 0));
  transition: opacity 0.45s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(8, 13, 26, 0.82); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.site-header.is-scrolled::before { opacity: 0; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: 0.85rem; color: var(--ink); text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand__name { font-size: 0.95rem; font-weight: 500; letter-spacing: 0.4em; text-transform: uppercase; margin-right: -0.4em; }
.nav__cta { min-height: 42px; padding: 0 1.4em; }

/* ------------------------------------------------------------------ héroe (el ident) */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; color: var(--ink); }
.hero__media { position: absolute; inset: 0; }
.hero__video, .hero__still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__still img { opacity: 0; }
.hero.is-done .hero__still img, html:not(.js) .hero__still img { opacity: 1; }
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease);
  background: linear-gradient(to top, rgba(6, 10, 20, 0.92) 0%, rgba(6, 10, 20, 0.55) 22%, rgba(6, 10, 20, 0) 45%);
}
.hero.is-done .hero__media::after, html:not(.js) .hero__media::after { opacity: 1; }
.hero__progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--spectrum);
  transform: scaleX(0); transform-origin: left; opacity: 0.85; transition: opacity 0.6s;
}
.hero.is-done .hero__progress { opacity: 0; }

.hero__content {
  position: absolute; left: 50%; bottom: clamp(36px, 8vh, 96px); width: min(760px, 100% - 2 * var(--gutter));
  transform: translateX(-50%); text-align: center; z-index: 2;
}
.js .hero:not(.is-done) .hero__content { opacity: 0; transform: translate(-50%, 18px); pointer-events: none; }
.hero__content { transition: opacity 1.1s var(--ease) 0.25s, transform 1.1s var(--ease) 0.25s; }
.hero__title { display: grid; gap: 0.7rem; margin-bottom: 1.8rem; }
.hero__eyebrow { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-2); line-height: 1.5; }
.hero__line { font-size: clamp(1.7rem, 3.1vw, 2.7rem); font-weight: 300; letter-spacing: -0.005em; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }

.hero__controls { position: absolute; right: var(--gutter); bottom: clamp(36px, 8vh, 96px); z-index: 3; display: flex; gap: 0.6rem; }
.pill {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: 40px; padding: 0 1.05em; border-radius: 999px;
  border: 1px solid rgba(244, 240, 232, 0.28); background: rgba(6, 10, 20, 0.45); color: var(--ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 0.7rem/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}
.pill:hover { border-color: var(--ink); background: rgba(6, 10, 20, 0.7); }
.pill .icon { width: 16px; height: 16px; }
[data-hero-sound] .icon--on, [data-hero-sound][aria-pressed="true"] .icon--off { display: none; }
[data-hero-sound][aria-pressed="true"] .icon--on { display: block; }
.hero .icon--replay, .hero.is-done .icon--skip { display: none; }
.hero.is-done .icon--replay { display: block; }

/* ------------------------------------------------------------------ secciones */
.section { position: relative; padding-block: clamp(80px, 9.5vw, 136px); }
.section__head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section__intro { margin-top: 1.4rem; font-size: 1.12rem; color: var(--ink-2); max-width: 620px; }
.lead { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; font-weight: 300; color: var(--ink); }

/* haz Λ decorativo: blanco en el vértice (el ojo) y arcoíris al abrirse */
.beam { position: absolute; z-index: 0; pointer-events: none; width: var(--w, 560px); height: var(--h, 700px); left: var(--x, 50%); top: var(--y, 0); transform: translateX(-50%); }
.beam__light {
  position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--spectrum); background-size: 240% 100%; background-position: 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 40%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 40%, transparent 92%);
  opacity: var(--o, 0.2); mix-blend-mode: screen; animation: beam-drift 22s ease-in-out infinite alternate;
}
.beam__light::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 26%); }
.beam__eye {
  position: absolute; left: 50%; top: 0; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%);
  background: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.75), 0 0 46px 14px rgba(143, 199, 245, 0.4);
  animation: eye-pulse 5s ease-in-out infinite;
}
@keyframes beam-drift { to { background-position: 100% 0; } }
@keyframes eye-pulse { 50% { box-shadow: 0 0 14px 4px rgba(255, 255, 255, 0.85), 0 0 64px 20px rgba(143, 199, 245, 0.5); } }

/* ------------------------------------------------------------------ contacto */
.contacto { overflow: hidden; text-align: center; background: var(--night-0); padding-block: clamp(110px, 13vw, 180px); }
.contacto__bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--night-0) 0%, rgba(6, 10, 20, 0.35) 30%, rgba(6, 10, 20, 0.55) 100%),
              url("../img/fondo-noche.webp") center / cover no-repeat;
}
.beam--contacto { --w: 900px; --h: 980px; --x: 50%; --y: 64px; --o: 0.13; }
.contacto__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.contacto .section__intro { margin-inline: auto; }
.mail {
  margin: 2.6rem 0 2.4rem; font-size: clamp(1.45rem, 3.6vw, 2.7rem); font-weight: 300; color: var(--ink);
  text-decoration: none; letter-spacing: 0.01em; padding-bottom: 0.25em; overflow-wrap: anywhere;
  background: var(--spectrum) no-repeat 0 100% / 100% 1px; transition: background-size 0.5s var(--ease);
}
.mail:hover { background-size: 100% 2px; }
.mail__dot { color: var(--plasma); text-shadow: 0 0 12px rgba(143, 199, 245, 0.9); }
.contacto__extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; margin-top: 2.2rem; }

/* ------------------------------------------------------------------ pie */
.site-footer { background: var(--night-0); border-top: 1px solid var(--line); padding-top: clamp(64px, 8vw, 104px); font-size: 0.95rem; }
.site-footer__inner { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.site-footer__logo img { width: 100%; height: auto; }
.site-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 2rem clamp(2rem, 8vw, 120px); }
.site-footer__title { color: var(--ink); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer p { color: var(--muted); }
.site-footer a { color: var(--ink-2); text-decoration: none; transition: color 0.3s; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--plasma); text-underline-offset: 4px; }
.site-footer nav li + li { margin-top: 0.35rem; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: clamp(56px, 7vw, 96px);
  padding-block: 1.6rem 2rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom ul { display: flex; gap: 1.6rem; }

/* ------------------------------------------------------------------ aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ páginas de texto (aviso legal, privacidad, 404) */
.page { padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(80px, 10vw, 140px); }
.page .container { max-width: 820px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.page h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 400; margin: 3rem 0 1rem; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 1.2rem; }
.page li + li { margin-top: 0.4rem; }
.page a { color: var(--plasma); text-underline-offset: 3px; }
.page .meta { color: var(--muted); font-size: 0.92rem; }
.placeholder { color: #ffd479; background: rgba(255, 212, 121, 0.1); padding: 0 0.3em; border-radius: 3px; }
.data-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.6rem; margin: 1.4rem 0; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; color: var(--ink); }
.site-header--solid { background: rgba(8, 13, 26, 0.9); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header--solid::before { opacity: 0; }

.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 2rem; background: radial-gradient(60% 50% at 50% 45%, rgba(24, 36, 63, 0.8), var(--night-0)); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 2.6rem 0 1rem; }
.notfound p { margin-bottom: 2.4rem; }
.tv-off { position: relative; width: min(420px, 80vw); height: 120px; margin: 0 auto; }
.tv-off::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform-origin: center;
  background: linear-gradient(90deg, transparent, #dff0ff 20%, #fff 50%, #dff0ff 80%, transparent);
  box-shadow: 0 0 18px 2px rgba(143, 199, 245, 0.8); animation: tv-line 2.6s var(--ease) infinite;
}
.tv-off::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--plasma); box-shadow: 0 0 16px 5px rgba(143, 199, 245, 0.8); opacity: 0; animation: tv-dot 2.6s var(--ease) infinite;
}
@keyframes tv-line { 0% { transform: scaleX(1); opacity: 1; } 45% { transform: scaleX(0.02); opacity: 1; } 50%, 100% { transform: scaleX(0); opacity: 0; } }
@keyframes tv-dot { 0%, 44% { opacity: 0; transform: scale(0.4); } 52% { opacity: 1; transform: scale(1.3); } 64%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }

/* ------------------------------------------------------------------ adaptación */
@media (max-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__logo { width: 190px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
}

/* Héroe en móvil y pantallas verticales: el ident completo en 16:9 y el texto debajo */
@media (max-width: 760px), (max-aspect-ratio: 5/4) {
  .hero { height: auto; min-height: 0; padding-top: var(--header-h); background: var(--night-0); }
  .hero__media { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .hero__media::after { display: none; }
  .hero__content, .js .hero:not(.is-done) .hero__content {
    position: relative; left: auto; bottom: auto; transform: none; width: auto; opacity: 1; pointer-events: auto;
    padding: 2.4rem var(--gutter) 3.4rem; text-align: left;
  }
  .hero__actions { justify-content: flex-start; }
  .hero__controls { position: absolute; right: var(--gutter); top: calc(var(--header-h) + 12px); bottom: auto; }
  .pill span { display: none; }
  .pill { padding: 0; width: 40px; justify-content: center; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .nav__cta { min-height: 40px; padding: 0 1.1em; letter-spacing: 0.18em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
