@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Light.ttf") format("truetype");
  font-weight: 300;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --ink-navy: #060D15;
  --deep-blue: #1A3352;
  --sky-blue: #7FCFEB;
  --sky-light: #91CCE7;
  --fog-white: #F0F6FB;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink-navy);
  color: var(--fog-white);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
}

.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.label-tag {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--sky-blue);
  margin-bottom: 14px;
}
.label-tag.center { text-align: center; }

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-title.center { text-align: center; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 60px);
  background: linear-gradient(to bottom, rgba(6,13,21,.9), rgba(6,13,21,0));
  backdrop-filter: blur(4px);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-mark { width: 24px; height: auto; }
.nav-word {
  font-family: "Space Mono", monospace;
  font-size: 12px; letter-spacing: .15em; color: var(--fog-white);
}
.nav-cta {
  font-family: "Space Mono", monospace;
  font-size: 11px; letter-spacing: .12em;
  color: var(--ink-navy);
  background: var(--sky-blue);
  padding: 9px 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.nav-cta:hover { background: var(--sky-light); transform: translateY(-1px); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid rgba(240,246,251,.25);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(240,246,251,.55);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 20px;
  transition: background .2s ease, color .2s ease;
}
.lang-btn:hover { color: var(--fog-white); }
.lang-btn.active {
  background: var(--sky-blue);
  color: var(--ink-navy);
}

@media (max-width: 480px) {
  .nav-right { gap: 8px; }
  .nav-cta { padding: 8px 12px; font-size: 10px; }
  .lang-btn { padding: 5px 8px; }
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px clamp(20px, 6vw, 60px) 60px;
  overflow: hidden;
}
.hero-inner { max-width: 760px; text-align: center; z-index: 2; }
.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 12px; letter-spacing: .18em; color: var(--sky-blue);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.grad-text {
  background: linear-gradient(90deg, var(--sky-blue), var(--sky-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(240,246,251,.72);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 38px;
}
.btn-primary {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 12px; letter-spacing: .12em;
  color: var(--ink-navy);
  background: var(--sky-blue);
  padding: 15px 26px;
  border-radius: 30px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover {
  background: var(--sky-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(127,207,235,.25);
}

.hero-bg {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden;
}

.hero-parallax {
  position: absolute; inset: 0;
  will-change: transform;
}

.hero-blob {
  position: absolute;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  right: -20vw; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: conic-gradient(from 200deg at 50% 50%, var(--deep-blue), var(--sky-blue), var(--sky-light), var(--ink-navy), var(--deep-blue));
  filter: blur(110px) saturate(140%);
  opacity: .45;
  animation: blobDrift 16s ease-in-out infinite;
}
@keyframes blobDrift {
  0%, 100% { transform: translateY(-50%) translate(0, 0) scale(1); }
  50% { transform: translateY(-50%) translate(-4%, 3%) scale(1.08); }
}

.hero-blob-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .18;
  mix-blend-mode: overlay;
  animation: grainDrift 9s ease-in-out infinite;
}
@keyframes grainDrift {
  0%, 100% { transform: translate(0, 0) scale(1.3); }
  50% { transform: translate(-1.5%, 1.5%) scale(1.35); }
}

.hero-mark-bg {
  position: absolute;
  right: -6%;
  top: 50%;
  width: 42vw;
  max-width: 560px;
  height: auto;
  opacity: .16;
  animation: markFloat 10s ease-in-out infinite;
}
@keyframes markFloat {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-53%) scale(1.02); }
}

@media (max-width: 760px) {
  .hero-mark-bg { width: 70vw; opacity: .12; right: -18%; }
  .hero-blob { right: -35vw; opacity: .35; }
}

/* INTRO */
.intro { padding: 90px clamp(20px, 6vw, 60px); border-top: 1px solid rgba(240,246,251,.08); }
.intro-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.intro-photo-frame {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(135deg, var(--deep-blue), var(--sky-blue));
  overflow: hidden;
}
.intro-photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}
.intro-photo-caption {
  font-family: "Space Mono", monospace;
  font-size: 11px; letter-spacing: .1em; color: rgba(240,246,251,.5);
  margin-top: 14px; text-align: center;
}
.intro-text {
  font-size: clamp(19px, 2.6vw, 28px);
  line-height: 1.5;
  color: var(--fog-white);
  font-weight: 400;
}
.intro-text strong { color: var(--sky-blue); font-weight: 600; }

.intro-grid .intro-photo { transition-delay: 0s; }
.intro-grid .intro-content { transition-delay: .14s; }

@media (max-width: 720px) {
  .intro-grid { grid-template-columns: 1fr; justify-items: center; }
  .intro-photo-frame { max-width: 240px; margin: 0 auto; }
  .intro-photo-caption { text-align: center; }
}

/* WORKS */
.works { padding: 100px clamp(20px, 6vw, 60px); border-top: 1px solid rgba(240,246,251,.08); }
.works .section-title { margin-bottom: 60px; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.work-card { display: flex; flex-direction: column; }
.work-video {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--ink-navy);
  transition: transform .3s ease;
  text-decoration: none;
}
.work-video:hover { transform: scale(1.02); }
.work-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Capa de brillo animado en los azules de marca, sobre la miniatura real
   (duotono con mix-blend-mode: sigue "brillando" en movimiento, pero deja
   ver el fotograma real del vídeo por debajo). */
.work-shine {
  position: absolute; inset: 0;
  z-index: 1;
  background-size: 240% 240%;
  animation: gradientShift 9s ease infinite;
  mix-blend-mode: color;
  opacity: .92;
}
.work-video::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,13,21,.05), rgba(6,13,21,.45));
}
/* Franja de brillo que barre la tarjeta en bucle, invitando a pulsar play. */
.work-sweep {
  position: absolute;
  top: -25%; left: -60%;
  width: 35%; height: 150%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg);
  z-index: 2;
  pointer-events: none;
  animation: sweepShine 3.4s ease-in-out infinite;
}
@keyframes sweepShine {
  0% { left: -60%; }
  55% { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .work-sweep { animation: none; display: none; }
}
.video-1 { background-image: linear-gradient(135deg, #060D15, #1A3352, #7FCFEB, #1A3352); }
.video-2 { background-image: linear-gradient(135deg, #1A3352, #91CCE7, #060D15, #7FCFEB); }
.video-3 { background-image: linear-gradient(135deg, #7FCFEB, #060D15, #1A3352, #91CCE7); }
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.play-icon {
  position: relative;
  z-index: 2;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(240,246,251,.92);
  color: var(--ink-navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  padding-left: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: transform .2s ease, background .2s ease;
}
.work-video:hover .play-icon { transform: scale(1.1); background: var(--fog-white); }
.work-tag {
  font-family: "Space Mono", monospace;
  font-size: 11px; letter-spacing: .12em; color: var(--sky-blue);
  margin-bottom: 8px;
}
.work-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.work-desc { font-size: 14px; color: rgba(240,246,251,.62); line-height: 1.5; }

/* CASE STUDY */
.case-study {
  padding: 100px clamp(20px, 6vw, 60px);
  background: linear-gradient(180deg, var(--deep-blue), var(--ink-navy));
  border-top: 1px solid rgba(240,246,251,.08);
}
.case-inner { max-width: 1000px; margin: 0 auto; }
.case-study .section-title { margin: 4px 0 20px; }
.case-intro { font-size: 16px; color: rgba(240,246,251,.68); max-width: 680px; margin-bottom: 40px; line-height: 1.6; }
.case-intro em { color: var(--sky-light); font-style: normal; }
.case-intro.center { margin-left: auto; margin-right: auto; text-align: center; }

.case-video {
  width: 100%;
  aspect-ratio: 21 / 9;
  background-image: linear-gradient(120deg, #060D15, #1A3352, #91CCE7, #7FCFEB, #1A3352);
  margin-bottom: 70px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
  margin-bottom: 70px;
}
.case-grid-phases {
  grid-template-columns: repeat(3, 1fr);
  row-gap: 44px;
}
@media (max-width: 860px) { .case-grid-phases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .case-grid-phases { grid-template-columns: 1fr; } }
.case-grid-phases .case-block {
  border-left: 2px solid rgba(127,207,235,.35);
  padding-left: 18px;
}
.case-icon {
  width: 40px; height: 40px;
  color: var(--sky-blue);
  margin-bottom: 14px;
  margin-left: -4px;
  display: block;
}
.case-label {
  font-family: "Space Mono", monospace;
  font-size: 12px; letter-spacing: .1em; color: var(--fog-white);
  margin-bottom: 12px;
}
.case-text { font-size: 15px; line-height: 1.6; color: rgba(240,246,251,.68); }

.case-stats {
  display: flex; flex-wrap: wrap; gap: 50px;
  padding-top: 50px; border-top: 1px solid rgba(240,246,251,.12);
}
.stat-num { font-size: clamp(36px, 5vw, 56px); font-weight: 700; color: var(--sky-blue); line-height: 1; }
.stat-label { font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .1em; color: rgba(240,246,251,.6); margin-top: 10px; }

/* CONTACT */
.contact { padding: 130px clamp(20px, 6vw, 60px); text-align: center; }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact .label-tag { display: flex; justify-content: center; }
.contact-sub { font-size: 16px; color: rgba(240,246,251,.68); margin: 20px 0 36px; line-height: 1.6; }

/* FOOTER */
.footer {
  padding: 40px clamp(20px, 6vw, 60px) 60px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  border-top: 1px solid rgba(240,246,251,.08);
}
.footer-mark { width: 22px; height: auto; opacity: .6; }
.footer-text { font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .1em; color: rgba(240,246,251,.4); }

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(.98);
  transition: opacity 1s cubic-bezier(.16,.84,.44,1), transform 1s cubic-bezier(.16,.84,.44,1);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: translateY(0) scale(1); }

.works-grid .work-card:nth-child(1) { transition-delay: 0s; }
.works-grid .work-card:nth-child(2) { transition-delay: .12s; }
.works-grid .work-card:nth-child(3) { transition-delay: .24s; }

.case-grid .case-block:nth-child(1) { transition-delay: 0s; }
.case-grid .case-block:nth-child(2) { transition-delay: .08s; }
.case-grid .case-block:nth-child(3) { transition-delay: .16s; }
.case-grid .case-block:nth-child(4) { transition-delay: .24s; }
.case-grid .case-block:nth-child(5) { transition-delay: .32s; }
.case-grid .case-block:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-blob, .hero-blob-grain, .hero-mark-bg, #ribbon-path {
    animation: none !important;
    transition: opacity .3s ease !important;
    transform: none !important;
  }
  .reveal { opacity: 1; }
}

@media (max-width: 640px) {
  .case-stats { gap: 32px; }
}

/* VIDEO MODAL */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,13,21,.72);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}
.modal-close {
  position: absolute; top: 26px; right: 30px;
  background: rgba(240,246,251,.1); border: none; color: var(--fog-white);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 18px; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.modal-close:hover { background: rgba(240,246,251,.2); }
.modal-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 980px;
}
.modal-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(127,207,235,.15);
}
.modal-video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
