/* =========================================
   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;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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__pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.pillar-card__items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pillar-card__item h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}

.pillar-card__item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 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__image-hint {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.about__image-wrapper:hover .about__image-hint {
  opacity: 0;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pulse-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1);
  animation: pulse 2s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
}

.about__image-hint-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.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 — Logo Carousel */
.logos-carousel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  padding: 2rem 0;
}

.logos-carousel__track {
  display: flex;
  gap: 5rem;
  align-items: center;
  width: max-content;
  animation: logosScroll 40s linear infinite;
}

.logos-carousel:hover .logos-carousel__track,
.logos-carousel.is-paused .logos-carousel__track {
  animation-play-state: paused;
}

.logos-carousel__track img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: auto;
}

.logos-carousel__track img:hover {
  opacity: 1;
  transform: scale(1.1);
}

@keyframes logosScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tools__intro {
  max-width: 720px;
  margin: 1rem auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.tools__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 5% 4rem;
}

.tool-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.15);
}

.tool-card__category {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tool-card__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tool-card__item {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  transition: all 0.3s ease;
}

.tool-card__item:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Contact */
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.contact__btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.06em;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.contact__btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.contact__copy-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact__copy-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact__copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.contact__copy-btn:hover { color: #fff; }

.contact__copy-feedback {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.contact__copy-feedback.visible { opacity: 1; }

.contact__secondary-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.contact__btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.contact__btn-secondary:hover {
  border-color: var(--accent);
  color: #fff;
}
/* =========================================
   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;
  }
}

/* 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 {
    padding: 1.5rem 5%;
  }
  .logos-carousel__track {
    gap: 3rem;
    animation-duration: 30s;
  }
  .logos-carousel__track img {
    height: 32px;
  }
  .section__header {
    margin-bottom: var(--spacing-md);
  }
  /* Hero text smaller on mobile */
  .hero__giant-text {
    font-size: clamp(2.8rem, 8vw, 4rem);
  }
  .hero__overlay-content {
    bottom: 8%;
  }
  /* Reduce section padding on mobile */
  .section {
    padding: var(--spacing-lg) 5%;
  }
  /* FPV canvas mobile */
  .fpv__header {
    top: 5%;
  }
  .fpv__header .section__title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  /* 3D sphere labels */
  #tools .section__title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .services__pillars {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .tools__cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem 5% 3rem;
  }
  .tools__intro {
    font-size: 0.88rem;
  }
  .contact__btn-primary {
    font-size: 0.95rem;
    padding: 0.85rem 1.8rem;
  }
  /* Portfolio slides */
  .portfolio__slide {
    min-width: 85vw;
  }
  .portfolio__slide-title {
    font-size: 1.2rem;
  }
  .mobile-menu__link {
    font-size: 1.2rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .cursor, .cursor-follower {
    display: none !important;
  }
  .services__bg-canvas {
    display: none;
  }
  .services {
    background: radial-gradient(ellipse at center, #1a0a05 0%, #111 70%);
  }
}
