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

:root {
  --bg: #121214;
  --text: #E8E3D8;
  --accent: #C9352B;
  --dim: #6B6762;
  --surface: #1A1A1C;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: auto; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 10000;
  padding: 0.5rem 1rem; background: var(--accent); color: var(--text);
  font-size: 0.8rem; letter-spacing: 0.05em; text-decoration: none;
  border-radius: 2px; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -60%;
  width: 220%;
  height: 220%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.065;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.2s steps(1) infinite;
}

@keyframes grain {
  0%   { transform: translate(0,0); }     12% { transform: translate(-4%,-5%); }
  25%  { transform: translate(-8%,3%); }  37% { transform: translate(5%,-7%); }
  50%  { transform: translate(-3%,6%); }  62% { transform: translate(7%,2%); }
  75%  { transform: translate(-5%,-4%); } 87% { transform: translate(3%,7%); }
  100% { transform: translate(-2%,1%); }
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 3rem;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 3.2rem;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(18,18,20,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-logo-img { height: 68px; width: auto; display: block; }
.nav-cta {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 0.4rem;
  position: relative; padding-bottom: 2px;
}
.nav-cta::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--text);
  transition: width 0.3s var(--ease);
}
.nav-cta:hover::after { width: 100%; }
.nav-cta-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.nav-cta:hover .nav-cta-arrow { transform: translate(3px,-3px); }

/* HERO */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; align-items: flex-end;
  padding: 0 3.2rem 5rem; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.5s ease;
}
.hero-video.loaded { opacity: 1; }
.hero-fallback {
  position: absolute; inset: 0;
  background-image: url('posts/web/EVENTOS/GRAVERA 22 (evento)/DSC08193.jpg');
  background-size: cover; background-position: center;
  display: none;
}
.hero-fallback.visible { display: block; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); z-index: 1; }
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 35vh;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 2; pointer-events: none;
}
.hero-content { position: relative; z-index: 3; width: 100%; }
.hero-headline {
  font-family: 'strelka', serif;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: normal; line-height: 0.92;
  letter-spacing: -0.01em; text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero-line { display: block; }
.hero-word { display: inline-block; margin-right: 0.25em; will-change: transform; }
.hero-word--accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem); line-height: 1.7;
  letter-spacing: 0.04em; color: rgba(232,227,216,0.75);
  margin-bottom: 2.4rem; max-width: 560px; text-wrap: pretty;
}
.hero-cta {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  position: relative; padding-bottom: 3px;
}
.hero-cta::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--text);
  transition: width 0.4s var(--ease);
}
.hero-cta:hover::after { width: 100%; }
.hero-cta-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.hero-cta:hover .hero-cta-arrow { transform: translate(3px,-3px); }

/* MANIFIESTO */
.manifesto { padding: 25vh 12%; text-align: center; }
.manifesto-text {
  font-family: 'strelka', serif;
  font-size: clamp(1.4rem, 2.8vw, 2.6rem);
  font-weight: normal; line-height: 1.6; letter-spacing: 0.01em; text-wrap: pretty;
}
.manifesto-text .word {
  display: inline-block; color: #2E2E31;
  transition: color 0.3s ease; margin-right: 0.28em;
}

/* SERVICIOS */
.servicios { padding: 15vh 5vw; }
.servicios-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: #1E1E20;
}
.servicio-card {
  background: var(--bg); padding: 2.4rem 2rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: background 0.3s ease; cursor: default;
}
.servicio-card:hover { background: var(--surface); }
.servicio-num { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--dim); }
.servicio-title {
  font-family: 'strelka', serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: normal; line-height: 1.1;
}
.servicio-desc { font-size: 0.82rem; line-height: 1.65; color: rgba(232,227,216,0.65); flex: 1; }
.servicio-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; margin-top: auto; }
.servicio-list li {
  font-size: 0.72rem; letter-spacing: 0.06em; color: var(--dim);
  padding-left: 0.8rem; position: relative;
}
.servicio-list li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }

.cursor-follower {
  position: fixed; top: 0; left: 0;
  width: 280px; height: 200px; border-radius: 4px; overflow: hidden;
  pointer-events: none; z-index: 50; opacity: 0;
  transition: opacity 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: translate(-50%,-50%); will-change: transform;
}
.cursor-follower.visible { opacity: 1; }
.cursor-follower-img, .cursor-follower-video {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0; display: none;
}
.cursor-follower-img.active, .cursor-follower-video.active { display: block; }

@media (max-width: 768px) {
  .servicios-grid {
    grid-template-columns: repeat(4, 80vw);
    overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; background: transparent;
    padding-bottom: 1rem; scrollbar-width: none;
  }
  .servicios-grid::-webkit-scrollbar { display: none; }
  .servicio-card { scroll-snap-align: start; border: 1px solid #1E1E20; border-radius: 6px; }
}

/* FEATURED WORK */
.featured { padding: 15vh 0; overflow: hidden; }
.featured-intro { padding: 0 5vw 4rem; }
.featured-title {
  font-family: 'strelka', serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: normal; line-height: 1.05; margin-bottom: 1.2rem; text-transform: uppercase;
}
.featured-sub { font-size: 0.9rem; line-height: 1.7; color: var(--dim); max-width: 480px; }
.featured-track-wrap { overflow: hidden; }
.featured-track { display: flex; gap: 16px; padding: 0 5vw; will-change: transform; }
.work-card {
  flex: 0 0 min(520px, 72vw); height: 65vh;
  position: relative; border-radius: 4px; overflow: hidden; cursor: pointer;
}
.work-card-media { position: absolute; inset: 0; }
.work-card-img, .work-card-video {
  width: 100%; height: 110%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-card:hover .work-card-img { transform: scale(1.03); }
.work-card-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.work-card:hover .work-card-overlay { opacity: 1; }
.work-card-play {
  font-size: 1.8rem; color: white;
  border: 2px solid rgba(255,255,255,0.6);
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding-left: 4px;
}
.work-card-info {
  position: absolute; bottom: 1.2rem; left: 1.4rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.work-card-num { font-size: 0.62rem; letter-spacing: 0.15em; color: rgba(232,227,216,0.5); }
.work-card-name { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  padding: 5rem 5vw 2.5rem; gap: 1rem;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-close {
  position: absolute; top: 2rem; right: 2.4rem;
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-inner { width: 90vw; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-inner img, .lightbox-inner video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox-strip {
  display: flex; gap: 6px; overflow-x: auto; flex-shrink: 0;
  padding: 0.25rem 0; max-width: 90vw; width: 90vw;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: rgba(232,227,216,0.15) transparent;
}
.lightbox-strip:empty { display: none; }
.lightbox-strip::-webkit-scrollbar { height: 3px; }
.lightbox-strip::-webkit-scrollbar-thumb { background: rgba(232,227,216,0.15); border-radius: 2px; }
.lightbox-thumb {
  flex-shrink: 0; width: 80px; height: 60px;
  object-fit: cover; cursor: pointer; border-radius: 2px;
  opacity: 0.4; transition: opacity 0.2s, border-color 0.2s;
  scroll-snap-align: start; border: 1.5px solid transparent;
}
.lightbox-thumb:hover { opacity: 0.75; }
.lightbox-thumb.active { opacity: 1; border-color: var(--accent); }

/* PROCESO */
.proceso {
  padding: 15vh 5vw;
  background: radial-gradient(ellipse at 50% 85%, rgba(201,53,43,0.09) 0%, transparent 55%);
}
.proceso-title {
  font-family: 'strelka', serif;
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: normal; line-height: 1.1; margin-bottom: 6rem; max-width: 640px; text-transform: uppercase;
}
.proceso-svg { width: 100%; height: 3px; display: block; margin-bottom: 2.4rem; }
.proceso-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.proceso-step { display: flex; flex-direction: column; gap: 0.6rem; opacity: 0; }
.proceso-dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); margin-bottom: 0.8rem;
  box-shadow: 0 0 14px rgba(201,53,43,0.8), 0 0 28px rgba(201,53,43,0.3);
}
.proceso-num { font-size: 0.62rem; letter-spacing: 0.15em; color: var(--accent); opacity: 0.75; }
.proceso-step-title { font-family: 'strelka', serif; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: normal; }
.proceso-step-desc { font-size: 0.82rem; line-height: 1.65; color: rgba(232,227,216,0.6); }
@media (max-width: 768px) { .proceso-steps { grid-template-columns: 1fr 1fr; gap: 2.4rem; } }

/* ABOUT */
.about { position: relative; overflow: hidden; min-height: 90vh; display: flex; align-items: center; }
.about-bg-img { position: absolute; inset: 0; z-index: 0; }
.about-bg-img img {
  width: 100%; height: 120%; margin-top: -10%;
  object-fit: cover; display: block;
  filter: brightness(0.38) saturate(0.7);
  will-change: transform;
}
.about-bg-fade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%),
    linear-gradient(to right, rgba(18,18,20,0.5) 0%, transparent 35%, transparent 65%, rgba(18,18,20,0.5) 100%);
}
.about-content-col {
  position: relative; z-index: 2;
  padding: 18vh 5vw 15vh; width: 100%;
  display: flex; flex-direction: column; gap: 2rem; max-width: 560px;
}
.about-title { font-family: 'strelka', serif; font-size: clamp(2rem,3.5vw,3.2rem); font-weight: normal; line-height: 1.1; text-transform: uppercase; }
.about-text { font-size: 0.92rem; line-height: 1.8; color: rgba(232,227,216,0.7); max-width: 420px; }
.about-sep { width: 40px; height: 1px; background: rgba(232,227,216,0.15); }
.about-metrics { display: flex; gap: 3rem; }
.metric { display: flex; flex-direction: column; gap: 0.4rem; }
.metric-top { display: flex; align-items: baseline; gap: 0.05em; }
.metric-prefix { font-family: 'strelka', serif; font-size: 1.4rem; color: var(--accent); }
.metric-value { font-family: 'strelka', serif; font-size: clamp(2.4rem,4vw,3.6rem); font-weight: normal; line-height: 1; }
.metric-suffix { font-family: 'strelka', serif; font-size: 1.6rem; color: var(--dim); }
.metric-label { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 768px) {
  .about-content-col { padding: 14vh 6vw 12vh; }
  .about-metrics { gap: 2rem; flex-wrap: wrap; }
}

/* FINAL CTA */
.cta-section {
  padding: 20vh 5vw; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.cta-headline {
  font-family: 'strelka', serif;
  font-size: clamp(2.4rem, 6vw, 6rem);
  font-weight: normal; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
}
.cta-sub { font-size: clamp(0.85rem,1.2vw,1rem); line-height: 1.7; color: var(--dim); max-width: 440px; }
.cta-btn-wrap { margin-top: 1.2rem; }
.cta-btn {
  display: inline-block; padding: 1.1rem 2.8rem;
  border: 1px solid rgba(232,227,216,0.25); border-radius: 60px;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease;
  will-change: transform;
}
.cta-btn:hover { border-color: var(--accent); background: rgba(201,53,43,0.08); }

/* FOOTER */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 3.2rem; border-top: 1px solid #1C1B1A;
}
.site-footer span, .site-footer a {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; transition: color 0.2s;
}
.site-footer a:hover { color: var(--text); }
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
@media (max-width: 768px) {
  .footer-nav { gap: 1.2rem; }
}

@media (max-width: 768px) {
  .nav { padding: 1.2rem 1.6rem; }
  .nav-logo-img { height: 38px; }
  .hero { padding: 0 1.6rem 4rem; }
  .hero-sub br { display: none; }
  .manifesto { padding: 18vh 6%; }
  .servicios { padding: 12vh 4vw; }
  .featured { padding: 10vh 0; }
  .featured-intro { padding: 0 4vw 2.4rem; }
  .featured-track { padding: 0 4vw; }
  .work-card { flex: 0 0 85vw; height: 55vh; }
  .proceso { padding: 12vh 4vw; }
  .proceso-title { margin-bottom: 4rem; }
  .about-content-col { padding: 4rem 6vw; }
  .cta-headline { font-size: clamp(2rem,10vw,3.5rem); }
  .cta-section { padding: 14vh 6%; }
  .site-footer { flex-direction: column; gap: 0.8rem; text-align: center; padding: 1.6rem; }
}

/* LIGHT LEAKS */
.leaks {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 2;
  overflow: hidden;
}
.leak {
  position: absolute; border-radius: 50%;
  will-change: transform;
}
.leak--a {
  width: 90vw; height: 70vh;
  top: -20vh; left: -25vw;
  background: radial-gradient(ellipse at center, rgba(201,53,43,0.24) 0%, rgba(180,40,20,0.08) 45%, transparent 72%);
  filter: blur(60px);
}
.leak--b {
  width: 70vw; height: 65vh;
  bottom: -15vh; right: -20vw;
  background: radial-gradient(ellipse at center, rgba(220,90,30,0.20) 0%, rgba(200,70,15,0.07) 45%, transparent 70%);
  filter: blur(65px);
}
.leak--c {
  width: 60vw; height: 55vh;
  top: 45vh; left: 20vw;
  background: radial-gradient(ellipse at center, rgba(185,35,18,0.16) 0%, transparent 65%);
  filter: blur(75px);
}
.leak--d {
  width: 55vw; height: 50vh;
  top: 15vh; right: 5vw;
  background: radial-gradient(ellipse at center, rgba(210,120,40,0.12) 0%, rgba(190,90,20,0.04) 45%, transparent 68%);
  filter: blur(80px);
}

/* SECTION TRANSITIONS */
.manifesto, .servicios, .proceso, .about, .cta-section { position: relative; }
.manifesto::before, .servicios::before, .proceso::before,
.cta-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 14vh;
  background: linear-gradient(to bottom, var(--bg), rgba(201,53,43,0.04) 55%, transparent);
  pointer-events: none; z-index: 2;
}
.manifesto::after, .proceso::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 14vh;
  background: linear-gradient(to top, var(--bg), rgba(201,53,43,0.04) 55%, transparent);
  pointer-events: none; z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .hero-video { transition: none; }
  .nav-cta::after, .hero-cta::after { transition: none; }
}
