/* ===========================================================
   APIORA — Portfolio agencia de vídeo
   Estilo: oscuro premium, editorial, scroll animado
   =========================================================== */

:root {
  --bg:        #0a0a0b;
  --bg-soft:   #111113;
  --surface:   #16161a;
  --line:      rgba(255,255,255,0.09);
  --text:      #f4f2ee;
  --muted:     #9a9aa2;
  --muted-2:   #6e6e77;
  --accent:    #e8a06a;   /* miel cálido */
  --accent-2:  #e0785a;   /* coral */
  --radius:    18px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --maxw:      1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Ocultar el botón de reproducción nativo de iOS en vídeos con autoplay */
video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #1a1205; }

/* ---------- Tipografía ---------- */
.display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
h1.display { font-size: clamp(2.8rem, 8vw, 6.5rem); }
h2.display { font-size: clamp(2.1rem, 5.2vw, 4rem); }
h3.display { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
  opacity: 0.7;
}

.lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 46ch; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 4rem); }
section { position: relative; }
.section-pad { padding: clamp(5rem, 12vh, 9rem) 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.6em;
  border-radius: 100px;
  font-weight: 500; font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: #0a0a0b; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(255,255,255,0.04); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ===========================================================
   NAV
   =========================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 5vw, 4rem);
  transition: background .5s var(--ease), backdrop-filter .5s, padding .5s var(--ease), border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,11,0.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  padding-top: 1rem; padding-bottom: 1rem;
}
.nav-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a { font-size: 0.92rem; color: var(--muted); transition: color .3s; position: relative; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn)::after {
  content:""; position:absolute; left:0; bottom:-4px; height:1px; width:0; background: var(--accent); transition: width .4s var(--ease);
}
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* ===========================================================
   HERO
   =========================================================== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-video-wrap { position: absolute; inset: 0; z-index: 0; }
.hero-video-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.hero-video-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.15) 35%, rgba(10,10,11,0.55) 70%, rgba(10,10,11,0.98) 100%),
    linear-gradient(90deg, rgba(10,10,11,0.6) 0%, rgba(10,10,11,0) 55%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(3rem, 8vh, 6rem); }
.hero h1 { margin: 1.5rem 0 1.6rem; max-width: 15ch; }
.hero .lead { max-width: 52ch; margin-bottom: 2.4rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; right: clamp(1.2rem, 5vw, 4rem); z-index: 2;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 0.6rem; writing-mode: vertical-rl;
}
.hero-scroll .dot { writing-mode: horizontal-tb; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{ opacity:.3; transform: translateY(0);} 50%{ opacity:1; transform: translateY(6px);} }

/* ---------- Marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.6rem 0; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 3.5rem; will-change: transform; animation: scroll-x 26s linear infinite; }
.marquee-track span { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.1rem, 2.2vw, 1.7rem); color: var(--muted-2); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 3.5rem; }
.marquee-track span::after { content: "•"; color: var(--accent); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ===========================================================
   WORK / PORTFOLIO
   =========================================================== */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); flex-wrap: wrap; }
.work-head h2 { max-width: 16ch; margin-top: 1rem; }

.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 3vw, 2.2rem); }
.work-card { position: relative; cursor: pointer; }
.work-card:nth-child(4n+1), .work-card:nth-child(4n+4) { grid-row: span 1; }
.work-media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16/10; background: var(--surface); border: 1px solid var(--line);
}
.work-media video, .work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work-card:hover .work-media video, .work-card:hover .work-media img { transform: scale(1.05); }
.work-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,11,0.7) 100%);
  opacity: 0; transition: opacity .5s;
}
.work-card:hover .work-media::after { opacity: 1; }
.work-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 3;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(10,10,11,0.55); backdrop-filter: blur(8px);
  border: 1px solid var(--line); padding: 0.4em 0.85em; border-radius: 100px; color: var(--text);
  opacity: 0; transform: translateY(-6px); transition: all .5s var(--ease);
}
.work-card:hover .work-badge { opacity: 1; transform: translateY(0); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.1rem; gap: 1rem; }
.work-meta h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.work-meta .loc { color: var(--muted); font-size: 0.92rem; }
.work-meta .play { color: var(--muted-2); font-size: 0.82rem; display: inline-flex; align-items: center; gap: 0.4em; transition: color .3s; }
.work-card:hover .work-meta .play { color: var(--accent); }

/* ===========================================================
   STATEMENT (pull quote)
   =========================================================== */
.statement { text-align: center; }
.statement p { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: clamp(1.8rem, 5vw, 3.6rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 20ch; margin: 0 auto; }
.statement .hl { color: var(--accent); }

/* ===========================================================
   SERVICES
   =========================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .4s, transform .5s var(--ease);
}
.service:hover { border-color: rgba(232,160,106,0.4); transform: translateY(-6px); }
.service-img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.service:hover .service-img img { transform: scale(1.05); }
.service-img::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,11,0.45) 0%, rgba(10,10,11,0) 32%); }
.service-num {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem; color: #0a0a0b;
  background: var(--accent); width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.service-body { padding: clamp(1.6rem, 2.5vw, 2.1rem); display: flex; flex-direction: column; }
.service h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.service p { color: var(--muted); font-size: 0.97rem; }

/* ===========================================================
   PROCESS
   =========================================================== */
.process-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.step { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(2rem, 3.5vw, 3rem); min-height: 230px; transition: border-color .4s, transform .5s var(--ease); }
.step:hover { border-color: rgba(232,160,106,0.4); transform: translateY(-6px); }
.step-bgnum { position: absolute; top: 0.45rem; right: 0.5rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(5rem, 10vw, 8rem); line-height: 1; color: rgba(232,160,106,0.11); pointer-events: none; user-select: none; }
.step-icon { display: block; width: 34px; height: 34px; color: var(--accent); margin-bottom: 1.5rem; }
.step-icon svg { width: 100%; height: 100%; display: block; }
.step h3 { position: relative; font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.step p { position: relative; color: var(--muted); font-size: 0.97rem; max-width: 34ch; }

/* ===========================================================
   PRICING
   =========================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); margin-top: clamp(2.5rem, 5vw, 4rem); align-items: stretch; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.8rem, 3vw, 2.4rem); display: flex; flex-direction: column; position: relative; transition: border-color .4s, transform .5s var(--ease); }
.price:hover { transform: translateY(-6px); border-color: rgba(232,160,106,0.35); }
.price.featured { border-color: var(--accent); background: #181419; }
.price-tag { position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%); background: var(--accent); color: #0a0a0b; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.35em 0.9em; border-radius: 100px; white-space: nowrap; }
.price h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.4rem; }
.price .plan-desc { color: var(--muted); font-size: 0.9rem; min-height: 2.6em; }
.price .amount { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: clamp(2.4rem, 5vw, 3.2rem); letter-spacing: -0.02em; margin: 1.4rem 0 0.2rem; line-height: 1; }
.price .amount .cur { font-size: 0.5em; vertical-align: super; color: var(--muted); margin-right: 2px; }
.price .amount .per { font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.price ul { list-style: none; margin: 1.8rem 0; display: flex; flex-direction: column; gap: 0.8rem; }
.price li { font-size: 0.94rem; color: var(--text); display: flex; gap: 0.6em; align-items: flex-start; }
.price li::before { content: "✓"; color: var(--accent); font-weight: 600; flex-shrink: 0; }
.price .btn { margin-top: auto; width: 100%; justify-content: center; }
.pricing-note { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 2rem; }
.pricing-note strong { color: var(--accent); font-weight: 600; }

/* ===========================================================
   CONTACT
   =========================================================== */
.contact { text-align: center; }
.contact h2 { margin: 1.2rem auto 1.4rem; max-width: 16ch; }
.contact .lead { margin: 0 auto 2.6rem; max-width: 48ch; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-mail { display: inline-block; margin-top: 2.5rem; font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: color .3s, border-color .3s; }
.contact-mail:hover { color: var(--accent); border-color: var(--accent); }

/* ===========================================================
   FOOTER
   =========================================================== */
.footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 2rem; letter-spacing: -0.02em; }
.footer-logo span { color: var(--accent); }
.footer-cols { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 0.6rem; transition: color .3s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.85rem; }

/* ---------- Reveal (JS enhance; visible sin JS) ---------- */
.reveal { will-change: transform, opacity; }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed; inset: 0; top: 0;
    background: rgba(10,10,11,0.97); backdrop-filter: blur(20px); z-index: 99;
    justify-content: center; align-items: center; gap: 2rem; font-size: 1.5rem;
  }
  .nav-links.open a { color: var(--text); font-size: 1.6rem; }
  .nav-toggle { display: block; z-index: 100; position: relative; }
  .hero-scroll { display: none; }
  .hero .lead { max-width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .work-meta h3 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hero-video-wrap video { transform: none; }
}
