/* ============================================================
   Carpintería Estepovoy Hermanos — hoja de estilos
   ============================================================ */

:root {
  --ink: #0c0c0c;
  --espresso: #181818;
  --espresso-2: #212121;
  --bronze: #b6864f;
  --bronze-light: #d9b98a;
  --bronze-dim: #8a6a45;
  --paper: #f7f7f5;
  --text: #1a1a1a;
  --text-muted: #656565;
  --text-on-dark: #f0f0ee;
  --text-on-dark-muted: #9c9c98;
  --border-light: rgba(20, 20, 20, 0.12);
  --border-dark: rgba(240, 240, 238, 0.14);
  --shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
  --radius: 2px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Archivo', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: 'Bodoni Moda', serif; font-weight: 400; color: inherit; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 1rem; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (min-width: 900px) {
  .container { padding: 0 48px; }
}

/* subtle grain overlay for texture / premium feel */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .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");
}

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* hero: CSS-only entrance, independent of scroll/JS so it can never get stuck hidden */
.hero-in {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in-kf .9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes hero-in-kf {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- eyebrow / headings ---------- */
.eyebrow {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bronze-dim);
  margin-bottom: 18px;
}
.eyebrow-light { color: var(--bronze-light); }

h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: .01em;
  margin-bottom: 22px;
}
h2.light { color: var(--text-on-dark); }

.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 22px;
}
.lead-light { font-size: 1.05rem; color: var(--text-on-dark-muted); max-width: 42ch; margin-bottom: 30px; }

.section { padding: 120px 0; position: relative; scroll-margin-top: 84px; }
@media (max-width: 760px) { .section { padding: 76px 0; } }

.section-head { max-width: 640px; margin-bottom: 56px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  font-size: .92rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--bronze); color: #17110a; }
.btn-primary:hover { background: var(--bronze-light); }
.btn-ghost { border-color: var(--border-light); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-whatsapp { background: #25D366; color: #0b2b14; margin-top: 8px; }
.btn-whatsapp:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 22px 0;
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(20, 16, 12, 0.86);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.6);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { height: 40px; width: auto; }
.brand-name {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.25rem;
  letter-spacing: .04em;
  color: var(--text-on-dark);
}
.brand-name em { font-style: normal; color: var(--bronze-light); }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  transition: color .3s;
  position: relative;
}
.main-nav a:hover { color: var(--text-on-dark); }

.nav-cta { flex-shrink: 0; color: var(--text-on-dark); border-color: rgba(239,230,216,.45); padding: 12px 26px; font-size: .78rem; }
.nav-cta:hover { border-color: var(--text-on-dark); background: rgba(239,230,216,.08); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none; border: none;
}
.nav-toggle span { display: block; height: 1px; background: var(--text-on-dark); width: 100%; transition: transform .3s, opacity .3s; }

@media (max-width: 900px) {
  .main-nav { position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 78vw);
    background: rgba(17,13,9,.98); flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 26px; padding: 40px; transform: translateX(100%); transition: transform .45s var(--ease); }
  .main-nav.is-open { transform: translateX(0); }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 32%;
  filter: grayscale(.55) brightness(.46) contrast(1.12) sepia(.06);
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,8,.6) 0%, rgba(8,8,8,.4) 32%, rgba(6,6,6,.86) 100%),
    linear-gradient(90deg, rgba(8,8,8,.8) 0%, rgba(8,8,8,.2) 55%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 130px;
  padding-top: 160px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  color: var(--text-on-dark);
  line-height: 1.05;
  margin-bottom: 26px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-on-dark-muted);
  max-width: 46ch;
  margin: 0 auto 42px;
}
.scroll-cue {
  position: absolute;
  right: 40px; bottom: 40px;
  z-index: 2;
  width: 30px; height: 50px;
  border: 1px solid rgba(239,230,216,.5);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  background: var(--bronze-light);
  border-radius: 3px;
  animation: cue 1.8s infinite;
}
@keyframes cue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 0; transform: translateY(18px); }
}
@media (max-width: 760px) {
  .hero-content { padding-bottom: 90px; padding-top: 120px; }
  .scroll-cue { display: none; }
}

/* ============================================================
   SOBRE NOSOTROS
   ============================================================ */
.section-nosotros { position: relative; overflow: hidden; }
.nosotros-watermark {
  position: absolute;
  bottom: 0; left: 6%;
  width: 640px;
  max-width: 60vw;
  opacity: .2;
  pointer-events: none;
  z-index: 0;
}
.split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 56px; }
}

.split-gallery { position: relative; height: 460px; }
.gallery-frame { position: absolute; overflow: hidden; box-shadow: var(--shadow); border-radius: var(--radius); }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-a { width: 62%; height: 78%; top: 0; left: 0; z-index: 2; }
.frame-b { width: 46%; height: 52%; bottom: 0; right: 0; z-index: 3; border: 6px solid var(--paper); }
.frame-c { width: 34%; height: 34%; top: 8%; right: 4%; z-index: 1; opacity: .9; }
@media (max-width: 900px) {
  .split-gallery { height: 340px; }
}
@media (max-width: 560px) {
  .split-gallery { height: 280px; }
  .frame-c { display: none; }
}

/* ============================================================
   CON QUIENES TRABAJAMOS (banner fijo)
   ============================================================ */
.section-clientes {
  background: var(--paper);
  padding: 70px 28px 76px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}
.clientes-caption {
  margin: 0 0 24px;
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.clientes-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.clientes-row span {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  color: var(--text);
}
.clientes-row .cl-sep {
  font-style: normal;
  color: var(--bronze);
  font-size: 1.6rem;
}
@media (max-width: 560px) {
  .clientes-row { gap: 12px; }
}

/* ============================================================
   TRABAJOS RECIENTES
   ============================================================ */
.section-trabajos, .section-proceso {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section-trabajos .lead, .section-proceso .lead { color: var(--text-on-dark-muted); }
.section-trabajos .eyebrow, .section-proceso .eyebrow { color: var(--bronze-light); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  position: relative;
  margin: 0;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform .5s var(--ease);
}
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.work-card:hover img { transform: scale(1.06); }

/* ============================================================
   PROCESO
   ============================================================ */
.section-proceso { padding: 64px 0; }
.section-proceso .section-head { margin-bottom: 24px; }
.process-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
}
.process-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--border-dark);
}
.process-list li:last-child { padding-bottom: 0; }
.process-num {
  flex: 0 0 auto;
  width: 56px;
  font-family: 'Bodoni Moda', serif;
  font-size: 1.9rem;
  color: var(--bronze-light);
  line-height: 1;
}
.process-body h3 { font-size: 1.15rem; margin-bottom: 4px; line-height: 1.2; }
.process-body p { color: var(--text-on-dark-muted); font-size: .92rem; line-height: 1.35; max-width: 48ch; }

@media (max-width: 560px) {
  .process-step { gap: 20px; padding: 16px 0; }
  .process-num { width: 40px; font-size: 1.5rem; }
}

/* ============================================================
   CONTACTO
   ============================================================ */
.section-contacto { background: var(--ink); }
.split-reverse .contacto-info { order: 1; }
.split-reverse .contacto-form-wrap { order: 2; }

.info-list { margin: 30px 0 30px; display: flex; flex-direction: column; gap: 20px; }
.info-list li { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--border-dark); padding-bottom: 16px; }
.info-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-light); }
.info-list a, .info-list span:not(.info-label) { color: var(--text-on-dark); font-size: 1.02rem; }
.info-list a:hover { color: var(--bronze-light); }

.contacto-form-wrap {
  background: var(--paper);
  padding: 44px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  padding: 10px 2px;
  color: var(--text);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--bronze);
}
.form-hint { margin-top: 14px; font-size: .78rem; color: var(--text-muted); text-align: center; }

.map-wrap {
  margin-top: 90px;
  filter: grayscale(.5) contrast(1.05);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-wrap iframe { width: 100%; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #080808; color: var(--text-on-dark-muted); padding: 60px 0 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 30px;
  align-items: center; justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-dark);
}
.brand-footer .brand-name { color: var(--text-on-dark); }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark-muted); }
.footer-nav a:hover { color: var(--text-on-dark); }
.footer-social { display: flex; gap: 20px; }
.footer-social a { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark-muted); }
.footer-social a:hover { color: var(--bronze-light); }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 26px 0 30px;
  font-size: .78rem;
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.whatsapp-float {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 800;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #0b2b14;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
  transition: transform .3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }
