/* Valerie Frei-Betancur, Realtor. Black, white, gold. Fraunces + Instrument Sans. */

:root {
  --black: #000;
  --white: #fff;
  --gold: #c2a14d;        /* fills, rules, text on black */
  --gold-deep: #7a5f1c;   /* gold text on white (passes AA) */
  --gold-pale: #ead9a4;
  --gray: #4d4d4d;        /* secondary text on white */
  --gray-on-black: #bdbdbd;
  --line: #dcd8cc;
  --wash: #f4f4f2;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --t-small: 0.889rem;
  --t-body: 1rem;
  --t-lead: 1.25rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2rem, 1.4rem + 2.4vw, 3.157rem);
  --t-h1: clamp(2.6rem, 1.6rem + 4.4vw, 4.6rem);

  --gutter: clamp(calc(20 * var(--px)), 5vw, calc(72 * var(--px)));
  --section: clamp(calc(80 * var(--px)), 11vw, calc(160 * var(--px)));
  --max: calc(1240 * var(--px));

  /* One pixel of the layout. Every px length outside the desktop-only blocks is written as
     calc(N * var(--px)), so that tablets can show the phone layout scaled up: there --px grows
     with the window (see the tablet block at the end of this file). Everywhere else it is 1px.
     New rules for phones should use it too, or they will not scale on tablets. */
  --px: 1px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: calc(1 * var(--px)); }
h1, h2, h3, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
p { text-wrap: pretty; }
:focus-visible { outline: calc(3 * var(--px)) solid var(--gold); outline-offset: calc(3 * var(--px)); }
.sr { position: absolute; width: calc(1 * var(--px)); height: calc(1 * var(--px)); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: var(--section); }
.band-black { background: var(--black); color: var(--white); }
.band-wash { background: var(--wash); }
.lead { font-size: var(--t-lead); line-height: 1.55; max-width: 34em; }
.muted { color: var(--gray); }
.band-black .muted { color: var(--gray-on-black); }
.measure { max-width: 36em; }
.stack > * + * { margin-top: 1.1em; }
.key-rule { width: clamp(calc(120 * var(--px)), 14vw, calc(190 * var(--px))); height: auto; margin: 0 0 calc(36 * var(--px)); }
.gold-rule { width: calc(72 * var(--px)); height: calc(2 * var(--px)); background: var(--gold); border: 0; margin: 0 0 calc(32 * var(--px)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.5em;
  border: calc(2 * var(--px)) solid var(--gold);
  border-radius: calc(2 * var(--px));
  background: var(--gold);
  color: var(--black);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--black); color: var(--gold-pale); }
.band-black .btn:hover, .hero .btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn-line { background: transparent; border-color: currentColor; color: inherit; }
.btn-line:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.text-link { font-weight: 600; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: calc(16 * var(--px));
  padding: calc(22 * var(--px)) var(--gutter);
  border-bottom: calc(1 * var(--px)) solid var(--line);
}
.home .site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  border-bottom: 0; padding-bottom: calc(72 * var(--px));
  background: linear-gradient(to bottom, var(--white) 0%, var(--white) 52%, rgb(255 255 255 / 0.7) 72%, rgb(255 255 255 / 0) 100%);
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
/* logo: inline SVG; lettering follows text colour, the key stays gold */
.logo { display: block; height: clamp(calc(46 * var(--px)), 3vw + calc(30 * var(--px)), calc(66 * var(--px))); width: auto; overflow: visible; }
.logo path { fill: currentColor; }
.logo .lg-key { fill: #c3a049; }
.brand-name { font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); letter-spacing: -0.01em; }
.brand-role { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gray); margin-top: calc(6 * var(--px)); }
.menu .brand-role { color: var(--gray-on-black); }
.header-tools { display: flex; align-items: center; gap: clamp(calc(12 * var(--px)), 2vw, calc(28 * var(--px))); }

.lang { display: flex; border: calc(1 * var(--px)) solid currentColor; border-radius: calc(2 * var(--px)); }
.lang button {
  padding: calc(7 * var(--px)) calc(11 * var(--px)); border: 0; background: transparent; color: inherit;
  font: 600 0.8rem/1 var(--sans); cursor: pointer;
}
.lang button[aria-pressed='true'] { background: var(--gold); color: var(--black); }

.menu-btn {
  width: calc(48 * var(--px)); height: calc(48 * var(--px)); padding: 0;
  display: grid; place-content: center; gap: calc(7 * var(--px));
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.menu-btn i { display: block; width: calc(30 * var(--px)); height: calc(2 * var(--px)); background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.menu-btn[aria-expanded='true'] i:nth-child(1) { transform: translateY(calc(9 * var(--px))) rotate(45deg); }
.menu-btn[aria-expanded='true'] i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded='true'] i:nth-child(3) { transform: translateY(calc(-9 * var(--px))) rotate(-45deg); }

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column;
  background: var(--black); color: var(--white);
  visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s;
  overflow-y: auto;
}
.menu.open { visibility: visible; opacity: 1; }
.menu-top { display: flex; justify-content: space-between; align-items: center; padding: calc(22 * var(--px)) var(--gutter); }
.menu nav { flex: 1; display: flex; align-items: center; padding: calc(24 * var(--px)) var(--gutter) calc(64 * var(--px)); }
.menu li + li { margin-top: clamp(calc(8 * var(--px)), 2vh, calc(20 * var(--px))); }
.menu nav a {
  font-family: var(--serif); font-size: clamp(2.2rem, 1.4rem + 4vw, 4rem); line-height: 1.1;
  text-decoration: none; border-bottom: calc(2 * var(--px)) solid transparent;
}
.menu nav a:hover, .menu nav a[aria-current='page'] { border-bottom-color: var(--gold); }
.menu-foot { padding: 0 var(--gutter) calc(32 * var(--px)); color: var(--gray-on-black); font-size: var(--t-small); }
.menu-foot a { color: var(--white); }

/* ---------- logo intro, on every page load ----------
   1. the key appears on its own, out to the right, and plunges into place like a key into a lock
   2. on impact the V's flourish draws and the letters arrive
   3. the key then turns twice and settles; the name line and tagline follow */
@media (prefers-reduced-motion: no-preference) {
  /* fade and plunge run on the stage; the turn itself is pre-rendered frames drawn by site.js */
  .site-header .key3d-stage { opacity: 0; animation: key-appear 0.35s ease 0.1s both, key-plunge 0.42s 0.4s both; }
  .site-header .lg-v { fill-opacity: 0; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: lg-draw 1s cubic-bezier(0.6, 0, 0.3, 1) 0.68s forwards, lg-fill 0.5s ease 1.38s forwards; }
  .site-header .lg-letter { opacity: 0; transform: translateY(calc(10 * var(--px))); animation: lg-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.88s + var(--i) * 0.07s) forwards; }
  .site-header .lg-tag { opacity: 0; animation: lg-fade 0.4s ease calc(1.48s + var(--i) * 0.045s) forwards; }
  .site-header .brand-role { opacity: 0; animation: lg-fade 0.6s ease 2.5s forwards; }
  .header-tag { opacity: 0; animation: lg-fade 0.7s ease 2.8s forwards; }
}
@keyframes key-appear { from { opacity: 0; scale: 0.92; } to { opacity: 1; scale: 1; } }
/* a brief beat out to the right, then straight home with a small knock */
@keyframes key-plunge {
  0%   { translate: 24% 0; animation-timing-function: cubic-bezier(0.45, 0, 0.85, 0.55); }
  55%  { translate: -2.2% 0; animation-timing-function: ease-out; }
  80%  { translate: 0.8% 0; animation-timing-function: ease-in-out; }
  100% { translate: 0 0; }
}
/* Two full turns about the shaft, slowing into place, with a small settle at the end.
   No filter or opacity here: either one flattens the layers and the key loses its thickness. */
@keyframes key-spin {
  0%   { transform: rotateX(720deg); animation-timing-function: cubic-bezier(0.3, 0.3, 0.25, 1); }
  84%  { transform: rotateX(-9deg); animation-timing-function: ease-in-out; }
  93%  { transform: rotateX(3deg); animation-timing-function: ease-in-out; }
  100% { transform: rotateX(0deg); }
}
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-fill { to { fill-opacity: 1; stroke-width: 0; } }
@keyframes lg-rise { to { opacity: 1; transform: none; } }
@keyframes lg-fade { to { opacity: 1; } }

/* ---------- header key: a flat key that moves on its own, with a pre-rendered 3D turn ---------- */
.logo-wrap { position: relative; display: block; width: fit-content; }
.key3d-stage { position: absolute; inset: 0; pointer-events: none; }
.has-key3d .logo .lg-key { visibility: hidden; }
.key-flat { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity 0.3s ease; }
.key-flat path { fill: #c3a049; }
/* The rendered frame covers the key plus room to turn: placed over the key in the logo's own
   562.33 x 146.77 box, with the key's shaft on the frame's mid-line. */
.key-turn { position: absolute; left: 31.62%; top: 21.94%; width: 69.43%; height: 91.72%; opacity: 0; transition: opacity 0.3s ease; }
.key3d-stage.turning .key-flat { opacity: 0; transition-duration: 0.06s; }
.key3d-stage.turning .key-turn { opacity: 1; transition-duration: 0.06s; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--black); color: var(--white);
  overflow: hidden;
}
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.64) 45%, rgb(0 0 0 / 0.88)); }
.hero-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(calc(220 * var(--px)), 0.8fr) minmax(0, 1.15fr) clamp(calc(340 * var(--px)), 30vw, calc(460 * var(--px)));
  gap: clamp(calc(24 * var(--px)), 3vw, calc(48 * var(--px)));
  align-items: end;
  padding: calc(200 * var(--px)) var(--gutter) 0;
  max-width: calc(1560 * var(--px)); width: 100%; margin-inline: auto;
}
.hero-portrait { position: relative; align-self: end; margin: 0 0 0 calc(14 * var(--px)); }
.hero-portrait::before {
  content: ''; position: absolute; inset: calc(-14 * var(--px)) calc(14 * var(--px)) 0 calc(-14 * var(--px));
  border: calc(2 * var(--px)) solid var(--gold); border-bottom: 0; z-index: -1;
}
.hero-portrait img { width: 100%; height: auto; max-height: 60vh; aspect-ratio: 1; object-fit: contain; object-position: center bottom; }
.hero-copy { align-self: center; padding-bottom: clamp(calc(32 * var(--px)), 6vh, calc(80 * var(--px))); }
.hero-copy h1 { font-size: clamp(2.6rem, 1.2rem + 3.8vw, 4.8rem); line-height: 0.98; letter-spacing: -0.025em; }
.hero-copy .lead { margin-top: calc(28 * var(--px)); max-width: 22em; color: var(--white); }
.hero-copy .family { margin-top: calc(20 * var(--px)); font-family: var(--serif); font-style: italic; font-size: var(--t-lead); color: var(--gold); }

/* the yard sign: a photographed white wooden post, with the panel as its own layer so it
   can settle after one swing. Text and button sit on the panel as real HTML. */
.sign { position: relative; width: 100%; max-width: calc(460 * var(--px)); align-self: end; justify-self: end; }
.sign-post-img { width: 100%; height: auto; }
.sign-hang {
  position: absolute; left: 6.71%; top: 15.57%; width: 75.04%;
  transform-origin: 50% 0;
  animation: sign-settle 2.6s cubic-bezier(0.3, 0, 0.3, 1) 0.3s both;
}
.sign-hang > img { width: 100%; height: auto; filter: drop-shadow(0 calc(10 * var(--px)) calc(18 * var(--px)) rgb(0 0 0 / 0.35)); }
@keyframes sign-settle {
  0% { transform: rotate(5deg); } 22% { transform: rotate(-3.6deg); } 44% { transform: rotate(2.3deg); }
  64% { transform: rotate(-1.3deg); } 82% { transform: rotate(0.6deg); } 100% { transform: rotate(0); }
}
.sign-panel {
  position: absolute; inset: 15.5% 6% 4% 6%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.45em;
  color: var(--black); text-align: center; container-type: inline-size;
}
.sign-title { font-family: var(--serif); font-size: clamp(1.7rem, 15cqw, 2.9rem); line-height: 1; letter-spacing: -0.01em; }
.sign-text { font-size: clamp(0.72rem, 5cqw, 0.92rem); line-height: 1.3; max-width: 18em; }
.sign-panel .btn { padding: 0.6em 1.1em; font-size: clamp(0.78rem, 5.4cqw, 0.98rem); margin-top: 0.15em; }
.sign-panel .btn:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.sign-rider { font-size: clamp(0.66rem, 4.2cqw, 0.8rem); font-weight: 600; color: var(--gold-deep); }

/* client appreciation slideshow */
.moments { margin-top: clamp(calc(56 * var(--px)), 7vw, calc(96 * var(--px))); }
.slides { display: flex; gap: calc(14 * var(--px)); overflow-x: auto; scroll-snap-type: x proximity; padding-inline: var(--gutter); scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { height: clamp(calc(260 * var(--px)), 34vw, calc(440 * var(--px))); width: auto; max-width: none; flex: none; scroll-snap-align: center; background: #161616; }
.slide-nav { display: flex; gap: calc(10 * var(--px)); justify-content: flex-end; padding: calc(20 * var(--px)) var(--gutter) 0; }
.slide-nav button { width: calc(52 * var(--px)); height: calc(52 * var(--px)); border: calc(1 * var(--px)) solid var(--gold); border-radius: 50%; background: transparent; color: var(--gold); font: 400 1.8rem/1 var(--serif); cursor: pointer; }
.slide-nav button:hover { background: var(--gold); color: var(--black); }

/* closed homes, always moving */
.closed { border-top: calc(2 * var(--px)) solid var(--gold); background: var(--black); padding: calc(18 * var(--px)) 0 calc(22 * var(--px)); }
.closed-view { overflow: hidden; }
.closed-track { display: flex; gap: calc(18 * var(--px)); width: max-content; animation: closed-roll var(--roll, 60s) linear infinite; }
.closed-view:hover .closed-track, .closed-view:focus-within .closed-track { animation-play-state: paused; }
@keyframes closed-roll { to { transform: translateX(-50%); } }
.closed-item { width: calc(220 * var(--px)); flex: none; }
/* (the height is the one in the img tag, written out here so that it can scale on tablets) */
.closed-item img { width: 100%; height: calc(147 * var(--px)); aspect-ratio: 3 / 2; object-fit: cover; background: #161616; }
.closed-item figcaption { margin-top: calc(8 * var(--px)); display: flex; justify-content: space-between; gap: calc(8 * var(--px)); font-size: 0.8rem; line-height: 1.3; }
.closed-item .city { font-family: var(--serif); font-size: 1rem; }
.closed-item .when { color: var(--gray-on-black); text-align: right; }

/* ---------- home sections ---------- */
.family-band .statement { font-family: var(--serif); font-size: var(--t-h2); line-height: 1.16; letter-spacing: -0.015em; max-width: 21em; }
.family-band .lead { margin-top: calc(36 * var(--px)); }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: calc(64 * var(--px)); border-top: calc(1 * var(--px)) solid var(--black); }
.services li { padding: calc(28 * var(--px)) calc(28 * var(--px)) calc(8 * var(--px)) 0; }
.services li + li { padding-left: calc(28 * var(--px)); border-left: calc(1 * var(--px)) solid var(--line); }
.services h3 { font-size: 2rem; margin-bottom: calc(12 * var(--px)); }
.services p { color: var(--gray); font-size: 0.95rem; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: calc(24 * var(--px)); flex-wrap: wrap; margin-bottom: calc(56 * var(--px)); }

.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(32 * var(--px)); }
.listing img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--wash); }
.listing .price { font-family: var(--serif); font-size: var(--t-h3); margin-top: calc(14 * var(--px)); }
.listing .facts { color: var(--gray); font-size: var(--t-small); }
.listing-note { margin-top: calc(32 * var(--px)); font-size: 0.78rem; color: var(--gray); max-width: 60em; }

/* reviews */
.stars { color: var(--gold-deep); letter-spacing: 0.12em; font-size: 1rem; }
.band-black .stars { color: var(--gold); }
.quote blockquote { font-family: var(--serif); line-height: 1.35; }
.quote blockquote::before { content: '\201C'; }
.quote blockquote::after { content: '\201D'; }
.quote footer { margin-top: calc(18 * var(--px)); font-size: var(--t-small); }
.quote .who { font-weight: 600; display: block; font-size: 1rem; }
.quote .stars { display: block; margin-bottom: calc(14 * var(--px)); }
.featured-reviews { display: grid; grid-template-columns: 1fr 1fr; gap: calc(56 * var(--px)) clamp(calc(32 * var(--px)), 6vw, calc(96 * var(--px))); }
.featured-reviews .quote:first-child { grid-column: 1 / -1; padding-bottom: calc(56 * var(--px)); border-bottom: calc(1 * var(--px)) solid var(--line); }
.featured-reviews .quote:first-child blockquote { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem); line-height: 1.22; letter-spacing: -0.01em; max-width: 24em; }
.featured-reviews .quote blockquote { font-size: 1.3rem; }

.review-list .quote { padding-block: calc(44 * var(--px)); border-top: calc(1 * var(--px)) solid var(--line); display: grid; grid-template-columns: calc(240 * var(--px)) 1fr; gap: calc(32 * var(--px)); }
.review-list .quote blockquote { font-size: 1.35rem; max-width: 30em; }
.review-list .quote footer { margin: 0; grid-column: 1; grid-row: 1 / span 2; }
.review-list .quote .stars, .review-list .quote blockquote { grid-column: 2; }
.review-summary { display: flex; align-items: baseline; gap: calc(16 * var(--px)); flex-wrap: wrap; margin-top: calc(24 * var(--px)); }
.review-summary .avg { font-family: var(--serif); font-size: 3rem; line-height: 1; }

/* client appreciation */
.appreciation { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(calc(40 * var(--px)), 7vw, calc(120 * var(--px))); align-items: start; }
.appreciation h2 { color: var(--gold); }
.perks li { padding: calc(26 * var(--px)) 0; border-top: calc(1 * var(--px)) solid #3a3a3a; }
.perks li:last-child { border-bottom: calc(1 * var(--px)) solid #3a3a3a; }
.perks h3 { margin-bottom: calc(8 * var(--px)); }
.perks p { color: var(--gray-on-black); }
.band-wash .perks li, .perks.on-white li { border-color: var(--line); }
.perks.on-white p { color: var(--gray); }

.closing-cta { text-align: left; display: grid; grid-template-columns: 1fr auto; gap: calc(32 * var(--px)); align-items: center; }

/* ---------- inner pages ---------- */
.page-head { padding-block: clamp(calc(56 * var(--px)), 8vw, calc(112 * var(--px))) clamp(calc(40 * var(--px)), 5vw, calc(72 * var(--px))); }
.page-head .lead { margin-top: calc(24 * var(--px)); }

.about-grid { display: grid; grid-template-columns: minmax(calc(240 * var(--px)), 0.8fr) 1.2fr; gap: clamp(calc(32 * var(--px)), 6vw, calc(96 * var(--px))); align-items: start; }
/* (heights here and on .land-photo are the ones in the img tags, written out so they scale on tablets) */
.about-grid img { width: 100%; height: calc(690 * var(--px)); aspect-ratio: 4 / 5; object-fit: cover; background: #1c1c1c; position: sticky; top: calc(24 * var(--px)); }
.about-body p { max-width: 34em; }
.about-body h2 { margin: calc(64 * var(--px)) 0 calc(20 * var(--px)); font-size: 2rem; }
.towns { columns: 3; column-gap: calc(32 * var(--px)); font-family: var(--serif); font-size: 1.25rem; }
.towns li { padding: calc(6 * var(--px)) 0; break-inside: avoid; }

.vendor-group { display: grid; grid-template-columns: calc(260 * var(--px)) 1fr; gap: calc(32 * var(--px)); padding-block: calc(44 * var(--px)); border-top: calc(1 * var(--px)) solid var(--black); }
.vendor-group h2 { font-size: 1.8rem; }
.vendor + .vendor { margin-top: calc(36 * var(--px)); padding-top: calc(36 * var(--px)); border-top: calc(1 * var(--px)) solid var(--line); }
.vendor p { max-width: 34em; margin-top: calc(6 * var(--px)); color: var(--gray); }
.vendor .contact { margin-top: calc(12 * var(--px)); display: flex; flex-wrap: wrap; gap: calc(6 * var(--px)) calc(28 * var(--px)); font-weight: 600; color: var(--black); }
.vendor .aff { font-size: 0.78rem; font-weight: 600; color: var(--gold-deep); margin-left: calc(10 * var(--px)); white-space: nowrap; }
.disclosure { margin-top: calc(48 * var(--px)); padding: calc(24 * var(--px)) calc(28 * var(--px)); background: var(--wash); font-size: var(--t-small); max-width: 46em; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(calc(40 * var(--px)), 7vw, calc(120 * var(--px))); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: calc(22 * var(--px)) calc(20 * var(--px)); }
.field { display: flex; flex-direction: column; gap: calc(7 * var(--px)); }
.field.full, .form > .full { grid-column: 1 / -1; }
.field label, fieldset legend { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.82rem; color: var(--gray); }
.field input, .field textarea, .field select {
  width: 100%; padding: calc(13 * var(--px)) calc(14 * var(--px));
  border: calc(1 * var(--px)) solid #8c8c8c; border-radius: calc(2 * var(--px));
  background: var(--white); color: var(--black);
  font: 400 1rem/1.4 var(--sans);
}
.field textarea { min-height: calc(130 * var(--px)); resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: calc(3 * var(--px)) solid var(--gold); outline-offset: calc(1 * var(--px)); border-color: var(--black); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: calc(4 * var(--px)); font-family: var(--serif); font-size: var(--t-h3); font-weight: 400; }
.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(215 * var(--px)), 1fr)); gap: calc(16 * var(--px)); margin-top: calc(16 * var(--px)); }
.hp { position: absolute; left: calc(-9999 * var(--px)); }
.form-msg { grid-column: 1 / -1; padding: calc(16 * var(--px)) calc(18 * var(--px)); border-left: calc(4 * var(--px)) solid var(--gold); background: var(--wash); }
.form-msg.error { border-left-color: #a4201a; }
.form-msg:empty { display: none; }
.done { padding: calc(40 * var(--px)); border: calc(2 * var(--px)) solid var(--gold); }
.done h2 { margin-bottom: calc(16 * var(--px)); }

.steps { counter-reset: step; }
.steps li { counter-increment: step; padding: calc(24 * var(--px)) 0 calc(24 * var(--px)) calc(64 * var(--px)); position: relative; border-top: calc(1 * var(--px)) solid var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: calc(18 * var(--px)); font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--gold-deep); }
.steps h3 { font-size: 1.25rem; margin-bottom: calc(4 * var(--px)); }
.steps p { color: var(--gray); font-size: 0.95rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding: calc(72 * var(--px)) 0 calc(40 * var(--px)); border-top: calc(2 * var(--px)) solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: calc(40 * var(--px)); }
.site-footer .brand-name { font-size: 1.3rem; font-family: var(--serif); margin-top: calc(18 * var(--px)); }
.footer-logo .logo { height: calc(78 * var(--px)); }
.broker-logo { height: calc(40 * var(--px)); width: auto; margin-top: calc(28 * var(--px)); }
.site-footer .tag { color: var(--gold); font-family: var(--serif); font-style: italic; margin-top: calc(6 * var(--px)); }
.site-footer li { padding: calc(4 * var(--px)) 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal { margin-top: calc(56 * var(--px)); padding-top: calc(24 * var(--px)); border-top: calc(1 * var(--px)) solid #3a3a3a; color: var(--gray-on-black); font-size: 0.78rem; display: flex; flex-wrap: wrap; gap: calc(8 * var(--px)) calc(32 * var(--px)); justify-content: space-between; }

/* ---------- small screens ----------
   Two layouts only: desktop from 1081px up, and the phone layout below that. Tablets (601 to
   1080px) show the phone layout scaled up to their width; see the tablet block at the end. */
@media (max-width: 1080px) {
  html { font-size: 106.25%; }
  .hero-main { grid-template-columns: 1fr; padding-top: calc(200 * var(--px)); gap: calc(28 * var(--px)); }
  .hero-portrait { order: 2; max-width: calc(300 * var(--px)); }
  .hero-copy { order: 1; padding-bottom: 0; }
  .sign { order: 3; }
  .featured-reviews, .appreciation, .about-grid, .form-grid, .closing-cta, .footer-grid { grid-template-columns: 1fr; }
  .about-grid img { position: static; max-width: calc(360 * var(--px)); }
  .review-list .quote, .vendor-group { grid-template-columns: 1fr; gap: calc(16 * var(--px)); }
  .review-list .quote footer, .review-list .quote .stars, .review-list .quote blockquote { grid-column: 1; grid-row: auto; }
  .review-list .quote footer { order: 3; }
  .form, .times { grid-template-columns: 1fr; }
  .towns { columns: 2; }
  .listings { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .services li, .services li + li { padding: calc(24 * var(--px)) 0 calc(8 * var(--px)); border-left: 0; border-top: calc(1 * var(--px)) solid var(--line); }
  .services li:first-child { border-top: 0; }
  .closed-item { width: calc(170 * var(--px)); }
  .done { padding: calc(28 * var(--px)) calc(22 * var(--px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sign-hang { animation: none; }
  .closed-track { animation: none; }
  .closed-view { overflow-x: auto; }
  * { transition-duration: 0.01ms !important; }
}


/* ==========================================================================
   Hero and header layout from Andrew's Illustrator file (assets-from-valerie/layout/).
   Desktop sizes are in --u, one pixel of the 1920-wide artboard, so the composition
   scales with the window. Phones and tablets use the phone layout further down.
   ========================================================================== */
/* --u shrinks to whichever is tighter, the window's width or its height, so the whole hero
   (header to listing strip) always fits on one screen without being cut off */
:root { --u: min(100vw / 1920, 100svh / 1080); --logo-h: clamp(calc(46 * var(--px)), 3.75vw, calc(72 * var(--px))); }

/* header: logo, name, tagline on the left; language and menu on the right */
.site-header { gap: clamp(calc(12 * var(--px)), 1.8vw, calc(34 * var(--px))); }
.header-tools { margin-left: auto; }
.logo { height: var(--logo-h); }
.brand-role { font-size: clamp(0.72rem, 0.87vw, 0.92rem); font-weight: 600; letter-spacing: 0; }
.header-tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.16vw, 2.3rem); line-height: 1; color: var(--gold); white-space: nowrap; }
.home .site-header {
  align-items: flex-start; padding-bottom: 0; min-height: max(calc(150 * var(--px)), calc(194 * var(--u)));
  background: linear-gradient(to bottom, var(--white) 0%, var(--white) 59%, rgb(255 255 255 / 0.7) 76%, rgb(255 255 255 / 0) 100%);
}
.home .header-tag { margin-top: clamp(calc(10 * var(--px)), 1.1vw, calc(22 * var(--px))); }
.home .header-tools { margin-top: clamp(0px, 0.6vw, calc(12 * var(--px))); }
@media (max-width: 1080px) { .header-tag { display: none; } }

/* lighter shade over the video */
/* no shade over the video: the words have their own dark band behind them */
.hero-shade { display: none; }
.hero-portrait { margin-left: 0; }
.hero-portrait::before { content: none; }
.hero-copy h1, .hero-copy .lead { text-shadow: 0 calc(2 * var(--px)) calc(18 * var(--px)) rgb(0 0 0 / 0.45); }

/* the sign: dark board, gold FOR SALE, white text. Sizes are in cqw of the whole sign. */
.sign { container-type: inline-size; }
.sign-panel {
  container-type: normal;
  inset: 15.3% 0 0.4% 2%;
  gap: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.6) 50%, rgb(0 0 0 / 0.9));
  color: var(--white);
}
.sign-title {
  font-size: 9.6cqw; font-weight: 600; line-height: 1; letter-spacing: 0.17em; margin-right: -0.17em;
  text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, #c2a14d 0%, #c9aa5a 30%, #e8cf90 50%, #d0b367 62%, #c2a14d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sign-text { font-size: max(3.39cqw, calc(11.5 * var(--px))); line-height: 1.3; max-width: 15.5em; margin-top: 3.4cqw; }
.sign-panel .btn {
  margin-top: 2.6cqw; padding: 0 1em; min-width: 45.3cqw; height: max(9.7cqw, calc(38 * var(--px)));
  display: grid; place-items: center;
  font-size: max(3.67cqw, calc(12.5 * var(--px))); font-weight: 600; color: var(--white);
}
.sign-panel .btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.sign-rider { font-size: max(2.85cqw, calc(10.5 * var(--px))); font-weight: 600; color: var(--gold); margin-top: 2.9cqw; }

@media (min-width: 1081px) {
  .hero { min-height: 100svh; height: 100svh; }
  .hero-main { position: absolute; inset: 0; display: block; padding: 0; max-width: none; }
  .hero-copy .family { display: none; }           /* the tagline lives in the header at this size */

  /* The headshot image is square: the original photo in the middle, with generated suit below it
     and generated shoulders and arms either side. Her head stays where it was (the original photo
     still spans 72 to 664); the added length runs down behind the listing strip. */
  .hero-portrait { position: absolute; left: calc(-38.3 * var(--u)); bottom: calc(48 * var(--u)); width: calc(789 * var(--u)); margin: 0; }
  .hero-portrait img { max-height: none; aspect-ratio: 1; }

  /* The headline is centred in the visible gap between her and the sign, so the space on either
     side of it is equal. Left bound: where her hair actually ends across the headline's height,
     measured from the cut-out's pixels (533). Right bound: the sign board's left edge at rest
     (1920 - 703.7 = 1216.3). To give a large headline room, she sits 12 further left and the
     sign 30 further right than in the mockup. */
  .hero-copy { position: absolute; z-index: 2; left: calc(533 * var(--u)); right: calc(703.7 * var(--u)); top: 47.4%; transform: translateY(-50%); padding: 0; text-align: center; }
  .hero-copy h1 { font-size: calc(74 * var(--u)); line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
  .hero-copy .lead { font-size: calc(26 * var(--u)); line-height: 1.3; margin-top: calc(8 * var(--u)); max-width: none; white-space: nowrap; }

  /* anchored from the right, so on a wide, short window the spare width opens up in the middle */
  .sign { position: absolute; right: calc(33.3 * var(--u)); bottom: calc(170.3 * var(--u)); width: calc(720 * var(--u)); max-width: none; }
  .sign-hang { left: 6.89%; top: 15.99%; width: 75%; }

  /* closed homes: photos straddle the gold ground line */
  .closed { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: calc(152.9 * var(--u)); padding: 0; border-top: calc(5 * var(--u)) solid var(--gold); }
  .closed-view { position: absolute; left: 0; right: 0; bottom: calc(27.4 * var(--u)); }
  .closed-track { gap: calc(24.3 * var(--u)); }
  .closed-item { width: calc(297.6 * var(--u)); }
  .closed-item img { height: auto; aspect-ratio: 297.6 / 198.9; }
  .closed-item figcaption { display: none; }
}


/* ---------- simulated chains: sign.js positions the board and draws the links ---------- */
.sign-chains { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* resting position, used until the script takes over (and if it never runs) */
.sign-hang, .sign .sign-hang { left: 6.89%; top: 24.2%; width: 75%; animation: none; transform-origin: 0 0; }
/* the dark overlay covers the board's face and stops at the inside of its white frame on all
   four sides (the face measures 20..879 x 17..616 in the 900x638 board image) */
.sign-panel { inset: 2.7% 2.3% 3.4% 2.2%; }
.sign.sim .sign-hang { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; will-change: transform; }
.sign.sim.dragging .sign-hang { cursor: grabbing; }
.sign.sim .sign-hang .btn { cursor: pointer; }
@media (pointer: fine) { .sign.sim .sign-hang { touch-action: none; } }
@media (min-width: 1081px) { .sign-hang { left: 6.89%; top: 24.2%; width: 75%; } .hero-main { overflow: visible; } }

/* the name line is sized by site.js to span exactly the logo's width */
.brand-role { white-space: nowrap; width: fit-content; }

/* call and email buttons in the header */
/* solid glyphs, no circle; the 44px box is only the tap target */
.icon-btn { width: calc(44 * var(--px)); height: calc(44 * var(--px)); display: grid; place-items: center; border: 0; background: none; color: inherit; text-decoration: none; transition: color 0.15s; }
.icon-btn svg { width: calc(26 * var(--px)); height: calc(26 * var(--px)); fill: currentColor; stroke: none; }
.icon-btn:hover { color: var(--gold-deep); }
.menu .icon-btn:hover { color: var(--gold); }
.header-tools { gap: clamp(calc(8 * var(--px)), 1.1vw, calc(18 * var(--px))); }
.header-tools .lang { margin-left: clamp(0px, 0.6vw, calc(10 * var(--px))); }
@media (max-width: 480px) { .icon-btn { width: calc(38 * var(--px)); height: calc(38 * var(--px)); } .icon-btn svg { width: calc(23 * var(--px)); height: calc(23 * var(--px)); } .header-tools { gap: calc(6 * var(--px)); } }

/* the headshot image is square (extended suit, shoulders and arms) */
.hero-portrait img { aspect-ratio: 1; }

/* listing strip driven by home.js: draggable and flingable */
.closed-track.js-roll { animation: none; will-change: transform; }
.closed-view:has(.js-roll) { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.closed-view.dragging { cursor: grabbing; }


/* ==========================================================================
   Phones. The header has to fit on one row (logo, call, email, EN/ES, menu) without widening
   the page; before this it overflowed and the browser zoomed the whole site out to fit it.
   ========================================================================== */
.closed-item figcaption { display: none; }                     /* photos only, on every screen size */

@media (max-width: 1080px) {
  :root { --logo-h: clamp(calc(34 * var(--px)), 10.5vw, calc(42 * var(--px))); --gutter: calc(16 * var(--px)); }
  .site-header { padding: calc(14 * var(--px)) var(--gutter); gap: calc(6 * var(--px)); }
  .home .site-header { min-height: calc(132 * var(--px)); }
  .header-tools { gap: calc(5 * var(--px)); flex: none; }
  .header-tools .lang { margin-left: 0; }
  .icon-btn { width: calc(34 * var(--px)); height: calc(34 * var(--px)); }
  .icon-btn svg { width: calc(22 * var(--px)); height: calc(22 * var(--px)); }
  .lang button { padding: calc(7 * var(--px)) calc(7 * var(--px)); font-size: 0.72rem; }
  .menu-btn { width: calc(38 * var(--px)); height: calc(38 * var(--px)); gap: calc(6 * var(--px)); }
  .menu-btn i { width: calc(24 * var(--px)); }
  .menu-btn[aria-expanded='true'] i:nth-child(1) { transform: translateY(calc(8 * var(--px))) rotate(45deg); }
  .menu-btn[aria-expanded='true'] i:nth-child(3) { transform: translateY(calc(-8 * var(--px))) rotate(-45deg); }
  .brand { min-width: 0; }
  .menu-top { padding: calc(14 * var(--px)) var(--gutter); gap: calc(6 * var(--px)); }

  /* hero: tighter top, headline sized to the screen, headshot not taller than the screen */
  .hero-main { padding-top: calc(132 * var(--px)); gap: calc(22 * var(--px)); }
  .hero-copy h1 { font-size: clamp(2.5rem, 12.5vw, 3.4rem); }
  .hero-copy .lead { margin-top: calc(16 * var(--px)); font-size: 1.08rem; }
  .hero-copy .family { margin-top: calc(12 * var(--px)); }
  .hero-portrait { max-width: none; margin-inline: calc(-8 * var(--px)); }
  .hero-portrait img { max-height: 62svh; }
  .sign { max-width: calc(400 * var(--px)); margin-top: 0; }
  .closed { padding: calc(14 * var(--px)) 0 calc(16 * var(--px)); }
  .closed-item { width: calc(200 * var(--px)); }

  /* sections: a little less air, comfortable reading sizes */
  .band { padding-block: calc(64 * var(--px)); }
  .family-band .statement { font-size: 1.75rem; }
  .services { margin-top: calc(40 * var(--px)); }
  .section-head { margin-bottom: calc(32 * var(--px)); }
  .featured-reviews { gap: calc(36 * var(--px)); }
  .featured-reviews .quote:first-child { padding-bottom: calc(36 * var(--px)); }
  .featured-reviews .quote:first-child blockquote, .featured-reviews .quote blockquote, .review-list .quote blockquote { font-size: 1.2rem; line-height: 1.4; }
  .review-list .quote { padding-block: calc(32 * var(--px)); }
  .slides img { height: calc(240 * var(--px)); }
  .slide-nav button { width: calc(48 * var(--px)); height: calc(48 * var(--px)); }
  .closing-cta .btn, .about-body .btn, .form .btn { width: 100%; text-align: center; padding-block: 1em; }
  .page-head { padding-block: calc(40 * var(--px)) calc(28 * var(--px)); }
  .site-footer { padding: calc(56 * var(--px)) 0 calc(32 * var(--px)); }
  .footer-logo .logo { height: calc(64 * var(--px)); }
  .legal { margin-top: calc(36 * var(--px)); }
  /* 16px inputs stop iOS from zooming the page when a field is tapped */
  .field input, .field textarea, .field select { font-size: calc(16 * var(--px)); }
  .menu nav a { font-size: clamp(1.9rem, 9vw, 2.6rem); }
}
/* very narrow phones: drop the email button from the header (it is still in the menu and footer) */
@media (max-width: 350px) { .site-header .icon-btn[data-mail] { display: none; } }

/* bot check widget, and the "Leave a review" prompts in the homepage reviews section */
.bot-check { grid-column: 1 / -1; min-height: 0; }
.bot-check:empty { display: none; }
.section-actions { display: flex; align-items: center; gap: calc(20 * var(--px)) calc(28 * var(--px)); flex-wrap: wrap; }
.review-invite { margin-top: calc(56 * var(--px)); padding-top: calc(32 * var(--px)); border-top: calc(1 * var(--px)) solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: calc(16 * var(--px)) calc(32 * var(--px)); flex-wrap: wrap; }
.review-invite p { font-family: var(--serif); font-size: var(--t-h3); line-height: 1.25; }
@media (max-width: 1080px) { .section-actions .btn, .review-invite .btn { width: 100%; text-align: center; } .review-invite { margin-top: calc(36 * var(--px)); } }

/* footer credit */
.legal .credit { flex-basis: 100%; }
.legal a { color: var(--white); text-decoration: underline; }

/* Privacy page, and the link to it under each form */
.prose > * { max-width: 44rem; }
.prose h2 { font-size: 2rem; margin: calc(56 * var(--px)) 0 calc(16 * var(--px)); }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 1.1em; }
.form-privacy { font-size: var(--t-small); }
.form-privacy a { color: var(--gray); text-decoration: underline; }

/* Land and Dump trailer pages */
.about-grid img.land-photo { height: calc(540 * var(--px)); aspect-ratio: 16 / 9; }
.pull { font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.2; letter-spacing: -0.01em; margin-top: calc(48 * var(--px)); padding-top: calc(32 * var(--px)); border-top: calc(2 * var(--px)) solid var(--gold); max-width: 20em; }
.dump-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(calc(40 * var(--px)), 7vw, calc(120 * var(--px))); align-items: start; }
.dump-grid h2 { font-size: 2rem; margin-bottom: calc(20 * var(--px)); }
.cta-row { display: flex; gap: calc(14 * var(--px)); flex-wrap: wrap; margin-top: calc(28 * var(--px)); }
.towns-more { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--gold-deep); margin-top: calc(14 * var(--px)); }
@media (max-width: 1080px) { .dump-grid { grid-template-columns: 1fr; } .cta-row .btn { width: 100%; text-align: center; } .pull { margin-top: calc(36 * var(--px)); } }

/* ==========================================================================
   Phone hero, from Andrew's mobile mockup (homepage-mobile-390.svg, a 390px artboard).
   Headline on the left, headshot on the right, one wide booking button, then the closed-homes
   strip. The For Sale sign is not shown on phones. Everything is placed in --m units
   (1 unit = 1px on the 390px artboard) so it scales with the screen width. Tablets show this same layout, scaled up.
   ========================================================================== */
.hero-cta { display: none; }
@media (max-width: 1080px) {
  :root { --m: calc(100vw / 390); }
  .home .site-header { min-height: calc(96 * var(--m)); }
  /* The hero fills the screen exactly (header, headline, button, closed-homes strip), so the first
     section below starts off-screen and its intro plays only once the visitor scrolls to it.
     --strip is the closed-homes strip's height; whatever height is left over on a tall phone
     (--spare) is shared out above and below the headline block. */
  /* (full height even before the strip has loaded, or the next section would be in view at first) */
  .hero { min-height: 100svh; --strip: calc(180 * var(--px)); --spare: max(0px, 100svh - var(--strip) - 460.4 * var(--m)); --drop: calc(var(--spare) * 0.55); }
  .closed { height: var(--strip); box-sizing: border-box; overflow: hidden; }
  .hero-main { position: relative; display: block; flex: none; height: calc(460.4 * var(--m) + var(--spare)); padding: 0; margin: 0; max-width: none; gap: 0; }
  .sign { display: none; }
  .hero-portrait { position: absolute; left: calc(149.3 * var(--m)); top: calc(116.2 * var(--m) + var(--drop)); width: calc(233.3 * var(--m)); max-width: none; margin: 0; }
  .hero-portrait img { max-height: none; }
  .hero-copy { position: absolute; z-index: auto; left: calc(24 * var(--m)); top: calc(129 * var(--m) + var(--drop)); padding: 0; }
  /* a black band behind the words, from the left edge of the screen to behind the headshot,
     where it fades out so its end is never seen (it sits under the headshot, over the video) */
  .hero-copy::before {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    left: calc(-24 * var(--m)); width: calc(292 * var(--m)); top: calc(-13 * var(--m)); bottom: calc(-13 * var(--m));
    background: linear-gradient(90deg, rgb(0 0 0 / 0.66) 0%, rgb(0 0 0 / 0.66) 62%, rgb(0 0 0 / 0) 100%);
  }
  .hero-copy h1 { font-size: calc(34 * var(--m)); line-height: calc(39.5 * var(--m)); letter-spacing: -0.02em; max-width: calc(200 * var(--m)); }
  .hero-copy .lead { margin-top: calc(11 * var(--m)); max-width: calc(170 * var(--m)); font-size: calc(16.5 * var(--m)); line-height: calc(20 * var(--m)); }
  .hero-copy .family { margin: calc(12.5 * var(--m)) 0 0 calc(-6 * var(--m)); font-size: calc(18.5 * var(--m)); line-height: 1.2; white-space: nowrap; }
  .hero .hero-cta {
    display: flex; align-items: center; justify-content: center; position: absolute; z-index: 2;
    left: calc(20.5 * var(--m)); top: calc(347.4 * var(--m) + var(--drop)); width: calc(349 * var(--m)); height: calc(81.8 * var(--m));
    padding: 0; font-size: calc(28.2 * var(--m)); line-height: 1; color: var(--white); white-space: nowrap;
  }

  .hero .hero-cta:hover { color: var(--black); }

  /* Spanish runs longer: a slightly smaller block so it still clears the button */
  html[lang='es'] .hero-copy { top: calc(124 * var(--m) + var(--drop)); }
  html[lang='es'] .hero-copy h1 { font-size: calc(28 * var(--m)); line-height: calc(32 * var(--m)); max-width: calc(180 * var(--m)); }
  html[lang='es'] .hero-copy .lead { margin-top: calc(9 * var(--m)); max-width: calc(180 * var(--m)); font-size: calc(14 * var(--m)); line-height: calc(17.5 * var(--m)); }
  html[lang='es'] .hero-copy .family { margin-top: calc(9 * var(--m)); font-size: calc(16.5 * var(--m)); }

  /* section spacing as drawn in the mockup */
  .home .family-band { padding-block: calc(31 * var(--px)) calc(12 * var(--px)); }
  .home #reviews-band { padding-block: calc(13 * var(--px)) calc(36 * var(--px)); }
  .home main > .band:last-child { padding-block: calc(37 * var(--px)); }
}

/* Homepage reviews on phones: one review at a time, swiped sideways, with dots underneath. */
.review-dots { display: none; }
@media (max-width: 1080px) {
  .featured-reviews {
    display: flex; align-items: flex-start; gap: calc(16 * var(--px));
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; transition: height 0.3s ease;
  }
  .featured-reviews::-webkit-scrollbar { display: none; }
  .featured-reviews .quote { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
  .featured-reviews .quote:first-child { padding-bottom: 0; border-bottom: 0; }
  .review-dots:not([hidden]) { display: flex; justify-content: center; gap: calc(2 * var(--px)); margin-top: calc(18 * var(--px)); }
  .review-dots button { width: calc(32 * var(--px)); height: calc(32 * var(--px)); padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .review-dots button::before { content: ''; width: calc(10 * var(--px)); height: calc(10 * var(--px)); border-radius: 50%; border: calc(1.5 * var(--px)) solid var(--gold-deep); transition: background-color 0.2s; }
  .review-dots button[aria-current='true']::before { background: var(--gold-deep); }
  .review-invite { margin-top: calc(20 * var(--px)); }
}
@media (prefers-reduced-motion: reduce) { .featured-reviews { transition: none; } }

/* ---------- key dividers (homepage): each section opens with the key ----------
   home.js wraps each key image in .key-divider and lays a canvas over it that plays the
   pre-rendered 3D turn. The section gets .anim (content waiting, hidden), then .play when its key
   scrolls into view; both are removed when the sequence ends. Without JS, or with reduced motion,
   none of this runs and the plain key image and the section simply show. */
.key-wrap .key-rule { display: block; }
.key-divider { --kw: clamp(calc(120 * var(--px)), 14vw, calc(190 * var(--px))); position: relative; display: block; width: var(--kw); margin: 0 0 calc(36 * var(--px)); }
.key-divider .key-rule { width: 100%; margin: 0; visibility: hidden; }          /* keeps the space; the canvas is what shows */
.key-divider.static .key-rule { visibility: visible; }
.key-divider.static .key-canvas { display: none; }
/* the rendered frame is a little larger than the key, centred on it, with the shaft on its mid-line */
.key-canvas { position: absolute; left: calc(-0.015 * var(--kw)); top: calc(-0.0207 * var(--kw)); width: calc(1.03 * var(--kw)); height: calc(0.4292 * var(--kw)); pointer-events: none; }
.band.anim .key-canvas { opacity: 0; }
.band.anim > :not(.key-wrap) { opacity: 0; }
.band.play .key-canvas { animation: key-appear 0.35s ease 0.1s both, key-plunge-rule 0.42s 0.4s both; }
/* As the key lands the section's own surfaces (rules, borders) fade up, and its text follows a
   line at a time: home.js gives every word and button .rv and a delay (--d) for its line. */
.band.play > :not(.key-wrap) { animation: lg-fade 0.5s ease 0.64s forwards; }
.band.play .rv { opacity: 0; animation: lg-fade 0.45s ease var(--d, 0.64s) forwards; }
/* the header's plunge, with the run-in scaled to this key's own length */
@keyframes key-plunge-rule {
  0%   { translate: 38% 0; animation-timing-function: cubic-bezier(0.45, 0, 0.85, 0.55); }
  55%  { translate: -3.4% 0; animation-timing-function: ease-out; }
  80%  { translate: 1.2% 0; animation-timing-function: ease-in-out; }
  100% { translate: 0 0; }
}

/* ---------- menu overlay: its top bar sits exactly over the page header ----------
   Same vertical alignment as the homepage header, and the scrollbar's width (set as --sbw while
   the menu is open and page scrolling is locked) is kept as padding so nothing shifts sideways. */
body { padding-right: var(--sbw, 0px); }
.menu { padding-right: var(--menu-pad, 0px); }
/* seven links: keep them within the height of the window so the menu doesn't need to scroll */
.menu nav a { font-size: min(clamp(2.2rem, 1.4rem + 4vw, 4rem), 6.6vh); }
@media (max-width: 1080px) { .menu nav a { font-size: min(clamp(1.9rem, 9vw, 2.6rem), 5.6vh); } }
.home .site-header { right: var(--sbw, 0px); }
.home .menu-top { align-items: flex-start; }

/* ---------- guides page ---------- */
.guide-group + .guide-group { margin-top: clamp(calc(48 * var(--px)), 6vw, calc(88 * var(--px))); }
.guide-group h2 { font-size: var(--t-h3); color: var(--gold-deep); padding-bottom: calc(14 * var(--px)); border-bottom: calc(2 * var(--px)) solid var(--gold); }
.guide { display: grid; grid-template-columns: 1fr auto; gap: calc(16 * var(--px)) calc(40 * var(--px)); align-items: center; padding-block: calc(28 * var(--px)); border-bottom: calc(1 * var(--px)) solid var(--line); }
.guide h3 { font-family: var(--serif); font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.8rem); font-weight: 400; line-height: 1.2; }
.guide h3 + p { margin-top: calc(8 * var(--px)); max-width: 44em; }
.guide-get { display: grid; gap: calc(8 * var(--px)); justify-items: center; text-align: center; }
.guide-get .small { font-size: var(--t-small); }
@media (max-width: 1080px) {
  .guide { grid-template-columns: 1fr; }
  .guide-get { justify-items: stretch; }
  .guide-get .btn { text-align: center; }
}

/* ---------- For Sale sign: solid navy panel, lit from above ----------
   Opaque #161c40, lighter towards the top and darker towards the bottom. Two soft highlights sit
   on top (a glow from above and a faint diagonal sheen); sign.js moves them with --lx / --ly as
   the board swings, so the light appears to stay still while the sign moves under it. */
.sign-panel {
  background:
    linear-gradient(104deg, transparent calc(var(--lx, 50%) - 26%), rgb(255 255 255 / 0.075) var(--lx, 50%), transparent calc(var(--lx, 50%) + 26%)),
    radial-gradient(115% 95% at var(--lx, 50%) var(--ly, -18%), rgb(126 146 232 / 0.5), rgb(126 146 232 / 0) 62%),
    linear-gradient(180deg, #2b3572 0%, #1d2553 26%, #161c40 52%, #0e1230 82%, #090c22 100%);
  box-shadow: inset 0 0 0 calc(1 * var(--px)) rgb(255 255 255 / 0.05), inset 0 calc(-18 * var(--px)) calc(30 * var(--px)) calc(-18 * var(--px)) rgb(0 0 0 / 0.55);
}

/* ---------- desktop hero: pull the three pieces together on wide windows ----------
   The hero is laid out on a 16:9 stage. On a window wider than that (most desktop browsers, once
   toolbars take their share of the height) the headshot stays on the left edge and the sign on
   the right, and the spare width opened up as gaps either side of the headline. --pull moves the
   headshot and the sign inwards by 40% of that spare width each; the headline stays centred between. */
@media (min-width: 1081px) {
  .hero { --pull: calc((100vw - 1920 * var(--u)) * 0.2); }
  .hero-portrait { left: calc(-38.3 * var(--u) + var(--pull)); }
  .hero-copy { left: calc(533 * var(--u) + var(--pull)); right: calc(703.7 * var(--u) + var(--pull)); }
  .sign { right: calc(33.3 * var(--u) + var(--pull)); }
  /* Spanish runs longer: a smaller headline so it sits between the headshot and the sign as the English does */
  html[lang='es'] .hero-copy h1 { font-size: calc(56 * var(--u)); }
  html[lang='es'] .hero-copy .lead { font-size: calc(20 * var(--u)); }
}

/* ---------- desktop hero: dark band behind the headline ----------
   A strip of shade at the headline's height so the words read against any frame of the video.
   It runs from behind the headshot to behind the For Sale sign (both sit in front of it) and
   fades to nothing at each end. */
@media (min-width: 1081px) {
  .hero-main::before {
    content: ''; position: absolute; z-index: 0; pointer-events: none;
    left: calc(300 * var(--u) + var(--pull, 0px)); right: calc(380 * var(--u) + var(--pull, 0px));
    top: 47.4%; height: calc(190 * var(--u)); transform: translateY(-50%);
    background: linear-gradient(90deg, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / 0.62) 24%, rgb(0 0 0 / 0.62) 76%, rgb(0 0 0 / 0) 100%);
  }
  .hero-portrait, .sign { z-index: 1; }
}
/* without the physics (reduced motion), the sign still answers the pointer */
@media (hover: hover) { .sign:not(.sim) .sign-hang { transition: scale 0.2s ease; } .sign:not(.sim) .sign-hang:hover { scale: 1.03; } }

/* ---------- client photos: hover, and a lightbox on click ---------- */
.slides .slide { flex: none; padding: 0; border: 0; background: #161616; cursor: zoom-in; position: relative; overflow: hidden; scroll-snap-align: center; line-height: 0; }
.slides .slide img { display: block; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s; }
.slides .slide::after { content: ''; position: absolute; inset: 0; border: calc(2 * var(--px)) solid var(--gold); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.slides .slide:focus-visible { outline: calc(2 * var(--px)) solid var(--gold); outline-offset: calc(3 * var(--px)); }
.slides .slide:focus-visible::after { opacity: 1; }
@media (hover: hover) {
  .slides .slide:hover img { transform: scale(1.05); filter: brightness(1.08); }
  .slides .slide:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .slides .slide img { transition: none; } .slides .slide:hover img { transform: none; } }

.lightbox { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: clamp(calc(12 * var(--px)), 3vw, calc(40 * var(--px))); border: 0; background: rgb(0 0 0 / 0.93); color: var(--white); }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(calc(6 * var(--px)), 2vw, calc(28 * var(--px))); animation: lg-fade 0.2s ease; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.6); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: calc(18 * var(--px)); min-width: 0; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - calc(190 * var(--px))); width: auto; height: auto; object-fit: contain; background: #161616; box-shadow: 0 0 0 calc(1 * var(--px)) rgb(194 161 77 / 0.5); }
.lightbox figcaption { text-align: center; max-width: 40em; }
.lightbox-title { font-size: var(--t-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.lightbox-count { margin-top: calc(8 * var(--px)); font-size: var(--t-small); color: var(--gray-on-black); }
.lightbox-step, .lightbox-close { width: calc(52 * var(--px)); height: calc(52 * var(--px)); border: calc(1 * var(--px)) solid var(--gold); border-radius: 50%; background: rgb(0 0 0 / 0.5); color: var(--gold); font: 400 1.8rem/1 var(--serif); cursor: pointer; }
.lightbox-step:hover, .lightbox-close:hover { background: var(--gold); color: var(--black); }
.lightbox-close { position: absolute; top: clamp(calc(10 * var(--px)), 2vw, calc(24 * var(--px))); right: clamp(calc(10 * var(--px)), 2vw, calc(24 * var(--px))); z-index: 1; }
@media (max-width: 1080px) {
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: calc(14 * var(--px)); }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; align-self: center; }
  .lightbox img { max-height: calc(100dvh - calc(270 * var(--px))); }
  .lightbox-step { grid-row: 2; width: calc(48 * var(--px)); height: calc(48 * var(--px)); }
  .lightbox-step[data-step='-1'] { justify-self: end; }
  .lightbox-step[data-step='1'] { justify-self: start; }
}

/* ==========================================================================
   Site menu: a dark panel on the left that fades out (by mid-screen on desktop)
   The page stays visible on the right and the header stays on top (its menu button becomes the
   close button). Links slide in from the left one after another; on closing they leave from the
   bottom up and the panel slides off to the left. site.js adds .open, then .closing while leaving.
   ========================================================================== */
.menu-key { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateX(calc(-72 * var(--px))); } to { opacity: 1; transform: none; } }
@keyframes menu-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(calc(-72 * var(--px))); } }
@keyframes menu-key-float { from { transform: translateX(0); } to { transform: translateX(0.5em); } }
/* the header's plunge: out to the right, straight in with a small knock, and it stays in */
@keyframes menu-key-plunge {
  0%   { transform: translateX(0.5em); animation-timing-function: ease-out; }
  22%  { transform: translateX(0.95em); animation-timing-function: cubic-bezier(0.45, 0, 0.85, 0.55); }
  68%  { transform: translateX(-0.5em); animation-timing-function: ease-out; }
  86%  { transform: translateX(-0.3em); animation-timing-function: ease-in-out; }
  100% { transform: translateX(-0.36em); }
}
.site-header { position: relative; z-index: 30; background: var(--white); }   /* stays above the panel, on its own white */
.home .site-header { position: absolute; z-index: 30; background: linear-gradient(to bottom, var(--white) 0%, var(--white) 59%, rgb(255 255 255 / 0.7) 76%, rgb(255 255 255 / 0) 100%); }
.menu { --solid: 26%; --fade: 50%; background: none; opacity: 1; overflow: hidden; padding-right: 0; transition: visibility 0s; }
.menu::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.97) 0%, rgb(0 0 0 / 0.95) var(--solid), rgb(0 0 0 / 0.8) calc(var(--solid) + (var(--fade) - var(--solid)) * 0.4), rgb(0 0 0 / 0.42) calc(var(--solid) + (var(--fade) - var(--solid)) * 0.75), rgb(0 0 0 / 0) var(--fade));
  transform: translateX(-100%); transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.menu.open::before { transform: none; }
.menu.closing::before { transform: translateX(-100%); transition: transform 0.42s cubic-bezier(0.6, 0, 0.8, 0.4) calc((var(--n) - 1) * 45ms + 240ms); }
.menu-top { display: none; }
.menu nav { position: relative; align-items: center; padding: calc(170 * var(--px)) var(--gutter) calc(40 * var(--px)); }
.menu nav a { font-size: min(clamp(1.5rem, 0.7rem + 1.75vw, 2.7rem), 5.4vh); text-shadow: 0 calc(1 * var(--px)) calc(14 * var(--px)) rgb(0 0 0 / 0.7); transition: color 0.2s; }
.menu nav a:hover, .menu nav a:focus-visible { color: var(--gold-pale, #e8cf90); }
.menu li + li { margin-top: clamp(calc(8 * var(--px)), 2.2vh, calc(22 * var(--px))); }
.menu li { opacity: 0; }
.menu.open li { animation: menu-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) calc(140ms + var(--i) * 55ms) both; }
.menu.closing li { animation: menu-out 0.3s cubic-bezier(0.5, 0, 0.9, 0.5) calc((var(--n) - 1 - var(--i)) * 45ms) both; }
.menu-foot { opacity: 0; transition: opacity 0.3s; text-shadow: 0 calc(1 * var(--px)) calc(10 * var(--px)) rgb(0 0 0 / 0.8); }
.menu.open .menu-foot { opacity: 1; transition: opacity 0.4s 0.55s; }
.menu.closing .menu-foot { opacity: 0; transition: opacity 0.15s; }

/* the key beside the current page's link */
.menu-key { display: block; position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; font-size: 1rem;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s; }
.menu-key img { display: block; width: 100%; height: auto; filter: drop-shadow(0 calc(2 * var(--px)) calc(10 * var(--px)) rgb(0 0 0 / 0.55)); }
.menu.open .menu-key.on { opacity: 1; transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s 0.6s; }
.menu.open .menu-key.on.pointing { transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.menu.closing .menu-key { opacity: 0 !important; transition: opacity 0.2s 0.1s !important; }
.menu-key img { animation: menu-key-float 1.5s ease-in-out infinite alternate; }
/* over another link: stop floating and hold at the far (right-hand) end of the float */
.menu-key.pointing img { animation: none; transform: translateX(0.5em); transition: transform 0.3s ease; }
.menu-key.plunge img { animation: menu-key-plunge 0.5s both; transition: none; }

/* phones (and tablets): the same menu, with the dark part reaching further across so the links
   stay on it; the page still shows through along the right-hand side */
@media (max-width: 1080px) {
  .menu { --solid: 78%; --fade: 100%; }
  .menu nav { padding: calc(120 * var(--px)) var(--gutter) calc(24 * var(--px)); }
  .menu nav a { font-size: min(clamp(1.45rem, 6.6vw, 1.9rem), 4.8vh); }
  .menu li + li { margin-top: clamp(calc(8 * var(--px)), 2.4vh, calc(20 * var(--px))); }
  .menu nav li { padding-right: 3.5rem; }                        /* room for the key after the longest line */
}
/* short windows (a phone on its side): tuck the links up under the header so all seven fit.
   The second condition is the same test for a scaled-up tablet: under 520px tall at 390px wide. */
@media (max-height: 520px), (min-width: 601px) and (max-width: 1080px) and (min-aspect-ratio: 390 / 520) {
  .menu { overflow-y: auto; }
  .menu nav { padding-block: calc(96 * var(--px)) calc(6 * var(--px)); }
  .menu li + li { margin-top: calc(6 * var(--px)); }
  .menu-foot { padding-bottom: calc(10 * var(--px)); }
}
@media (prefers-reduced-motion: reduce) {
  .menu::before, .menu.closing::before { transition: none; }
  .menu.open li, .menu.closing li { animation: none; opacity: 1; }
  .menu-key img { animation: none; }
}

/* ==========================================================================
   Moving between pages: the header stays, everything under it fades to white and the next page
   fades in. site.js adds .leaving on the way out and .arrived on the way in.
   ========================================================================== */
main, .site-footer { transition: opacity 0.26s ease; }
.leaving main, .leaving .site-footer { opacity: 0; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .arrived main, .arrived .site-footer { animation: page-in 0.5s ease 0.05s backwards; }
  /* the logo is already there: no intro */
  .arrived .site-header .key3d-stage, .arrived .site-header .lg-letter, .arrived .site-header .lg-tag,
  .arrived .site-header .brand-role, .arrived .header-tag { animation: none; opacity: 1; transform: none; }
  .arrived .site-header .lg-v { animation: none; fill-opacity: 1; stroke: none; }
}

/* Choosing a page from the menu: the dark panel stays put across the change of page (.keep on the
   way out, .carry on the way in) and slides away (.carry-out) once the new page has faded in. */
.menu.closing.keep::before { transform: none; transition: none; }
.menu.carry, .menu.carry-out { visibility: visible; pointer-events: none; }
.menu.carry::before { transform: none; transition: none; }
.menu.carry-out::before { transform: translateX(-100%); transition: transform 0.5s cubic-bezier(0.6, 0, 0.8, 0.4); }

/* ==========================================================================
   Tablets (601 to 1080px wide): the phone layout, scaled up.
   Every rule above for (max-width: 1080px) is the phone design, drawn for a 390px-wide screen.
   On a tablet one layout pixel (--px) becomes 1/390 of the window's width, and the root font
   size (17px on phones) follows it, so px and rem sizes all grow by the same factor. Viewport
   units already scale with the window. The result is what a 390px phone shows, enlarged.
   ========================================================================== */
@media (min-width: 601px) and (max-width: 1080px) {
  :root { --px: calc(100vw / 390); }
  html { font-size: calc(17 * var(--px)); }
}
