/* ═══════════════════════════════════════════
   PORTOTECH EC — Shared Styles
   ═══════════════════════════════════════════ */
:root {
  --yellow: #F5C200;
  --black: #080808;
  --gray-dark: #111111;
  --gray-mid: #1a1a1a;
  --gray-border: #252525;
  --gray-text: #777;
  --white: #F0F0F0;
  --nav-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--black); color: var(--white);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ── NAV ──────────────────────────────────────── */
nav#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: var(--nav-h);
  background: rgba(8,8,8,0.7); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.85rem; font-weight: 600; color: var(--gray-text);
  letter-spacing: 0.5px; transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--yellow);
  transform: scaleX(0); transition: transform 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--yellow); color: var(--black) !important;
  padding: 8px 20px; border-radius: 6px; font-weight: 700 !important;
}
.nav-cta::after { display: none !important; }

/* ── BUTTONS ──────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--yellow); color: var(--black);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 0.9rem; padding: 14px 28px;
  border-radius: 8px; letter-spacing: 0.5px;
  position: relative; overflow: hidden;
  transition: box-shadow 0.3s, transform 0.15s;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.35) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(245,194,0,0.4); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.9rem; padding: 14px 28px;
  border-radius: 8px; border: 1px solid var(--gray-border);
  position: relative; overflow: hidden;
  transition: border-color 0.3s, color 0.3s, transform 0.15s;
}
.btn-ghost::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(245,194,0,0.12) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-ghost:hover::before { opacity: 1; }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-ghost:active { transform: scale(0.97); }

.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0); animation: rippleAnim 0.6s linear; pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

.btn-maps {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 1.25rem; width: 100%; justify-content: center;
  background: transparent; color: var(--yellow);
  border: 1px solid rgba(245,194,0,0.3);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  padding: 10px 20px; border-radius: 8px;
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
  position: relative; overflow: hidden;
}
.btn-maps:hover { background: rgba(245,194,0,0.08); border-color: var(--yellow); transform: translateY(-2px); }

.btn-dark {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--black); color: var(--yellow);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 0.95rem; padding: 15px 34px; border-radius: 8px;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
}
.btn-dark:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }

/* ── CTA BAND ─────────────────────────────────── */
.cta-band {
  background: var(--yellow); padding: 5rem 5%;
  text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 1px, transparent 0, transparent 50%);
  background-size: 10px 10px;
}
.cta-band h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 800; color: var(--black); letter-spacing: -1px;
  line-height: 1; margin-bottom: 0.75rem; position: relative;
}
.cta-band p { font-size: 1rem; color: rgba(0,0,0,0.6); margin-bottom: 2rem; font-weight: 500; position: relative; }

/* ── FOOTER ───────────────────────────────────── */
footer {
  background: var(--gray-dark); border-top: 1px solid var(--gray-border);
  padding: 3rem 5%; display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 1.5rem;
}
.footer-tagline { font-size: 0.75rem; color: var(--gray-text); margin-top: 4px; }
.footer-social { display: flex; gap: 1rem; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray-mid); border: 1px solid var(--gray-border);
  padding: 9px 16px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.social-btn:hover { border-color: var(--yellow); color: var(--yellow); transform: translateY(-2px); }
.footer-copy {
  width: 100%; text-align: center; font-size: 0.75rem; color: var(--gray-text);
  padding-top: 2rem; margin-top: 1rem; border-top: 1px solid var(--gray-border);
}

/* ── SECTIONS ─────────────────────────────────── */
.section { padding: 6rem 5%; }
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--yellow); margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700;
  margin-bottom: 3rem; line-height: 1.15;
}

/* ── PAGE HERO (inner pages) ──────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 5% 3.5rem;
  background: var(--gray-dark); border-bottom: 1px solid var(--gray-border);
}
.page-hero-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--yellow); margin-bottom: 0.75rem;
}
.page-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 800; letter-spacing: -1px; line-height: 0.9;
}

/* ── STATS ────────────────────────────────────── */
.stats {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  padding: 4rem 5%;
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
  background: var(--gray-dark);
}
.stat { text-align: center; }
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem; font-weight: 700; color: var(--yellow); line-height: 1;
}
.stat-label {
  font-size: 0.75rem; color: var(--gray-text);
  margin-top: 6px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}

/* ── REVEAL ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── ANIMATIONS ───────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── PHONE FRAME ──────────────────────────────── */
.hero-phone-wrap {
  flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.phone-glow {
  position: absolute; inset: -60px; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(245,194,0,0.08) 0%, transparent 70%);
}
.phone-frame {
  height: min(80vh, 700px);
  width: calc(min(80vh, 700px) * 0.476);
  border-radius: 42px;
  background: #000;
  border: 7px solid #1e1e20;
  box-shadow:
    0 0 0 1px #2c2c2e,
    0 50px 120px rgba(0,0,0,0.85),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden; position: relative;
  transition: transform 0.4s cubic-bezier(.23,1,.32,1), box-shadow 0.4s;
  transform: rotate(-2deg);
  /* Containment: isolate paint to this element */
  contain: layout paint style;
}
.phone-frame:hover {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: 0 0 0 1px #2c2c2e, 0 70px 140px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 26px;
  background: #1e1e20; border-radius: 0 0 18px 18px; z-index: 20;
}
.phone-screen-inner {
  width: 100%; height: 100%; position: relative;
  background: #161823; overflow: hidden;
  /* Strict containment: nothing escapes, no layout cost on parent */
  contain: strict;
}

/* TikTok static video bg — NO animation on background-position */
.tt-video-bg {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, #1a0b30 0%, #0d1420 35%, #161030 65%, #091525 100%);
  /* Scanlines: static, no animation */
  background-image:
    linear-gradient(155deg, #1a0b30 0%, #0d1420 35%, #161030 65%, #091525 100%),
    repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 4px);
}

/* Light orb: separate div, GPU composited via will-change */
.tt-light-orb {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 62% 42%, rgba(245,194,0,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 28% 65%, rgba(100,60,220,0.1) 0%, transparent 55%);
  will-change: transform;
  animation: ttLight 8s ease-in-out infinite;
  transform: translateZ(0);
}
@keyframes ttLight {
  0%,100% { transform: translateZ(0) translate(0,0); }
  40%      { transform: translateZ(0) translate(-6%,4%); }
  70%      { transform: translateZ(0) translate(6%,-4%); }
}

/* Gear/build overlay illustration — slowed down */
.tt-overlay-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  font-size: 5rem; opacity: 0.1; z-index: 1;
  animation: ttIcon 6s ease-in-out infinite;
}
@keyframes ttIcon {
  0%,100% { transform: translate3d(-50%,-54%,0) rotate(-4deg) scale(1); }
  50%     { transform: translate3d(-50%,-54%,0) rotate(4deg) scale(1.06); }
}

/* Right sidebar */
.tt-sidebar {
  position: absolute; right: 9px; bottom: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  z-index: 5;
}
.tt-action { text-align: center; cursor: pointer; }
.tt-action-icon { font-size: 1.45rem; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7)); }
.tt-action-count { font-size: 0.58rem; color: rgba(255,255,255,0.75); font-weight: 700; margin-top: 2px; letter-spacing: 0.5px; }

/* Music disc — GPU composited */
.tt-disc {
  width: 34px; height: 34px; border-radius: 50%;
  background: conic-gradient(#333, #666, #333);
  border: 3px solid #444; position: relative;
  will-change: transform;
  animation: ttDisc 4s linear infinite;
}
.tt-disc::after {
  content: ''; position: absolute; inset: 8px;
  background: #1e1e20; border-radius: 50%;
}
@keyframes ttDisc { to { transform: rotate(360deg); } }

/* Bottom info */
.tt-bottom {
  position: absolute; bottom: 0; left: 0; right: 44px; padding: 14px 12px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
  z-index: 5;
}
.tt-username { font-weight: 800; font-size: 0.82rem; color: #fff; margin-bottom: 5px; letter-spacing: 0.3px; }
.tt-caption { font-size: 0.7rem; color: rgba(255,255,255,0.82); line-height: 1.45; margin-bottom: 8px; }
.tt-music { font-size: 0.62rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 5px; }
.tt-music-note { animation: ttBounce 2.5s ease-in-out infinite alternate; }
@keyframes ttBounce { from{transform:translateY(0)} to{transform:translateY(-3px)} }

/* Tap overlay — cubre toda la pantalla, lleva al video real */
.tt-video-tap {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tt-play-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
  transition: transform 0.2s, background 0.2s;
}
.tt-video-tap:hover .tt-play-icon {
  transform: scale(1.1);
  background: rgba(255,255,255,0.25);
}

/* Watch button */
.tt-watch {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #fe2c55; color: #fff;
  font-weight: 800; font-size: 0.72rem; padding: 8px 10px;
  border-radius: 8px; margin-top: 10px; letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
}
.tt-watch:hover { opacity: 0.9; transform: scale(0.97); }

/* Floating badges */
.phone-badge {
  position: absolute; bottom: -20px; left: 16px;
  background: rgba(8,8,8,0.95); border: 1px solid var(--gray-border);
  border-radius: 999px; padding: 8px 14px 8px 10px;
  font-size: 0.72rem; font-weight: 700; color: var(--white);
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  white-space: nowrap; z-index: 10;
}
.phone-badge-live {
  width: 7px; height: 7px; background: #fe2c55; border-radius: 50%;
  animation: blink 2s infinite;
}
.phone-badge-new {
  position: absolute; bottom: -16px; right: -16px; top: auto;
  background: var(--yellow); color: var(--black);
  font-size: 0.65rem; font-weight: 800; letter-spacing: 1px;
  padding: 5px 10px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(245,194,0,0.3);
  z-index: 10; text-transform: uppercase;
  animation: badgePop 3s ease-in-out infinite;
}
@keyframes badgePop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }

/* ── HAMBURGER BUTTON ─────────────────────────── */
.menu-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: transparent; border: none; cursor: pointer; padding: 4px;
}
.menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
  transform-origin: center;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; width: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ──────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(8,8,8,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-border);
  flex-direction: column; padding: 1rem 5% 1.5rem;
  transform: translateY(-8px); opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0); opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  padding: 0.9rem 0; font-size: 1rem; font-weight: 600;
  color: var(--gray-text); border-bottom: 1px solid var(--gray-border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--white); }
.mobile-menu-cta {
  margin-top: 1rem; border-bottom: none !important;
  background: var(--yellow); color: var(--black) !important;
  text-align: center; padding: 12px 0 !important;
  border-radius: 8px; font-weight: 800 !important;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .mobile-menu { display: flex; }
  footer { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
}

/* ── PERFORMANCE: pausa animaciones en tab oculto ─ */
body.anim-paused * { animation-play-state: paused !important; }

/* ── ACCESIBILIDAD: sin animaciones si el usuario lo prefiere ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
