/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
  --bg-dark: #111111;
  --bg-light: #f3f3f3;
  --text-light: #ffffff;
  --text-dark: #111111;
  --text-muted: #888888;
  --accent: #ff3b00;

  --font-sans: 'Space Grotesk', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-mono: 'DM Mono', monospace;
  --font-display: 'Anton', 'Impact', sans-serif;

  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --transition-fast: 0.3s ease;
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: initial; /* handled by Lenis */
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

body[data-theme="light"] {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.dm-mono { font-family: var(--font-mono); }
.playfair { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 em, h2 em, h3 em, h4 em, h5 em, h6 em {
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: inherit !important;
}

/* =========================================
   LAYOUT & SECTIONS
   ========================================= */
.section {
  padding: var(--spacing-xl) 5%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.section__container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.section__header {
  margin-bottom: var(--spacing-lg);
}

.section__number {
  display: block;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

.section__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  text-transform: uppercase;
}

/* (Removed duplicate custom cursor code) */
/* =========================================
   CUSTOM CIRCLE CURSOR
   ========================================= */
.cursor,
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
}

.cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}

.cursor-follower.is-hovering {
  width: 60px;
  height: 60px;
  background-color: #ffffff;
  border-color: transparent;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
  color: #fff;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.navbar__links {
  display: none;
}

@media (min-width: 1024px) {
  .navbar__links {
    display: flex;
    gap: 2rem;
  }
  .navbar__hamburger {
    display: none !important;
  }
}

.navbar__link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width var(--transition-fast);
}

.navbar__link:hover::after {
  width: 100%;
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex !important;
  flex-direction: column;
  gap: 5px;
  color: inherit;
  z-index: 200;
}

.navbar__hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: currentColor;
  transition: var(--transition-fast);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-light);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  clip-path: circle(0% at 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.is-active {
  clip-path: circle(150% at 100% 0);
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-menu__link {
  font-size: 2.5rem;
  font-weight: 500;
  text-transform: uppercase;
}

/* =========================================
   SPECIFIC SECTIONS (Simplified inline)
   ========================================= */
/* Hero */
.hero {
  justify-content: center;
  overflow: hidden;
}

.hero__bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  z-index: 1;
}

@media (min-width: 1024px) {
  .hero__content {
    grid-template-columns: 1.5fr 1fr;
  }
}

.hero__title {
  font-size: clamp(3rem, 7vw, 6rem);
  text-transform: uppercase;
  margin-bottom: 2rem;
  line-height: 1;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
}

.hero__image-wrapper {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
}

.hero__image-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,59,0,0.3) 0%, transparent 60%);
  mix-blend-mode: screen;
  z-index: 2;
  pointer-events: none;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 9999;
}

/* Services */
.services {
  z-index: 1;
}

.services__bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.service-card {
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.service-card__number {
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.service-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card__desc {
  color: var(--text-muted);
}

/* About */
.about__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 768px) {
  .about__content { grid-template-columns: 1fr 1fr; }
}

.about__image-wrapper {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #1a1a1a;
}

.about__image-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}

.about__image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__intro {
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* Career */
.career__timeline {
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 2rem;
}

.career__item {
  position: relative;
  margin-bottom: 4rem;
}

.career__item::before {
  content: '';
  position: absolute;
  left: -2.3rem;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.career__date { color: var(--accent); margin-bottom: 0.5rem; }
.career__role { font-size: 1.5rem; margin-bottom: 0.2rem; }
.career__company { color: var(--text-muted); margin-bottom: 1rem; }

/* Portfolio */
.portfolio__track-wrapper {
  overflow: hidden;
}

.portfolio__track {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
}

.portfolio__slide {
  min-width: 80vw;
}

@media (min-width: 768px) {
  .portfolio__slide { min-width: 40vw; }
}

.portfolio__slide-placeholder {
  aspect-ratio: 16/9;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.portfolio__slide-title { font-size: 1.5rem; }
.portfolio__slide-category { color: var(--text-muted); font-size: 0.9rem; }

/* Clients — Stack Drag & Reveal */
.clients-stack {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clients-stack__counter {
  align-self: flex-end;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.clients-stack__counter-current {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

.clients-stack__counter-sep {
  margin: 0 0.3rem;
  color: rgba(255,255,255,0.2);
}

.clients-stack__viewport {
  position: relative;
  width: 100%;
  height: 65vh;
  max-height: 560px;
  min-height: 360px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.clients-stack__viewport:active {
  cursor: grabbing;
}

/* Cards */
.client-stack__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  max-width: 360px;
  min-width: 260px;
  height: 72%;
  max-height: 480px;
  min-height: 300px;
  border-radius: 20px;
  background: linear-gradient(145deg, #181818, #1e1e1e);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  will-change: transform;
  transform-origin: center center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: box-shadow 0.5s ease;
}

.client-stack__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ff7a00, #ffa540);
  z-index: 2;
  border-radius: 20px 20px 0 0;
}

.client-stack__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,59,0,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.client-stack__card-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1;
}

.client-stack__initial {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 10rem);
  color: rgba(255,255,255,0.04);
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
}

.client-stack__brand {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.client-stack__separator {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
  opacity: 0.4;
}

/* Hover state */
.client-stack__card--hover {
  box-shadow: 0 30px 60px rgba(255,59,0,0.2), 0 0 40px rgba(255,59,0,0.05);
}

/* Navigation arrows */
.clients-stack__nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.clients-stack__arrow {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.clients-stack__arrow:hover {
  .section__header {
    margin-bottom: var(--spacing-md); /* Balanced spacing */
  }
  
  
  .clients-stack__arrow {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  
  /* Optimize client cards for mobile */
  .client-stack__card {
    border-radius: 16px !important;
  }
  
  .client-stack__initial {
    font-size: clamp(4rem, 10vw, 6rem) !important;
  }
  
  .client-stack__brand {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
  }
}

.tool-tag {
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  transition: all 0.3s ease;
  cursor: default;
}

.tool-tag:hover {
  background: var(--color, var(--accent));
  border-color: var(--color, var(--accent));
  color: #fff;
}

/* Contact */
.contact__blocks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__block {
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contact__block-label { color: var(--text-muted); font-size: 0.9rem; }
.contact__block-value { font-size: 1.5rem; }
/* =========================================
   WORLD-CLASS REDESIGN ADDITIONS
   ========================================= */

/* Brutalist Hero */
.hero-brutalist {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 100vh;
}

.hero__video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__video-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__video-bg video, .hero__fallback-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero__mask-text {
  position: relative;
  z-index: 2;
  text-align: center;
  mix-blend-mode: overlay;
}

.hero__giant-text {
  font-size: clamp(4rem, 10vw, 12rem);
  line-height: 0.85;
  color: white;
  margin: 0;
  padding: 0;
  letter-spacing: -0.02em;
}

.hero__overlay-content {
  position: absolute;
  bottom: 5%;
  left: 5%;
  z-index: 3;
}

/* FPV Section */
.secuencia-aerea {
  position: relative;
  background-color: #000;
  color: #fff;
  padding: 0 !important;
  height: 100vh;

.canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  display: grid;
  grid-template: 1fr / 1fr;
}

.canvas-container > * {
  grid-area: 1 / 1;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fpv__header {
  position: absolute;
  top: 10%;
  left: 5%;
  z-index: 2;
  mix-blend-mode: difference;
}

.fpv__scroll-hint {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.7;
}

/* Career Pinning Layout */
.career__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 1024px) {
  .career__layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Magnetic Buttons */
.magnetic-btn {
  display: inline-block;
  position: relative;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--text-light);
  color: var(--bg-dark);
  font-weight: 600;
  text-transform: uppercase;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.magnetic-btn:hover {
  transform: scale(1.1);
}

/* Portfolio Parallax */
.overflow-hidden {
  overflow: hidden;
}

.parallax-img {
  width: 130%; /* Para dar margen al parallax */
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* =========================================
   MOBILE & TOUCH REFINEMENTS
   ========================================= */
@media (max-width: 768px) {
  .navbar__cta {
    display: none;
  }
  .navbar {
    padding: 1.5rem 5%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .cursor, .cursor-follower, #cursor-smoke {
    display: none !important;
  }
}
