/* ════════════════════════════════════════════
   tbō — landing cinematográfica
   Paleta de marca:
   --purple  #773FFF (Pantone 265)
   --orange  #FF5000 (Pantone 1505)
   --yellow  #FFEA1E (Pantone 100)
   --gray    #404040 (Gris 75%)
   ════════════════════════════════════════════ */

:root {
  --purple: #773FFF;
  --orange: #FF5000;
  --yellow: #FFEA1E;
  --gray:   #404040;

  --accent: var(--orange);          /* cambia por sección vía JS */

  --bg:      #0d0a14;
  --surface: #17121f;
  --text:    #f4f1fa;
  --text-dim:#a49cb5;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;

  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem;
  --space-4: 2.5rem; --space-5: 4rem; --space-6: 7rem;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); transition: color .6s var(--ease-out); }
.accent { color: var(--accent); transition: color .6s var(--ease-out); }

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
}

.kicker {
  color: var(--accent);
  transition: color .6s var(--ease-out);
  margin-bottom: var(--space-3);
}

/* ══════════ LOADER ══════════ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: grid; place-items: center;
}
.loader__inner { display: grid; justify-items: center; gap: var(--space-3); width: min(320px, 70vw); }
.loader__logo-wrap { position: relative; width: 110px; height: 63.16px; }
.loader__logo {
  width: 110px; display: block;
  filter: brightness(0) invert(1);
  /* recorta la línea (macrón) de la "ō" para animarla por separado */
  clip-path: path(evenodd, "M0 0H110V63.16H0Z M83 18H93V21H83Z");
}
.loader__logo-macron {
  position: absolute; left: 83px; top: 18px;
  width: 10px; height: 3px; border-radius: 1px;
  background: #fff;
}
.loader__track { width: 100%; height: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.loader__bar { width: 0%; height: 100%; background: var(--orange); }
.loader__pct { color: var(--text-dim); }

/* ══════════ CURSOR ══════════ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); transition: background .4s; }
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  opacity: .6;
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              opacity .25s, border-color .4s;
}
body.is-hovering .cursor-ring { width: 64px; height: 64px; opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ══════════ FONDO AMBIENTAL ══════════ */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.ambient__blob {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%;
  filter: blur(90px); opacity: .16; will-change: transform;
}
.ambient__blob--a { background: var(--accent); top: -20%; left: -15%; animation: drift-a 26s ease-in-out infinite alternate; transition: background 1s; }
.ambient__blob--b { background: var(--purple); bottom: -30%; right: -20%; opacity: .10; animation: drift-b 32s ease-in-out infinite alternate; }
.ambient__blob--c { background: var(--orange); top: 40%; left: 55%; width: 30vmax; height: 30vmax; opacity: .07; animation: drift-a 40s ease-in-out infinite alternate-reverse; }

@keyframes drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-6vw, -8vh) scale(.95); } }

/* barrido de luz tipo softbox */
.ambient__sweep {
  position: absolute; inset: -50%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.045) 50%, transparent 60%);
  animation: sweep 9s var(--ease-out) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-60%); }
  55%  { transform: translateX(60%); }
  100% { transform: translateX(60%); }
}

/* grano de película */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: .35; mix-blend-mode: overlay;
  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' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

/* ══════════ NAV ══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(to bottom, rgba(13,10,20,.85), transparent);
  backdrop-filter: blur(8px);
  transform: translateY(0);
  transition: transform .45s var(--ease-out);
}
.nav.nav--hidden { transform: translateY(-110%); }
.nav__logo img { height: 34px; }
.nav__links { display: flex; gap: var(--space-4); }
.nav__links a { position: relative; padding: .4rem 0; cursor: pointer; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.btn {
  display: inline-block; cursor: pointer;
  border: 1px solid var(--accent); color: var(--text);
  padding: .65rem 1.4rem; border-radius: 100px;
  transition: background .3s, color .3s, border-color .6s, transform .2s;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: #0d0a14; transform: scale(1.04); }
.btn--big { font-size: 1rem; padding: 1.1rem 2.6rem; }

main { position: relative; z-index: 1; }
section { position: relative; }

/* ══════════ HERO ══════════ */
.hero {
  min-height: 100dvh;
  display: grid; align-content: end;
  padding: var(--space-6) var(--space-4) var(--space-5);
  overflow: hidden;
}
.hero__media { position: absolute; inset: -10% 0; z-index: -2; will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--bg) 4%, rgba(13,10,20,.55) 45%, rgba(13,10,20,.25));
}
.hero__title {
  font-size: clamp(2.4rem, 7.2vw, 6.2rem);
  font-weight: 800;
  font-stretch: 72%;
  text-transform: uppercase;
  line-height: .96;
  letter-spacing: -.01em;
  max-width: 16ch;
}
.hero__title .word { display: inline-block; white-space: nowrap; }
.hero__title .char { display: inline-block; will-change: transform, opacity; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,.18);
  color: var(--text-dim);
}
.hero__scrollcue {
  position: absolute; right: var(--space-4); bottom: var(--space-5);
  display: grid; justify-items: center; gap: .6rem; color: var(--text-dim);
}
.hero__scrollline {
  width: 1px; height: 56px; background: rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.hero__scrollline::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  animation: scrollcue 2s var(--ease-out) infinite;
}
@keyframes scrollcue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* ══════════ CHAPTERS ══════════ */
.chapter {
  min-height: 42dvh;
  display: grid; align-content: center; justify-items: start;
  padding: 0 var(--space-4);
  overflow: hidden;
}
.chapter__num { color: var(--accent); transition: color .6s; margin-bottom: var(--space-2); }
.chapter__title {
  font-size: clamp(3.4rem, 13vw, 12rem);
  font-weight: 900;
  font-stretch: 65%;
  text-transform: uppercase;
  line-height: .9;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,.4);
  transition: -webkit-text-stroke-color .6s var(--ease-out);
  will-change: transform;
}
@supports (color: color-mix(in srgb, red, blue)) {
  .chapter__title {
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 75%, white 25%);
  }
}

/* ══════════ QUIÉNES SOMOS ══════════ */
.somos { padding: var(--space-6) var(--space-4); }
.somos__grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5); align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.somos__claim {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 700; font-stretch: 80%;
  line-height: 1.15;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.somos__desc { color: var(--text-dim); font-size: 1.08rem; max-width: 46ch; }
.somos__desc + .somos__desc { margin-top: var(--space-2); }
.somos__media { border-radius: 20px; overflow: hidden; }
.somos__media img { aspect-ratio: 4/3.4; object-fit: cover; width: 100%; will-change: transform; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  max-width: 1200px; margin: var(--space-6) auto 0;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: var(--space-4);
}
.stat { display: grid; gap: .4rem; }
.stat__num {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800; font-stretch: 72%;
  color: var(--accent); transition: color .6s;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat__label { color: var(--text-dim); }

/* ══════════ HUB SOLUCIONES ══════════ */
.hub { padding: var(--space-6) var(--space-4); max-width: 1280px; margin: 0 auto; }
.hub__heading {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.hub__cols { display: flex; gap: var(--space-2); min-height: 62dvh; }
.hub__col {
  position: relative; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--space-4);
  border-radius: 20px; overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: flex .55s var(--ease-out);
  isolation: isolate;
}
.hub__col:nth-child(1) { --col-img: url("../images/branding.jpg"); }
.hub__col:nth-child(2) { --col-img: url("../images/tecnologia.jpg"); }
.hub__col:nth-child(3) { --col-img: url("../images/contenido.jpg"); }
.hub__col::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--col-img);
  background-size: cover; background-position: center;
  opacity: .35; filter: saturate(.4) brightness(.6);
  transition: opacity .55s, filter .55s, transform .55s var(--ease-out);
}
.hub__col::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(13,10,20,.92) 20%, transparent 70%);
}
.hub__col:hover, .hub__col:focus-within { flex: 2.2; }
.hub__col:hover::before, .hub__col:focus-within::before {
  opacity: .8; filter: saturate(1) brightness(.85); transform: scale(1.05);
}
.hub__index { color: var(--accent); transition: color .6s; margin-bottom: auto; }
.hub__col h4 {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  line-height: 1.05; margin-bottom: var(--space-2);
}
.hub__col ul { list-style: none; display: grid; gap: .45rem; color: var(--text-dim);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .55s var(--ease-out), opacity .4s .1s;
}
.hub__col:hover ul, .hub__col:focus-within ul { max-height: 220px; opacity: 1; }

/* ══════════ SHOWCASE (Equipo / Portafolio) ══════════ */
.showcase {
  position: relative;
  min-height: 100dvh;
  display: grid;
  overflow: hidden;
  color: var(--text);
}
.showcase__media { position: absolute; inset: -10% 0; z-index: -2; will-change: transform; }
.showcase__media img { width: 100%; height: 100%; object-fit: cover; }
.showcase__scrim { position: absolute; inset: 0; z-index: -1; }

/* la imagen se desvanece en los bordes y deja ver el fondo ambiental,
   igual que el resto del sitio (sin costuras contra los capítulos).
   La figura sobresale 10% del alto de la sección por arriba y abajo
   (parallax), así que el fundido debe completarse antes de ~8.3% / 91.7%,
   que es donde el overflow de la sección recorta la imagen. */
.showcase__media {
  -webkit-mask-image: linear-gradient(to bottom, transparent 12%, #000 34%, #000 60%, transparent 86%);
  mask-image: linear-gradient(to bottom, transparent 12%, #000 34%, #000 60%, transparent 86%);
}
.showcase__scrim {
  -webkit-mask-image: linear-gradient(to bottom, transparent 2%, #000 24%, #000 72%, transparent 96%);
  mask-image: linear-gradient(to bottom, transparent 2%, #000 24%, #000 72%, transparent 96%);
}
.contact__media {
  -webkit-mask-image: linear-gradient(to bottom, transparent 12%, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 12%, #000 34%);
}
.showcase__logo {
  position: absolute; top: var(--space-4); right: var(--space-4); z-index: 2;
  height: 30px; filter: brightness(0) invert(1);
}
.showcase__credit {
  position: absolute; bottom: var(--space-3); right: var(--space-4); z-index: 2;
  color: rgba(255,255,255,.72);
}
.showcase__body {
  position: relative; z-index: 1;
  align-self: center;
  padding: var(--space-6) var(--space-4);
  max-width: 620px;
}

/* Portafolio */
.showcase--portfolio .showcase__body { padding-top: var(--space-6); }
.showcase--portfolio .showcase__eyebrow {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 300; line-height: 1;
  margin-bottom: .2rem;
}
.showcase--portfolio .showcase__title {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1;
  margin-bottom: var(--space-3);
}
.showcase--portfolio .showcase__behance {
  font-size: clamp(2.6rem, 5.2vw, 4rem); font-weight: 700; line-height: 1;
  margin-bottom: var(--space-4);
}
.showcase--portfolio .showcase__text {
  color: rgba(244,241,250,.85); max-width: 32ch; font-weight: 600;
  margin-bottom: var(--space-4);
}
.showcase__bubble {
  position: relative; display: inline-block; cursor: pointer;
  background: #fff; color: #17121f;
  padding: .9rem 1.7rem; border-radius: 100px; font-weight: 700;
  transition: transform .25s var(--ease-out), background .25s;
}
.showcase__bubble:hover, .showcase__bubble:focus-visible { transform: scale(1.04); background: var(--yellow); }
.showcase__bubble::before {
  content: ""; position: absolute; left: 26px; bottom: -7px;
  width: 14px; height: 14px; background: #fff;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transition: background .25s;
}
.showcase__bubble:hover::before, .showcase__bubble:focus-visible::before { background: var(--yellow); }

/* ══════════ CONTACTO ══════════ */
.contact {
  position: relative;
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  color: var(--gray);
  padding: var(--space-4);
}
.contact__media { position: absolute; inset: -10% 0; z-index: -1; will-change: transform; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact__logo {
  position: absolute; top: var(--space-4); right: var(--space-4); z-index: 2;
  height: 30px;
}
.contact__body {
  position: relative; z-index: 1;
  max-width: 520px;
  padding: var(--space-6) 0 0 var(--space-3);
}
.contact__title {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--gray);
}
.contact__cta {
  position: relative; display: inline-block; cursor: pointer;
  background: #12100a; color: #fff;
  padding: .85rem 1.8rem; border-radius: 100px; font-weight: 700;
  margin-bottom: var(--space-5);
  transition: transform .25s var(--ease-out), background .25s;
}
.contact__cta:hover, .contact__cta:focus-visible { transform: scale(1.04); background: #2a2318; }
.contact__cta::before {
  content: ""; position: absolute; left: 28px; bottom: -7px;
  width: 14px; height: 14px; background: #12100a;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.contact__qr {
  width: 168px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.contact__qr img { width: 100%; display: block; }
.footer {
  position: relative; z-index: 1;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(64,64,64,.25);
  padding-top: var(--space-2);
  color: var(--gray);
}

/* ══════════ REVEALS (estado inicial vía JS) ══════════ */
.reveal { will-change: transform, opacity; }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 900px) {
  .nav { padding: var(--space-2) var(--space-2); }
  .nav__links { display: none; }
  .hero { padding: var(--space-6) var(--space-2) var(--space-5); }
  .hero__scrollcue { display: none; }
  .chapter { min-height: 34dvh; padding: 0 var(--space-2); }
  .somos { padding: var(--space-5) var(--space-2); }
  .somos__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-2); }
  .hub { padding: var(--space-5) var(--space-2); }
  .hub__cols { flex-direction: column; min-height: unset; }
  .hub__col { min-height: 200px; }
  .hub__col ul { max-height: 220px; opacity: 1; }
  .showcase__body { padding: var(--space-5) var(--space-2); max-width: none; }
  .showcase--portfolio .showcase__media img { object-position: 78% center; }
  .contact { padding: var(--space-2); }
  .contact__body { padding: var(--space-5) 0 0 var(--space-1); max-width: none; }
  .footer { flex-direction: column; text-align: center; }
}

/* ══════════ REDUCED MOTION ══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ambient__sweep, .hero__scrollline::after { animation: none; }
}
