/* ================================================================
   APOLO MEDIA — style.css  v2
   ================================================================ */

/* ── RESET ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; background: none; }

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --bg:      #080808;
  --bg2:     #101010;
  --text:    #f0ede8;
  --dim:     rgba(240,237,232,0.45);
  --border:  rgba(255,255,255,0.07);
  --card:    rgba(255,255,255,0.03);
  --card-h:  rgba(255,255,255,0.06);

  --serif:   'Cormorant Garant', Georgia, serif;
  --sans:    'DM Sans', -apple-system, sans-serif;

  --r:       16px;
  --nav-h:   70px;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] {
  --bg:      #f2f0eb;
  --bg2:     #e8e6e1;
  --text:    #0d0d0d;
  --dim:     rgba(13,13,13,0.45);
  --border:  rgba(0,0,0,0.08);
  --card:    rgba(0,0,0,0.03);
  --card-h:  rgba(0,0,0,0.06);
}

/* ── BASE ───────────────────────────────────────────────────────── */
html  { scroll-behavior: smooth; }
body  {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition: background .5s ease, color .5s ease;
}
* { cursor: none !important; }

/* ── CURSOR ─────────────────────────────────────────────────────── */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  color: var(--text);
}
.c-ring {
  position: absolute; top: 0; left: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .55;
  transform: translate(-50%,-50%);
  transition: width .35s var(--ease), height .35s var(--ease),
              opacity .35s ease, backdrop-filter .35s ease;
}
.c-icon {
  position: absolute; top: 0; left: 0;
  width: 17px; height: 17px;
  transform: translate(-50%,-50%);
  opacity: .9;
  transition: width .35s var(--ease), height .35s var(--ease);
}
.cursor.is-hover .c-ring {
  width: 72px; height: 72px; opacity: .85;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(255,255,255,.04);
}
.cursor.is-hover .c-icon { width: 20px; height: 20px; }

/* ── APERTURE CANVAS ────────────────────────────────────────────── */
.aperture-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9990; opacity: 0;
}

/* ── NAV ────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 52px;
  z-index: 500;
  transition: background .4s ease, border-color .4s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Brand text */
.nav-brand {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity .25s ease;
}
.nav-brand:hover { opacity: .6; }

/* Links */
.nav-links { display: flex; gap: 36px; }
.nav-link {
  font-size: 12px; font-weight: 400;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--dim);
  transition: color .25s ease;
}
.nav-link:hover { color: var(--text); }

/* Mode button */
.mode-btn {
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--text); padding: 0;
  transition: border-color .3s ease, transform .5s var(--ease);
}
.mode-btn:hover { border-color: var(--dim); transform: rotate(30deg); }
.mode-icon { width: 18px; height: 18px; }

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100dvh; min-height: 600px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-video-wrap { position: absolute; inset: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,.2) 0%, transparent 36%, rgba(8,8,8,.68) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 68px 84px;
  color: #f0ede8;
  animation: heroFadeUp .9s var(--ease) .2s both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(88px, 14vw, 210px);
  font-weight: 300; line-height: .87;
  letter-spacing: -.025em; color: #f0ede8;
}
.hero-title em { font-style: italic; }
.hero-line { display: block; }
.hero-sub {
  margin-top: 28px;
  font-size: 12px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(240,237,232,.55);
}
.scroll-hint {
  position: absolute; bottom: 44px; right: 68px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(240,237,232,.35);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}
.scroll-bar {
  width: 1px; height: 54px;
  background: linear-gradient(to bottom, rgba(240,237,232,.5), transparent);
  animation: sbAnim 2.4s var(--ease) infinite; transform-origin: top;
}
@keyframes sbAnim {
  0%   { transform: scaleY(0); opacity: 1; }
  75%  { transform: scaleY(1); opacity: .5; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ── SECTION BASE ───────────────────────────────────────────────── */
.section { padding: 120px 68px; border-top: 1px solid var(--border); }
.sec-head { margin-bottom: 80px; }
.eyebrow {
  display: block; font-size: 11px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 18px;
}
.section h2, .sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 6.5vw, 90px);
  font-weight: 300; line-height: 1.04; letter-spacing: -.02em;
}
.section h2 em, .sec-head h2 em { font-style: italic; }

/* ── REVEAL ─────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.svc-card:nth-child(1) { transition-delay: 0s; }
.svc-card:nth-child(2) { transition-delay: .07s; }
.svc-card:nth-child(3) { transition-delay: .14s; }
.svc-card:nth-child(4) { transition-delay: .21s; }
.svc-card:nth-child(5) { transition-delay: .28s; }
.svc-card:nth-child(6) { transition-delay: .35s; }

/* ── SERVICES ───────────────────────────────────────────────────── */
.svc-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--border); gap: 1px;
}
.svc-card {
  background: var(--bg); padding: 48px 40px 40px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .3s ease;
  position: relative;
}
.svc-card:hover { background: var(--card-h); }
.svc-n { font-size: 11px; letter-spacing: .16em; color: var(--dim); }
.svc-card h3 { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.2; }
.svc-card p  { font-size: 14px; color: var(--dim); line-height: 1.8; flex: 1; }
.svc-arrow {
  display: inline-block; font-size: 18px; color: var(--dim);
  transition: transform .3s ease, color .3s ease;
  align-self: flex-start; margin-top: 8px;
}
.svc-card:hover .svc-arrow { transform: translateY(4px); color: var(--text); }

/* ── PROYECTOS ──────────────────────────────────────────────────── */

/* REEL HERO */
.reel-hero {
  display: block; margin-bottom: 80px;
}
.reel-inner {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 16/9;
  transition: transform .15s ease;
}
.reel-video {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.reel-label {
  position: absolute; top: 28px; left: 36px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(240,237,232,.6); z-index: 2;
}
.reel-cta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 60px 36px 32px;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  color: #f0ede8; font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 32px); font-weight: 300; font-style: italic;
  display: flex; align-items: flex-end; justify-content: flex-end;
  z-index: 2;
  opacity: 0; transition: opacity .35s ease;
}
.reel-cta span { font-size: .7em; margin-left: 8px; opacity: .7; }
.reel-hero:hover .reel-cta { opacity: 1; }

/* PROJECT ROWS */
.proj-list { display: flex; flex-direction: column; gap: 4px; }

.proj-row {
  display: grid; grid-template-columns: 1fr 2.2fr;
  gap: 52px; align-items: center;
  padding: 52px 0;
  border-top: 1px solid var(--border);
}
.proj-row:last-child { border-bottom: 1px solid var(--border); }

.proj-meta { padding-left: 8px; }
.proj-n {
  display: block; font-size: 11px; letter-spacing: .18em;
  color: var(--dim); margin-bottom: 18px;
}
.proj-meta h3 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 300; line-height: 1.05; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.proj-meta p { font-size: 13px; color: var(--dim); line-height: 1.75; }

/* Project card (3D tilt) */
.proj-card {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg2);
  transform-style: preserve-3d;
  transition: box-shadow .4s ease;
  cursor: none;
}
.proj-card:hover {
  box-shadow: 0 28px 64px rgba(0,0,0,.5);
}
.proj-card video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.proj-card:hover video { transform: scale(1.04); }
.proj-tag {
  position: absolute; top: 20px; left: 24px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(240,237,232,.7); z-index: 2;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

/* ── CLIENTES ───────────────────────────────────────────────────── */
.logos-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--border); gap: 1px;
}
.logo-cell {
  background: var(--bg);
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  transition: background .3s ease;
  position: relative; overflow: hidden;
}
.logo-cell::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 0 rgba(255,255,255,0);
  transition: box-shadow .4s ease;
}
.logo-cell:hover { background: var(--card-h); }
.logo-cell:hover::after {
  box-shadow: inset 0 0 40px rgba(255,255,255,.04);
}
.logo-cell img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .4s var(--ease), filter .3s ease;
  filter: brightness(0) invert(1);   /* white in dark mode */
}
[data-theme="light"] .logo-cell img { filter: brightness(0); }

.logo-cell:hover img {
  transform: scale(1.1);
  filter: brightness(0) invert(1) drop-shadow(0 0 14px rgba(255,255,255,.5));
}
[data-theme="light"] .logo-cell:hover img {
  filter: brightness(0) drop-shadow(0 0 10px rgba(0,0,0,.3));
}

/* Text logo for missing PNGs */
.logo-text-only { font-family: var(--sans); }
.logo-text-only span {
  font-size: 1.1rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text); opacity: .55;
  transition: opacity .3s ease, transform .4s var(--ease),
              text-shadow .3s ease;
}
.logo-text-only:hover span {
  opacity: 1; transform: scale(1.12);
  text-shadow: 0 0 18px rgba(255,255,255,.4);
}
[data-theme="light"] .logo-text-only:hover span {
  text-shadow: 0 0 14px rgba(0,0,0,.2);
}

/* ── ABOUT ──────────────────────────────────────────────────────── */
.about-layout {
  display: grid; grid-template-columns: 2fr 3fr;
  gap: 80px; align-items: start;
}
.about-photo-wrap {
  border-radius: 18px; overflow: hidden;
  aspect-ratio: 3/4;
  transform-style: preserve-3d;
  cursor: none;
  transition: box-shadow .4s ease;
}
.about-photo-wrap:hover { box-shadow: 0 24px 56px rgba(0,0,0,.45); }
.about-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.about-body h2 {
  font-family: var(--serif);
  font-size: clamp(60px, 7.5vw, 108px);
  font-weight: 300; line-height: .91; letter-spacing: -.025em;
  margin-bottom: 40px;
}
.about-p { font-size: 16px; line-height: 1.9; color: var(--dim); margin-bottom: 20px; }

.about-links { margin-top: 48px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 400; color: var(--text);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 9px 20px;
  transition: border-color .3s ease, background .3s ease;
}
.pill:hover { border-color: var(--dim); background: var(--card); }
.pill span  { font-size: 11px; opacity: .5; }

/* ── CONTACT ────────────────────────────────────────────────────── */
.contact {
  display: flex; align-items: center; justify-content: center;
  min-height: 70vh;
}
.contact-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 36px;
}
.contact-h {
  font-family: var(--serif);
  font-size: clamp(52px, 8.5vw, 120px);
  font-weight: 300; line-height: 1.02; letter-spacing: -.025em;
  white-space: nowrap;
}
.email-btn {
  display: flex; align-items: center; gap: 20px;
  border: 1px solid var(--border); border-radius: 100px;
  padding: 18px 36px; color: var(--text);
  font-size: 15px; font-weight: 300; letter-spacing: .02em;
  transition: border-color .3s ease, background .3s ease, transform .3s var(--ease);
}
.email-btn:hover { border-color: var(--dim); background: var(--card); transform: scale(1.025); }
.email-hint {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); border-left: 1px solid var(--border); padding-left: 20px;
}
.contact-socials { display: flex; gap: 20px; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text);
  transition: border-color .3s ease, background .3s ease, transform .3s var(--ease);
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover { border-color: var(--dim); background: var(--card); transform: scale(1.08); }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.footer {
  padding: 28px 68px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: .06em; color: var(--dim);
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: var(--dim); transition: color .25s ease; }
.footer-legal a:hover { color: var(--text); }

/* ── 3D TILT BASE ───────────────────────────────────────────────── */
.tilt-card { transition: transform .15s ease; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2,1fr); }
  .about-layout { grid-template-columns: 1fr; gap: 52px; }
  .about-photo-wrap { max-width: 420px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .section { padding: 72px 24px; }
  .nav { padding: 0 24px; }
  .hero-content { padding: 0 28px 60px; }
  .scroll-hint  { right: 28px; }
  .nav-links    { display: none; }
  .svc-grid     { grid-template-columns: 1fr; }
  .logos-grid   { grid-template-columns: repeat(3,1fr); }
  .proj-row     { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .proj-meta    { padding-left: 0; }
  /* reel stays 16/9 on mobile */
  .footer       { flex-direction: column; gap: 16px; text-align: center; }
  .footer-legal { flex-wrap: wrap; justify-content: center; }
  .contact-h    { font-size: clamp(38px,11vw,72px); white-space: normal; }
}

@media (max-width: 480px) {
  .logos-grid { grid-template-columns: repeat(2,1fr); }
}
