/* =============================================================================
   base.css — the fluid foundation. Copy into every site as css/base.css.
   Nothing here is width-locked: type, spacing and layout scale continuously
   from ~360px phones to ultrawide. This file is why sites are dynamic off the bat.
   ============================================================================= */

:root {
  /* COLOURS — Reefside brand CI (White Sands / Deep Tide / Living Coral / Salt Air). */
  --brand:      #00444f;   /* primary teal — nav links, buttons, wordmark */
  --brand-dark: #0a323c;   /* darkest tide — launch bar, footer */
  --accent:     #ed7768;   /* Living Coral */
  --muted:      #5f7178;   /* secondary text (derived from Deep Tide) */
  --surface:    #fcf7f2;   /* White Sands — light section background */
  --ink:        #23424f;   /* Deep Tide — body text */
  --white:      #ffffff;
  --sand:      #f6f2ed;    /* page background (from the Figma design) */
  --salt-air:  #c2d1cc;
  --cream:     #fffaf3;    /* text on dark tide */

  /* TYPE — fluid scale. Never set a size that only looks right at one width.
     Display = Sinhala MN (brand CI headline font; Apple system font, no webfont —
     falls back to spaced Lato elsewhere). Body = Lato via Adobe Fonts. */
  --font: "lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sinhala MN Web", "Sinhala MN", "lato", serif;
  --t-header: clamp(48px, 7vw,   88px);
  --t-h1:     clamp(40px, 5.4vw, 70px);
  --t-h2:     clamp(26px, 3.2vw, 40px);
  --t-h3:     clamp(20px, 2.3vw, 27px);
  --t-lg:   20px;
  --t-body: 16px;
  --t-small: 11px;
  --t-cta:   12px;

  /* SPACING — gutters and section rhythm breathe with the viewport. */
  --wrap: 1240px;                             /* max content width; page itself is fluid */
  --pad:  clamp(20px, 5vw, 64px);             /* fluid side padding */
  --section-y: clamp(56px, 8vw, 128px);       /* vertical section rhythm */
  --measure: 68ch;                            /* readable line-length cap */

  --nav-h: 68px;
  --topbar-h: 40px;        /* fixed so the sticky header can hide exactly the launch bar */
  --radius: 0;             /* Reefside is straight and clean — no rounded corners anywhere */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ── Brand display font — Sinhala MN Regular, Latin-subset woff2 (8KB) ───────── */
@font-face {
  font-family: "Sinhala MN Web";
  src: url("../fonts/sinhala-mn-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Minimal reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth;
  /* clip (not hidden) kills sideways viewport wobble on iOS without creating a
     scroll container, so position:sticky keeps working */
  overflow-x: hidden; overflow-x: clip;
}
body {
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; overflow-x: clip;       /* body never gets a horizontal scrollbar */
  overflow-wrap: break-word;                  /* long words wrap instead of overflowing (else clipped by overflow-x) */
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Typography scale — brand: spaced uppercase display headlines, Lato body ── */
/* Tight letters, WIDE word gaps — spaced uppercase reads as words, not a letter soup */
h1 { font-size: var(--t-h1); line-height: 1.08; font-weight: 400; font-family: var(--font-display); letter-spacing: .035em; word-spacing: .16em; text-transform: uppercase; color: var(--brand); }
h2 { font-size: var(--t-h2); line-height: 1.14; font-weight: 400; font-family: var(--font-display); letter-spacing: .035em; word-spacing: .16em; text-transform: uppercase; color: var(--brand); }
h3 { font-size: var(--t-h3); line-height: 1.2;  font-weight: 400; font-family: var(--font-display); letter-spacing: .03em; word-spacing: .14em; text-transform: uppercase; color: var(--brand); }
p  { max-width: var(--measure); }
/* Unbreakable tokens (URLs, emails, long single words) break instead of running off narrow screens. */
a, h1, h2, h3, h4, h5, h6, td, li { overflow-wrap: anywhere; }
.eyebrow { font-size: var(--t-cta); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.kicker { display: block; margin-top: .7rem; }   /* eyebrow that sits BELOW its heading */
/* In centred contexts the kicker's <p> box (max-width) must centre too, not hug the left */
.center .kicker, .page-head .kicker { margin-inline: auto; }

/* ── Layout helpers ────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.measure { max-width: var(--measure); }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; margin-inline: auto; }

/* Auto-fit grid that never overflows: cells wrap when they can't hold min width. */
.grid { display: grid; gap: clamp(16px, 3vw, 32px); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }

/* Wide content (tables/code/diagrams) scrolls inside its own box, never the page. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Screen-reader-only text */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: .9em 1.6em; border: 1px solid transparent; border-radius: var(--radius);
  font-size: var(--t-cta); letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-fill    { background: var(--brand); color: var(--white); }
.btn-fill:hover  { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: currentColor; }
.btn-outline:hover { background: var(--brand); color: var(--white); }

/* ── Hero (100svh so mobile chrome doesn't clip it) ───────────────────────────── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;   /* vh fallback for Safari < 15.4 */
  display: grid; place-items: center; text-align: center;
  color: var(--white); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); z-index: -1; }
.hero__inner { padding: var(--pad); display: grid; gap: 1.2rem; justify-items: center; }
.hero h1 { font-size: var(--t-header); }

/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav { position: fixed; inset: 0 0 auto; z-index: 40; transition: transform .3s var(--ease), background .3s var(--ease); }
.nav__bar { display: flex; align-items: center; gap: 1rem; min-height: var(--nav-h); }
.nav__logo { font-weight: 800; letter-spacing: .04em; font-size: var(--t-lg); }
.nav__links { display: flex; gap: clamp(12px, 2vw, 28px); margin-left: auto; }
.nav__links a { font-size: var(--t-cta); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.nav__cta { padding-block: .6em; }
/* Homepage bar: transparent over hero, solid once scrolled. Sub-page bar: always solid. */
.nav:not(.nav--static) { background: transparent; color: var(--white); }
.nav.nav--static, .nav.is-scrolled { background: var(--white); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.nav.nav--static .nav__cta, .nav.is-scrolled .nav__cta { background: var(--brand); color: var(--white); }

.nav__burger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: none; border: 0; padding: 8px; min-width: 44px; min-height: 44px; }
.nav__burger span { width: 24px; height: 2px; background: currentColor; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: 100%;
  background: var(--brand-dark); color: var(--white); z-index: 60; padding: clamp(24px, 6vw, 48px);
  transform: translateX(100%); transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
}
/* Inverted drawer: white links on the dark tide (active page stays coral).
   .drawer-scoped selectors so they outrank the shared masthead/drawer link colours below. */
.drawer .drawer__links a { color: var(--white); }
.drawer .drawer__links a.is-active { color: var(--accent); }
.drawer .drawer__links a.masthead__cta { background: var(--accent); border-color: var(--accent); color: var(--white); align-self: center; }
.drawer .drawer__links a.masthead__cta:hover { background: transparent; border-color: var(--white); color: var(--white); }
.drawer.is-open { transform: none; }
/* X floats top-right (10px higher, 5px further right); links rise to meet it */
.drawer__close {
  position: absolute; top: calc(clamp(24px, 6vw, 48px) - 10px); right: calc(clamp(24px, 6vw, 48px) - 5px);
  display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 32px; line-height: 1; background: none; border: 0; color: inherit;
}
.drawer__links { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; margin-top: 50px; font-size: var(--t-lg); }

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer { background: var(--brand-dark); color: var(--white); padding-block: clamp(40px, 6vw, 72px); }
.footer__inner { display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
.footer__legal { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; font-size: var(--t-cta); letter-spacing: .06em; text-transform: uppercase; }
.footer__social { display: flex; gap: 1rem; list-style: none; padding: 0; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); transition: background .2s; }
.footer__social a:hover { background: rgba(255,255,255,.22); }
.footer__copy { font-size: 13px; opacity: .8; line-height: 1.8; max-width: none; }
.footer__copy a { text-decoration: underline; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 1rem; max-width: 560px; }
.form__row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.form label { display: grid; gap: .4rem; font-size: 14px; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 16px; padding: calc(.8em - 2px) 1em; border: 0; border-radius: 5px; background: var(--white); width: 100%;  /* font-size >=16px so iOS Safari doesn't zoom on focus */
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.form input[type="checkbox"] { width: auto; }
/* Consent: checkbox left, text right, on one line (beats the .form label grid) */
.form label.form__consent { display: flex; gap: .6rem; align-items: center; font-size: 13px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot */
.form__msg { font-size: 14px; }
.form__msg.is-error { color: #b0261a; }

/* Body offset so fixed nav never covers content on sub-pages. */
.has-static-nav { padding-top: var(--nav-h); }

/* ── Legal pages (privacy / terms) — long-form readable typography ─────────────── */
.legal { max-width: var(--measure); }
.legal h1 { font-size: var(--t-h2); }
.legal h2 { font-size: var(--t-h3); margin-top: 2.2rem; }
.legal h3 { font-size: var(--t-lg); margin-top: 1.6rem; }
.legal p, .legal ul, .legal ol { margin-top: 1rem; }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal li { margin-top: .4rem; }
.legal a { color: var(--brand); text-decoration: underline; }

/* ── Image-layout repertoire — frames, captions, galleries (immersive, not stiff) ── */
.media-frame { position: relative; overflow: hidden; border-radius: var(--radius); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-cap { position: absolute; inset: auto 0 0 0; padding: 1rem 1.2rem; color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); font-weight: 600; pointer-events: none; }
.gallery { display: grid; gap: clamp(12px, 2vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.gallery-frame { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ Reefside header — launch bar (scrolls away) + sticky glass masthead ═══ */
.site-header { position: sticky; top: calc(-1 * var(--topbar-h)); z-index: 40; }

.topbar {
  background: var(--brand-dark); color: var(--cream); text-align: center;
  height: var(--topbar-h); display: grid; place-items: center; padding-inline: var(--pad);
}
.topbar p { max-width: none; display: inline-flex; align-items: baseline; gap: .6em; white-space: nowrap; }
.topbar__display { font-family: var(--font-display); font-size: clamp(16px, 1.7vw, 20px); letter-spacing: .09em; text-transform: uppercase; }
.topbar__date { font-weight: 300; font-size: clamp(15px, 1.6vw, 19px); letter-spacing: .07em; text-transform: uppercase; }

/* Frosted-glass bar that floats over the hero and shrinks once scrolled */
.masthead {
  background: rgb(255 255 255 / 77%);   /* white tint, still clearly translucent — glossy blur does the rest */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .masthead { background: rgba(246, 242, 237, .92); }
}
.site-header.is-scrolled .masthead { background: rgba(246, 242, 237, .82); box-shadow: 0 1px 0 rgba(10, 50, 60, .08); }

.masthead__bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: clamp(16px, 3vw, 48px); padding-block: clamp(6px, 1.4vw, 14px);
  transition: padding .3s var(--ease);
  max-width: 1680px;                       /* wider than --wrap: links sit near the edges like the design */
}
.site-header.is-scrolled .masthead__bar { padding-block: 7px; }
.masthead__logo { display: block; width: clamp(170px, 17vw, 300px); transition: width .3s var(--ease); }
.site-header.is-scrolled .masthead__logo { width: clamp(130px, 12vw, 180px); }
.masthead__logo img { width: 100%; height: auto; }
.masthead__links { display: flex; gap: clamp(16px, 2.6vw, 52px); align-items: center; }
.masthead__links--right { justify-content: flex-end; }
.masthead__links a, .drawer__links a {
  font-size: 14px; letter-spacing: .04em; text-transform: none;
  color: var(--brand); white-space: nowrap;
  transition: color .2s var(--ease);
}
.masthead__links a:hover { color: var(--accent); }
/* Nav-link hover: a hairline grows from the centre outwards, 3px under the text */
.masthead__links a:not(.masthead__cta) { position: relative; }
.masthead__links a:not(.masthead__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: center;
  transition: transform .28s var(--ease);
}
.masthead__links a:not(.masthead__cta):hover::after,
.masthead__links a:not(.masthead__cta):focus-visible::after { transform: scaleX(1); }
/* Current page: hold the hover look (coral + underline) */
.masthead__links a.is-active, .drawer__links a.is-active { color: var(--accent); }
.masthead__links a.is-active:not(.masthead__cta)::after { transform: scaleX(1); }

/* Contact Us button: solid teal on load, empties to an outline on hover.
   Selectors carry `a` so they outrank the generic .masthead__links a colour. */
.masthead__links a.masthead__cta, .drawer__links a.masthead__cta {
  background: var(--brand); color: var(--white); border: 1px solid var(--brand);
  padding: 5px 24px; font-size: 12.5px; letter-spacing: .02em; text-transform: none;
}
.masthead__links a.masthead__cta:hover, .drawer__links a.masthead__cta:hover {
  background: transparent; border-color: currentColor; color: var(--brand);
}
/* Over the hero (home, not yet scrolled) the hover outline reads white */
body[data-route="home"] .site-header:not(.is-scrolled) .masthead__links a.masthead__cta:hover { color: #fff; }
.drawer__links a.masthead__cta { align-self: flex-start; }
.masthead .nav__burger { display: none; color: var(--brand); justify-self: end; }

/* Non-home pages: the brand brush pattern washes through the glass nav, very subtle */
body:not([data-route="home"]) .masthead { position: relative; }
body:not([data-route="home"]) .masthead::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../images/pattern-brush-1920.webp") center / cover;
  opacity: .1;
}
.masthead__bar { position: relative; }   /* keeps links/logo above the pattern layer */

@media (max-width: 1180px) {
  .masthead__links { display: none; }
  .masthead__bar { grid-template-columns: 44px 1fr 44px; }
  .masthead__logo { grid-column: 2; justify-self: center; }
  .masthead .nav__burger { display: flex; grid-column: 3; }
}

/* Hero banner: full-width image behind the glass nav, strapline overlaid.
   --header-pull is measured by main.js (header height) so the image slides under it;
   with JS off it falls back to 0 and the hero simply starts below the header. */
.hero-banner {
  position: relative; overflow: hidden; margin-top: calc(-1 * var(--header-pull, 0px));
  /* Fills the viewport exactly, so the opening strip sits right at the fold —
     only the topbar's "Opening 1 October" is on screen on load. */
  min-height: 100vh; min-height: 100svh;
}
.hero-banner__img { display: block; width: 100%; height: 100vh; height: 100svh; object-fit: cover; }
/* Deeper scroll drift on banners than the site-wide 8%: extra bleed (±18%) buys 12% of
   travel with no gap at the edges. (Other parallax bands stay at 8% in animations.css.) */
.hero-banner .parallax-band__media { inset: -18% 0; height: 136%; }
.fx-on .hero-banner .parallax-band__media { transform: translateY(calc(var(--par, 0) * 12%)); }
/* Flat 30% black scrim between the image and the text (the masked tree/people layer
   sits above it, so the foreground stays bright and the depth reads even stronger). */
.hero-banner::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
/* Foreground cutout (traced in _hero-mask-tool.html): same geometry + parallax as the base
   image, so the headline tucks behind the masked tree/people. Sits above the text. */
.hero-banner__fg { z-index: 2; pointer-events: none; filter: brightness(.72); }   /* matches the 28% black scrim */
.hero-banner__inner {
  position: absolute; inset: var(--header-pull, 0px) 0 0 0; z-index: 1;
  display: grid; place-content: center; justify-items: center; gap: 1.2rem;
  text-align: center; padding: var(--pad); color: var(--cream);
}
.hero-banner__inner {
  will-change: transform;        /* mouse drift (transform) is applied by main.js */
  translate: 0 -18px;            /* sits a touch above true centre; composes with the JS transform */
}
.hero-banner__inner h1 {
  color: var(--cream); font-size: var(--t-h1); letter-spacing: normal;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .38), 0 5px 22px rgba(0, 0, 0, .32);
}
.hero-banner__cats {
  font-weight: 300; letter-spacing: .1em; text-transform: uppercase;
  font-size: clamp(13.5px, 1.65vw, 17.5px); color: var(--cream); max-width: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .42), 0 4px 16px rgba(0, 0, 0, .32);
}
.hero-banner__cats .sep { padding-inline: 2px; }

/* Slim centred strip under the banner — sticks just below the shrunken nav.
   --nav-stuck-h is measured by main.js; fallback keeps it sensible with JS off. */
.opening-strip {
  position: sticky; top: calc(var(--nav-stuck-h, 62px) - 1px); z-index: 20;
  text-align: center; padding: clamp(12px, 2.2vh, 26px) var(--pad);
  background: var(--sand); box-shadow: 0 1px 0 rgba(35, 66, 79, .08);
  transition: background .3s var(--ease), padding .3s var(--ease);
}
.opening-strip p {
  max-width: none; font-family: var(--font-display); letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); font-size: clamp(14px, 1.7vw, 20px);
  transition: color .3s var(--ease);
}
/* Once it snaps under the nav it goes dark tide, tighter */
.opening-strip.is-stuck { background: var(--brand-dark); padding-block: 7px; }
.opening-strip.is-stuck p { color: var(--cream); }

/* ── Mobile tuning ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  /* Hero: ~35% shorter than the full-viewport desktop hero — the wide image is far
     less cover-zoomed, so it reads sharper and shows more of the scene */
  .hero-banner { min-height: 64svh; }
  .hero-banner__img { height: 64svh; }
  /* Text rides ABOVE the masked tree/people on mobile (no tuck-behind), smaller, two lines */
  .hero-banner__inner { z-index: 3; }
  .hero-banner__inner h1 { font-size: calc(var(--t-h1) - 7px); }
  .hero-line2 { display: block; }
  /* A Place for Community image: fits the viewport, wrap padding on both sides */
  .community-img { max-width: 100%; justify-self: stretch; }
  /* Strapline stacks: "Curated Living." / "Coastal Soul." */
  .strap-band p span { display: block; margin-top: .15em; }
}

/* Strapline band — brush-stroke pattern FIXED to the viewport (painting stays while you scroll) */
.strap-band {
  position: relative; overflow: hidden; text-align: center; padding: clamp(72px, 14vw, 190px) var(--pad);
  background-size: cover; background-position: center; background-attachment: fixed;
}
@media (prefers-reduced-motion: reduce), (max-width: 820px) {
  .strap-band { background-attachment: scroll; }   /* iOS ignores fixed attachment — serve normal there */
}
@media (max-width: 820px) {
  .strap-band { background-size: auto 130%; }      /* bleed for the JS position drift (main.js) */
}
.strap-band::after { content: ""; position: absolute; inset: 0; background: rgba(10, 50, 60, .22); }
.strap-band p {
  position: relative; z-index: 1; max-width: none; color: var(--white);
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .14em; font-size: clamp(19px, 3.2vw, 42px); line-height: 1.35;
}
.strap-band p span {/* opacity: .72; */}

/* Tenant tiles — photo blocks with centred title; description fades in on hover.
   5-up on wide screens (25 tenants = 5 exact rows, no orphan tile), 4-up below 1400px. */
.tenants__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1400px) { .tenants__grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .tenants__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .tenants__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px)  { .tenants__grid { grid-template-columns: 1fr; } }
.tile { position: relative; aspect-ratio: 4 / 3; overflow: hidden; isolation: isolate; }
.tile__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
/* Subtle top-left → bottom-right gradient so adjoining tiles read as separate blocks */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(13, 34, 41, .48), rgba(13, 34, 41, .68));
  transition: opacity .35s var(--ease);
}
.tile:hover::after, .tile:focus-within::after {
  background: linear-gradient(135deg, rgba(13, 34, 41, .6), rgba(13, 34, 41, .78));
}
.tile:hover .tile__bg { transform: scale(1.05); }
.tile__inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; text-align: center; padding: clamp(14px, 2vw, 26px); color: var(--white);
}
.tile__logo { max-width: min(62%, 190px); max-height: 46px; width: auto; height: auto; object-fit: contain; transition: transform .35s var(--ease); }
.tile__name {
  font-family: var(--font); font-weight: 400; letter-spacing: .22em; text-transform: uppercase;
  font-size: clamp(14px, 1.3vw, 19px); color: var(--white); transition: transform .35s var(--ease);
}
.tile__desc {
  font-weight: 300; font-size: 13.5px; line-height: 1.55; max-width: 30ch;
  color: rgba(255, 255, 255, .92);
  opacity: 0; transform: translateY(10px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.tile:hover .tile__logo, .tile:hover .tile__name { transform: translateY(-5px); }
/* CI-baked tiles already carry their own dark artwork + logo — keep our overlay light,
   and push the hover description to the lower third so it clears the baked logo */
.tile--baked::after { background: linear-gradient(135deg, rgba(13, 34, 41, .1), rgba(13, 34, 41, .25)); }
.tile--baked:hover::after, .tile--baked:focus-within::after {
  background: linear-gradient(135deg, rgba(13, 34, 41, .5), rgba(13, 34, 41, .68));
}
.tile--baked .tile__inner { justify-content: flex-end; padding-bottom: clamp(16px, 2.2vw, 30px); }
.tile:hover .tile__desc, .tile:focus-within .tile__desc { opacity: 1; transform: none; }
@media (hover: none) { .tile__desc { opacity: 1; transform: none; } }   /* touch: always readable */

/* Thin pattern band page header (max ~30% of the viewport) + intro section below it */
.page-band {
  position: relative; overflow: hidden; text-align: center;
  height: clamp(160px, 30svh, 300px); display: grid; place-items: center;
}
.page-band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-band h1 { position: relative; z-index: 1; font-size: clamp(28px, 3.6vw, 48px); color: var(--brand); }
.page-intro {
  background: var(--surface); text-align: center;
  padding-block: calc(clamp(56px, 8vw, 110px) + 30px);
  position: relative; overflow: hidden;   /* contains the coral accent — it never bleeds into the next section */
}
.page-intro h1, .page-intro h2 { font-size: var(--t-h2); max-width: 30ch; margin-inline: auto; }
.page-intro p { max-width: 58ch; margin: 1.2rem auto 0; }
.page-intro > .wrap { position: relative; z-index: 1; }

/* Faster parallax band variant: extra bleed buys the deeper 12% travel without gaps.
   Media also runs lighter so overlaid washes read as texture. */
.band-fast .parallax-band__media { inset: -18% 0; height: 136%; opacity: .2; }
.fx-on .band-fast .parallax-band__media { transform: translateY(calc(var(--par, 0) * 12%)); }

/* Coral cut-out half off the LEFT edge of its section */
.coral-left {
  position: absolute; left: calc(-1 * clamp(100px, 13vw, 210px) + 55px); top: 50%; translate: 0 -50%;
  width: clamp(198px, 25.2vw, 378px); opacity: .3; pointer-events: none;
}
/* Contact section: coral sits lower and fainter */
body[data-route="contact"] .coral-left, .coral-left--low { top: calc(50% + 150px); opacity: .15; }

/* Sub-page banner: identical layer structure to the home hero (image under the glass nav,
   45% scrim, centred title, parallax + mouse drift) — just a calmer title size. */
.hero-banner--page .hero-banner__inner h1 {
  font-size: clamp(22px, 2.9vw, 37px); max-width: 34ch;
  text-transform: none; letter-spacing: .01em;   /* sentence case — lighter, reads as a sentence */
}

/* Sub-page header: full photo banner, title ON the image (same scrim recipe as the hero) */
.page-head { position: relative; overflow: hidden; text-align: center; color: var(--cream); padding: clamp(88px, 13vw, 190px) var(--pad); }
.page-head__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.page-head > * { position: relative; z-index: 1; }
.page-head h1 {
  font-size: clamp(24px, 2.9vw, 38px); color: var(--cream); max-width: 32ch; margin-inline: auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 3px 12px rgba(0, 0, 0, .5);
}

/* Overlapping feature: image and panel share a grid so the panel rides over the image */
.feature-overlap { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.feature-overlap__img { grid-column: 1 / 9; grid-row: 1; width: 100%; height: 100%; max-height: 640px; object-fit: cover; }
.feature-overlap__panel {
  grid-column: 7 / 13; grid-row: 1; z-index: 1;
  background: var(--surface); padding: clamp(26px, 4vw, 64px);
}
.feature-overlap--flip .feature-overlap__img { grid-column: 5 / 13; }
.feature-overlap--flip .feature-overlap__panel { grid-column: 1 / 7; }
.feature-overlap__panel--salt { background: var(--salt-air); }
.feature-overlap__panel p { margin-top: 1rem; }
@media (max-width: 820px) {
  .feature-overlap { display: block; }
  .feature-overlap__img { max-height: 420px; }
  .feature-overlap__panel { margin: -48px var(--pad) 0; position: relative; }
}

/* Duo cards (e.g. Free Parking + Wheelchair Friendly) */
.duo-cards { display: grid; gap: clamp(16px, 2.5vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.duo-cards article { background: var(--surface); }
.duo-cards img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.duo-cards .duo-cards__body { padding: clamp(20px, 3vw, 36px); }
.duo-cards p { margin-top: .8rem; }

/* Band copy raised above the image's focal point (Live Music) */
.band-copy-high { translate: 0 -85px; }
@media (max-width: 720px) { .band-copy-high { translate: 0 -105px; } }

/* A Place for Community image (desktop: capped width, hugs the right of its column;
   under 720px the mobile block makes it full-column-width with wrap padding) */
@media (min-width: 721px) {
  .community-img { max-width: 456px; justify-self: end; }
}

/* Contact page: icon lines + map */
.contact-info { padding-top: clamp(24px, 3.5vw, 44px); }   /* lines "Opening Hours" up with "Enquire Now" in the panel */
.contact-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: .1rem;
  margin-left: -5px;                       /* optically lines the icons up with the text above */
  color: var(--brand);
  transition: color .2s var(--ease);
}
.contact-line:first-of-type { margin-top: .9rem; }
.contact-line:hover { color: var(--accent); }
.contact-line__icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 27px;
  flex: 0 0 auto;
  color: inherit;
}
.map-embed { display: block; width: 100%; height: clamp(420px, 66vh, 660px); object-fit: cover; }
/* Dark tide panel around the contact form */
.form-panel { background: var(--brand-dark); padding: clamp(24px, 3.5vw, 44px); border-radius: 5px; }
.form-panel .form { gap: .8rem; }
/* Name/surname and phone/email always sit 50/50 (stack only on small phones) */
.form-panel .form__row { grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 480px) { .form-panel .form__row { grid-template-columns: 1fr; } }
.form-panel .form__consent { color: var(--cream); }
.form-panel .form__consent a { text-decoration: underline; }
.form-panel .form__msg { color: var(--cream); }
.form-panel .form__msg.is-error { color: #ffb4a8; }
.form-panel .btn-fill { background: var(--accent); }
.form-panel .btn-fill:hover { background: var(--brand); }

/* Watercolour accents */
.whale-float { position: absolute; right: clamp(-40px, -2vw, 0px); bottom: -8%; width: clamp(220px, 30vw, 480px); opacity: .8; pointer-events: none; }
/* Whale pod: sits low in its section (under the next band on load) and drifts
   northeast (up-right, 45°) as you scroll. --par runs +1 → −1 as the element rises. */
.whale-drift {
  position: absolute;
  right: 5%;
  bottom: -70px;
  width: clamp(240px, 36vw, 493px);
  opacity: .5;
  pointer-events: none;
}
.fx-on .whale-drift[data-parallax-drift] {
  transform: translate(calc(var(--par, 0) * -100px), calc(var(--par, 0) * 100px));
  will-change: transform;
}

/* Coral accent (decorative cut-out from the brand file) — sits fully inside its
   section (raised off the bottom edge so it isn't clipped), soft at 30% */
.coral-accent { position: absolute; right: calc(-1 * clamp(30px, 6vw, 90px)); bottom: 40px; width: clamp(180px, 24vw, 380px); opacity: .3; pointer-events: none; }

/* Footer: dark tide, content columns from the copy doc, coral accent right */
.footer { position: relative; overflow: hidden; }
.footer__logo { width: clamp(180px, 20vw, 300px); margin-bottom: .6rem; }
.footer__grid {
  display: grid; gap: clamp(28px, 4vw, 72px); width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  text-align: left; padding-bottom: clamp(20px, 3vw, 40px);
  border-bottom: 1px solid rgba(255,250,243,.18); margin-bottom: 1.6rem;
}
.footer__title {
  font-family: var(--font-display); color: var(--cream); font-weight: 400;
  font-size: 14px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .9rem;
}
.footer__grid p, .footer__grid address { font-style: normal; font-weight: 300; line-height: 1.9; font-size: 15px; max-width: none; }
.footer__grid a:hover { color: var(--accent); }
.footer .coral-accent { opacity: .28; bottom: -10%; }

/* ── Reduced motion: every animation must have a no-motion path (spec §1.5). ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
