/* 37°8 shared stylesheet. Linked AFTER each page's own inline <style>, so rules here win at equal specificity.
   Preview, 22 Nov 2026. Round 1: accessible text-colour tokens, WhatsApp placement, contrast fixes.
   Round 2 moves the repeated nav, footer and button CSS here as well (see the /378 skill).

   Rules for this file
   - Brand colours do not change: Atlantic #0B1D30, Meridian #B85C38, Algarve #F7F2E8, Stone #9AA1A8, white.
   - Stone and Meridian are not accessible as SMALL TEXT on light backgrounds. Use the *-ink tokens below for text;
     keep the brand values for rules, dots, large type and decoration. */

:root {
  --stone-ink: #5E666E;            /* Stone as text on cream or white: 5.2:1 (Stone #9AA1A8 itself is 2.3:1 on cream) */
  --ink-muted: rgba(11, 29, 48, .72);   /* muted navy text: 6.4:1 on cream, 6.8:1 on white (the old 40 to 60% was 2.9 to 4.4:1) */
  --meridian-ink: #9C4624;         /* Meridian as small text or a button fill on cream/white: 5.7:1 (Meridian itself 4.1:1) */
  --meridian-on-dark: #DD9570;     /* Meridian as small text on Atlantic: 7.0:1 (Meridian itself 3.8:1) */
  --cream-muted: rgba(247, 242, 232, .68); /* muted cream text on Atlantic: 7.6:1 */
  --whatsapp-ink: #0F7A3F;         /* WhatsApp green as a text link on cream: 4.9:1 (#25D366 is 1.8:1). The round button keeps #25D366 */
}

/* ---------- WhatsApp: never over body copy ---------------------------------------------------------------------------
   Below 1500px there is no gutter wide enough to park a floating button in (content max-width 1320px plus the button and its margins),
   so the button lives in the header instead (site.js adds it, using the page's own pre-filled message).
   From 1500px the floating button sits in the right gutter, clear of the content. */
html body .wa-fab { display: none; }
@media (min-width: 1500px) {
  html body .wa-fab { display: flex; width: 46px; height: 46px; right: 8px; bottom: 20px; }
  html body .wa-fab svg { width: 24px; height: 24px; }
  html body .wa-fab-label { display: none; }
}
.nav-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wa-hdr {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid rgba(11, 29, 48, .22); background: transparent; color: var(--atlantic, #0B1D30);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.wa-hdr svg { width: 20px; height: 20px; display: block; }
.wa-hdr:hover { background: #25D366; border-color: #25D366; color: #fff; }
.wa-hdr:focus-visible { outline: 2px solid var(--meridian-ink); outline-offset: 2px; }
@media (min-width: 1500px) { .wa-hdr { display: none; } }
@media (max-width: 480px) {
  .nav-end { gap: 6px; }
  .wa-hdr { width: 40px; height: 40px; }
  html body .brand .sub { letter-spacing: .14em; }
}

/* ---------- Contrast: small text ------------------------------------------------------------------------------------
   Muted navy text (colour:rgba(11,29,48,.4 to .65)) was raised to var(--ink-muted) at source in each page's own CSS. */
html body .gallery-block .room-note { color: var(--cream-muted); }   /* was navy on navy: unreadable */
html body .sect-eyebrow, html body .rental-card-eyebrow, html body .room-col .lvl,
html body .valuation-left .section-num { color: var(--meridian-ink); }
html body .hero-tag, html body .sale-card-eyebrow { color: var(--meridian-on-dark); }
/* on Atlantic sections some pages set style="color:var(--meridian)" inline, hence !important */
html body .gallery-block .sect-eyebrow, html body .book-block .sect-eyebrow, html body .contact-grid .section-num { color: var(--meridian-on-dark) !important; }
html body .fp3d-eyebrow { color: var(--meridian-ink); }
html body .submit, html body .val-submit { background: var(--meridian-ink); }
html body .submit:hover, html body .val-submit:hover { background: #84391b; }
html body .gtag, html body .video-tile .gtag, html body .hero-tile .gtag { background: var(--meridian-ink) !important; }
html body .agent-contact a[href*="wa.me"] { color: var(--whatsapp-ink) !important; text-decoration-color: rgba(15, 122, 63, .45) !important; }
html body .contact-grid ::placeholder, html body .book-block ::placeholder, html body .val-form-dark ::placeholder { color: var(--cream-muted); opacity: 1; }
/* labels printed over photographs get a backing so they read on any image */
html body .hero-image-ref span, html body .sale-card-ref {
  background: rgba(11, 29, 48, .72); color: #F7F2E8; padding: 3px 8px;
}

/* ---------- 3D floor plan embed: muted text inside the viewer (floor / view switches) passes AA ---------------------- */
.fp3d .fp-root { --_muted: color-mix(in srgb, var(--_ink) 72%, transparent); }

/* ---------- Home first screen (22 Nov 2026, option A): headline and both CTAs on the left, current listings on the right ---------- */
.hero-proof { font-size: 14px; color: var(--ink-muted); margin: 22px 0 0; line-height: 1.5; }
.hero-proof a { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }
.hero-proof a:hover { color: var(--meridian-ink); }
.hero-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero-side .hero-image { aspect-ratio: auto; flex: 1 1 auto; min-height: 260px; }
.hero-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-cards a { display: block; background: #fff; border: 1px solid rgba(11, 29, 48, .12); color: var(--atlantic, #0B1D30); text-decoration: none; height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.hero-cards a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(11, 29, 48, .4); }
.hero-cards img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-cards .hc-name { display: block; font-family: "Fraunces", serif; font-size: 16px; line-height: 1.2; padding: 10px 12px 0; }
.hero-cards .hc-town { display: block; font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--stone-ink); padding: 4px 12px 12px; }
@media (min-width: 1025px) {
  html body .hero { padding-top: 40px; padding-bottom: 48px; }
  html body .hero h1 { font-size: clamp(48px, 5.6vw, 84px); margin-bottom: 22px; }
  html body .hero p.lede { margin-bottom: 28px; }
  html body .hero-content { padding: clamp(32px, 3.6vw, 52px); }
}
@media (max-width: 640px) {
  html body .hero { padding-top: 20px; }
  html body .hero-content { padding: 24px 22px; }
  html body .hero h1 { font-size: clamp(40px, 11vw, 52px); margin-bottom: 16px; }
  html body .hero p.lede { font-size: 15.5px; margin-bottom: 20px; }
  html body .hero .cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  html body .hero .cta-row .btn { padding: 14px 10px; justify-content: center; font-size: 12px; letter-spacing: .1em; }
  html body .hero .cta-row .btn .arr { display: none; }
  .hero-cards { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .hero-cards li { scroll-snap-align: start; }
}

/* "How we work" cards: one concrete idea each, numbered instead of the generic icons */
.value .v-num { font-family: "Fraunces", serif; font-size: 34px; line-height: 1; color: var(--meridian-ink); letter-spacing: -.02em; }

/* ---------- Home first screen, "Open sky" (Nick's pick B, 24 Nov 2026) ---------------------------------------------------
   Full-bleed photograph under the header; the type sits in the sky. Replaces the option A split first screen. */
.hero-sky { position: relative; height: calc(100vh - var(--nav-h, 74px) - 1px - var(--a378-cc-h, 0px)); height: calc(100svh - var(--nav-h, 74px) - 1px - var(--a378-cc-h, 0px)); min-height: 560px; overflow: hidden; background: #6AA9F5; color: var(--atlantic, #0B1D30); }
.hero-sky-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 21%; display: block; }
.hero-sky-copy { position: absolute; z-index: 2; top: 60px; left: 27.8vw; right: 24px; }
@media (max-width: 640px) { .hero-sky-copy { position: static; } .hero-sky-copy > h1, .hero-sky-copy > .hero-sky-sub { position: relative; z-index: 2; } .hero-sky-copy > h1 { padding: 26px 22px 0; } .hero-sky-copy > .hero-sky-sub { padding: 0 22px; } }
.hero-sky h1 { font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(48px, 6.67vw, 104px); line-height: 1; letter-spacing: -.025em; margin: 0 0 11px; color: var(--atlantic, #0B1D30); }
.hero-sky h1 em { font-style: italic; font-weight: 400; }
.hero-sky-sub { font-family: "Inter", sans-serif; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.45; color: var(--atlantic, #0B1D30); margin: 0 0 21px; max-width: 60ch; }
.hero-sky-btn { display: flex; align-items: center; justify-content: space-between; width: 319px; max-width: 100%; height: 60px; padding: 0 26px; box-sizing: border-box; background: #F7F2E8; color: var(--atlantic, #0B1D30); border: 0; border-radius: 0; text-decoration: none; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: background .25s ease; }
.hero-sky-btn:hover { background: #fff; }
.hero-sky-btn:focus-visible, .hero-sky-cap:focus-visible { outline: 2px solid var(--atlantic, #0B1D30); outline-offset: 3px; }
.hero-sky-cap { position: absolute; z-index: 2; left: 0; bottom: 0; display: block; padding: 11px 20px; background: #0B1D30; color: #F7F2E8; font-family: "Fraunces", serif; font-style: italic; font-size: 19px; line-height: 1.25; text-decoration: none; }
@media (max-width: 900px) {
  .hero-sky-copy { left: 22px; right: 22px; top: 26px; }
  .hero-sky-img { object-position: 38.6% 50%; }
}
@media (max-width: 640px) {
  .hero-sky h1 { font-size: clamp(44px, 13.8vw, 64px); margin-bottom: 16px; }
  .hero-sky-sub { font-size: 16.5px; margin: 0; max-width: none; }
  .hero-sky-btn { position: absolute; left: 22px; right: 22px; bottom: 90px; width: auto; height: 60px; }
  .hero-sky-btn { z-index: 2; }
  .hero-sky-cap { left: 21px; bottom: 25px; padding: 9px 14px; font-size: 15px; }
}

/* while the cookie strip is showing the first screen shrinks to the space left, so the button and caption stay above the fold;
   after Accept or Reject (--a378-cc-h back to 0) the 560px minimum and the full drawing height return */
body.a378-cc-open .hero-sky { min-height: 380px; }

/* ---------- Properties menu: wide visual grid (24 Nov 2026) ---------------------------------------------------------------
   Same markup as before (.nav-sub > .nav-sub-section > a.nav-sub-item), now with a photo and the town on each card.
   The panel hangs from the header across the page width; hover and click behaviour (inline JS on each page) is unchanged. */
@media (min-width: 901px) {
  html body header.nav nav ul li.has-sub { position: static; }
  html body header.nav .nav-sub {
    top: 100%; left: 50%; min-width: 0; width: min(1240px, calc(100vw - 48px)); box-sizing: border-box;
    padding: 24px 0 0; transform: translateX(-50%) translateY(-6px);
  }
  html body header.nav li.has-sub.open .nav-sub { transform: translateX(-50%) translateY(0); }
  html body .nav-sub-section { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; padding: 0 28px 24px; align-items: start; }
  html body .nav-sub-section + .nav-sub-section { padding-top: 22px; }
  html body .nav-sub-head { grid-column: 1 / -1; margin: 0; }
  html body .nav-sub-item { display: block; padding: 0; border: 0; }
  html body .nav-sub-item:hover .t { color: var(--meridian-ink, #9C4624); }
  html body .nav-sub-foot { padding: 16px 28px; }
}
@media (min-width: 901px) and (max-width: 1100px) { html body .nav-sub-section { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html body .nav-sub-img { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #E8E1D2; margin-bottom: 10px; }
html body .nav-sub-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
html body .nav-sub-item:hover .nav-sub-img img { transform: scale(1.04); }
html body .nav-sub-item .tw { display: block; font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--stone-ink, #5E666E); margin-top: 4px; }
html body .nav-sub-item .m { margin-top: 4px; line-height: 1.4; }
@media (max-width: 900px) {
  html body header.nav nav ul li .nav-sub a.nav-sub-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 10px 0; }
  html body header.nav nav ul li .nav-sub a.nav-sub-item .nav-sub-img { grid-row: 1 / span 3; margin: 0; aspect-ratio: 4 / 3; }
  html body header.nav nav ul li .nav-sub a.nav-sub-item .t { font-size: 16px; }
  html body header.nav nav ul li .nav-sub a.nav-sub-item .tw { margin-top: 2px; }
}

/* blog pages: eyebrow and the closing button use the AA-safe Meridian */
html body .art-eyebrow { color: var(--meridian-ink); }
html body .art-eyebrow::before { background: var(--meridian-ink); }
html body .cta-btn { background: var(--meridian-ink); }
html body .cta-btn:hover { background: #84391b; }
