/* ============================================================
   FLOR DE CERA · ui.css · hero widget, modals, overlays, drawer
   ============================================================ */

body.no-scroll { overflow: hidden; }

/* ---------- HOME hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: -8% 0 0 0; z-index: 0; will-change: transform; }
.hero-bg .ph { position: absolute; inset: 0; border-radius: 0; height: 116%; }

/* multi-layer depth field (scroll + pointer parallax) */
.hero-depth { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hd-layer { position: absolute; inset: -14% -8%; will-change: transform; }
.hd-sky { border-radius: 0; animation: skyDrift 26s ease-in-out infinite alternate; }
@keyframes skyDrift { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.hd-sun {
  inset: auto; left: 16%; top: 4%; width: 620px; height: 620px; max-width: 90%;
  background: radial-gradient(closest-side, rgba(255,231,193,.95), rgba(255,196,142,.42) 42%, transparent 72%);
  border-radius: 50%; mix-blend-mode: screen; filter: blur(4px);
  animation: sunPulse 7s ease-in-out infinite alternate;
}
@keyframes sunPulse { from { opacity: .82; } to { opacity: 1; } }
.hd-hills { left: -12%; right: -12%; bottom: 0; height: 56%; inset: auto -12% 0 -12%; }
.hd-hills-3 { background: radial-gradient(130% 92% at 72% 100%, #715c97 0%, rgba(113,92,151,0) 58%); opacity: .55; }
.hd-hills-2 { background: radial-gradient(130% 86% at 24% 100%, #3f3360 0%, rgba(63,51,96,0) 60%); opacity: .8; height: 50%; }
.hd-hills-1 { background: radial-gradient(150% 84% at 56% 100%, #211531 0%, rgba(33,21,49,0) 64%); opacity: .97; height: 46%; }
.hd-rows {
  bottom: 0; height: 40%; inset: auto 0 0 0; opacity: .5;
  background: repeating-linear-gradient(95deg, transparent 0 26px, rgba(16,10,24,.5) 26px 30px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 72%);
  mask-image: linear-gradient(180deg, transparent, #000 72%);
}
.hd-particles { position: absolute; inset: 0; will-change: transform; }
.hd-photo { background-size: cover; background-position: center 62%; }
.hero-warm { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
   linear-gradient(180deg, rgba(40,28,52,.30) 0%, rgba(40,28,52,0) 22%, rgba(40,28,52,0) 55%, rgba(34,22,46,.66) 100%),
   linear-gradient(110deg, rgba(82,67,130,.34) 0%, rgba(201,138,115,.12) 45%, rgba(244,217,168,.10) 100%); }
.hd-particles i {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,242,214,.95), rgba(255,242,214,0) 70%);
  filter: blur(.5px); opacity: 0; animation: drift 11s linear infinite;
}
.hd-particles i:nth-child(1) { left: 12%; bottom: 24%; animation-delay: 0s; }
.hd-particles i:nth-child(2) { left: 26%; bottom: 12%; animation-delay: 1.6s; transform: scale(.7); }
.hd-particles i:nth-child(3) { left: 38%; bottom: 32%; animation-delay: 3.1s; }
.hd-particles i:nth-child(4) { left: 52%; bottom: 18%; animation-delay: 4.4s; transform: scale(1.3); }
.hd-particles i:nth-child(5) { left: 63%; bottom: 28%; animation-delay: 2.2s; transform: scale(.8); }
.hd-particles i:nth-child(6) { left: 74%; bottom: 14%; animation-delay: 5.6s; }
.hd-particles i:nth-child(7) { left: 84%; bottom: 30%; animation-delay: 0.8s; transform: scale(1.1); }
.hd-particles i:nth-child(8) { left: 46%; bottom: 38%; animation-delay: 6.4s; transform: scale(.6); }
.hd-particles i:nth-child(9) { left: 92%; bottom: 22%; animation-delay: 3.8s; }
@keyframes drift {
  0% { transform: translateY(24px) scale(1); opacity: 0; }
  15% { opacity: .85; }
  75% { opacity: .5; }
  100% { transform: translateY(-150px) scale(1.1); opacity: 0; }
}

/* 3D tilt cards */
@media (hover: hover) and (pointer: fine) {
  .prop-card, .vp, .card { transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
  .prop-card.tilting, .vp.tilting, .card.tilting { transition: transform .1s linear, box-shadow .45s var(--ease); }
}
.hero-veil { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(180deg, rgba(20,14,32,.42) 0%, rgba(20,14,32,.08) 26%, rgba(20,14,32,.10) 55%, rgba(28,18,42,.62) 100%); }
.hero-grain { position: absolute; inset: 0; z-index: 2; opacity: .5; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }
.hero .wrap { position: relative; z-index: 3; width: 100%; padding-top: calc(var(--header-h) + 40px); padding-bottom: 140px; }
.hero-webgl { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: block; width: 100%; height: 100%; }

/* ---------- Floating flor-de-cera petals (brand motif, site-wide) ---------- */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hero .petals { z-index: 2; }
.petal { position: absolute; will-change: transform, opacity; user-select: none;
  animation: petalDrift var(--dur, 22s) ease-in-out infinite alternate; }
@keyframes petalDrift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { transform: translate(var(--dx, 24px), var(--dy, -30px)) rotate(var(--rot, 160deg)) scale(1.09); }
}
@media (prefers-reduced-motion: reduce) { .petals { display: none; } }
.hero-content { max-width: 760px; }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--lila); }
.hero h1.display { color: #fff; font-size: clamp(46px, 8.4vw, 96px); font-weight: 300; line-height: 0.98; }
.hero h1.display em { color: #fff; }
.hero-sub { color: rgba(255,255,255,.9); font-size: clamp(17px, 2.1vw, 21px); max-width: 50ch; margin: 24px 0 0; line-height: 1.55; }

/* hero content entrance — transform only, opacity stays 1 so it always paints */
@keyframes heroUp { from { transform: translateY(26px); } to { transform: none; } }
.hero [data-reveal] { opacity: 1; animation: heroUp 1s var(--ease) both; }
.hero [data-reveal][data-delay="1"] { animation-delay: .1s; }
.hero [data-reveal][data-delay="2"] { animation-delay: .22s; }
.hero [data-reveal][data-delay="3"] { animation-delay: .34s; }

/* hero booking widget */
.hero-widget {
  margin-top: 40px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  box-shadow: var(--sh-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.2fr auto;
  gap: 4px;
  max-width: 880px;
}
.hw-field { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 18px; border-radius: 16px; transition: background .2s; cursor: pointer; }
.hw-field:hover { background: var(--marfil); }
.hw-field + .hw-field::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--linea); }
.hw-field label { font-family: var(--f-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lila-600); pointer-events: none; }
.hw-field .hw-control { display: flex; align-items: center; gap: 8px; }
.hw-field input[type="date"], .hw-field select {
  border: none; background: transparent; font-family: var(--f-body); font-size: 15px; font-weight: 500; color: var(--carbon);
  padding: 0; width: 100%; cursor: pointer; -webkit-appearance: none; appearance: none; outline: none;
}
.hw-field input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.hw-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23524382' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; padding-right: 18px; }
.hw-guests { display: flex; align-items: center; gap: 14px; }
.hw-guests .gv { font-size: 15px; font-weight: 500; min-width: 16px; text-align: center; }
.step-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--linea); background: #fff; color: var(--uva); font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; flex-shrink: 0; }
.step-btn:hover { border-color: var(--uva); background: var(--uva); color: #fff; }
.hero-widget .btn { align-self: stretch; border-radius: 16px; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: rgba(255,255,255,.82); font-size: 13.5px; flex-wrap: wrap; }

/* Cloudbeds widget card (real booking engine in hero) */
.cb-card { margin-top: 34px; background: rgba(255,255,255,.97); backdrop-filter: blur(16px); border-radius: 20px; box-shadow: var(--sh-lg); padding: 16px 18px; max-width: 900px; }
.cb-label { display: block; font-family: var(--f-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lila-600); margin-bottom: 10px; }
.cb-embed { min-height: 54px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cb-embed iframe, .cb-embed > * { max-width: 100%; }
.hero-trust svg { color: var(--lila); }
.hero-trust .trust { color: rgba(255,255,255,.82); }
.hero-trust .trust svg { color: var(--lila); }
.hero-trust .sep { background: rgba(255,255,255,.4); }

/* scroll indicator */
.scroll-ind { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255,255,255,.75); font-family: var(--f-label); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.scroll-ind .mouse { width: 24px; height: 38px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 14px; position: relative; }
.scroll-ind .mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 2px; background: #fff; transform: translateX(-50%); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 12px); } 100% { opacity: 0; } }

/* ---------- Mobile drawer ---------- */
.mobile-drawer { position: fixed; inset: 0; z-index: 95; background: var(--carbon); color: #fff; transform: translateX(100%); transition: transform .45s var(--ease); display: flex; flex-direction: column; padding: 28px; }
.mobile-drawer.open { transform: none; }
.mobile-drawer .md-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.mobile-drawer .md-head .wordmark { font-family: var(--f-label); letter-spacing: .3em; color: #fff; font-size: 18px; }
.md-close { background: none; border: none; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; }
.mobile-drawer nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-drawer nav a { font-family: var(--f-display); font-size: 34px; font-weight: 400; color: #fff; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.mobile-drawer .md-foot { margin-top: auto; display: flex; flex-direction: column; gap: 18px; }

/* ---------- Booking modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(26,16,40,.5); backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.modal-card { background: #fff; border-radius: 22px; width: min(540px, 100%); box-shadow: var(--sh-lg); overflow: hidden; }
.modal.shake .modal-card { animation: shake .45s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-7px)} 40%,80%{transform:translateX(7px)} }
.modal-head { padding: 26px 28px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h3 { font-family: var(--f-display); font-size: 28px; font-weight: 500; color: var(--uva-900); margin: 0; }
.modal-head p { margin: 4px 0 0; color: var(--carbon-60); font-size: 14px; }
.modal-close { background: none; border: none; font-size: 26px; color: var(--carbon-40); cursor: pointer; line-height: 1; }
.modal-body { padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.mb-field label { display: block; font-family: var(--f-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lila-600); margin-bottom: 7px; }
.mb-field input, .mb-field select { width: 100%; padding: 13px 16px; border: 1px solid var(--linea); border-radius: 12px; font-family: var(--f-body); font-size: 15px; color: var(--carbon); background: var(--marfil); outline: none; transition: border-color .2s, box-shadow .2s; }
.mb-field input:focus, .mb-field select:focus { border-color: var(--uva); box-shadow: 0 0 0 3px var(--lila-wash); }
.mb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mb-guests { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; border: 1px solid var(--linea); border-radius: 12px; background: var(--marfil); }
.mb-guests .gv { font-size: 15px; font-weight: 500; }
.mb-guests .row { gap: 12px; }

/* ---------- Checkout overlay (Cloudbeds sim) ---------- */
.checkout { position: fixed; inset: 0; z-index: 130; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(26,16,40,.6); backdrop-filter: blur(8px); }
.checkout.open { display: flex; }
.co-card { background: #fff; border-radius: 22px; width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--sh-lg); }
.co-top { background: var(--uva); color: #fff; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.co-top .co-brand { display: flex; align-items: center; gap: 10px; }
.co-top .co-brand img { width: 30px; filter: brightness(0) invert(1); }
.co-top .co-brand b { font-family: var(--f-label); letter-spacing: .2em; font-size: 14px; }
.co-secure { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; opacity: .9; }
.co-body { padding: 28px; }
.co-step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--f-label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ok, #16a34a); background: #e7f6ec; padding: 6px 13px; border-radius: var(--r-pill); margin-bottom: 18px; }
.co-body h3 { font-family: var(--f-display); font-size: 30px; font-weight: 500; color: var(--uva-900); margin: 0 0 4px; }
.co-summary { border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; margin: 20px 0; }
.co-summary .co-img { height: 130px; }
.co-rows { padding: 18px 20px; }
.co-rows .co-r { display: flex; justify-content: space-between; padding: 9px 0; font-size: 15px; border-bottom: 1px solid var(--linea-2); }
.co-rows .co-r:last-child { border-bottom: none; }
.co-rows .co-r span:first-child { color: var(--carbon-60); }
.co-rows .co-r span:last-child { font-weight: 500; color: var(--carbon); }
.co-rows .co-r.total { padding-top: 14px; font-size: 18px; }
.co-rows .co-r.total span:last-child { color: var(--uva); font-weight: 600; font-size: 22px; }
.co-link { font-family: var(--f-mono, monospace); font-size: 12px; color: var(--lila-600); background: var(--lila-wash); border-radius: 10px; padding: 12px 14px; word-break: break-all; margin: 4px 0 18px; line-height: 1.5; }
.co-note { font-size: 13px; color: var(--carbon-60); text-align: center; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 140; display: none; align-items: center; justify-content: center; padding: 5vh 5vw; background: rgba(18,12,28,.85); backdrop-filter: blur(6px); }
.lightbox.open { display: flex; }
.lb-inner { width: min(1100px, 92vw); height: min(78vh, 760px); }
.lb-close { position: absolute; top: 24px; right: 30px; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .hero-widget { grid-template-columns: 1fr 1fr; }
  .hero-widget .btn { grid-column: 1 / -1; }
  .hw-field + .hw-field::before { display: none; }
}
@media (max-width: 1040px) {
  .nav-links, .header-right .lang-toggle.desktop-only { display: none; }
  .hamburger { display: flex; }
  .book-bar { display: none; }
  .fab-book { display: flex; }
}
@media (max-width: 860px) {
  .vp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-widget { grid-template-columns: 1fr; }
  .hw-field + .hw-field::before { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .mb-row { grid-template-columns: 1fr; }
}
@media (min-width: 861px) { .mobile-drawer { display: none; } }

/* ---------- Inline-grid responsive cascade ---------- */
@media (max-width: 1040px) {
  [style*="repeat(4,"] { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 880px) {
  [style*="repeat(3,"] { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 680px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="span 2"], [style*="span 2}"] { grid-column: auto !important; grid-row: auto !important; }
  .page-hero { min-height: 82vh !important; }
}

/* ---------- Mobile-first refinements ---------- */
@media (max-width: 600px) {
  /* declutter header — FAB always carries the booking CTA on mobile */
  .site-header .header-right > .btn-primary { display: none; }
  .brand .wordmark { font-size: 16px; letter-spacing: 0.26em; }
  .site-header { height: 60px; }
  .site-header.scrolled { height: 56px; }

  /* hero: tighter, give the booking widget room */
  .hero .wrap { padding-top: calc(60px + 18px); padding-bottom: 120px; }
  .hero h1.display { font-size: clamp(38px, 12vw, 60px); }
  .hero-sub { font-size: 16px; margin-top: 18px; }
  .hero-widget { margin-top: 28px; padding: 10px; gap: 2px; border-radius: 18px; }
  .hero-trust { gap: 8px 12px; font-size: 12.5px; }

  /* bigger touch targets */
  .step-btn { width: 34px; height: 34px; font-size: 18px; }
  .hw-field { padding: 14px 16px; }
  .btn { padding: 15px 24px; }
  .nav-links a, .lang-toggle .opt { min-height: 44px; }

  /* roomier sections */
  .section { padding-block: 56px; }
  .section-sm { padding-block: 44px; }
  h2.display { font-size: clamp(28px, 8.5vw, 40px); }
  .display em { font-style: italic; }

  /* stat rows wrap instead of squashing */
  [style*="display:flex"][style*="gap:40px"] { flex-wrap: wrap; gap: 22px 32px !important; }

  /* FAB clears content */
  body { scroll-padding-bottom: 90px; }
  .site-footer { padding-bottom: 96px; }

  /* gallery mosaics get a sensible mobile height */
  [style*="grid-auto-rows"] { grid-auto-rows: 230px !important; }

  /* page hero text breathing room */
  .page-hero .wrap { padding-bottom: 44px; }
  .crumb { margin-bottom: 12px; }
}

/* tablet: ease the dense 2-col content blocks */
@media (max-width: 760px) {
  .prop-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
}
