/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #000000;
  --surface:   #0d0d0d;
  --surface2:  #111111;
  --text:      #ffffff;
  --muted:     #aaaaaa;
  --cyan:      #00dcff;
  --magenta:   #c800ff;
  --font:      'Inter', sans-serif;
  --max-w:     1200px;
  --gap:       clamp(1.5rem, 4vw, 3rem);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
}

.section { padding: clamp(4rem, 10vw, 7rem) 0; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

/* ── Fade-in animation (JS adds .visible) ───────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-primary {
  background: var(--cyan);
  color: #000;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-whatsapp {
  background: #25d366;
  color: #000;
}
.btn-mail {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-mail:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 130px;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nav-brand .isotipo {
  height: 46px;
  width: auto;
}

.nav-brand .logo-text {
  height: 116px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Fallback text when images aren't loaded */
.nav-brand-fallback {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}
.nav-brand-fallback span { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a.nav-cta {
  color: var(--cyan);
  border: 1px solid rgba(0,220,255,0.4);
  padding: 0.35rem 0.9rem;
  border-radius: 3px;
}
.nav-links a.nav-cta:hover {
  background: rgba(0,220,255,0.1);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-socials a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.nav-socials a:hover { color: var(--cyan); }
.nav-socials svg { width: 18px; height: 18px; fill: currentColor; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 130px;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

/* Canvas de la animación de fondo */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Overlay degradado para legibilidad del texto */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0.90) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

/* Cursor parpadeante en el título */
.hero-title .accent {
  border-right: 3px solid var(--cyan);
  animation: cursor-blink 0.9s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { border-color: var(--cyan); }
  50%       { border-color: transparent; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--cyan);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-title .accent { color: var(--cyan); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Demo reel ──────────────────────────────────────────────── */
.reel { background: var(--surface); }

.reel-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.reel-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Thumbnail click-to-play (cuando el embed está desactivado) */
.yt-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.yt-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.75);
}
.yt-thumb:hover img {
  transform: scale(1.03);
  filter: brightness(0.6);
}
.yt-thumb .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.yt-thumb .play-icon {
  width: 72px;
  height: 72px;
  background: rgba(0,220,255,0.15);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
  backdrop-filter: blur(6px);
}
.yt-thumb:hover .play-icon {
  background: rgba(0,220,255,0.3);
  transform: scale(1.1);
}
.yt-thumb .play-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--cyan);
  margin-left: 4px;
}
.yt-thumb .play-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.reel-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* ── About ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-stat {
  text-align: center;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  background: var(--surface);
}
.about-stat-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.about-stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about-text p:last-child { margin-bottom: 0; }

/* ── Services ───────────────────────────────────────────────── */
.services { background: var(--surface); }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--surface2);
  border-radius: 4px;
  border-top: 3px solid var(--cyan);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: transform 0.25s, box-shadow 0.25s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,220,255,0.08);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.service-icon {
  width: 40px;
  height: 40px;
  background: rgba(0,220,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--cyan);
}
.service-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ── Contact ────────────────────────────────────────────────── */
.contact { text-align: center; }

.contact-text {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.contact-sub {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-socials a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.footer-socials a:hover { color: var(--cyan); }
.footer-socials svg { width: 18px; height: 18px; fill: currentColor; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
  width: 100%;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 0.5rem;
}

/* ── Page hero (subpages) ───────────────────────────────────── */
.page-hero {
  padding: calc(130px + 4rem) 0 3rem;
  background: var(--surface);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-hero p {
  color: var(--muted);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}
.page-hero .section-label {
  color: var(--cyan);
  margin-top: 0;
}

/* ── Portfolio grid ─────────────────────────────────────────── */
.portfolio-section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.portfolio-section + .portfolio-section {
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Grid de videos verticales (Shorts 9:16) */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.shorts-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 177.78%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.shorts-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Dos verticales lado a lado (destacados) */
.shorts-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0 auto 2rem;
  max-width: 580px;
}

@media (max-width: 768px) {
  .shorts-grid { grid-template-columns: repeat(2, 1fr); }
  .shorts-duo { max-width: 100%; }
}
@media (max-width: 480px) {
  .shorts-grid { grid-template-columns: 1fr 1fr; }
  .shorts-duo { grid-template-columns: 1fr 1fr; }
}

.portfolio-section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--cyan);
}
.portfolio-section-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  padding-left: 1rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.media-placeholder {
  aspect-ratio: 16/9;
  background: var(--surface2);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.media-placeholder svg { width: 28px; height: 28px; opacity: 0.4; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ── Services page tiers ────────────────────────────────────── */
.tiers { padding: clamp(3rem, 6vw, 5rem) 0; }

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.tier-card {
  background: var(--surface2);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}
.tier-card:hover {
  border-color: rgba(0,220,255,0.3);
  transform: translateY(-4px);
}

.tier-card.featured {
  border-color: var(--cyan);
  position: relative;
}
.tier-card.featured::before {
  content: 'Más solicitado';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cyan);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 0 0 4px 4px;
}

.tier-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.tier-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tier-price {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tier-features {
  list-style: none;
  flex: 1;
  margin-bottom: 2rem;
}
.tier-features li {
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.tier-features li::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2 7l3.5 3.5L12 3.5' stroke='%2300dcff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.tier-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
  border-left: 2px solid rgba(200,0,255,0.5);
  font-style: italic;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .tiers-grid { grid-template-columns: 1fr; }
  .about-stat { display: flex; gap: 1.5rem; align-items: center; text-align: left; }
  .about-stat-num { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  /* Navbar — logo en mobile */
  .navbar { height: 90px; }
  .nav-brand .isotipo { height: 38px; }
  .nav-brand .logo-text { height: 68px; }
  .hero { padding-top: 90px; }
  .page-hero { padding: calc(90px + 3rem) 0 2.5rem; }

  .nav-links,
  .nav-socials { display: none; }

  .nav-toggle { display: flex; }

  /* Menú mobile abierto — incluye redes sociales al final */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.97);
    padding: 1.5rem clamp(1rem, 5vw, 2.5rem) 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    animation: slideDown 0.25s ease;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text);
  }

  /* Redes sociales dentro del menú mobile */
  .nav-links.open .mobile-socials {
    display: flex;
    gap: 1.25rem;
    padding-top: 1.25rem;
    border-bottom: none;
  }
  .nav-links.open .mobile-socials a {
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: none;
    color: var(--muted);
  }
  .nav-links.open .mobile-socials a:hover { color: var(--cyan); }
  .nav-links.open .mobile-socials svg { width: 20px; height: 20px; fill: currentColor; }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
  }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer-socials { justify-content: center; }

  /* Portfolio grid — evita scroll horizontal */
  .media-grid { grid-template-columns: 1fr 1fr; }

  /* Tier cards — botones full width */
  .tier-card .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .nav-brand .logo-text { height: 54px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .contact-actions { flex-direction: column; align-items: center; }
  .contact-actions .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* Portfolio grid — una columna en pantallas muy chicas */
  .media-grid { grid-template-columns: 1fr; }

  /* Tier featured badge — ajuste de texto largo */
  .tier-card.featured::before { font-size: 0.62rem; padding: 0.2rem 0.7rem; }
}
