:root {
  --bg: #060606;
  --section-gray: #121212;
  --fg: #ffffff;
  --muted: #8f8f8f;
  --accent: #E7FF3E;
  --card-bg: #131313;
  --border: rgba(255,255,255,0.12);
  --gutter: 96px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, .display {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

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

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- NAV ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px var(--gutter);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--bg);
  position: relative;
  z-index: 20;
}
.site-header .logo img { height: 40px; width: auto; }

.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 40px; font-size: 13px; letter-spacing: 0.08em; font-weight: 600; text-transform: uppercase; }
.navlink { position: relative; color: var(--fg); opacity: 0.72; transition: opacity 0.2s ease, color 0.2s ease; }
.navlink:hover { opacity: 1; color: var(--accent); }
.navlink.active { opacity: 1; color: var(--accent); }

/* ---------- LANG SWITCH ---------- */
.lang-switch { display: flex; align-items: center; gap: 2px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 3px; }
.lang-btn {
  background: none;
  border: none;
  color: var(--fg);
  opacity: 0.6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-family: 'IBM Plex Sans', sans-serif;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.is-active { background: var(--accent); color: #060606; opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 19;
}
.mobile-nav a {
  padding: 18px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--fg);
  opacity: 0.8;
}
.mobile-nav a.active { color: var(--accent); opacity: 1; }
.mobile-nav.is-open { display: flex; }

/* ---------- BUTTONS ---------- */
.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #060606;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-neon:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(231,255,62,0.3); }

/* ---------- CARDS ---------- */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.card:hover { transform: translateY(-5px); border-color: var(--accent); }

.play-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.card:hover .play-ring, .track-row:hover .play-ring { background: var(--accent); color: #060606; }

/* ---------- VIDEO EMBEDS (Vimeo) ---------- */
.video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}
.card .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
  z-index: 2;
}
.card .tag-bl, .card .tag-tr, .card .project-info {
  z-index: 3;
  pointer-events: none;
}
.card .thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.track-row { transition: background 0.15s ease; border-bottom: 1px solid var(--border); }
.track-row:hover { background: rgba(255,255,255,0.035); }

.bar { background: var(--muted); transition: background 0.15s ease; }
.track-row:hover .bar { background: var(--accent); }

.social-link { color: var(--muted); transition: color 0.15s ease; font-size: 13px; }
.social-link:hover { color: var(--accent); }

/* ---------- HERO (Home) ---------- */
.hero { padding: 96px var(--gutter) 56px var(--gutter); max-width: 1180px; margin: 0 auto; }
.hero h1 { font-size: clamp(28px, 4vw, 52px); line-height: 1.2; font-weight: 600; text-align: center; }

.stats-row { display: flex; align-items: flex-start; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.stat-block { display: inline-block; text-align: center; }
.stat-number { font-size: clamp(38px, 5vw, 64px); font-weight: 700; color: var(--accent); line-height: 1; white-space: nowrap; }
.stat-label { margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-indent: 6px; }
.hero-text { flex: 1; min-width: 260px; font-size: 15px; line-height: 1.6; color: #b7b7b7; padding-top: 6px; border-left: 1px solid rgba(255,255,255,0.12); padding-left: 40px; }

/* ---------- REELS (Home) ---------- */
.featured-reel-wrap { padding: 0 var(--gutter); }
.featured-reel { width: 100%; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.featured-reel .glow { position: absolute; inset: 0; background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 70%); }
.featured-reel .play-ring { position: relative; width: 92px; height: 92px; }
.tag-bl { position: absolute; left: 32px; bottom: 28px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #b7b7b7; }
.tag-tr { position: absolute; right: 32px; top: 28px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f6f6f; }

/* ---------- BRAND STATEMENT (Home) ---------- */
.brand-statement { padding: 48px var(--gutter) 8px var(--gutter); text-align: center; }
.brand-statement p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.4;
  color: #f0f0f0;
  max-width: 820px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.reels-grid { display: flex; gap: 32px; padding: 40px var(--gutter) 0 var(--gutter); }
.reel-card { flex: 1; height: 220px; display: flex; align-items: center; justify-content: center; }
.reel-card .glow { position: absolute; inset: 0; background: linear-gradient(160deg, #191919 0%, #0a0a0a 70%); }
.reel-card .play-ring { position: relative; width: 56px; height: 56px; }
.reel-card .tag-bl { left: 20px; bottom: 18px; font-size: 11px; }

/* ---------- CTA (Home) ---------- */
.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 100px var(--gutter) 0 var(--gutter);
  padding-top: 56px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.cta-row h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.cta-row .btn-neon { padding: 16px 30px; font-size: 14px; }

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 80px;
  padding: 48px var(--gutter);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: var(--bg);
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { font-size: 13px; color: #9a9a9a; line-height: 1.9; }
.footer-brand strong { display: block; color: #ffffff; font-weight: 600; letter-spacing: 0.04em; }
.footer-social { display: flex; gap: 22px; }

/* ---------- PAGE TITLE (Proyectos / Música Original) ---------- */
.page-title { padding: 72px var(--gutter) 40px var(--gutter); }
.page-title h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; }
.page-title .subtitle { font-size: 15px; color: #9a9a9a; margin-top: 14px; max-width: 620px; }

/* ---------- PROYECTOS GRID ---------- */
.projects-grid { padding: 0 var(--gutter) 40px var(--gutter); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.project-card { height: 260px; display: flex; align-items: center; justify-content: center; }
.project-card .glow { position: absolute; inset: 0; background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 75%); }
.project-card .play-ring { position: relative; width: 48px; height: 48px; }
.project-info { position: absolute; left: 22px; bottom: 20px; }
.project-info .client { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.project-info .desc { font-size: 12px; color: #9a9a9a; margin-top: 4px; }

/* ---------- TRACK LIST (Música Original) ---------- */
.tracks { padding: 0 var(--gutter) 40px var(--gutter); }
.track-row { display: flex; align-items: center; padding: 18px 20px; gap: 16px; position: relative; }
.track-row .play-ring { width: 34px; height: 34px; }
.track-title { flex: 1; font-size: 15px; font-weight: 600; }
.track-client { width: 180px; font-size: 13px; color: #9a9a9a; text-align: right; }
.track-wave { width: 90px; display: flex; justify-content: flex-end; gap: 3px; align-items: flex-end; height: 18px; flex-shrink: 0; }

.track-seek { position: absolute; left: 0; right: 0; bottom: -1px; height: 16px; margin-top: -8px; display: flex; align-items: center; cursor: pointer; z-index: 3; touch-action: none; }
.track-seek-track { width: 100%; height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; transition: background 0.15s ease, height 0.15s ease; }
.track-seek-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; }
.track-row:hover .track-seek-track, .track-row.is-playing .track-seek-track { background: rgba(255,255,255,0.14); height: 4px; }
.track-row.is-playing { background: rgba(231,255,62,0.06); }
.track-row.is-playing .play-ring { background: var(--accent); color: #060606; }
.track-row.is-playing .bar { background: var(--accent); animation: bar-pulse 0.9s ease-in-out infinite alternate; }
.track-row.is-playing .bar:nth-child(2) { animation-delay: 0.1s; }
.track-row.is-playing .bar:nth-child(3) { animation-delay: 0.2s; }
.track-row.is-playing .bar:nth-child(4) { animation-delay: 0.05s; }
.track-row.is-playing .bar:nth-child(5) { animation-delay: 0.15s; }
@keyframes bar-pulse { from { transform: scaleY(0.5); } to { transform: scaleY(1.3); } }

/* ---------- CONTACTO ---------- */
.contact-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 80px var(--gutter); text-align: center; }
.contact-center h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 600; }
.contact-center .btn-neon { padding: 20px 40px; font-size: 17px; }
.contact-phones { display: flex; gap: 24px; font-size: 14px; color: #9a9a9a; flex-wrap: wrap; justify-content: center; }
.copy-email-btn {
  background: none;
  border: none;
  color: #9a9a9a;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  margin-top: -20px;
  transition: color 0.15s ease;
}
.copy-email-btn:hover { color: var(--accent); }
.copy-email-btn.is-copied { color: var(--accent); text-decoration: none; }
.contact-footer { padding: 32px var(--gutter); border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact-footer .copy { font-size: 12px; color: #6f6f6f; }

/* =========================================================
   RESPONSIVE — TABLET (<= 900px)
   ========================================================= */
@media (max-width: 900px) {
  :root { --gutter: 40px; }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row { gap: 32px; }
}

/* =========================================================
   RESPONSIVE — MOBILE (<= 640px)
   ========================================================= */
@media (max-width: 640px) {
  :root { --gutter: 20px; }

  .site-header { padding: 18px 20px; }
  .site-header .logo img { height: 30px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .lang-switch { margin-right: 4px; }

  .hero { padding-top: 44px; padding-bottom: 28px; }
  .stats-row { flex-direction: column; align-items: center; gap: 0; }
  .stat-block { width: 100%; }
  .hero-text { margin-top: 24px; padding-top: 20px; padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.12); max-width: 100%; text-align: left; }

  .reels-grid { flex-direction: column; }
  .reel-card { flex: 0 0 auto; height: 150px; }

  .cta-row { flex-direction: column; align-items: flex-start; margin-top: 60px; }
  .cta-row .btn-neon { width: 100%; }

  .site-footer { flex-direction: column; align-items: flex-start; margin-top: 56px; padding: 32px 20px; }

  .projects-grid { grid-template-columns: 1fr; gap: 20px; }

  .track-row { flex-wrap: wrap; }
  .track-client { width: auto; text-align: left; order: 3; flex-basis: 100%; padding-left: 50px; margin-top: -8px; }
  .track-wave { display: none; }
  .track-seek { height: 20px; margin-top: -10px; }

  .contact-center { padding: 56px 20px; gap: 28px; }
  .contact-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}


/* ---------- VIDEO MODAL (Proyectos) ---------- */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: #1a1a1a;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 40px 20px;
}
.video-modal-overlay.is-open { display: flex; }
.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
}
.video-modal-frame, .video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}
.video-modal-close {
  position: absolute;
  top: -52px;
  left: 0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.video-modal-close:hover { background: rgba(255,255,255,0.16); color: var(--accent); border-color: var(--accent); }

/* ---------- HOME REELS ON TOUCH DEVICES ----------
   background=1 Vimeo embeds don't autoplay/loop on touch devices
   (Vimeo does this on purpose to save mobile data), so the iframe
   is left blank. On touch devices we hide the iframe and show the
   dark glow + play icon instead, so it reads as "tap to watch"
   rather than a broken empty box. Tapping still opens the full
   video via video-modal.js. */
@media (hover: none) and (pointer: coarse) {
  .featured-reel .video-embed, .reel-card .video-embed { display: none; }
}
