/* ===========================
   1. Variables & Reset
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #080810;
  --bg2:    #0f0f1a;
  --bg3:    #141420;
  --orange: #E8650A;
  --purple: #9B6FF5;
  --cream:  #F5F0E8;
  --muted:  #6B6B7A;
  --border: rgba(255,255,255,0.07);
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===========================
   Page Loader Curtain
=========================== */
#pageLoader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
}

/* ===========================
   Hero Stars
=========================== */
.ast-wrap {
  position: absolute;
  font-family: 'Playfair Display', serif;
  pointer-events: none;
  z-index: 3;
  color: rgba(245, 240, 232, 0.82);
  line-height: 1;
  will-change: transform;
  opacity: 0; /* revealed by GSAP */
}
.ast-grande {
  font-size: clamp(80px, 13vw, 170px);
  top: 10%;
  right: 6%;
  text-shadow:
    0 0 60px rgba(232, 101, 10, 0.45),
    0 0 140px rgba(155, 111, 245, 0.18);
}
.ast-piccolo {
  font-size: clamp(38px, 5.5vw, 68px);
  bottom: 22%;
  left: 6%;
  text-shadow:
    0 0 40px rgba(232, 101, 10, 0.35),
    0 0 80px rgba(155, 111, 245, 0.14);
}

/* ===========================
   2. Mouse Glow
=========================== */
.mouse-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(155,111,245,0.08) 0%, transparent 65%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  will-change: left, top;
  top: -210px;
  left: -210px;
}

/* ===========================
   3. Utilities
=========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--orange);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 1.5rem;
}
.section-title em { color: var(--orange); font-style: italic; }

/* ---- Shared button base ---- */
.btn-primary,
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  isolation: isolate;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  /* prevent layout shift from GSAP transform */
  will-change: transform;
}

/* Shine sweep element */
.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255,255,255,0.32) 50%,
    transparent 80%
  );
  transform: translateX(-110%) skewX(-8deg);
  pointer-events: none;
  z-index: 1;
}

.btn-label { position: relative; z-index: 2; }

.btn-arrow {
  position: relative; z-index: 2;
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1rem;
}

/* ---- Hero button ---- */
.btn-primary {
  background: var(--orange);
  color: var(--cream);
  padding: 1rem 2.6rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 4px 24px rgba(232,101,10,0.3);
  transition: box-shadow 0.35s ease;
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 48px rgba(232,101,10,0.52); }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }

/* ===========================
   4. Reveal — controlled by GSAP
=========================== */
.reveal { will-change: transform, opacity; }

/* ===========================
   5. NAV
=========================== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 3rem;
  transition: background 0.35s, backdrop-filter 0.35s, padding 0.35s;
}

#nav.scrolled {
  background: rgba(8,8,16,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 3rem;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--cream);
  z-index: 10;
}
.nav-logo span { color: var(--orange); }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cream); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  z-index: 10;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform 0.3s, opacity 0.3s;
  border-radius: 2px;
}

.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.mobile-menu.open { display: flex; }

.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none;
  color: var(--muted); font-size: 1.4rem;
  cursor: pointer; transition: color 0.2s;
}
.mobile-close:hover { color: var(--cream); }

.mobile-menu ul { display: flex; flex-direction: column; gap: 2.5rem; text-align: center; }
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: clamp(2rem, 8vw, 3rem);
  color: var(--cream); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--orange); }

/* ===========================
   6. HERO
=========================== */
#hero {
  position: relative;
  height: 100vh; min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('entradafoto.png') center/cover no-repeat;
  will-change: transform;
  transform-origin: center top;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6,6,18,0.68) 0%,
    rgba(6,6,18,0.25) 28%,
    rgba(6,6,18,0.20) 65%,
    rgba(6,6,18,0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  color: rgba(245,240,232,0.6);
  margin-bottom: 1.8rem;
  text-transform: uppercase;
}

.hero-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em;
  line-height: 1;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.serif-title {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 700;
  font-size: clamp(4rem, 11vw, 10rem);
  color: var(--cream);
  text-shadow: 0 2px 40px rgba(0,0,0,0.55);
}

.hero-dot {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 700;
  font-size: clamp(4rem, 11vw, 10rem);
  color: var(--orange);
  text-shadow: 0 2px 40px rgba(0,0,0,0.55);
  line-height: 1;
}

.sans-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 8rem);
  color: var(--cream);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(0,0,0,0.55);
}

.hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: rgba(245,240,232,0.78);
  margin-bottom: 2.8rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}

/* Marquee con logos */
.marquee-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.09);
  z-index: 3;
  padding: 1.1rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 18s linear infinite;
  will-change: transform;
  align-items: center;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 0 4rem;
  flex-shrink: 0;
}

.mq-logo {
  height: 30px;
  max-width: 170px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  display: block;
}

.mq-sep {
  color: var(--orange);
  font-size: 0.55rem;
  opacity: 0.7;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* ===========================
   7. PORTAFOLIO
=========================== */
#portafolio {
  background: var(--bg2);
  padding: 7rem 0 6rem;
}

.port-section-header { margin-bottom: 4rem; }

/* Brand block */
.brand-block {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}

.brand-logo-img {
  max-height: 56px;
  max-width: 240px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  display: block;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.brand-tags span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(232,101,10,0.08);
  border: 1px solid rgba(232,101,10,0.25);
  padding: 0.28rem 0.7rem;
  border-radius: 20px;
}

.brand-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.85;
  max-width: 500px;
}

/* Carousel */
.carousel-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  gap: 10px;
  align-items: stretch;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Slides — width set by JS based on image aspect ratio */
.car-slide {
  flex: 0 0 auto;
  height: 460px;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
  background: var(--bg3);
}

/* Parallax wrapper inside slide */
.par-wrap {
  width: 100%;
  height: 120%;
  margin-top: -10%;
  will-change: transform;
}

.par-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  user-select: none;
  pointer-events: none;
}

.car-slide:hover .par-wrap img { transform: scale(1.04); }

/* Arrow buttons */
.car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(8,8,16,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.13);
  color: var(--cream);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s, border-color 0.22s, transform 0.22s;
}
.car-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-50%) scale(1.08);
}
.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }

/* Dots */
.car-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 1.4rem;
}
.car-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(245,240,232,0.18);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
  flex-shrink: 0;
}
.car-dot.active { width: 22px; background: var(--orange); }

/* Tessa showcase */
.showcase-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow: hidden;
  border-radius: 12px;
  cursor: zoom-in;
}

.showcase-wrap .par-wrap {
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0;
}

.showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  user-select: none;
}

.showcase-wrap:hover .showcase-img { transform: scale(1.03); }

/* Image modal */
.img-modal {
  position: fixed; inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.img-modal.open { display: flex; }

.img-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.95);
  cursor: zoom-out;
}

.img-modal-img {
  position: relative; z-index: 1;
  max-width: 85vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}

.img-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.img-modal-nav:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-50%) scale(1.08);
}
.img-modal-prev { left: 1.5rem; }
.img-modal-next { right: 1.5rem; }

.img-modal-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  z-index: 2;
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.img-modal-close:hover { color: white; }

/* ===========================
   8. CONTACTO
=========================== */
#contacto {
  background: var(--bg);
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.contacto-glow {
  position: absolute; bottom: -80px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(232,101,10,0.07) 0%, transparent 68%);
  pointer-events: none;
}

.contacto-center {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}
.contacto-center .section-label { margin-bottom: 1.4rem; }

.contacto-titulo {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.35; color: var(--cream);
  margin-bottom: 1.4rem;
}
.contacto-titulo em { color: var(--orange); font-style: italic; }

/* word-wrap container for slide-up reveal */
.ct-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.contacto-sub {
  color: var(--muted); line-height: 1.85;
  font-size: 0.95rem; margin-bottom: 2.8rem;
}

/* CTA button — specific overrides (base in shared block above) */
.btn-cta {
  background: var(--orange);
  color: var(--cream);
  padding: 1.15rem 3rem;
  margin-bottom: 3.2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 28px rgba(232,101,10,0.28);
  transition: box-shadow 0.35s ease;
  animation: cta-pulse 3s ease-in-out infinite;
}
.btn-cta:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 52px rgba(232,101,10,0.55);
  animation-play-state: paused;
}
.btn-cta:hover .btn-arrow { transform: translateX(5px); }

@keyframes cta-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 28px rgba(232,101,10,0.28); }
  50%       { box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 44px rgba(232,101,10,0.52); }
}

.contacto-frase {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 0.95rem;
  color: var(--muted); opacity: 0.5;
}

/* ===========================
   9. FOOTER
=========================== */
#footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
}

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

.footer-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.01em; color: var(--cream);
}
.footer-logo span { color: var(--orange); }

.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: 0.78rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--cream); }

.footer-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0.4rem;
}
.footer-copy { font-size: 0.72rem; color: var(--muted); }

.footer-ig {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; color: var(--muted);
  transition: color 0.2s;
}
.footer-ig:hover { color: var(--cream); }
.footer-ig svg { flex-shrink: 0; }

/* ===========================
   10. WA Flotante
=========================== */
.wa-float {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  animation: pulse-wa 2.8s ease-in-out infinite;
  transition: transform 0.2s;
  cursor: pointer;
}
.wa-float:hover { transform: scale(1.12); }
.wa-float svg { width: 28px; height: 28px; }

@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%      { box-shadow: 0 4px 32px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ===========================
   11. Responsive
=========================== */
@media (max-width: 1024px) {
  #nav { padding: 1.4rem 2rem; }
  #nav.scrolled { padding: 0.9rem 2rem; }
}

@media (max-width: 768px) {
  #nav { padding: 1.2rem 1.5rem; }
  #nav.scrolled { padding: 0.85rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .brand-header { flex-direction: column; gap: 1rem; }
  .car-slide { height: 320px; }
  .img-modal-nav { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-right { align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  #portafolio, #contacto { padding: 5rem 0; }
  .carousel-wrap, .showcase-wrap { padding: 0 1rem; }
}
