/* ==========================================================================
   visual-integration.css — page-level type, boxes, rhythm and picture framing
   (t_ba43e4a7). Loaded LAST on purpose: this is the integration lane, so it
   *resolves* the three places where lux.css / villa-premium.css /
   design-polish.css answer the same question differently (heading scale,
   panel language, page gutter) instead of adding a fifth competing layer.

   Rules of the file:
   - no colour, wording, layout mode or behaviour is replaced;
   - one radius, one border, one shadow tier, one section step;
   - villa-scoped work is scoped with body[data-page="villa"], everything else
     touches only containers the villa pages do not share.
   ========================================================================== */

:root{
  --vi-r:14px;              /* the single card/panel radius */
  --vi-panel:18px 20px;     /* the single panel padding */
  --vi-rule:1px solid var(--line);
  --vi-sec:28px;            /* one vertical rhythm step between sections */
  --vi-measure:66ch;        /* comfortable line length for running text */
}

/* ---------------------------------------------- 1. one page gutter --------
   The bars stay full-bleed (their background must reach both edges) but their
   CONTENT now sits on the same vertical line as .wrap: wrap margin + wrap
   padding. Before this, the header logo held 64px while the content column
   started at 112.5px on a 1440 window. */
@media (min-width:1000px){
  .hdr,.ftr{
    /* 100% (the body box) not 100vw: the viewport is 15px wider than the body
       wherever a scrollbar is showing, and that 15px showed up as a left-edge
       drift on every page with one. */
    padding-inline:calc(64px + max(0px, (100% - var(--max)) / 2));
  }
}

/* ------------------------------------------- 2. hierarchy, not ten peers ---
   Every section on a villa page used to be a 22.4px/700 heading with its own
   top rule, so all ten sections shouted at once. The H1 keeps the display
   size and the sections step back to a readable sub-head with one shared
   rhythm between them. */
body[data-page="villa"] .villahead h1{
  font-size:clamp(1.55rem,2.9vw,2.2rem);
  line-height:1.16;
  letter-spacing:-.022em;
  max-width:30ch;
  text-wrap:balance;
}
body[data-page="villa"] .layout2 .block{
  padding-top:var(--vi-sec);
  margin-top:var(--vi-sec);
  border-top:var(--vi-rule);
}
body[data-page="villa"] .layout2 .block h2{
  font-size:1.28rem;
  font-weight:600;
  letter-spacing:-.008em;
  line-height:1.3;
  margin:0 0 10px;
  padding:0;
}
body[data-page="villa"] .layout2 .prose{
  max-width:var(--vi-measure);
  font-size:1rem;
  line-height:1.7;
  color:var(--ink-2);
}

/* One label style for every overline on the page (they were 11.5 / 11.8 /
   12.2px with two different colours and three tracking values). */
.eyebrow,
.vibeblock h3,
.uspblock h3,
body[data-page="villa"] .layout2 section > h3{
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--accent-2);
  margin:0 0 8px;
  line-height:1.3;
}

/* ----------------------------- 3. one box language, one shadow tier -------
   Two sibling highlight panels had two different treatments (a borderless
   left-rule block and a bordered card); they are one component now, and the
   booking card drops from 22px to the same radius as the rail cards. */
.vibeblock,
.uspblock{
  border:var(--vi-rule);
  border-left:3px solid var(--accent-2);
  border-radius:var(--vi-r);
  background:var(--card);
  padding:var(--vi-panel);
  margin:0 0 var(--vi-sec);
  box-shadow:none;
}
/* chrome.css already pins the card radii with !important; the integration
   sheet answers in kind so one radius survives instead of three. */
body[data-page="villa"] .bookcard{border-radius:var(--vi-r) !important}
body[data-page="villa"] .railcard{
  border-radius:var(--vi-r);
  padding:var(--vi-panel);
}

/* Intentional crops: a facade wants the sky/horizon dropped, an interior wants
   the middle of the room. Landscape shots keep their horizon instead of being
   centred on the floor. */
.gcell[data-zone="exterior"],
.gcell[data-zone="pool"],
.gcell[data-zone="outdoor"],
.gcell[data-zone="view"]{--vi-focal:50% 62%}
.gcell[data-zone="living"],
.gcell[data-zone="kitchen"],
.gcell[data-zone="bedrooms"],
.gcell[data-zone="bathroom"]{--vi-focal:50% 48%}
.gcell img{object-fit:cover;object-position:var(--vi-focal,50% 50%)}

/* ------------------------------------------------ 5. results composition --
   Cards keep the approved four-up density; what changes is the anatomy:
   one radius, a reserved title block so a long name cannot shove the price
   out of line, and one fewer repeated sentence per card. */
.vcard{border-radius:var(--vi-r) !important}
.vcard .vteamlab{display:none}            /* stays in the chip's aria-label */
.vcard .vtop{min-height:2.4em;align-items:flex-start}
.vcard .vtop h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vcard .vloc{margin-top:2px}
/* The first card used to start 296px under the band: a repeated count line,
   a sort bar, a collections rail and a quick-facet row each carried their own
   generous margin. The count line is dropped (the band's H1 already prints
   "992 villas"), and the rest is closed up so the cards start in the fold. */
.searchhead .wrap{padding-bottom:16px}
.results{padding-top:20px}
.resultlist .fitcount{display:none}
.resultlist .sortbar{padding-bottom:10px;margin:0 0 12px}
.resultlist .collections{margin:0 0 8px;padding-top:0}
.resultlist .qrow{margin:0 0 10px}

/* The action row is pinned to the card floor, so a shorter snippet or a
   one-line fact list cannot float one card's price 10px above its neighbours'. */
.vcard{display:flex;flex-direction:column}
.vcard .vbody{display:flex;flex-direction:column;flex:1 1 auto}
.vcard .vact{margin-top:auto;padding-top:10px}

/* One overlay signal per card: "Book now" already says the villa books
   instantly, so the duplicate pill and every badge after the first go; the
   rating chip, the single strongest badge and the heart stay.
   The card emits its badges as span.vbadge-pill (`.pill` only live on
   .vmodepill), already sorted Premium > Recommended > New > Top > Popular by
   lib/lux.js, so keeping the first child keeps the strongest claim — the rule
   is deterministic and does not depend on which keys fired. */
.vcard .vmodepill.pill-inst{display:none}
.vcard .vbadges .vbadge-pill ~ .vbadge-pill{display:none}

/* ------------------------------------------------- 6. phone reachability ---
   The sticky dock must not land on the last line of content, and the home
   indicator must not eat the Reserve button. */
@media (max-width:860px){
  body[data-page="villa"] .layout2{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  /* the related-villas strip drops to one column on a phone: two 170px cards
     squeezed the price line into overflow */
  body[data-page="villa"] .relgrid{grid-template-columns:1fr}
  .stickybar{padding-bottom:calc(.6rem + env(safe-area-inset-bottom,0px))}
  body[data-page="villa"] .villahead h1{max-width:none}
}

/* ------------------------------------------ 7. whole-page vertical rhythm --
   Home sections carried three different paddings (48 / 0 with margins / a
   stray 72px pre-footer). One step now, on every direct main section, so the
   page reads as bands instead of as accidental gaps. */
.wrap{scroll-margin-top:84px}
main > .wrap{padding-block:32px}
.hero .kicker{font-size:12.5px;letter-spacing:.14em}
.hero .sub{max-width:52ch;line-height:1.55}
.blstrip{margin-top:0}
.why{margin-top:32px;padding-block:32px}

@media (prefers-reduced-motion:reduce){
  .gcell img{transition:none}
}
