/* ==========================================================================
   BM Arriendos — cinematic landing
   Palette: warm black · bone · desert sand. Type: Bodoni Moda / IBM Plex.
   ========================================================================== */

:root {
  --ink: #0d0c0b;
  --ink-2: #161412;
  --ink-3: #1f1c19;
  --bone: #f3efe8;
  --bone-dim: rgba(243, 239, 232, .68);
  --bone-faint: rgba(243, 239, 232, .14);
  --sand: #c9a46e;
  --sand-deep: #a9844f;
  --stone: #8c857b;

  --f-display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --f-sans: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 17px/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--sand); color: var(--ink); }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--bone); color: var(--ink); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.eyebrow {
  font: 500 12px/1.2 var(--f-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand);
}
.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(42px, 7.2vw, 108px);
  line-height: .98;
  letter-spacing: -.02em;
  font-optical-sizing: auto;
}
.display em { font-style: italic; color: var(--bone-dim); }
.display-md { font-size: clamp(34px, 5vw, 72px); }
.display-lg { font-size: clamp(38px, 5.6vw, 84px); }
.lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; color: var(--bone-dim); max-width: 34ch; font-weight: 300; }
.section-lede { font-size: clamp(16px, 1.3vw, 19px); color: var(--bone-dim); max-width: 52ch; font-weight: 300; margin-top: 24px; }

/* ---------- logo mark (B|M) ---------- */
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 30px;
  background: var(--bone); color: var(--ink);
  font: 400 19px/1 var(--f-display);
  letter-spacing: -.02em;
}
.mark i { width: 1px; height: 55%; background: currentColor; opacity: .55; margin: 0 2px; }
.mark-lg { width: 76px; height: 60px; font-size: 38px; }
.mark-lg i { margin: 0 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  font: 500 15px/1 var(--f-sans);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-sand { background: var(--sand); color: var(--ink); }
.btn-sand:hover { background: var(--bone); }
.btn-ghost { border-color: rgba(243, 239, 232, .4); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone); background: rgba(243, 239, 232, .08); }
.btn-light { background: var(--bone); color: var(--ink); }
.btn-light:hover { background: var(--sand); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.ico { width: 18px; height: 18px; flex: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font: 400 12px/1 var(--f-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 11px;
  border: 1px solid var(--bone-faint);
  color: var(--bone-dim);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(13, 12, 11, .78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-color: var(--bone-faint);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font: 400 17px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14px; text-decoration: none; color: var(--bone-dim); transition: color .2s; }
.nav-links a:hover { color: var(--bone); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; height: 460vh; }
.hero-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero-media, .hero-poster, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-poster, .hero-video { object-fit: cover; }
.hero-video { opacity: 0; transition: opacity .6s; }
.hero-video.is-ready { opacity: 1; }
.hero-media { transform: scale(1.04); transform-origin: 50% 60%; will-change: transform; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,12,11,.55) 0%, rgba(13,12,11,0) 28%),
    linear-gradient(0deg, rgba(13,12,11,.85) 0%, rgba(13,12,11,.2) 45%, rgba(13,12,11,0) 70%),
    linear-gradient(90deg, rgba(13,12,11,.55) 0%, rgba(13,12,11,0) 55%);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.beat {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  bottom: calc(max(12vh, 96px) + env(safe-area-inset-bottom));
  max-width: 980px;
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
  pointer-events: none;
}
.beat.is-live { pointer-events: auto; }
.beat .eyebrow { margin-bottom: 20px; }
.beat .lede { margin-top: 24px; }
.big-num {
  font: 400 clamp(120px, 22vw, 320px)/.8 var(--f-display);
  letter-spacing: -.04em;
}
.big-num span {
  background: linear-gradient(180deg, var(--bone) 30%, rgba(243,239,232,.35));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.beat-2 .lede { margin-top: 16px; }

.hero-hud {
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: calc(28px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 20px;
  font: 400 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-dim);
}
.hud-rail { flex: 1; height: 1px; background: var(--bone-faint); position: relative; overflow: hidden; }
.hud-fill { position: absolute; inset: 0; background: var(--sand); transform-origin: 0 50%; transform: scaleX(0); }
.scroll-cue { transition: opacity .4s; }
.scroll-cue::after { content: " ↓"; display: inline-block; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--bone-faint);
  border-bottom: 1px solid var(--bone-faint);
  position: relative; z-index: 2; background: var(--ink);
}
.stat { padding: clamp(28px, 4vw, 56px) var(--gutter); border-left: 1px solid var(--bone-faint); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 400 clamp(44px, 5vw, 76px)/1 var(--f-display); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 12px; font: 400 12px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stone); }

/* ==========================================================================
   SECTIONS (shared)
   ========================================================================== */
.section-head { padding: clamp(96px, 14vw, 180px) var(--gutter) clamp(48px, 6vw, 80px); max-width: var(--max); margin: 0 auto; }
.section-head .eyebrow { margin-bottom: 24px; }

/* ==========================================================================
   SERVICES — sticky media + steps
   ========================================================================== */
.services-body {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(80px, 10vw, 140px);
}
.services-media {
  position: sticky; top: calc(var(--nav-h) + 4vh);
  height: calc(100vh - var(--nav-h) - 8vh); min-height: 460px;
}
.smedia { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.smedia.is-active { opacity: 1; }
.sm-main {
  position: absolute; inset: 0 12% 12% 0; width: 88%; height: 88%; object-fit: cover;
  transform: scale(1.06); transition: transform 1.6s var(--ease);
}
.smedia.is-active .sm-main { transform: scale(1); }
.sm-inset {
  position: absolute; right: 0; bottom: 0; width: 42%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 8px solid var(--ink);
  transform: translateY(30px); opacity: 0;
  transition: transform 1.2s .15s var(--ease), opacity .8s .15s;
}
.smedia.is-active .sm-inset { transform: none; opacity: 1; }
.smedia-count {
  position: absolute; left: 0; bottom: 0;
  font: 400 12px/1 var(--f-mono); letter-spacing: .14em; color: var(--stone);
}
.sc-cur { color: var(--sand); }

.services-steps { display: flex; flex-direction: column; }
.sstep {
  min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: 22px;
  opacity: .28; transition: opacity .6s;
  border-top: 1px solid var(--bone-faint); padding: 48px 0;
}
.sstep:first-child { border-top: 0; }
.sstep.is-active { opacity: 1; }
.sstep-n { font: 400 12px/1 var(--f-mono); letter-spacing: .14em; color: var(--sand); }
.sstep h3 { font: 400 clamp(36px, 4vw, 60px)/1 var(--f-display); letter-spacing: -.02em; }
.sstep p { font-size: clamp(17px, 1.4vw, 20px); font-weight: 300; color: var(--bone-dim); max-width: 38ch; }
.sstep-img { display: none; }

/* ==========================================================================
   PROPERTIES
   ========================================================================== */
.props { background: var(--ink-2); padding-bottom: clamp(80px, 10vw, 140px); }
.prop-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 28px);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.prop { background: var(--ink-3); display: flex; flex-direction: column; }
.prop:nth-child(2) { transform: translateY(clamp(0px, 8vw, 120px)); }
.prop:nth-child(4) { transform: translateY(clamp(0px, 8vw, 120px)); }
.prop-grid { padding-bottom: clamp(0px, 8vw, 120px); }
.prop-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); cursor: zoom-in; }
.prop-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .9s var(--ease), transform 4s linear;
}
.prop-media img.is-on { opacity: 1; transform: scale(1.1); }
.prop-media img:first-child { opacity: 1; }
.prop-media.is-cycling img:first-child:not(.is-on) { opacity: 0; }
.prop-body { padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; }
.prop-idx { font: 400 12px/1 var(--f-mono); letter-spacing: .14em; color: var(--sand); }
.prop h3 { font: 400 clamp(30px, 3vw, 44px)/1 var(--f-display); letter-spacing: -.01em; }
.prop-addr { font: 400 13px/1 var(--f-mono); letter-spacing: .06em; color: var(--stone); text-transform: uppercase; }
.prop .chips { margin-top: 6px; }
.prop-actions { display: flex; gap: 24px; margin-top: 10px; }
.link-btn {
  font: 500 14px/1 var(--f-sans); text-decoration: none; padding: 6px 0;
  border-bottom: 1px solid rgba(201, 164, 110, .5); color: var(--bone);
  transition: border-color .2s, color .2s;
}
.link-btn:hover { color: var(--sand); border-color: var(--sand); }

/* ==========================================================================
   INTERLUDE
   ========================================================================== */
.interlude { position: relative; height: 110vh; overflow: hidden; display: grid; place-items: center; }
.interlude-img { position: absolute; inset: -15% 0; width: 100%; height: 130%; object-fit: cover; will-change: transform; }
.interlude-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(13,12,11,.25), rgba(13,12,11,.75)); }
.interlude-quote {
  position: relative; text-align: center; padding: 0 var(--gutter);
  font: 400 clamp(40px, 6.4vw, 104px)/1 var(--f-display); letter-spacing: -.02em;
}
.interlude-quote em { color: var(--sand); }

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { padding-bottom: clamp(96px, 12vw, 160px); }
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  counter-reset: s;
}
.steps li { padding: 32px 28px 0 0; border-top: 1px solid var(--bone-faint); position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%;
  background: var(--sand); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.1s var(--ease);
}
.steps li.is-in::before { transform: scaleX(1); }
.steps li:nth-child(2)::before { transition-delay: .15s; }
.steps li:nth-child(3)::before { transition-delay: .3s; }
.steps li:nth-child(4)::before { transition-delay: .45s; }
.step-n { font: 400 12px/1 var(--f-mono); letter-spacing: .14em; color: var(--sand); }
.steps h3 { font: 400 clamp(24px, 2.2vw, 32px)/1.1 var(--f-display); margin: 20px 0 12px; }
.steps p { color: var(--bone-dim); font-weight: 300; }

/* ==========================================================================
   CLIENTS
   ========================================================================== */
.clients {
  text-align: center; padding: clamp(64px, 8vw, 110px) var(--gutter);
  border-top: 1px solid var(--bone-faint); border-bottom: 1px solid var(--bone-faint);
}
.client-list {
  display: flex; justify-content: center; align-items: baseline; gap: clamp(20px, 4vw, 56px);
  margin-top: 28px;
  font: 400 clamp(40px, 6vw, 88px)/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
}
.client-list .sep { color: var(--sand); }

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.final { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.final-img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.final-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13,12,11,.95) 10%, rgba(13,12,11,.4) 60%, rgba(13,12,11,.6)); }
.final-inner { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 10vw, 140px); }
.final-inner .eyebrow { margin-bottom: 24px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 72px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  max-width: var(--max); margin: 0 auto;
  font-size: 15px; color: var(--bone-dim);
}
.footer-brand { display: flex; gap: 20px; align-items: flex-start; }
.footer-brand p { font: 400 20px/1.3 var(--f-display); color: var(--bone); }
.footer-brand p span { font: 300 14px/1.5 var(--f-sans); color: var(--stone); }
.footer-col .eyebrow { margin-bottom: 16px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--sand); }
.footer-legal { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid var(--bone-faint); font: 400 12px/1 var(--f-mono); letter-spacing: .08em; color: var(--stone); }

/* ---------- floating WhatsApp ---------- */
.fab {
  position: fixed; z-index: 40;
  right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sand); color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
  transition: opacity .4s, transform .4s var(--ease), background .2s;
}
.fab svg { width: 28px; height: 28px; }
.fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { background: var(--bone); }

/* ---------- gallery ---------- */
.gallery {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(13,12,11,.96); color: var(--bone);
}
.gallery[open] { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; }
.gallery::backdrop { background: rgba(0,0,0,.6); }
.gallery figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 64px 0 24px; min-width: 0; }
.gallery img { max-width: 100%; max-height: 100%; object-fit: contain; min-height: 0; }
.gallery figcaption { font: 400 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); padding-top: 18px; }
.g-nav { font: 300 56px/1 var(--f-display); height: 100%; opacity: .6; transition: opacity .2s; }
.g-nav:hover { opacity: 1; }
.g-close { position: absolute; top: 12px; right: 20px; font: 300 44px/1 var(--f-display); opacity: .7; z-index: 2; }
.g-close:hover { opacity: 1; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.prop[data-reveal].is-in:nth-child(2), .prop[data-reveal].is-in:nth-child(4) { transform: translateY(clamp(0px, 8vw, 120px)); }
.stats .stat:nth-child(2) { transition-delay: .08s; }
.stats .stat:nth-child(3) { transition-delay: .16s; }
.stats .stat:nth-child(4) { transition-delay: .24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--bone-faint); }

  .services-body { grid-template-columns: 1fr; }
  .services-media { display: none; }
  .sstep { min-height: 0; opacity: 1; padding: 40px 0; }
  .sstep-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-top: 8px; }

  .prop-grid { grid-template-columns: 1fr; padding-bottom: 0; }
  .prop:nth-child(2), .prop:nth-child(4),
  .prop[data-reveal].is-in:nth-child(2), .prop[data-reveal].is-in:nth-child(4) { transform: none; }

  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .footer { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-name { display: none; }
  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .beat { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(13,12,11,.5) 0%, rgba(13,12,11,0) 25%),
      linear-gradient(0deg, rgba(13,12,11,.92) 0%, rgba(13,12,11,.35) 55%, rgba(13,12,11,.1) 80%);
  }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
  .gallery[open] { grid-template-columns: 44px 1fr 44px; }
  .g-nav { font-size: 40px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-stage { position: relative; }
  .hero-video, .grain, .scroll-cue, .hud-rail { display: none; }
  .beat { opacity: 0; }
  .beat-1, .beat-4 { opacity: 1; transform: none; pointer-events: auto; }
  .beat-1 { bottom: auto; top: calc(var(--nav-h) + 8vh); }
  [data-reveal], .smedia, .sm-main, .sm-inset, .prop-media img, .steps li::before { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .steps li::before { transform: scaleX(1); }
  .scroll-cue::after { animation: none; }
}
