/* =============================================================
   MARCO · Ebanistería de autor — Editorial premium
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ece5d8;   /* greige cálido */
  --bg-2:      #e2d9c9;   /* arena */
  --bg-3:      #d8cdb9;
  --paper:     #f6f1e8;   /* casi blanco cálido */
  --ink:       #241812;   /* marrón muy oscuro casi negro */
  --ink-soft:  #3b2a1e;
  --ink-mute:  #6b5a48;   /* metadata — AA en todos los fondos */
  --accent:    #7a4a24;   /* nogal — acento principal */
  --accent-2:  #a06a38;   /* madera clara */
  --brand:     #402614;   /* tinta del logo */
  --line:      rgba(36,24,18,0.16);
  --line-soft: rgba(36,24,18,0.09);

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --gutter: clamp(1.3rem, 5vw, 4.5rem);
  --maxw: 1280px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.04; letter-spacing: -0.01em; font-weight: 500; }
::selection { background: var(--accent); color: var(--paper); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
  display: inline-flex; align-items: center; gap: .8rem;
}

.wordmark {
  font-family: var(--serif); font-weight: 500;
  letter-spacing: .36em; color: var(--brand);
  display: inline-block; padding-left: .36em;
}
.wordmark u { text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.wordmark span { letter-spacing: inherit; }

/* =============================================================
   4. Custom cursor
   ============================================================= */
.cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; display: none; opacity: 0; transition: opacity .3s var(--ease-out); }
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px; background: var(--accent); border-radius: 50%; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px; border: 1px solid var(--accent); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .35s;
  display: grid; place-items: center;
  font-family: var(--sans); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: transparent;
}
.cursor.is-interactive .cursor-ring { width: 46px; height: 46px; margin: -23px; }
.cursor.is-label .cursor-ring { width: 72px; height: 72px; margin: -36px; background: var(--accent); border-color: var(--accent); color: var(--paper); }
.cursor.is-label .cursor-dot { opacity: 0; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* =============================================================
   5. Scroll progress
   ============================================================= */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 940; background: transparent; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 0; transform: scaleX(0); }

/* =============================================================
   6. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg-2);
  display: grid; place-items: center;
  animation: splashSafety .01s 3.4s forwards;
}
.splash.is-out { opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0); transition: opacity .9s var(--ease-out), clip-path 1s var(--ease-out); }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; } }
.splash-inner { text-align: center; }
.splash-mark {
  font-family: var(--serif); font-weight: 500; display: block;
  font-size: clamp(2.6rem, 10vw, 5rem); letter-spacing: .42em; color: var(--brand); padding-left: .42em;
  opacity: 0; animation: splashIn 1s var(--ease-out) .1s forwards;
}
.splash-mark u { text-decoration: none; border-bottom: 2px solid currentColor; }
.splash-sub {
  display: block; margin-top: 1.1rem;
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-mute);
  opacity: 0; animation: splashIn 1s var(--ease-out) .5s forwards;
}
@keyframes splashIn { from { opacity: 0; transform: translateY(12px); letter-spacing: .6em; } to { opacity: 1; transform: none; } }

/* =============================================================
   7. Nav
   ============================================================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; transition: background .5s var(--ease-out), border-color .5s, backdrop-filter .5s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line-soft); }
.nav-inner { max-width: var(--maxw); margin-inline: auto; padding: 1.2rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo .wordmark { font-size: 1.3rem; }
.nav-links { display: none; gap: 2.4rem; }
.nav-link { font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft); position: relative; padding: .3rem 0; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { font-size: .8rem; letter-spacing: .03em; padding: .6rem 1.25rem; border: 1px solid var(--ink); border-radius: 100px; color: var(--ink); transition: background .4s var(--ease-out), color .4s; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
@media (min-width: 1024px) { .nav-links { display: flex; } }

/* Menú legible sobre el hero (antes de hacer scroll) */
.nav-inner { position: relative; z-index: 1; }
.nav::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 240%; z-index: 0;
  background: linear-gradient(180deg, rgba(15,9,4,.55) 0%, rgba(15,9,4,0) 100%);
  opacity: 0; transition: opacity .5s var(--ease-out); pointer-events: none;
}
.nav:not(.is-solid)::before { opacity: 1; }
.nav:not(.is-solid) .nav-logo .wordmark { color: #fbf6ec; }
.nav:not(.is-solid) .nav-link { color: rgba(251,246,236,.92); }
.nav:not(.is-solid) .nav-cta { color: #fbf6ec; border-color: rgba(251,246,236,.7); }
.nav:not(.is-solid) .nav-cta:hover { background: #fbf6ec; color: #241f19; border-color: #fbf6ec; }

/* =============================================================
   8. Side dots
   ============================================================= */
.side-dots { position: fixed; top: 50%; right: 1.6rem; z-index: 850; display: none; flex-direction: column; gap: .9rem; transform: translateY(-50%); }
@media (min-width: 1280px) { .side-dots { display: flex; } }
.side-dots a { width: 26px; height: 16px; display: flex; align-items: center; justify-content: flex-end; position: relative; }
.side-dots a::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width .35s var(--ease-out), height .35s, background .35s; }
.side-dots a.is-active::after { width: 11px; height: 11px; background: var(--accent); }
.side-dots a::before {
  content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: .68rem; letter-spacing: .08em; color: var(--ink-soft); white-space: nowrap; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.side-dots a:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }

/* =============================================================
   9. Hero
   ============================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 0 clamp(3.5rem, 9vh, 7rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; will-change: transform; }
.hero-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,6,.34) 0%, rgba(20,12,6,.10) 24%, rgba(20,12,6,.20) 52%, rgba(16,9,4,.82) 100%), linear-gradient(90deg, rgba(16,9,4,.50) 0%, rgba(16,9,4,0) 58%); }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); color: var(--paper); }
.hero-kicker { color: #ecdcc6; }
.kicker-line { width: 2.4rem; height: 1px; background: currentColor; display: inline-block; }
.hero-title { font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, 9.5vw, 7rem); line-height: .97; margin: 1rem 0 1.5rem; color: #fbf6ec; letter-spacing: -0.018em; }
.hero-title em { font-style: italic; font-weight: 300; }
.hero-sub { max-width: 46ch; font-size: clamp(1rem, 1.5vw, 1.2rem); color: #f1e8d9; line-height: 1.62; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 2.2rem; z-index: 2; color: #ecdcc6; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; writing-mode: vertical-rl; display: none; }
.hero-scroll span { animation: scrollPulse 2.4s var(--ease-soft) infinite; }
@keyframes scrollPulse { 0%,100%{opacity:.4;transform:translateY(0)} 50%{opacity:1;transform:translateY(8px)} }
@media (min-width: 1024px) { .hero-scroll { display: block; } }

/* =============================================================
   Buttons
   ============================================================= */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; letter-spacing: .02em; font-weight: 500; padding: .9rem 1.7rem; border-radius: 100px; transition: transform .45s var(--ease-out), background .4s, color .4s, box-shadow .45s, border-color .4s; }
.btn-primary { background: var(--accent); color: var(--paper); box-shadow: 0 6px 20px -8px rgba(122,74,36,.5); }
.btn-primary:hover { background: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -14px rgba(36,24,18,.6); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 18px 40px -14px rgba(122,74,36,.5); }
.btn-ghost { border: 1px solid rgba(246,241,232,.45); color: var(--paper); }
.btn-ghost:hover { background: rgba(246,241,232,.12); border-color: var(--paper); transform: translateY(-3px); }
.btn-lg { padding: 1.1rem 2.3rem; font-size: 1rem; }

/* =============================================================
   Intro / stats
   ============================================================= */
.intro { padding: clamp(5rem, 13vh, 10rem) 0; background: var(--paper); }
.intro-grid { display: grid; grid-template-columns: 1fr; gap: clamp(3rem, 7vw, 5rem); align-items: end; }
.intro-lead { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.6vw, 2.85rem); line-height: 1.28; color: var(--ink-soft); max-width: 20ch; }
.intro-lead em { font-style: italic; color: var(--accent); }
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.stat-num { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 500; color: var(--accent); line-height: 1; }
.stat-label { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }
@media (min-width: 960px) { .intro-grid { grid-template-columns: 1.4fr 1fr; } .intro-lead { max-width: 22ch; } }

/* =============================================================
   Marquee
   ============================================================= */
.marquee { overflow: hidden; position: relative; padding: 1.6rem 0; background: var(--ink); border-block: 1px solid rgba(246,241,232,.08); }
.marquee-track { display: inline-flex; gap: 3rem; white-space: nowrap; will-change: transform; }
.marquee-track span { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.2rem); font-style: italic; font-weight: 400; color: var(--paper); }
.marquee-track span:nth-child(even) { color: var(--accent-2); font-style: normal; }

/* =============================================================
   Section heads
   ============================================================= */
.section-head { max-width: 50rem; margin-bottom: clamp(2.8rem, 7vh, 4.5rem); }
.section-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.04; margin: .8rem 0 1.1rem; color: var(--ink); letter-spacing: -0.015em; }
.section-title em { font-style: italic; font-weight: 300; color: var(--accent); }
.section-lead { color: var(--ink-mute); font-size: 1.06rem; max-width: 54ch; }
.section-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* =============================================================
   Trabajos — lista editorial
   ============================================================= */
.works { padding: clamp(4.5rem, 12vh, 9rem) 0; }
.works-list { display: grid; grid-template-columns: 1fr; gap: clamp(3rem, 7vw, 6rem); }
.work { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.work-media { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 4/3; background: var(--bg-2); }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter 1s; }
.work:hover .work-media img { transform: scale(1.05); filter: saturate(1.06) brightness(1.03); }
.work-meta { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.work-idx { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); padding-top: .35rem; letter-spacing: .05em; }
.work-text h3 { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; color: var(--ink); }
.work-wood { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: .5rem 0 .6rem; }
.work-note { font-size: .98rem; color: var(--ink-mute); line-height: 1.55; max-width: 42ch; }
@media (min-width: 760px) {
  .works-list { grid-template-columns: repeat(2, 1fr); gap: clamp(3rem, 5vw, 5rem) clamp(2rem, 4vw, 4rem); }
  .work:nth-child(4n+1) .work-media { aspect-ratio: 3/4; }
  .work:nth-child(4n+4) .work-media { aspect-ratio: 3/4; }
  .work:nth-child(4n+1) { margin-top: 0; }
  .work:nth-child(4n+2) { margin-top: clamp(2rem, 6vw, 5rem); }
  .work:nth-child(4n+3) { margin-top: 0; }
  .work:nth-child(4n+4) { margin-top: clamp(2rem, 6vw, 5rem); }
}

/* =============================================================
   El oficio
   ============================================================= */
.craft { padding: clamp(4.5rem, 12vh, 9rem) 0; background: var(--ink); color: var(--paper); }
.craft-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.craft-fig { overflow: hidden; border-radius: 4px; aspect-ratio: 1/1; }
.craft-fig img { width: 100%; height: 100%; object-fit: cover; }
.craft .kicker { color: var(--accent-2); }
.craft .section-title { color: var(--paper); }
.craft .section-title em { color: var(--accent-2); }
.craft-body > p.reveal { color: #d9cbb8; font-size: 1.06rem; margin-top: 1.2rem; max-width: 48ch; }
.craft-quote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.35; color: var(--paper); margin-top: 2.2rem; padding-left: 1.4rem; border-left: 2px solid var(--accent-2); max-width: 28ch; }
@media (min-width: 900px) { .craft-grid { grid-template-columns: 1fr 1.1fr; } }

/* =============================================================
   Maderas
   ============================================================= */
.woods { padding: clamp(4.5rem, 12vh, 9rem) 0; background: var(--paper); }
.wood-list { list-style: none; display: grid; gap: 0; }
.wood { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; padding: 1.9rem 0; border-top: 1px solid var(--line); transition: padding-left .5s var(--ease-out); }
.wood:last-child { border-bottom: 1px solid var(--line); }
.wood:hover { padding-left: 1rem; }
.wood-n { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); padding-top: .35rem; }
.wood h3 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; color: var(--ink); margin-bottom: .25rem; }
.wood p { color: var(--ink-mute); font-size: 1rem; max-width: 52ch; }
@media (min-width: 760px) { .wood { grid-template-columns: auto 16rem 1fr; gap: 2.5rem; align-items: baseline; } }

/* =============================================================
   A medida
   -- FIX MOBILE: sticky solo en desktop (2 columnas).
      En mobile la imagen fluye normal y NO se superpone al texto.
   ============================================================= */
.medida { padding: clamp(4.5rem, 12vh, 9rem) 0; }
.medida-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.medida-fig { border-radius: 4px; overflow: hidden; }
.medida-fig img { width: 100%; height: 100%; object-fit: cover; }
.medida-body .section-title { margin-top: .7rem; }
.medida-body > p.reveal { color: var(--ink-mute); font-size: 1.08rem; margin-bottom: 2.4rem; max-width: 46ch; }
.process { list-style: none; display: grid; gap: 0; margin-bottom: 2.6rem; counter-reset: p; }
.pstep { display: grid; grid-template-columns: auto 1fr; gap: 1.3rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.pstep:last-of-type { border-bottom: 1px solid var(--line); }
.pstep-n { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-family: var(--serif); font-size: 1.1rem; }
.pstep h4 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; margin-bottom: .25rem; color: var(--ink); }
.pstep p { color: var(--ink-mute); font-size: .96rem; max-width: 40ch; }
@media (min-width: 900px) {
  .medida-grid { grid-template-columns: .9fr 1.1fr; }
  /* sticky SOLO cuando hay dos columnas — evita superposición en mobile */
  .medida-fig { position: sticky; top: 6rem; }
}

/* =============================================================
   CTA
   ============================================================= */
.cta { padding: clamp(5.5rem, 15vh, 11rem) 0; background: var(--ink); color: var(--paper); text-align: center; position: relative; overflow: hidden; }
.cta-inner { max-width: 46rem; position: relative; z-index: 1; }
.cta-mark { position: absolute; top: -3rem; left: 50%; transform: translateX(-50%); font-size: clamp(9rem, 30vw, 20rem); color: rgba(246,241,232,.03); z-index: 0; pointer-events: none; white-space: nowrap; }
.cta .kicker { color: var(--accent-2); }
.cta-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin: .8rem 0 1.3rem; color: var(--paper); }
.cta-title em { font-style: italic; font-weight: 300; color: var(--accent-2); }
.cta-lead { color: #d9cbb8; font-size: 1.12rem; margin-bottom: 2.6rem; max-width: 44ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.cta-place { margin-top: 3rem; }
.cta-address { display: inline-flex; align-items: center; gap: .5rem; color: #e4d7c4; font-size: 1.02rem; margin-bottom: 1.1rem; }
.cta-address svg { color: var(--accent-2); flex: none; }
.cta-map { margin: 1.6rem auto 0; max-width: 46rem; border-radius: 14px; overflow: hidden; border: 1px solid rgba(246,241,232,.16); box-shadow: 0 24px 60px -28px rgba(0,0,0,.7); }
.cta-map iframe { display: block; width: 100%; height: 340px; border: 0; }
.footer-addr { color: var(--ink-mute); font-size: .9rem; margin-top: .5rem; }

/* =============================================================
   Footer
   ============================================================= */
.footer { padding: clamp(3.5rem, 9vh, 6rem) 0 2rem; background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-soft); }
.footer-mark { font-size: 1.7rem; }
.footer-tag { color: var(--ink-mute); max-width: 32ch; font-size: .95rem; margin-top: 1rem; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.footer-col { display: flex; flex-direction: column; gap: .7rem; }
.footer-col-t { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: .3rem; }
.footer-col a { font-size: .92rem; color: var(--ink-soft); width: fit-content; border-bottom: 1px solid transparent; transition: border-color .3s; padding-bottom: 2px; }
.footer-col a:hover { border-bottom-color: var(--accent); }
.footer-base { padding-top: 2rem; }
.footer-copy { font-size: .78rem; color: var(--ink-mute); letter-spacing: .02em; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; } .footer-cols { grid-template-columns: repeat(2, auto); gap: 4rem; justify-content: end; } }

/* =============================================================
   WhatsApp flotante
   ============================================================= */
.wa-float { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 930; display: inline-flex; align-items: center; gap: 0; background: #25D366; color: #fff; height: 3.5rem; border-radius: 100px; padding: 0 .95rem; box-shadow: 0 10px 26px -8px rgba(37,211,102,.55); transition: transform .4s var(--ease-out), box-shadow .4s, gap .4s, padding .4s; overflow: hidden; animation: waIn .5s var(--ease-out) 3.4s backwards; }
.wa-float svg { flex: none; }
.wa-float-label { max-width: 0; opacity: 0; white-space: nowrap; font-size: .88rem; font-weight: 500; letter-spacing: .01em; transition: max-width .4s var(--ease-out), opacity .35s, margin .4s; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(37,211,102,.7); }
.wa-float:hover .wa-float-label { max-width: 8rem; opacity: 1; margin-left: .5rem; }
@keyframes waIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@media (min-width: 640px) { .wa-float { right: 1.8rem; bottom: 1.8rem; height: 3.9rem; padding: 0 1.15rem; } }

/* =============================================================
   Galería en la card / badge + apertura
   ============================================================= */
.has-gallery .work-open { display: block; width: 100%; padding: 0; background: none; border: 0; cursor: pointer; text-align: left; }
.work-badge {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  background: rgba(20,12,6,.72); color: var(--paper);
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 100px; backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: .35rem;
  opacity: 0; transform: translateY(-4px); transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.work-badge::before { content: ""; width: .8rem; height: .8rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' d='M4 7h16v13H4zM8 7V4h8v3M9 13l2 2 4-4'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' d='M4 7h16v13H4zM8 7V4h8v3M9 13l2 2 4-4'/></svg>") center/contain no-repeat; }
.has-gallery .work-media { position: relative; }
.has-gallery:hover .work-badge { opacity: 1; transform: none; }
@media (hover: none) { .work-badge { opacity: 1; transform: none; } }

/* =============================================================
   Lightbox / carrusel de producto
   ============================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(.5rem, 2vw, 2rem);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(14,9,5,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.lb-close {
  position: fixed; top: 1rem; right: 1rem; z-index: 1002;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: #0e0905; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .3s var(--ease-out), background .3s;
}
.lb-close:hover { transform: scale(1.08) rotate(90deg); background: #000; }

.lb-shell {
  position: relative; z-index: 1001;
  width: 100%; max-width: 1100px;
  height: 92svh; max-height: 92svh;
  background: var(--paper); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(14px) scale(.98); transition: transform .45s var(--ease-out);
}
.lightbox.is-open .lb-shell { transform: none; }

/* Imagen: altura acotada en mobile para que el panel tenga lugar */
.lb-stage { position: relative; background: #17100a; flex: 0 0 auto; height: 44svh; display: flex; align-items: center; justify-content: center; }
.lb-viewport { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; opacity: 1; transition: opacity .25s var(--ease-out); }
.lb-img.is-swapping { opacity: 0; }

.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: rgba(20,12,6,.55); color: #fff;
  display: grid; place-items: center;
  transition: background .3s, transform .3s var(--ease-out);
  backdrop-filter: blur(4px);
}
.lb-arrow:hover { background: rgba(20,12,6,.85); }
.lb-prev { left: .7rem; }
.lb-next { right: .7rem; }
.lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lb-next:hover { transform: translateY(-50%) translateX(2px); }

/* Panel: ocupa el resto y scrollea internamente si hace falta */
.lb-panel {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1.3rem clamp(1.2rem, 5vw, 1.8rem) 1.5rem;
  display: flex; flex-direction: column; gap: .85rem; background: var(--paper);
}
.lb-head { display: flex; flex-direction: column; gap: .25rem; }
.lb-title { font-family: var(--serif); font-size: clamp(1.55rem, 6vw, 2rem); font-weight: 500; color: var(--ink); line-height: 1.05; overflow-wrap: anywhere; }
.lb-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lb-cap { font-size: .95rem; color: var(--ink-mute); line-height: 1.5; }
.lb-count { font-size: .78rem; letter-spacing: .06em; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.lb-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.lb-thumb { flex: none; width: 4.2rem; height: 3.1rem; border-radius: 5px; overflow: hidden; opacity: .5; border: 2px solid transparent; transition: opacity .3s, border-color .3s; cursor: pointer; background: var(--bg-2); padding: 0; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb.is-active { opacity: 1; border-color: var(--accent); }
.lb-thumb:hover { opacity: .85; }
.lb-wa { width: 100%; justify-content: center; margin-top: .3rem; }

/* Desktop: imagen a la izquierda, panel a la derecha */
@media (min-width: 860px) {
  .lb-shell { flex-direction: row; height: auto; max-height: 88svh; }
  .lb-stage { flex: 1 1 60%; height: auto; min-height: 0; align-self: stretch; }
  .lb-viewport { height: 100%; max-height: 88svh; }
  .lb-panel { flex: 1 1 40%; justify-content: center; padding: clamp(1.5rem, 2.5vw, 2.2rem); }
  .lb-thumbs { flex-wrap: wrap; overflow-x: visible; }
  .lb-thumb { width: 3.6rem; height: 2.8rem; }
  .lb-wa { width: auto; align-self: flex-start; }
}

/* =============================================================
   Reveal
   ============================================================= */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.split-word { display: inline-block; }
[data-reveal-mask] { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-out); }
[data-reveal-mask].is-visible { clip-path: inset(0); }
.no-js .reveal, .no-js [data-reveal-mask] { opacity: 1; transform: none; clip-path: none; }

/* =============================================================
   Reduced motion (solo intrusivos)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll span { animation: none; }
  .wa-float { animation: none; }
  .splash-mark, .splash-sub { animation-delay: .1s; }
}
