/* ============================================================
   refinements.css
   Mr Lux · The Agency Dominican Republic

   Targeted corrections on top of the approved design:
     1. Transparent → white scrolling navigation (restored)
     2. Page loading bar (restored)
     4. Slimmer boxed components
     5. Destination intro media panel

   Nothing here changes typography, brand colour, logos or copy.
   ============================================================ */

/* ============================================================
   1. NAVIGATION — TRANSPARENT OVER HERO, SOLID ON SCROLL
   Restored from the rejected version's treatment.
   Gated behind html.m-js so the approved white nav is the
   fallback if JS never runs.
   ============================================================ */

/* No transition on the very first paint, so the nav appears in its
   correct state instead of fading into it. */
html.m-preload #nav,
html.m-preload #nav *,
html.m-preload .nav-logo-img{ transition:none !important; }

html.m-js #nav{
  transition:background-color .5s cubic-bezier(.22,1,.36,1),
             border-color .5s cubic-bezier(.22,1,.36,1),
             box-shadow .5s cubic-bezier(.22,1,.36,1),
             backdrop-filter .5s cubic-bezier(.22,1,.36,1),
             padding .45s cubic-bezier(.22,1,.36,1);
}

/* Transparent state — only on pages that have a hero behind the bar */
html.m-js body.has-hero-nav #nav:not(.sc){
  background:transparent;
  border-bottom-color:transparent;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
/* Gentle scrim so menu text stays legible on bright imagery */
html.m-js body.has-hero-nav #nav:not(.sc)::before{
  content:'';
  position:absolute; inset:0; z-index:-1;
  background:linear-gradient(to bottom, rgba(0,0,0,.42), rgba(0,0,0,0));
  pointer-events:none;
}
html.m-js body.has-hero-nav #nav{ position:fixed; }

/* Link, dropdown-arrow and toggle colours in the transparent state */
html.m-js body.has-hero-nav #nav:not(.sc) .nli>li>a,
html.m-js body.has-hero-nav #nav:not(.sc) .nli>li>span.ndrop{
  color:#fff;
}
html.m-js body.has-hero-nav #nav:not(.sc) .nli>li>a:hover,
html.m-js body.has-hero-nav #nav:not(.sc) .nli>li:hover>span.ndrop{
  color:#fff;
  border-bottom-color:rgba(255,255,255,.55);
}
html.m-js body.has-hero-nav #nav:not(.sc) .nmobile-toggle span,
html.m-js body.has-hero-nav #nav:not(.sc) .nmobile-toggle i,
html.m-js body.has-hero-nav #nav:not(.sc) .nmobile-toggle::before,
html.m-js body.has-hero-nav #nav:not(.sc) .nmobile-toggle::after{
  background:#fff; color:#fff;
}
html.m-js body.has-hero-nav #nav:not(.sc) .nmobile-toggle{ color:#fff; }

/* The consultation button keeps its red fill in both states — it is the
   primary CTA and must not lose contrast. Only its edge is reinforced. */
html.m-js body.has-hero-nav #nav:not(.sc) .nct{
  box-shadow:0 2px 18px rgba(0,0,0,.28);
}

/* Dropdown panels stay white and readable in BOTH nav states */
html.m-js .nsub{ background:#fff; }
html.m-js body.has-hero-nav #nav:not(.sc) .nsub a{ color:var(--t2); }
html.m-js body.has-hero-nav #nav:not(.sc) .nsub a:hover{ color:var(--red); }

/* Solid state — the approved white navigation, unchanged */
html.m-js #nav.sc{
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}

/* ============================================================
   2. LOADING BAR
   The markup sits immediately after <body>, and the progress is
   driven by CSS animation alone — so the bar is painted and moving
   before any script runs. JavaScript only completes and hides it.
   ============================================================ */
#mLoader{
  position:fixed; top:0; left:0; right:0;
  height:3px;
  z-index:100000;            /* above #nav (999) and everything else */
  pointer-events:none;
  opacity:1;
  transition:opacity .32s ease .06s;
}
#mLoader .mLoader-fill{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg, var(--red), #ff6b6f);
  box-shadow:0 0 10px rgba(237,33,39,.55);
  transform:translateZ(0);
  animation:mLoadCreep 2.6s cubic-bezier(.12,.62,.28,1) forwards;
}
/* Starts at a visible sliver so there is feedback on the very first
   painted frame, then fast to a third and progressively slower. */
@keyframes mLoadCreep{
  0%   { width:8% }
  12%  { width:32% }
  35%  { width:56% }
  70%  { width:74% }
  100% { width:88% }
}
/* JS marks the page usable */
#mLoader.mL-complete .mLoader-fill{
  animation:none;
  width:100%;
  transition:width .26s cubic-bezier(.22,1,.36,1);
}
#mLoader.mL-done{ opacity:0; }
/* Hard removal. On a heavy page the opacity transition can be starved by
   main-thread work, so the bar is taken out of the layer entirely once
   it has completed. It can never linger. */
#mLoader.mL-gone{ display:none !important; }
/* Reset before the next navigation */
#mLoader.mL-reset .mLoader-fill{ animation:none; width:0; transition:none; }

@media(prefers-reduced-motion:reduce){
  /* Still immediate feedback, but no long creep and no fade delay. */
  #mLoader{ transition:opacity .01ms; }
  #mLoader .mLoader-fill{ animation:none; width:70%; transition:width .01ms; }
  #mLoader.mL-complete .mLoader-fill{ width:100%; transition:width .01ms; }
}

/* ============================================================
   4. SLIMMER BOXED COMPONENTS
   Padding, gaps and min-heights only — every value below is a
   reduction of the real declaration in main.css or in a
   destination page's own <style> block. No font-size is changed.
   Destination-page rules are prefixed with `body` because those
   pages define their boxes in an inline <style> that would
   otherwise win the cascade.
   ============================================================ */

/* --- Property cards (main.css: .lbody 1.4rem) --- */
.lbody{ padding:.85rem .95rem .9rem; }
.lspecs{ margin-bottom:.45rem; padding-bottom:.45rem; }
.ldesc{ margin-bottom:.48rem; }
.lname{ margin-bottom:.24rem; }

/* --- Statistics (1.2rem 1rem / .75rem 1rem / 1.3rem) --- */
.stat-box{ padding:.75rem .8rem; }
.sbar-item{ padding:.5rem .9rem; }
.gsm{ padding:.85rem; }

/* --- Information / service / investment boxes --- */
.ov-card{ padding:1rem; }        /* was 1.6rem  */
.adv-item{ padding:.95rem; }        /* was 1.5rem  */
.wgm-item{ padding:.95rem; }        /* was 1.5rem  */
.reach-item{ padding:1rem .95rem; } /* was 1.7rem 1.4rem */
.lawcard{ padding:1.15rem; }         /* was 2rem    */
.cd-item{ padding:.6rem 0; }       /* was .95rem  */

/* --- Destination cards (.acard 380px min, .abody 1.6rem) --- */
.acard{ min-height:300px; }
/* Page-level <style> blocks set these with ID specificity (#areas .acard,
   #courses .acard), so they need a `body` prefix to be trimmed. */
body #areas .acard{ min-height:320px; }
body #courses .acard{ min-height:380px; }
@media(max-width:760px){
  body #courses .acard{ min-height:320px; }
  body #courses .abody{ padding:1.3rem; }
}
.abody{ padding:1rem; }

/* --- Testimonials (1.75rem) --- */
.tcard{ padding:1.05rem; }

/* --- Insights --- */
.bpost .lbody,.bpost .bbody{ padding:.9rem .95rem; }

/* --- Contact form (2.2rem / 1.1rem) --- */
.cform-box{ padding:1.35rem; }
.cf-field{ margin-bottom:.68rem; }

/* --- FAQ (.fq 1rem 1.25rem) --- */
.fq{ padding:.65rem 1rem; }

/* --- Filters (1.2rem 1.5rem) --- */
.search-bar{ padding:.75rem 1rem; }

/* --- Modals --- */
.lmbox,.modal-box,.nl-box{ padding:1.2rem; }

/* --- Destination page boxes (inline <style>, so `body` prefix) --- */
body .hl-item{ padding:.9rem; }          /* was 1.5rem      */
body .hl-ic{ margin-bottom:.4rem; }        /* was .6rem       */
body .ls-item{ padding:.95rem; }           /* was 1.6rem      */
body .inv-item{ padding:.9rem; }         /* was 1.5rem      */
body .inv-ic{ margin-bottom:.4rem; }       /* was .6rem       */
body .zone-item{ padding:.88rem .85rem; }    /* was 1.4rem 1.2rem */
body .amen-item{ padding:.75rem; }         /* was 1.2rem      */
body .pt-item{ padding:1.05rem 1rem; }    /* was 1.8rem 1.5rem */
body .spot-body{ padding:1.25rem 1.4rem; }  /* was 2.2rem 2.4rem */
body .why-item{ padding:.3rem 0; }         /* was .4rem 0     */

/* Repeated boxes in a row stay aligned to one another */
.lgrid,.ov-grid,.adv-grid,.tgrid,.law-grid,.blog-grid,.reach-grid,
body .hl-grid,body .ls-grid,body .inv-row,body .zone-grid,
body .amen-grid,body .prop-types{ align-items:stretch; }

/* ============================================================
   5. DESTINATION INTRO — MEDIA PANEL FILLS THE RIGHT COLUMN
   Copy spans both rows on the left; statistics sit top-right;
   the destination image fills the space beneath them.
   ============================================================ */
.dest-overview-grid.dov-intro{
  grid-template-rows:auto 1fr;
  align-items:stretch;
  gap:2.4rem 3rem;
}
.dest-overview-grid.dov-intro > .dov-copy{
  grid-column:1; grid-row:1 / span 2;
}
.dest-overview-grid.dov-intro > .stat-strip{
  grid-column:2; grid-row:1;
  align-self:start;
}
.dov-media{
  grid-column:2; grid-row:2;
  position:relative;
  overflow:hidden;
  min-height:230px;
  margin:0;
  align-self:stretch;
  background:var(--ir3);
}
.dov-media img{
  width:100%; height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
/* Reveal consistent with the approved animation system */
html.m-js .dov-media img{
  transition:transform 1.4s cubic-bezier(.22,1,.36,1), opacity .8s ease;
}
html.m-js .dov-media.rv:not(.v) img{ transform:scale(1.05); }
html.m-js .dov-media.rv.v img{ transform:scale(1); }

/* Trim the excess vertical padding this section carried */
section:has(> .dest-overview-grid.dov-intro){ padding-block:3.25rem; }

@media(max-width:1080px){
  /* Single column: copy, then stats, then image — nothing overlaps */
  .dest-overview-grid.dov-intro{ grid-template-columns:1fr; grid-template-rows:auto; gap:1.6rem; }
  .dest-overview-grid.dov-intro > .dov-copy{ grid-column:1; grid-row:auto; }
  .dest-overview-grid.dov-intro > .stat-strip{ grid-column:1; grid-row:auto; }
  .dov-media{ grid-column:1; grid-row:auto; min-height:0; aspect-ratio:16/9; }
}
@media(max-width:700px){
  .dov-media{ aspect-ratio:4/3; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media(prefers-reduced-motion:reduce){
  html.m-js #nav,
  html.m-js .dov-media img{ transition:none !important; }
  html.m-js .dov-media.rv:not(.v) img{ transform:none !important; }
  /* The loader is NOT hidden here — reduced motion removes the animated
     creep (see the loader block above) but keeps the loading feedback. */
}

/* ============================================================
   6. HOMEPAGE HERO — DIRECTIONAL OVERLAY
   The previous treatment stacked two full-frame dark layers
   (.hero-slate + .hero-ov), giving a flat 45-58% darkness across
   the whole photograph and a near-solid 88-95% black band at the
   bottom. That is replaced with one horizontal gradient for text
   legibility and one restrained vertical gradient for the controls,
   so the property photography stays the focus.

   Scoped to #hero: interior-page heroes (.phero-ov) are untouched.
   No image is altered and no brightness filter is applied.
   ============================================================ */

/* Horizontal: carries the headline, then releases the photograph. */
#hero .hero-slate{
  background:linear-gradient(96deg,
    rgba(0,0,0,.47)   0%,
    rgba(0,0,0,.42)  18%,
    rgba(0,0,0,.26)  38%,
    rgba(0,0,0,.13)  56%,
    rgba(0,0,0,.06)  76%,
    rgba(0,0,0,.04) 100%);
}

/* Vertical: only what the nav at the top and the controls at the
   bottom actually need. The middle of the frame is left clear. */
#hero .hero-ov{
  background:linear-gradient(180deg,
    rgba(0,0,0,.22)   0%,
    rgba(0,0,0,.05)  18%,
    rgba(0,0,0,0)    40%,
    rgba(0,0,0,0)    62%,
    rgba(0,0,0,.30)  88%,
    rgba(0,0,0,.44) 100%);
}

/* Localized support for the type, instead of darkening the frame. */
#hero .ht,
#hero .hsub,
#hero .hflag span{ text-shadow:0 1px 16px rgba(0,0,0,.42); }

/* The caption plate was reading as a black block. */
#hero .hc-cap{ background:rgba(0,0,0,.30); backdrop-filter:blur(10px); }

@media(max-width:900px){
  /* Copy covers more of the frame on small screens, so the overlay
     behind it is stronger — but the rest of the photograph is still
     lighter than the original flat treatment. */
  #hero .hero-slate{
    background:linear-gradient(178deg,
      rgba(0,0,0,.34)   0%,
      rgba(0,0,0,.50)  30%,
      rgba(0,0,0,.50)  62%,
      rgba(0,0,0,.22) 100%);
  }
  #hero .hero-ov{
    background:linear-gradient(180deg,
      rgba(0,0,0,.26)   0%,
      rgba(0,0,0,.06)  22%,
      rgba(0,0,0,0)    46%,
      rgba(0,0,0,.26)  86%,
      rgba(0,0,0,.42) 100%);
  }
}

/* ============================================================
   7. TEAM → BUYER'S GUIDE BOUNDARY (homepage)
   The two sections each carried 100.8px of padding at this seam,
   leaving 211px of empty paper between the "Meet the Full Team"
   button and the "Step by Step" label. Only this boundary is
   tightened — every other section keeps its rhythm.
   ============================================================ */
#team-preview{ padding-bottom:2.5rem; }
#guide-preview{ padding-top:2.5rem; }

@media(max-width:760px){
  #team-preview{ padding-bottom:2.4rem; }
  #guide-preview{ padding-top:2.4rem; }
}
