/* BMArriendos — page styles (glass, hero, carousel, gallery). Tailwind utilities live in site.css. */
:root {
  --gold: #F59E0B;
  --gold-soft: #FBBF24;
  --ink: #07080A;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(14, 16, 20, 0.45);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-hi: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

html { background: var(--ink); color-scheme: dark; scrollbar-color: rgba(255,255,255,.28) var(--ink); }
::selection { background: rgba(245, 158, 11, .85); color: var(--ink); }
input, textarea { caret-color: var(--gold); }
body { background: var(--ink); color: #fff; -webkit-font-smoothing: antialiased; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Glass primitives (blur only the backdrop, never the images) ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-dark {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Brand logo on a light frosted tile (keeps the gold/green/black logo legible on dark) ---------- */
.logo-tile {
  display: inline-flex; align-items: center; border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
}

/* Small round glass contact buttons (WhatsApp / Instagram / email) */
.social-btn { display: inline-grid; place-items: center; height: 48px; width: 48px; border-radius: 9999px; }

/* ---------- Header ---------- */
.site-header { transition: background-color .4s ease, border-color .4s ease, -webkit-backdrop-filter .4s ease, backdrop-filter .4s ease; border-bottom: 1px solid transparent; }
.site-header.is-scrolled {
  background: rgba(7, 8, 10, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-premium);
}
.nav-link:hover::after, .nav-link[aria-current="true"]::after { transform: scaleX(1); }
.nav-link[aria-current="true"] { color: #fff; }

/* ---------- Hero background layers ---------- */
.hero-layer { position: absolute; inset: 0; opacity: 0; will-change: opacity, clip-path; }
.hero-layer.is-active { opacity: 1; }
.hero-layer .zoom { position: absolute; inset: 0; will-change: transform; }
.hero-layer img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }

.hero-shade {
  background:
    linear-gradient(180deg, rgba(7,8,10,.55) 0%, rgba(7,8,10,0) 22%),
    linear-gradient(0deg, rgba(7,8,10,.9) 0%, rgba(7,8,10,.35) 30%, rgba(7,8,10,0) 55%),
    linear-gradient(90deg, rgba(7,8,10,.82) 0%, rgba(7,8,10,.55) 32%, rgba(7,8,10,.08) 62%, rgba(7,8,10,0) 100%);
}
@media (max-width: 1023px) {
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(7,8,10,.75) 0%, rgba(7,8,10,.35) 40%, rgba(7,8,10,.55) 62%, rgba(7,8,10,.92) 100%);
  }
}

/* Title lines reveal from a mask */
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line-inner { display: block; }

/* Hero copy sits on photos: a soft dark shadow keeps it legible on bright skies */
#heroCopy h1, #heroCopy h2, #heroCopy p { text-shadow: 0 1px 2px rgba(7,8,10,.55), 0 2px 18px rgba(7,8,10,.55); }

/* ---------- Carousel ---------- */
.carousel-viewport {
  container-type: inline-size;
  overflow: hidden;
  padding: 30px 0 14px 4px;
  touch-action: pan-y;
  --gap: 20px;
  --visible: 4.25;   /* 4 full cards + a peek of the next one */
  --gaps: 4;
}
@media (max-width: 1023px) { .carousel-viewport { --visible: 3.25; --gaps: 3; --gap: 16px; } }
@media (max-width: 639px)  { .carousel-viewport { --visible: 2.15; --gaps: 2; --gap: 12px; padding-top: 22px; } }

.track {
  --card-w: calc((100cqw - var(--gap) * var(--gaps)) / var(--visible));
  display: flex; gap: var(--gap);
  transform: translate3d(calc(var(--pos, 0) * -1 * (var(--card-w) + var(--gap))), 0, 0);
  transition: transform .6s var(--ease-premium);
  will-change: transform;
}
.track.no-anim { transition: none; }

.card {
  flex: 0 0 var(--card-w); width: var(--card-w);
  position: relative; text-align: left; cursor: pointer;
  border-radius: 20px; outline: none;
  transform-origin: left bottom;
  transition: transform .5s var(--ease-premium);
}
.card-frame {
  display: block; padding: 5px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 22px 45px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.card-media { position: relative; display: block; aspect-ratio: 3 / 4.15; border-radius: 15px; overflow: hidden; background: #111; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,6,8,.88) 0%, rgba(5,6,8,.45) 30%, rgba(5,6,8,0) 58%); }
.card-badge { opacity: 0; transform: translateY(-4px); transition: opacity .4s ease, transform .4s var(--ease-premium); }

.card:hover .card-frame,
.card:focus-visible .card-frame { transform: translateY(-8px); border-color: var(--glass-border-hi); box-shadow: 0 30px 55px -20px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.25); }
.card:focus-visible .card-frame { outline: 2px solid var(--gold); outline-offset: 3px; }

.card.is-active { transform: scale(1.05); }
.card.is-active .card-frame { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 28px 50px -18px rgba(0,0,0,.9); }
.card.is-active .card-badge { opacity: 1; transform: none; }

/* Progress + numbering */
.progress-fill { transform-origin: left; transform: scaleX(.25); transition: transform .6s var(--ease-premium); }
.counter { display: inline-block; overflow: hidden; height: 1em; line-height: 1; }

.ctrl { transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .2s ease; }
.ctrl:hover { border-color: var(--glass-border-hi); background: rgba(255,255,255,.16); }
.ctrl:active { transform: scale(.95); }

/* Feature/location cards below the hero */
.lift { transition: transform .5s var(--ease-premium), border-color .5s ease; }
.lift:hover { transform: translateY(-6px); border-color: var(--glass-border-hi); }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--glass-shadow); } 30% { box-shadow: 0 0 0 2px var(--gold), var(--glass-shadow); } }

/* Photo gallery */
.gallery-dialog::backdrop { background: rgba(5, 6, 8, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.gallery-img { transition: opacity .35s ease, transform .5s var(--ease-premium); }
.gallery-img.is-loading { opacity: 0; transform: scale(.985); }
.gallery-thumb { opacity: .55; border: 1px solid rgba(255,255,255,.18); transition: opacity .3s ease, border-color .3s ease, transform .3s ease; }
.gallery-thumb:hover { opacity: .9; transform: translateY(-2px); }
.gallery-thumb.is-active { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
#galleryThumbs { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.gallery-trigger:hover .gallery-chip { border-color: var(--gold); background: rgba(245,158,11,.22); }

/* Search dialog */
dialog::backdrop { background: rgba(5, 6, 8, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .35s var(--ease-premium); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
