/* ============================================================
   KASANA - Luxury Real Estate
   Hand-written CSS3. No frameworks.

   CONTENTS
   01  Design tokens
   02  Reset & base
   03  Utilities (container, eyebrow, buttons)
   04  Header
   05  Navigation + mobile drawer
   06  Hero
   07  Property search card
   08  Stats
   09  Featured properties
   10  Footer
   11  Responsive
   12  Motion & print preferences
   ============================================================ */


/* ============================================================
   01  DESIGN TOKENS

   Deep navy and warm gold, pulled toward Tasmania.

   The dark end is a navy, not the almost-black basalt it replaces, but
   it is taken down and cooled until it sits closer to the dolerite of
   kunanyi than to the standard property-portal navy - #061A3B rather
   than a flat #001F49. The accent is a gold warmed toward Battery Point
   sandstone: #F0C048 has more honey in it than a pure yellow gold, so
   it reads as stone lit at five in the afternoon rather than as a
   highlighter. The grounds are a cream and a warm off-white, never the
   grey-white every portal defaults to.

   Contrast, measured against --paper unless noted:
       --ink        16.5:1     --body     10.1:1
       --muted       6.6:1     --gold-ink  6.2:1
       --gold on --basalt-900  9.0:1   (accent words on dark)
       --ink on --stone-500    9.0:1   (button label on gold)

   The scale names are deliberately unchanged. Every one of the ~2,000
   lines of component CSS across nine pages already addresses the brand
   through --basalt-*, --stone-*, --ink, --line and the legacy
   --navy-* / --gold-* aliases, so repointing the values here moves the
   whole site at once and no component file is touched to do it.
   ============================================================ */
:root {
  /* --- Navy: the dark end of the scale ------------------------ */
  --basalt-950: #04122B;              /* deepest, footer + hero wash */
  --basalt-900: #061A3B;              /* the brand navy */
  --basalt-800: #0B2650;
  --basalt-700: #133567;
  --basalt-600: #1E477F;

  /* --- Gold: the accent -------------------------------------- */
  --stone-500: #F0C048;                /* brand accent, fills + text on dark */
  --stone-400: #F8D058;                /* hover / highlight */
  --stone-300: #F7E58E;                /* hairlines on dark */
  --stone-700: #7E5614;                /* 6.2:1 on paper - small text on light */

  /* --- Slate: the secondary ---------------------------------- */
  --huon-700: #1B3A5C;
  --huon-500: #2A5480;

  /* --- Neutrals ----------------------------------------------
     The neutrals are navy-tinted rather than grey. A true grey next to
     #061A3B reads as dirt; carrying a few degrees of the brand hue
     through the body copy and the hairlines is what makes a page of
     mostly-text still look like it belongs to the same object. */
  --ink: #061A3B;                      /* headings - the brand navy itself */
  --body: #333E5E;                     /* body copy, 10.1:1 on paper */
  --muted: #515975;                    /* 6.6:1 - labels, meta, captions */
  --line: #E6E0D0;                     /* warm hairline, not grey */
  --line-soft: #F1ECDF;
  --paper: #FCFAF4;                    /* warm off white section ground */
  --paper-2: #FBF4E4;                  /* cream - badges, filter tabs, insets */
  --white: #FFFFFF;

  /* --- Named grounds -----------------------------------------
     --cream is the one the reference language leans on hardest: the
     ground under a section badge, under a filter bar, under a quiet
     inset. It is --paper-2 under a name that says what it is for. */
  --cream: #FBF4E4;
  --cream-deep: #F4E7C4;               /* the border that sits on --cream */
  --gold-wash: rgba(240, 192, 72, .14);
  --navy-wash: rgba(6, 26, 59, .06);

  /* --- Legacy aliases: do not remove ------------------------- */
  --navy-900: var(--basalt-900);
  --navy-800: var(--basalt-800);
  --gold: var(--stone-500);
  --gold-soft: var(--stone-400);
  --gold-ink: var(--stone-700);
  --page: var(--paper);

  /* --- Elevation ---------------------------------------------
     Two-part shadows: a tight contact shadow that grounds the edge,
     and a wide soft one that does the lifting. Tinted with the
     brand navy so nothing looks like grey fog on a warm ground. */
  --shadow-soft:
      0 1px 2px rgba(6, 26, 59, .05),
      0 6px 18px rgba(6, 26, 59, .05);
  --shadow-card:
      0 1px 2px rgba(6, 26, 59, .06),
      0 18px 44px rgba(6, 26, 59, .10);
  --shadow-lift:
      0 2px 4px rgba(6, 26, 59, .07),
      0 30px 64px rgba(6, 26, 59, .16);
  --shadow-deep:
      0 4px 10px rgba(6, 26, 59, .10),
      0 48px 96px rgba(6, 26, 59, .24);

  /* --- Layout ------------------------------------------------- */
  --max: 1320px;
  --max-text: 68ch;
  --header-h: 92px;
  --radius: 12px;
  --gutter: clamp(20px, 4vw, 40px);

  /* --- Rhythm -------------------------------------------------
     One vertical scale. Sections use --sp-section so the page keeps
     a single breathing pattern from 360px to 1920px. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-section: clamp(72px, 9vw, 140px);

  /* --- Type ---------------------------------------------------
     Two voices, on purpose. Headings, prices and figures are set in a
     small-caps serif so the brand reads like an agency that has been on
     the street for years; everything functional - nav, forms, labels,
     body copy - is a grotesque that stays quiet at small sizes and
     holds up in a filter panel.

     Bona Nova SC is a small-caps face, which is the whole reason it is
     here rather than text-transform: uppercase on a text serif. The
     capital forms come out of the font, so a heading keeps its real
     casing in the DOM: a screen reader reads "Discover your dream home",
     and a browser still hyphenates and wraps it as a normal sentence.
     It carries an italic, which the accent phrase in the headlines
     needs, and only 400 and 700 - a rule asking for 500 resolves down
     to 400, which is the weight the design wants anyway.

     Sizes are fluid between 360px and 1440px so a 27" monitor gets a
     display line with real presence without a stack of breakpoints. */
  --display: "Bona Nova SC", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --fs-hero:    clamp(2.75rem, 1.85rem + 4.0vw, 5rem);     /* 44 -> 80  */
  --fs-display: clamp(2.25rem, 1.32rem + 4.1vw, 4rem);     /* 36 -> 64  */
  --fs-title:   clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);  /* 28 -> 44  */
  --fs-lead:    clamp(1.0625rem, .98rem + .38vw, 1.3125rem);
  --fs-body:    1.0625rem;
  --fs-small:   .9375rem;
  --fs-micro:   .8125rem;

  /* Small caps want air, not tightening. A serif set in capitals at 64px
     with -.028em of tracking closes the counters up and reads as a smear;
     a hair of positive tracking is what makes it look cut rather than
     typed. The name is kept because two rules already reference it. */
  --track-tight: .012em;    /* display sizes */
  --track-body:   0;
  --track-caps:  .16em;     /* eyebrows, labels */

  /* --- Motion -------------------------------------------------
     Four curves and nothing else. --ease is for state (hover, focus);
     --ease-out is the entrance curve everything scroll-driven uses;
     --ease-soft is for anything that travels a long way; --spring
     gives buttons and hearts a little overshoot. */
  --ease:       200ms cubic-bezier(.4, 0, .2, 1);
  --ease-out:   600ms cubic-bezier(.16, 1, .3, 1);
  --ease-soft:  900ms cubic-bezier(.22, .61, .27, 1);
  --spring:     420ms cubic-bezier(.34, 1.56, .64, 1);
  --curve-out:  cubic-bezier(.16, 1, .3, 1);
  --curve-soft: cubic-bezier(.22, .61, .27, 1);

  /* One radius scale, used everywhere: inputs 8, cards 12, pills full. */
  --r-input: 8px;
  --r-card: 12px;
  --r-lg: 22px;
  --r-pill: 999px;
}


/* ============================================================
   02  RESET & BASE
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  /* 500, not 400. Bricolage Grotesque is a low-contrast grotesque with
     open counters, and at 400 over a white ground its stems are thin
     enough that a paragraph reads as grey wash rather than as text. The
     face carries 500 as a real instance rather than a synthesised one,
     so this costs nothing and is the single biggest thing holding body
     copy on the light sections. Anything that wants to be quieter sets
     its own weight; headings and buttons already do. */
  font-weight: 500;
  line-height: 1.62;
  color: var(--body);
  background: var(--white);
  /* antialiased was thinning every stem by roughly a third of a weight
     on macOS - working directly against the line above, and only for
     some visitors, which is the worst kind of inconsistency. The
     default grayscale rendering keeps the stems the font designer
     drew. */
  text-rendering: optimizeLegibility;
  /* Archivo ships proportional figures. Prices, bed counts and stat
     numbers sit in columns, so lock the whole page to tabular lining
     figures and nothing shifts as a counter ticks. */
  font-variant-numeric: tabular-nums lining-nums;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: var(--track-tight);
  /* Capitals have no descenders to separate one line from the next, so
     a small-caps heading needs more leading than a lowercase one would
     at the same size, not less. 1.1 stacks them; 1.16 lets them breathe. */
  line-height: 1.16;
  /* Balanced wrapping keeps the last line from stranding a single word
     under a 64px headline. */
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--stone-400); color: var(--basalt-900); }

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

img { height: auto; }

/* textarea belongs here too. Left out, it keeps the UA's monospace
   default and the message box on the contact form ends up in a
   different typeface to every other field beside it. */
button, input, select, textarea { font: inherit; color: inherit; }

/* Browsers set min-inline-size: min-content on fieldset, so a fieldset
   refuses to shrink below its widest content and spills out of narrow
   columns such as the filter sidebar. None of ours rely on that. */
fieldset { min-inline-size: 0; min-width: 0; }

button { cursor: pointer; }

/* Focus: always visible, always on-brand */
:focus-visible {
  outline: 2px solid var(--stone-400);
  outline-offset: 3px;
  border-radius: 4px;
  /* Second ring in basalt so the marker survives on a sandstone
     background, where the accent alone would nearly disappear. */
  box-shadow: 0 0 0 5px rgba(6, 26, 59, .35);
}

.skip-link {
  position: absolute;
  left: 24px;
  top: -70px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top var(--ease);
}
.skip-link:focus { top: 0; }


/* ============================================================
   03  UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The eyebrow is the one place the brand signs its name on a section.
   A short sandstone rule leads into it so the label reads as a mark
   rather than as small text that failed to become a heading. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
  /* Draws itself in when the section arrives; see motion.css. */
  transform-origin: left center;
}
.eyebrow-center { justify-content: center; }
.eyebrow-center::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

/* On the dark hero and navy bands the brand gold has plenty of contrast */
.hero .eyebrow,
.page-hero .eyebrow,
.band-navy .eyebrow { color: var(--gold); }

.section-title {
  font-size: var(--fs-title);
  font-weight: 400;
  letter-spacing: var(--track-tight);
}

/* The accent word. Every section heading on the site can put one phrase
   in gold by wrapping it in <em>, and the em carries no slant - it is a
   colour change that happens to be marked up as emphasis, which is what
   it actually is. Matches the headline treatment in the hero. */
.section-title em,
.hero-title em,
h1 em.accent,
h2 em.accent,
h3 em.accent {
  font-style: normal;
  color: var(--stone-500);
}

.section-lede {
  max-width: 56ch;
  margin-top: 18px;
  font-size: var(--fs-lead);
  line-height: 1.6;
}

.gold { color: var(--gold); }

/* An italic Newsreader phrase inside an otherwise upright headline.
   Used once per page at most - it marks the promise, not the noun. */
.accent-italic {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

/* --- Buttons ------------------------------------------------ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--ease), color var(--ease),
              transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

/* A single band of light crosses every solid button on hover. It is one
   pseudo-element and one transform, so it costs nothing, and it is the
   detail that reads as "expensive" more than any amount of shadow. */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg,
              transparent 38%,
              rgba(255, 255, 255, .32) 50%,
              transparent 62%);
  transform: translateX(-120%);
  transition: transform 720ms var(--curve-out);
  pointer-events: none;
}
.btn:hover::after,
.btn:focus-visible::after { transform: translateX(120%); }

.btn:active { transform: translateY(0) scale(.985); transition-duration: 80ms; }

.btn-gold {
  background: var(--gold);
  color: var(--basalt-900);
  box-shadow: 0 1px 2px rgba(6, 26, 59, .12), 0 10px 26px rgba(240, 192, 72, .30);
}
.btn-gold:hover {
  background: var(--stone-400);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(6, 26, 59, .14), 0 18px 38px rgba(240, 192, 72, .40);
}

.btn-navy {
  background: var(--basalt-900);
  color: #fff;
  box-shadow: 0 1px 2px rgba(6, 26, 59, .16), 0 10px 26px rgba(6, 26, 59, .18);
}
.btn-navy:hover {
  background: var(--basalt-700);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(6, 26, 59, .18), 0 18px 38px rgba(6, 26, 59, .26);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.btn-ghost::after { background: linear-gradient(105deg, transparent 38%, rgba(240, 192, 72, .18) 50%, transparent 62%); }
.btn-ghost:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
  transform: translateY(-2px);
}

/* Secondary action on a dark photographic background. Uses a border and
   a readable white label rather than a white fill, so it supports the
   gold primary instead of competing with it. */
.btn-outline-light {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, .14);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 30px; font-size: 16px; border-radius: 8px; }

.btn-block { width: 100%; }

.btn-arrow .arrow { transition: transform var(--ease); }
.btn-arrow:hover .arrow { transform: translateX(4px); }


/* ============================================================
   04  HEADER
   ============================================================ */
/* At the top of a page there is no bar, only a wash that the hero runs
   up into. Once the visitor scrolls it fills in and casts a shadow,
   which is what separates it from the content passing underneath. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: transform 420ms var(--curve-out), background-color var(--ease), box-shadow var(--ease);
}

/* The wash is a pseudo-element rather than the bar's own background so
   that it can hang below the bar and dissolve down there instead of
   stopping dead at 76px.

   Both halves of the old seam came from that hard stop. A tint that
   ends mid-photograph leaves a step in brightness, and - the louder of
   the two - a backdrop-filter that ends mid-photograph draws a crisp
   line right across the frame, blurred above it and sharp below. Every
   glass header that looks like a strip laid on the page has this edge.

   Masking the layer is what removes it: the mask fades the tint and the
   blurred backdrop together, on the same curve, so the wash has no
   bottom to find. It stays at full strength through the bar's own
   height, where the type needs it, and gives up over the 56px below. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--header-h) + 56px);
  background: linear-gradient(180deg,
      rgba(5, 19, 23, .66) 0%,
      rgba(5, 19, 23, .46) 48%,
      rgba(5, 19, 23, 0) 100%);
  -webkit-backdrop-filter: blur(11px) saturate(128%);
  backdrop-filter: blur(11px) saturate(128%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, .40) 74%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, .40) 74%, transparent 100%);
  pointer-events: none;
  transition: opacity var(--ease);
}

/* Scrolled, the bar does need an edge - it is a lid over content that
   keeps moving underneath, and the words have to stay readable against
   whatever passes below. The navy is opaque enough to carry that on its
   own, so the wash steps aside rather than stacking under it, and a
   long soft shadow does the separating in place of a line. */
.site-header.is-scrolled {
  background: rgba(6, 26, 59, .93);
  box-shadow: 0 16px 44px rgba(5, 19, 23, .34);
}

.site-header.is-scrolled::before { opacity: 0; }

/* Reading down the page, the bar rides up out of the way; the first
   push back up brings it straight down again. translateY beats
   animating `top` because it never touches layout, so the fixed bar
   leaving does not reflow the page behind it. The extra pixel clears
   the box shadow, which would otherwise sit as a smudge along the top
   edge while the bar itself is gone. */
.site-header.is-hidden { transform: translateY(calc(-100% - 1px)); }

/* Every page but this one opens on a dark hero that the wash can sit in.
   Property details opens on paper, where a wash blends into nothing and
   the navigation would be white on white, so it keeps the solid bar from
   the first pixel. */
body[data-page="property"] .site-header { background: rgba(6, 26, 59, .93); }
body[data-page="property"] .site-header::before { display: none; }

.header-inner {
  /* The wash is a positioned pseudo-element, so it would otherwise paint
     over the in-flow brand and nav. */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The nav is set in the display face now, which is wider than the
     grotesque it replaced and reads as a plate rather than a toolbar.
     A plate needs air around it: too little and the first link looks
     like part of the wordmark. */
  /* Tightened from clamp(24px, 3.4vw, 56px). space-between already
     pushes these three apart; the gap only sets a floor, and at 56px a
     side it was reserving 112px in a bar that does not have it to give.
     The larger lockup is paid for here rather than out of the nav. */
  gap: clamp(20px, 2.6vw, 40px);
  height: 100%;
}

/* --- Brand -------------------------------------------------- */
/* Mark and wordmark side by side, sized by height with width:auto so
   each stays on its own aspect ratio and neither can smear.

   The mark sets the bar height: 56px of mark in a 92px bar leaves 18px
   of air top and bottom. The wordmark is held at roughly 0.72 of the
   mark, which is the ratio the two were drawn at - let the wordmark
   grow past that and REAL ESTATE starts to outweigh the monogram.

   Width is the real constraint up here, not height. The lockup is
   234px at this size against 170px before, and the bar also carries a
   ~700px nav, a phone block and a CTA, so it steps down twice on the
   way to the drawer breakpoint. */
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }

.brand-mark {
  display: block;
  width: auto;
  height: 56px;
  transition: height 320ms var(--curve-out), transform 620ms var(--curve-out);
}

.brand-wordmark {
  display: block;
  width: auto;
  height: 40px;
  transition: height 320ms var(--curve-out);
}

/* The mark lifts a little when the lockup is used as a link. It is the
   only thing on the site that moves without being asked to. */
.brand:hover .brand-mark { transform: translateY(-2px); }

/* 1200 and 1024 are where the bar is tightest: the nav is still a row,
   the CTA is still there, and the container has stopped growing. The
   lockup gives ground first because it is the only thing here that can
   without losing a link or a phone number. */
@media (max-width: 1200px) {
  :root { --header-h: 84px; }
  .site-header .brand-mark { height: 52px; }
  .site-header .brand-wordmark { height: 37px; }
}

/* Below 992 the nav is a drawer and the CTA is gone, so width stops
   being the constraint and the lockup can stand back up. */
@media (max-width: 992px) {
  :root { --header-h: 88px; }
  .site-header .brand-mark { height: 58px; }
  .site-header .brand-wordmark { height: 41px; }
}

@media (max-width: 640px) {
  :root { --header-h: 76px; }
  .site-header .brand-mark { height: 48px; }
  .site-header .brand-wordmark { height: 34px; }
}

/* Narrower than this the wordmark and the hamburger start to collide.
   The monogram alone still says KASANA to anyone who has seen the sign. */
@media (max-width: 400px) {
  .site-header .brand-wordmark { display: none; }
}

/* --- Header actions ----------------------------------------- */
.header-actions { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 22px); flex-shrink: 0; }

/* Between the tablet breakpoint and a wide desktop there is not enough
   room for the phone block, the CTA and seven nav items at full size.
   The phone number is the first thing to go - it is in the footer, on
   the contact page, and one tap away in the mobile drawer. */
@media (max-width: 1180px) {
  .phone-text { display: none; }
  .header-cta { padding: 12px 18px; font-size: 14px; }
}

.phone { display: flex; align-items: center; gap: 11px; }

.phone-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: var(--gold);
  transition: border-color var(--ease), background-color var(--ease);
}
.phone:hover .phone-icon { border-color: var(--gold); background: rgba(240, 192, 72, .12); }

.phone-text { display: flex; flex-direction: column; line-height: 1.25; }

.phone-label { font-size: 12px; color: rgba(255, 255, 255, .6); }

.phone-number { font-size: 15px; font-weight: 700; color: #fff; }

/* --- Hamburger ---------------------------------------------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform var(--ease), opacity var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   05  NAVIGATION
   ============================================================ */
.main-nav { height: 100%; }

.nav-list {
  display: flex;
  align-items: stretch;
  gap: clamp(16px, 1.9vw, 30px);
  height: 100%;
}

.nav-list > li { display: flex; }

/* The nav is set in the display face, not the grotesque.

   It is the one place on the site where the two voices swap roles:
   everything else functional is Bricolage and everything else in Bona
   Nova SC is a heading. A masthead is not really functional furniture
   though - it is the brand saying its own name six times - and small
   caps at 17px with real tracking is what makes a row of six links
   read as an engraved plate rather than as a toolbar.

   Tracking is doing most of the work. Bona Nova SC at nav size with no
   letter-spacing closes up and looks like a mistake; at .06em the
   capitals separate and the row gets the width it needs to feel
   deliberate. */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .06em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .88);
  transition: color var(--ease);
}
.nav-link:hover { color: var(--gold); }

/* Active nav state is driven by <body data-page="..."> so the header
   markup stays byte-identical on every page. */
body[data-page="home"]       .nav-link[data-nav="home"],
body[data-page="properties"] .nav-link[data-nav="properties"],
body[data-page="about"]      .nav-link[data-nav="about"],
body[data-page="services"]   .nav-link[data-nav="services"],
body[data-page="agents"]     .nav-link[data-nav="agents"],
body[data-page="contact"]    .nav-link[data-nav="contact"],
.nav-link.is-active { color: var(--gold); }

/* The underline hugs the word rather than sitting on the bottom of the
   header. A rule pinned to the header's edge reads as a tab; one
   sitting a few pixels under the capitals reads as an underline, which
   is what it is. Inset by the tracking on the right, because
   letter-spacing adds its space after the last letter and an underline
   that runs the full box is visibly longer than the word above it. */
body[data-page="home"]       .nav-link[data-nav="home"]::after,
body[data-page="properties"] .nav-link[data-nav="properties"]::after,
body[data-page="about"]      .nav-link[data-nav="about"]::after,
body[data-page="services"]   .nav-link[data-nav="services"]::after,
body[data-page="agents"]     .nav-link[data-nav="agents"]::after,
body[data-page="contact"]    .nav-link[data-nav="contact"]::after,
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: .06em;
  bottom: calc(50% - 15px);
  height: 1.5px;
  background: var(--gold);
}

/* --- Pieces used only by the mobile drawer ------------------- */
.nav-close,
.nav-mobile-actions { display: none; }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(4, 18, 43, .58);
  opacity: 0;
  transition: opacity var(--ease);
}
.nav-overlay.is-visible { opacity: 1; }


/* ============================================================
   06  HERO
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* svh, so the hero is not cut off by a mobile browser's address bar
     the way 100vh is. The vh line is the fallback for older engines. */
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 40px);
  /* Room for the scroll cue, which is pinned 30px off the bottom. The
     190px here used to be clearance for the search panel lifting up
     into it; the panel is gone and the figures below sit in normal
     flow, so this is back to what the cue actually needs. */
  padding-bottom: 150px;
  overflow: hidden;
  isolation: isolate;
  background: var(--basalt-950);
  text-align: center;
}


/* --- The moving layer ---------------------------------------
   The video and the poster are the same frame of the same place, so
   there is no jump when playback starts. Both are laid out by the
   media element rather than as a background image, because a video
   element cannot be a background and having the two travel through
   different layout systems is what produces the half second where the
   poster sits at one crop and the video snaps to another. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--basalt-950);
  /* Scaled a touch past full bleed so the scroll response in motion.css
     can move the layer without exposing a hard edge. */
  transform-origin: center 30%;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The clip pushes forward past the Tasman Bridge toward the shoreline,
     and everything worth seeing - bridge, warehouses, kunanyi, the cloud
     sitting on it - lives in the upper half of the frame for all ten
     seconds. The bottom is open water. Anchoring above centre means a
     tall, narrow viewport crops the water rather than the city.

     The poster is drawn by this same box with this same fit and is a
     frame lifted out of this same file, so the last painted pixel of
     the poster and the first painted pixel of the video are identical
     and there is no jump when playback starts. */
  object-position: 50% 42%;
  /* A little contrast and saturation put back what the scrim above
     takes out. Same treatment the inner page photographs get. */
  filter: saturate(1.16) contrast(1.08);
  /* A video element is not a paragraph. Nothing here should be
     selectable, draggable or focusable. */
  pointer-events: none;
  user-select: none;
}

/* Two scrims, not one. The vertical pass carries the headline and
   darkens the very bottom so the search panel top edge stays legible
   whatever the footage is doing down there; the radial one pulls the
   corners down so the centred column sits in a pool of light rather
   than on an evenly grey rectangle. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
      /* Neutral black, not navy, and clear through the middle.

         Two things were tinting the photograph blue. The wash was mixed
         from the brand navy, so every pixel it covered was pulled a few
         degrees toward it - a sunset came out mauve. And a second navy
         ellipse sat behind the words at up to 52%, which put the
         heaviest tint over the most interesting part of the frame. That
         ellipse is gone. Black darkens without colouring, and these
         bands are narrow: heavy at the very top where the header sits,
         heavy at the very bottom, and essentially nothing across the
         middle, where the picture is left alone.

         Legibility moved to the type instead. The headline and lede
         carry a tight contrast halo plus a soft spread, which is what
         holds white text over a bright photograph without darkening the
         photograph to do it. */
      /* Same pool as the inner-page heroes, for the same reason: the
         column is centred and the wash below is at its thinnest right
         where the words are. The clip is the Derwent at midday, so the
         middle of this frame is bright water. Black, not the navy
         ellipse that used to sit here - see the note above. */
      radial-gradient(ellipse 76% 58% at 50% 46%,
          rgba(0, 0, 0, .42) 0%,
          rgba(0, 0, 0, .27) 46%,
          rgba(0, 0, 0, 0) 78%),
      linear-gradient(to bottom,
          rgba(0, 0, 0, .62) 0%,
          rgba(0, 0, 0, .30) 18%,
          rgba(0, 0, 0, .24) 42%,
          rgba(0, 0, 0, .32) 58%,
          rgba(0, 0, 0, .50) 84%,
          rgba(0, 0, 0, .72) 100%);
}

/* There used to be a gold hairline here, pinned at var(--header-h) - a
   deliberate piece of chrome that tied the video back to the brand. It
   is gone because it sat exactly on the header's bottom edge, and a
   line drawn under the bar is the one thing a bar cannot blend past,
   however soft the wash above it becomes. */


/* --- The centred column -------------------------------------- */
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
}

.hero-eyebrow {
  color: var(--stone-400);
  margin-bottom: 26px;
  /* Gold small caps sitting above the headline, which is open sky in
     the clip - the one place the pool does not reach. */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .78), 0 2px 12px rgba(0, 0, 0, .52);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 400;
  /* Small caps at 80px need more leading than the global 1.16, not
     less: there is no descender anywhere in the line to hold two rows
     of capitals apart. */
  line-height: 1.08;
  letter-spacing: .01em;
  color: #fff;
  text-wrap: initial;   /* the line splitter does the balancing here */
  /* Matches the inner-page headline: a tight dark edge on the
     letterform, a mid spread, and a wide soft one under the block. */
  text-shadow:
      0 1px 2px rgba(0, 0, 0, .72),
      0 3px 12px rgba(0, 0, 0, .52),
      0 10px 34px rgba(0, 0, 0, .46);
}

.hero-title em {
  font-style: normal;
  color: var(--stone-500);
}

.hero-text {
  max-width: 58ch;
  margin: 26px 0 0;
  font-size: var(--fs-lead);
  line-height: 1.68;
  color: rgba(255, 255, 255, .94);
  text-shadow:
      0 1px 2px rgba(0, 0, 0, .90),
      0 2px 10px rgba(0, 0, 0, .70),
      0 6px 26px rgba(0, 0, 0, .50);
}


/* --- The four ways in ---------------------------------------
   One glass panel, four links, hairlines between them rather than
   around each one, so it reads as a single object the way a segmented
   control does and not as four buttons that happen to be adjacent. */
.hero-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 44px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .10);
  /* Prefixed first: Safari still ships only the prefixed property. */
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow:
      0 1px 0 rgba(255, 255, 255, .14) inset,
      0 24px 60px rgba(4, 18, 43, .40);
}

.hero-bar-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 15px 30px;
  border-radius: calc(var(--r-lg) - 7px);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  transition:
      background-color var(--ease),
      color var(--ease),
      transform var(--ease);
}

/* The hairline sits on the item rather than between them, so it
   survives the row wrapping on a narrow screen: the first item of
   every visual row is the one that loses it. */
.hero-bar-item + .hero-bar-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(255, 255, 255, .22);
  transition: opacity var(--ease);
}

.hero-bar-item svg {
  flex-shrink: 0;
  color: var(--stone-400);
  transition: color var(--ease);
}

.hero-bar-item:hover,
.hero-bar-item:focus-visible {
  background: var(--stone-500);
  color: var(--basalt-900);
  transform: translateY(-1px);
}
.hero-bar-item:hover svg,
.hero-bar-item:focus-visible svg { color: var(--basalt-900); }

/* A hovered item paints its own ground, so the hairline in front of
   the next one would cut across the fill. Drop both sides of it. */
.hero-bar-item:hover::before,
.hero-bar-item:hover + .hero-bar-item::before,
.hero-bar-item:focus-visible::before,
.hero-bar-item:focus-visible + .hero-bar-item::before { opacity: 0; }


/* --- Trust row ---------------------------------------------- */
.trust {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
}

.avatars { display: flex; }

.avatars li + li { margin-left: -14px; }

.avatars img {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-800);
}

.trust-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  text-align: left;
}
.trust-text strong { font-size: 16px; font-weight: 700; color: #fff; }
.trust-text span { font-size: 14px; color: rgba(255, 255, 255, .68); }

.trust-arrow { margin-left: 6px; opacity: .85; }


/* --- Kept: the video-play button used on the inner pages ----- */
.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: color var(--ease);
}
.btn-video:hover { color: var(--gold); }

.btn-video .play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  transition: background-color var(--ease), color var(--ease), transform var(--ease);
}
.btn-video:hover .play {
  background: var(--gold);
  color: var(--navy-900);
  transform: scale(1.06);
}


/* ============================================================
   07  FORM PRIMITIVES

   What is left of the home page search panel.

   The panel itself is gone - the hero runs straight into the figures
   now - and with it went the tab group, the dual price slider, the
   four-column field grid and the live status line, none of which
   appeared anywhere else on the site. These are the pieces that did:
   .field is used by the contact form and the enquiry form on a
   listing, and .input-wrap is used by the listing page's filter
   sidebar. They stay here rather than moving to pages.css because
   they are primitives, and primitives live with the reset.
   ============================================================ */
.field { display: grid; gap: 7px; min-width: 0; }

.field > label,
.field > legend {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.input-wrap input { padding-left: 40px; }

.input-wrap input::placeholder { color: #6b7480; }

.input-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--body) 50%),
    linear-gradient(135deg, var(--body) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.input-wrap input:hover,
.input-wrap select:hover { border-color: #CBD2DA; }

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 192, 72, .16);
  outline: none;
}


/* ============================================================
   08  STATS
   ============================================================ */
.stats-section {
  position: relative;
  z-index: 2;
  padding-bottom: var(--sp-section);
  background: var(--page);
}

.stats-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  /* This used to be -104px, lifting the card up over the bottom of the
     hero photograph. The hero is a video now and the search panel does
     that job instead, so the card sits on the page like any other
     block - two objects overlapping the same edge is one too many. */
  margin-top: 0;
  padding: 52px 40px;
  background:
      radial-gradient(120% 160% at 50% -30%, rgba(240, 192, 72, .16), transparent 60%),
      var(--basalt-900);
  border: 1px solid rgba(240, 192, 72, .16);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

.stat {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px 10px;
  text-align: center;
}

.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .1); }

.stat-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  background: rgba(240, 192, 72, .14);
  border: 1px solid rgba(240, 192, 72, .4);
  border-radius: 50%;
  color: var(--gold);
}

.stat-number {
  font-family: var(--display);
  font-size: clamp(2.25rem, 1.6rem + 1.6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums lining-nums;
}

.stat-label {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}


/* ============================================================
   09  FEATURED PROPERTIES
   ============================================================ */
.featured {
  padding: var(--sp-section) 0;
  background: var(--white);
}


/* --- Section heads -------------------------------------------
   Two arrangements, one set of parts. The default is the split head
   the inner pages use - title left, link right, hairline under both.
   .section-head-center is the stacked one: badge, title, lede, all
   centred, no rule. A centred head that also carried a full-width
   hairline would read as a divider between two sections rather than
   as the opening of one. */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  /* A hairline under every section head, so each block on the page opens
     the same way and the rhythm is legible before a word is read. */
  border-bottom: 1px solid var(--line);
}

.section-head .section-title { max-width: 18ch; }
.band-navy .section-head { border-bottom-color: rgba(255, 255, 255, .14); }

.section-head-center {
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: var(--sp-6);
  padding-bottom: 0;
  border-bottom: 0;
  text-align: center;
}

.section-head-center .section-title {
  max-width: 26ch;
  margin-top: 18px;
}

.section-head-center .section-lede {
  max-width: 48ch;
  margin-top: 16px;
}


/* --- Section badge -------------------------------------------
   The small cream capsule that names what the section is before the
   heading says it at length. Cream rather than white so it still
   reads as an object on a white ground, and the icon is the only
   thing in it carrying the gold. */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border: 1px solid var(--cream-deep);
  border-radius: var(--r-pill);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}
.section-badge svg { flex-shrink: 0; color: var(--stone-700); }

.band-navy .section-badge {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}
.band-navy .section-badge svg { color: var(--stone-400); }


/* --- The filter ----------------------------------------------
   A segmented control: one cream trough, one gold pill that travels
   between positions, and the labels riding on top of both.

   The pill is a single element rather than a background on the
   checked tab, because a background can only cross-fade and a pill
   that moves is what makes the control feel like an object. Its
   position arrives from script.js as two custom properties and the
   transition lives here, so a reduced-motion visitor gets the move
   for free from the block at the foot of this file - the script does
   not know or care which it is.

   Before the first measurement the pill has no width. --pill-w
   defaults to 0 and .is-placed is what fades it in, so it never
   slides in from the left edge on load. */
.filter-tabs {
  position: relative;
  /* flex + fit-content + auto margins, not inline-flex. An inline-flex
     box is centred by the parent's text-align, and this fieldset is a
     sibling of the section head rather than a child of it, so there is
     no centred parent to inherit from. Sizing it to its contents and
     letting the auto margins do the work centres it against the
     container itself and keeps working when the tabs wrap. */
  display: flex;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto var(--sp-7);
  padding: 6px;
  border: 1px solid var(--cream-deep);
  border-radius: var(--r-card);
  background: var(--cream);
}

/* A fieldset carries a default border, padding and min-width that
   would fight all of the above. */
.filter-tabs,
.filter-tabs > legend { min-width: 0; }

.filter-wrap { display: flex; justify-content: center; }

.filter-pill {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 0;
  width: var(--pill-w, 0);
  height: calc(100% - 12px);
  border-radius: calc(var(--r-card) - 4px);
  background: var(--stone-500);
  box-shadow: 0 4px 14px rgba(240, 192, 72, .40);
  opacity: 0;
  transform: translateX(var(--pill-x, 0));
  pointer-events: none;
}

/* The transition arrives WITH .is-placed rather than before it. A style
   change that adds a transition property and changes the transitioned
   value in the same frame does not animate, so the very first placement
   snaps into position - which is what is wanted, because animating from
   a width of zero in the corner is not an entrance, it is a glitch.
   Every move after that has the transition already on the element and
   plays properly.

   Doing it this way also means the initial placement needs no
   requestAnimationFrame, and a tab that is restored from the bfcache or
   opened in the background - where no animation frame is ever served -
   still comes back with the pill under the right label. */
.filter-pill.is-placed {
  opacity: 1;
  transition:
      transform 420ms var(--curve-out),
      width     420ms var(--curve-out);
}

.filter-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: calc(var(--r-card) - 4px);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
  user-select: none;
  transition: color var(--ease), background-color var(--ease);
}

/* The input is hidden from sight, never from the accessibility tree:
   it is still the thing that is focused, checked and arrowed between. */
.filter-tab input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.filter-tab svg { flex-shrink: 0; color: var(--stone-700); transition: color var(--ease); }

.filter-tab:hover { color: var(--ink); background: rgba(240, 192, 72, .18); }

/* The count sits in its own capsule so the two numbers in a row line
   up whatever the label beside them is doing. */
.filter-tab-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(6, 26, 59, .08);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--body);
  transition: background-color var(--ease), color var(--ease);
}

.filter-tab:has(input:checked) {
  color: var(--basalt-900);
  background: transparent;
}
.filter-tab:has(input:checked) svg { color: var(--basalt-900); }
.filter-tab:has(input:checked) .filter-tab-count {
  background: rgba(6, 26, 59, .16);
  color: var(--basalt-900);
}

/* Without :has() the pill is the only indication of the checked tab.
   It is a gold capsule directly under the label, which is enough -
   this is a progressive enhancement, not a fallback that has to look
   identical. The focus ring below is not optional either way. */
.filter-tab:focus-within {
  outline: 2px solid var(--stone-700);
  outline-offset: 2px;
}


/* --- Grid ----------------------------------------------------- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.property-card.is-hidden { display: none; }

/* The swap. script.js fades the grid down, changes which cards are
   hidden while nothing is legible, then plays the survivors back in.
   Both are on the grid rather than on each card so a card that was
   already on screen animates too - it has just moved, and moving
   without acknowledging it is what makes a filter feel broken. */
@keyframes cardExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(.96); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

html.motion .property-grid.grid-exiting .property-card {
  animation: cardExit 190ms var(--curve-out) forwards;
}

html.motion .property-grid.grid-entering .property-card {
  animation: cardEnter 420ms var(--curve-out) both;
}

/* Stagger the entrance across the row. Six cards, so six positions;
   anything beyond the sixth simply arrives with the sixth, which is
   the harmless end of the ramp. */
html.motion .property-grid.grid-entering .property-card:nth-child(2) { animation-delay: 50ms; }
html.motion .property-grid.grid-entering .property-card:nth-child(3) { animation-delay: 100ms; }
html.motion .property-grid.grid-entering .property-card:nth-child(4) { animation-delay: 150ms; }
html.motion .property-grid.grid-entering .property-card:nth-child(5) { animation-delay: 200ms; }
html.motion .property-grid.grid-entering .property-card:nth-child(6) { animation-delay: 250ms; }

.grid-more {
  margin: var(--sp-7) 0 0;
  text-align: center;
}


/* --- Card -----------------------------------------------------
   The photograph carries the price and the status; the body carries
   the words. Putting the price on the image is what lets the body
   open on the address instead - and a price in white over a scrim is
   read before anything else on the card, which is the order people
   actually look in. */
.property-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(6, 26, 59, .14);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
      transform var(--ease-out),
      box-shadow var(--ease-out),
      border-color var(--ease-out);
}
.property-card:hover {
  transform: translateY(-8px);
  border-color: var(--stone-500);
  box-shadow: var(--shadow-lift);
}

/* The whole card is the click target. The title keeps the only real anchor
   and its ::after stretches across the card, so there is still exactly one
   link in the accessibility tree and middle click, ctrl click and "open in
   new tab" all behave like a normal link. */
.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* The heart sits above that overlay, so favouriting can never navigate.
   No stopPropagation needed: the click never reaches the link. */
.property-card .fav { z-index: 2; }

/* Move the focus ring onto the whole card rather than the title text.
   Guarded, so browsers without :has() keep the default outline. */
@supports selector(:has(*)) {
  .property-card:has(.card-title a:focus-visible) {
    outline: 2px solid var(--stone-400);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(4, 18, 43, .35);
  }
  .property-card .card-title a:focus-visible { outline: none; }
}


/* --- Card: the photograph ------------------------------------ */
.card-media {
  position: relative;
  /* A fixed height rather than an aspect ratio, because three cards in
     a row have to agree on where their bodies start: a 4:3 box is a
     different height in a 1fr column at 1320px than at 1000px, and the
     titles stop lining up the moment the grid is not exactly three
     across. */
  height: 300px;
  overflow: hidden;
  background: var(--basalt-800);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--curve-soft);
}
.property-card:hover .card-media img { transform: scale(1.07); }

/* The scrim is a real element rather than a pseudo on .card-media,
   because the media box is also what data-img-reveal clips: a gradient
   painted by the frame would be clipped with the photograph and the
   price would wipe on with it. */
.card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
      rgba(4, 18, 43, .82) 0%,
      rgba(4, 18, 43, .52) 20%,
      rgba(4, 18, 43, .12) 46%,
      transparent 70%);
  pointer-events: none;
}

.card-badges {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 6px 12px;
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.badge-sale { background: var(--stone-500); color: var(--basalt-900); }
.badge-rent { background: var(--basalt-900); color: #fff; }
.badge-type {
  background: rgba(4, 18, 43, .62);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.fav {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 0;
  border-radius: 50%;
  color: var(--basalt-900);
  box-shadow: 0 2px 10px rgba(4, 18, 43, .18);
  transition: transform var(--spring), background-color var(--ease), color var(--ease);
}
.fav:hover { transform: scale(1.12); background: #fff; }

.fav[aria-pressed="true"] { color: var(--gold); }
.fav[aria-pressed="true"] svg path { fill: var(--gold); stroke: var(--gold); }
.fav.is-bumped { transform: scale(1.28); }

/* Price, over the photograph. Set in the display serif at a size
   nothing else on the card competes with; the /week suffix drops back
   to the quiet grotesque because a weekly rent and a sale price are
   different quantities and must not read as the same figure. */
.price {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .60), 0 4px 16px rgba(0, 0, 0, .40);
}
.price .per {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .78);
}


/* --- Card: the body ------------------------------------------ */
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 20px;
}

.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .012em;
  line-height: 1.25;
}
.card-title a { transition: color var(--ease); }
.card-title a:hover { color: var(--gold-ink); }

.address {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.address svg { flex-shrink: 0; margin-top: 3px; color: var(--stone-700); }

/* Four stats, fixed at four columns, hairline top and bottom. The
   count is fixed because the row is a table of the same four facts on
   every card, and a row that sometimes holds three leaves the fourth
   column of the card beside it with nothing to align to. */
.meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 0;
  padding: 13px 0;
  border-top: 1px solid rgba(6, 26, 59, .10);
  border-bottom: 1px solid rgba(6, 26, 59, .10);
  font-size: 13px;
}

.meta li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.meta-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--cream);
  color: var(--stone-700);
}

.meta-value {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  /* An area reads "612 m²" and must not break between the figure and
     its unit when the column is narrow. */
  white-space: nowrap;
}

.meta-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--muted);
}

/* The blurb is the one sentence of voice on the card, and it is the
   part that varies most in length. Pushing it to the bottom of the
   body keeps the stat rows of three adjacent cards on the same line
   whatever it says. */
.card-blurb {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--body);
}


/* ============================================================
   10  FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  padding-top: 96px;
  background: var(--basalt-950);
  color: rgba(255, 255, 255, .66);
  overflow: hidden;
  isolation: isolate;
}

/* A hairline of sandstone across the very top, brightest in the middle.
   It is the seam between the page and the footer. */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 192, 72, .55) 50%, transparent);
}

/* The oversized wordmark behind the footer. Clamped so it scales with
   the viewport instead of overflowing a phone, and drawn as a gold
   hairline outline at 13% - just enough separation from the ground to
   be felt rather than read.

   Centring it needed two fixes.

   It used to be pinned with left: 50% and translateX(-50%), which
   centres the BOX. The box is not the word: letter-spacing adds its
   space after every character including the last, so the word carried
   a trailing gap that nothing balanced on the left and the ink sat
   half a space left of centre. Tracking is a flex gap now, and a gap
   only exists between items, so six letters centre exactly.

   And it used to hang off the top edge at -.16em, which put the caps
   half outside the footer and left the word sliced along the seam.
   inset: 0 with align-items: center sits it in the middle of the
   block, whole.

   The transform is deliberately not used here. It belongs to the
   letters, which need it for the entrance. */
.footer-watermark {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .06em;
  font-family: var(--display);
  font-size: clamp(7rem, 21vw, 20rem);
  font-weight: 500;
  line-height: .8;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 192, 72, .13);
  user-select: none;
  pointer-events: none;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-brand .brand-mark { height: 46px; }
.footer-brand .brand-wordmark { height: 33px; }

.footer-brand p {
  max-width: 34ch;
  margin-top: 20px;
  font-size: var(--fs-small);
  line-height: 1.65;
}

/* Each office is a small block, so the city name gets its own line in
   caps and the phone number sits under it rather than beside it. */
.office-city {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--stone-400);
}
.footer-contact li + li { margin-top: 22px; }

.footer-col h2 {
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}

.footer-col li + li { margin-top: 11px; }

.footer-col a,
.footer-col li { font-size: 15px; }

/* Footer links draw a sandstone rule under themselves rather than
   changing colour, which keeps the column reading as one block. */
.footer-col a {
  position: relative;
  transition: color var(--ease);
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 420ms var(--curve-out);
}
.footer-col a:hover { color: var(--stone-300); }
.footer-col a:hover::after { transform: scaleX(1); transform-origin: left center; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px;
}

.footer-bottom ul { display: flex; gap: 24px; }
.footer-bottom a:hover { color: var(--gold); }


/* ============================================================
   11  RESPONSIVE
   ============================================================ */

/* --- <= 1200px : the nav tightens, the phone loses its label -
   The hero does not change shape here. It used to be a two column grid
   that had to stack, and those rules stacked it; it is a single centred
   column at every width now, so there is nothing to collapse and it
   keeps its full height all the way down. */
@media (max-width: 1200px) {
  /* 18px, not 24: this is the band where the bar is tightest -
     nav still a row, CTA still present, container done growing. */
  .nav-list { gap: 18px; }

  .phone-text { display: none; }
}

/* --- <= 992px : hamburger nav, 2x2 stats, 2-col grid -------- */
@media (max-width: 992px) {
  .hamburger { display: flex; }

  .header-cta { display: none; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: min(340px, 86vw);
    height: 100dvh;
    padding: 82px 26px 32px;
    background: var(--navy-900);
    box-shadow: -20px 0 50px rgba(6, 14, 22, .4);
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
  }

  .main-nav.is-open { transform: translateX(0); }

  .nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    color: #fff;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    height: auto;
  }

  .nav-list > li { display: block; }

  .nav-link {
    width: 100%;
    height: auto;
    padding: 13px 2px;
    font-size: 19px;
    justify-content: flex-start;
  }

  /* In the drawer the links are stacked and full width, so an underline
     spanning the box would run to the far edge of the panel. It becomes
     a short gold rule under the first few letters instead. */
  body[data-page="home"]       .nav-link[data-nav="home"]::after,
  body[data-page="properties"] .nav-link[data-nav="properties"]::after,
  body[data-page="about"]      .nav-link[data-nav="about"]::after,
  body[data-page="services"]   .nav-link[data-nav="services"]::after,
  body[data-page="agents"]     .nav-link[data-nav="agents"]::after,
  body[data-page="contact"]    .nav-link[data-nav="contact"]::after,
  .nav-link.is-active::after { bottom: 6px; left: 2px; right: auto; width: 28px; }

  .nav-mobile-actions {
    display: grid;
    gap: 16px;
    margin-top: auto;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }

  .phone-block { display: grid; gap: 2px; }
  .phone-block .phone-label { font-size: 12px; color: rgba(255, 255, 255, .6); }
  .phone-block .phone-number { font-size: 17px; font-weight: 700; color: #fff; }

  .hero-title { font-size: 54px; }

  .hero-bar-item { padding: 14px 22px; font-size: 14px; }

  /* Three across still fits here; it is only below 640 that the icons
     have to go and the tabs have to share the full width. */
  .filter-tab { padding: 11px 16px; }

  .property-card .card-media { height: 260px; }

  .stats-card {
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 20px;
    padding: 40px 28px;
  }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(2n) { border-left: 1px solid rgba(255, 255, 255, .1); }

  .property-grid { grid-template-columns: repeat(2, 1fr); }

  .featured { padding: 90px 0; }

  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

/* --- <= 640px : compact two-column cards -------------------- */
@media (max-width: 640px) {
  .container { padding-inline: 20px; }

  .hero-title { font-size: 42px; }

  .hero {
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 150px;
  }

  /* Phone widths crop hard horizontally. The clip's subject - bridge,
     shoreline, mountain - sits in a narrow band across the upper middle
     of the frame, so aim the crop there rather than at the open water
     that fills the bottom two thirds. */
  .hero-video { object-position: 50% 38%; }

  .hero-text { font-size: 16px; }

  /* Two by two, not a wrapped row. Four items wrapping 3 + 1 leaves a
     stranded pill under three others, and the divider maths stops
     making sense the moment the rows are uneven. */
  .hero-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 100%;
    margin-top: 34px;
  }
  .hero-bar-item {
    justify-content: center;
    padding: 14px 10px;
    font-size: 13px;
  }
  /* The hairlines were drawn for a single row. In a grid they would cut
     across the middle of it. */
  .hero-bar-item + .hero-bar-item::before { display: none; }

  .trust { flex-wrap: wrap; gap: 14px; }
  .trust-arrow { display: none; }

  .section-title { font-size: 27px; }

  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .btn { width: 100%; }
  .section-head-center { align-items: center; }
  .section-head-center .btn { width: auto; }

  /* The filter fills the width and the tabs share it evenly, so the
     three of them read as one control rather than as a short bar
     floating in a wide gutter. */
  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    padding: 5px;
  }
  .filter-tab {
    justify-content: center;
    gap: 6px;
    padding: 11px 6px;
    font-size: 12.5px;
  }
  .filter-tab svg { display: none; }
  .filter-tab-count { min-width: 19px; padding: 1px 5px; font-size: 10.5px; }

  .stats-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 8px;
    padding: 28px 16px;
  }
  .stat { min-width: 0; padding-inline: 4px; }
  .stat-icon { width: 44px; height: 44px; margin-bottom: 6px; }
  .stat-number { font-size: clamp(28px, 7vw, 36px); }
  .stat-label { font-size: 10px; letter-spacing: .04em; }

  .property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Shared by featured, listing and similar-property cards. */
  .property-card { min-width: 0; }
  .property-card .card-media { height: 190px; }
  .property-card .card-body { padding: 12px; overflow-wrap: anywhere; }
  .property-card .price { left: 10px; right: 10px; bottom: 10px; font-size: clamp(19px, 5vw, 23px); }
  .property-card .price .per { font-size: 11px; }
  .property-card .card-title { font-size: 15px; line-height: 1.3; }
  .property-card .address { gap: 4px; font-size: 12px; }
  .property-card .address svg { width: 12px; height: 12px; }

  /* Four icon-and-figure columns will not fit in half a phone. Two by
     two, laid out along the row instead of stacked, so each fact reads
     as one line rather than as three stacked fragments. */
  .property-card .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
    margin-top: 12px;
    padding: 10px 0;
  }
  .property-card .meta li { flex-direction: row; gap: 6px; text-align: left; }
  .property-card .meta-icon { width: 26px; height: 26px; border-radius: 7px; }
  .property-card .meta-icon svg { width: 14px; height: 14px; }
  .property-card .meta-value { font-size: 12px; }
  .property-card .meta-label { display: none; }

  .property-card .card-blurb { display: none; }

  /* Two badges and the heart do not fit across a card this narrow -
     the second badge ends up underneath the heart. The deal is the one
     that has to be on the photograph; the type is already in the card
     below it and on the listing page filters, so it is the one that
     goes. */
  .property-card .card-badges { top: 8px; left: 8px; gap: 4px; }
  .property-card .badge-type { display: none; }
  .property-card .badge { padding: 5px 8px; font-size: 9px; letter-spacing: .04em; }
  .property-card .fav { top: 6px; right: 6px; }

  .featured { padding: 74px 0; }

  .footer-inner { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   12  MOTION & PRINT PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .nav-overlay { display: none; }
  .hero { min-height: auto; padding: 40px 0; }
}
