:root{
  --black: #0a0a0a;
  --black-2: #131311;
  --black-3: #1b1b18;
  --gold: #c9a24d;
  --gold-light: #e3c98a;
  --white: #f4f2ec;
  --gray: #9a988f;
  --border: rgba(244,242,236,0.1);
  --ff-display: 'Syne', sans-serif;
  --ff-body: 'Inter', sans-serif;
}

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

html{ scroll-behavior:smooth; }

body{
  background:var(--black);
  color:var(--white);
  font-family:var(--ff-body);
  font-weight:300;
  line-height:1.7;
  overflow-x:hidden;
}

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

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

::selection{ background:var(--gold); color:var(--black); }

/* grain texture overlay */
.grain{
  position:fixed; inset:0; z-index:9998; pointer-events:none;
  opacity:0.035; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress-bar{
  position:fixed; top:0; left:0; height:2px; width:0%;
  background:linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index:9999; transition:width .1s linear;
}

/* ---------- HEADER ---------- */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:500;
  display:flex; align-items:center; justify-content:space-between;
  padding:28px 5%;
  transition:padding .4s ease, background .4s ease, border-color .4s ease;
  border-bottom:1px solid transparent;
}
.site-header.scrolled{
  padding:16px 5%;
  background:rgba(10,10,10,0.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}

.logo{ display:flex; align-items:center; gap:12px; }
.logo-mark{
  width:38px; height:38px; border:1px solid var(--gold);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--ff-display); font-weight:700; font-size:14px; color:var(--gold);
  flex-shrink:0;
}
.logo-mark.small{ margin-bottom:10px; }
.logo-text{
  font-family:var(--ff-display); font-weight:700; font-size:15px;
  letter-spacing:2px; display:flex; flex-direction:column; line-height:1.25;
}
.logo-text em{
  font-style:normal; font-family:var(--ff-body); font-weight:300;
  font-size:9px; letter-spacing:3px; color:var(--gray);
}

.nav{ display:flex; align-items:center; gap:38px; }
.nav-link{
  font-size:13px; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--white); position:relative; padding-bottom:4px;
}
.nav-link::after{
  content:''; position:absolute; left:0; bottom:0; height:1px; width:0;
  background:var(--gold); transition:width .3s ease;
}
.nav-link:hover::after{ width:100%; }
.nav-cta{
  border:1px solid var(--gold); padding:9px 18px; color:var(--gold);
}
.nav-cta::after{ display:none; }
.nav-cta:hover{ background:var(--gold); color:var(--black); }

.nav-toggle{
  display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; z-index:600;
}
.nav-toggle span{ width:24px; height:1px; background:var(--white); transition:.3s; }

/* ---------- HERO ---------- */
.hero{
  position:relative; height:100vh; min-height:640px;
  display:flex; align-items:center; overflow:hidden;
}
.hero-bg{
  position:absolute; inset:-5%; background-size:cover; background-position:center;
  will-change:transform;
}
.hero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 40%, rgba(10,10,10,0.9) 100%);
}
.hero-content{ position:relative; z-index:2; padding:0 5%; max-width:1200px; }
.eyebrow{
  font-size:13px; letter-spacing:4px; text-transform:uppercase; color:var(--gold); margin-bottom:22px;
}
.hero-title{
  font-family:var(--ff-display); font-weight:800; text-transform:uppercase;
  font-size:clamp(24px, 3.6vw, 52px); line-height:1.12; letter-spacing:-0.5px;
}
.hero-title .line{ display:block; overflow:hidden; }
.hero-title em{ font-style:normal; color:var(--gold); }
.hero-sub{
  margin-top:26px; max-width:480px; color:var(--gray); font-size:16px; font-weight:300;
}
.hero-actions{ display:flex; gap:18px; margin-top:40px; flex-wrap:wrap; }

.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:15px 30px; font-size:13px; letter-spacing:1.5px; text-transform:uppercase;
  border:1px solid var(--gold); transition:.3s ease; cursor:pointer; font-family:var(--ff-body);
}
.btn-gold{ background:var(--gold); color:var(--black); }
.btn-gold:hover{ background:transparent; color:var(--gold); }
.btn-ghost{ color:var(--white); border-color:rgba(244,242,236,0.3); }
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold); }
.btn-block{ width:100%; justify-content:center; border:none; }

.scroll-cue{
  position:absolute; bottom:38px; left:50%; transform:translateX(-50%);
  z-index:2; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.scroll-cue span{
  width:1px; height:44px; background:linear-gradient(var(--gold), transparent);
  position:relative; overflow:hidden;
}
.scroll-cue span::after{
  content:''; position:absolute; top:-100%; left:0; width:100%; height:100%;
  background:var(--gold-light); animation:scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown{ to{ top:100%; } }
.scroll-cue small{ font-size:10px; letter-spacing:2px; color:var(--gray); text-transform:uppercase; }

/* ---------- MARQUEE ---------- */
.marquee{
  background:var(--black-2); border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  overflow:hidden; padding:16px 0; white-space:nowrap;
}
.marquee-track{
  display:inline-flex; gap:16px; animation:marquee 22s linear infinite;
  font-family:var(--ff-display); font-weight:700; font-size:16px; letter-spacing:2px; text-transform:uppercase;
}
.marquee-track span{ color:var(--gray); }
.marquee-track .dot{ color:var(--gold); }
@keyframes marquee{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

/* ---------- SHARED ---------- */
.kicker{
  font-size:12px; letter-spacing:3px; text-transform:uppercase; color:var(--gold); margin-bottom:16px;
}
.kicker.center{ text-align:center; }
h2{
  font-family:var(--ff-display); font-weight:700; font-size:clamp(28px,4vw,44px); line-height:1.15;
}
h2.center{ text-align:center; max-width:640px; margin:0 auto 64px; }
.body-text{ color:var(--gray); font-weight:300; max-width:480px; }
.body-text + .body-text{ margin-top:16px; }

section{ padding:120px 5%; position:relative; }

/* ---------- ESTUDIO ---------- */
.estudio-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:start; max-width:1300px; margin:0 auto;
}
.estudio-text h2{ margin:0 0 26px; }
.link-underline{
  display:inline-flex; align-items:center; gap:8px; margin-top:30px;
  font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--gold);
  border-bottom:1px solid var(--gold); padding-bottom:4px;
}
.estudio-image{ position:relative; }
.estudio-image img{ width:100%; aspect-ratio:4/5; object-fit:cover; }
.estudio-quote{
  position:absolute; bottom:-24px; left:-24px; right:24px;
  background:var(--gold); color:var(--black);
  font-family:var(--ff-display); font-weight:700; font-size:17px;
  padding:22px 26px; letter-spacing:0.3px;
}

/* ---------- SERVICIOS ---------- */
.servicios{ background:var(--black-2); }
.servicios-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:1px; max-width:1200px; margin:0 auto;
  background:var(--border);
}
.servicio-card{
  background:var(--black-2); padding:50px 36px; transition:background .35s ease;
}
.servicio-card:hover{ background:var(--black-3); }
.servicio-card i{ font-size:30px; color:var(--gold); }
.servicio-card h3{
  font-family:var(--ff-display); font-size:20px; font-weight:700; margin:22px 0 12px; letter-spacing:0.5px;
}
.servicio-card p{ color:var(--gray); font-size:14px; font-weight:300; }

/* ---------- PORTAFOLIO ---------- */
.gallery{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; max-width:1400px; margin:0 auto;
}
.gallery-item{
  position:relative; overflow:hidden; cursor:pointer; aspect-ratio:1/1;
}
.gallery-item:nth-child(3n+1){ aspect-ratio:1/1.25; }
.gallery-item img{
  width:100%; height:100%; object-fit:cover; transition:transform .7s cubic-bezier(.2,.7,.2,1), filter .5s ease;
  filter:grayscale(0.15);
}
.gallery-item:hover img{ transform:scale(1.08); filter:grayscale(0); }
.gallery-zoom{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(10,10,10,0.35); opacity:0; transition:opacity .35s ease;
}
.gallery-zoom i{
  width:48px; height:48px; border:1px solid var(--gold); border-radius:50%; color:var(--gold);
  display:flex; align-items:center; justify-content:center; font-size:22px;
  transform:scale(0.7); transition:transform .35s ease;
}
.gallery-item:hover .gallery-zoom{ opacity:1; }
.gallery-item:hover .gallery-zoom i{ transform:scale(1); }

/* ---------- CONTACTO ---------- */
.contacto{ background:var(--black-2); }
.contacto-grid{
  display:grid; grid-template-columns:1fr 1.1fr; gap:80px; max-width:1200px; margin:0 auto;
}
.contacto h2{ margin:14px 0 20px; }
.contacto-list{ list-style:none; margin:30px 0; display:flex; flex-direction:column; gap:14px; }
.contacto-list i{ color:var(--gold); margin-right:10px; }
.contacto-list li{ font-size:15px; color:var(--white); font-weight:300; }

.contacto-form{ display:flex; flex-direction:column; gap:20px; }
.form-row{ display:flex; flex-direction:column; gap:8px; }
.form-row label{ font-size:12px; letter-spacing:1px; text-transform:uppercase; color:var(--gray); }
.form-row label span{ text-transform:none; letter-spacing:0; opacity:0.6; }
.form-row input, .form-row textarea{
  background:transparent; border:none; border-bottom:1px solid var(--border);
  padding:12px 2px; color:var(--white); font-family:var(--ff-body); font-size:15px; font-weight:300;
  transition:border-color .3s ease;
}
.form-row input:focus, .form-row textarea:focus{ outline:none; border-color:var(--gold); }
.form-row textarea{ resize:vertical; min-height:90px; }
.form-note{ font-size:13px; color:var(--gold); min-height:18px; }

/* ---------- FOOTER ---------- */
.footer{
  text-align:center; padding:60px 5% 40px; border-top:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center;
}
.footer p{ color:var(--gray); font-size:12px; letter-spacing:0.5px; }

/* ---------- WHATSAPP FLOAT ---------- */
.wa-float{
  position:fixed; bottom:28px; right:28px; z-index:400;
  width:56px; height:56px; border-radius:50%;
  background:var(--gold); color:var(--black);
  display:flex; align-items:center; justify-content:center; font-size:26px;
  box-shadow:0 0 0 0 rgba(201,162,77,0.5);
  animation:pulse 2.4s ease-in-out infinite;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(201,162,77,0.45); }
  70%{ box-shadow:0 0 0 16px rgba(201,162,77,0); }
  100%{ box-shadow:0 0 0 0 rgba(201,162,77,0); }
}

/* ---------- LIGHTBOX ---------- */
.lightbox{
  position:fixed; inset:0; background:rgba(10,10,10,0.96); z-index:1000;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.lightbox.active{ opacity:1; pointer-events:auto; }
.lightbox img{ max-width:86vw; max-height:82vh; object-fit:contain; }
.lightbox-close{
  position:absolute; top:26px; right:5%; background:none; border:none; color:var(--white);
  font-size:30px; cursor:pointer;
}
.lightbox-nav{
  position:absolute; top:50%; transform:translateY(-50%); background:none; border:none;
  color:var(--white); font-size:38px; cursor:pointer; padding:10px;
}
.lightbox-nav:hover, .lightbox-close:hover{ color:var(--gold); }
.lightbox-nav.prev{ left:3%; } .lightbox-nav.next{ right:3%; }

/* ---------- SCROLL REVEAL ---------- */
.reveal{
  opacity:0; transform:translateY(28px); transition:opacity .8s ease, transform .8s ease;
}
.reveal.in-view{ opacity:1; transform:translateY(0); }
.hero-title .line.in-view{ opacity:1; transform:translateY(0); }

/* ---------- CUSTOM CURSOR ---------- */
.has-custom-cursor, .has-custom-cursor a, .has-custom-cursor button,
.has-custom-cursor input, .has-custom-cursor textarea{ cursor:none; }

.pencil-cursor{
  position:fixed; top:0; left:0; width:30px; height:30px;
  pointer-events:none; z-index:10000;
  transform:translate(-4px, -26px);
  transition:transform .12s ease;
  opacity:0; will-change:transform;
}
.has-custom-cursor .pencil-cursor{ opacity:1; }
.pencil-cursor.is-down{ transform:translate(-4px, -26px) scale(0.9) rotate(-6deg); }
.pencil-cursor.is-hover{ transform:translate(-4px, -26px) scale(1.15); }

.pencil-dot{
  position:fixed; top:0; left:0; width:3px; height:3px; border-radius:50%;
  background:var(--gold); pointer-events:none; z-index:9999;
  opacity:0.55; transform:translate(-50%,-50%);
  transition:opacity .7s ease, transform .7s ease;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:980px){
  .estudio-grid, .contacto-grid{ grid-template-columns:1fr; gap:50px; }
  .servicios-grid{ grid-template-columns:1fr; }
  .gallery{ grid-template-columns:repeat(2, 1fr); }
  .estudio-quote{ position:static; margin-top:18px; }
}

@media (max-width:760px){
  .nav{
    position:fixed; top:0; right:0; height:100vh; width:78%; max-width:320px;
    background:var(--black-2); flex-direction:column; justify-content:center; align-items:flex-start;
    padding:0 40px; gap:28px; transform:translateX(100%); transition:transform .4s ease; border-left:1px solid var(--border);
  }
  .nav.open{ transform:translateX(0); }
  .nav-toggle{ display:flex; }
  .gallery{ grid-template-columns:repeat(2, 1fr); gap:8px; }
  section{ padding:90px 6%; }
  .lightbox-nav{ font-size:30px; }
}
