/* ==========================================================================
   Site styles. One file, ordered by cascade layers (lowest priority first).
   Every raw value lives in the tokens layer and comes from DIRECTION.md; the
   values below are neutral placeholders to replace in Phase 3.
   ========================================================================== */
@layer reset, tokens, base, layout, components, sections, motion, utilities;

/* -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  img, picture, video, canvas, svg { display: block; max-width: 100%; }
  img, video { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :target { scroll-margin-block: 5ex; }
}

/* -------------------------------------------------------------------------- */
@layer tokens {
  @font-face { font-family: "Bellefair"; src: url("/assets/fonts/bellefair-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "Jost"; src: url("/assets/fonts/jost-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
  @font-face { font-family: "Allison"; src: url("/assets/fonts/allison-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  /* Metric-matched fallbacks so nothing jumps when the fonts swap in. */
  @font-face { font-family: "Bellefair Fallback"; src: local("Georgia"); size-adjust: 88%; ascent-override: 92%; descent-override: 26%; line-gap-override: 0%; }
  @font-face { font-family: "Jost Fallback"; src: local("Arial"); size-adjust: 96%; ascent-override: 104%; descent-override: 28%; line-gap-override: 0%; }

  :root {
    /* Brand board (Soar Creative): midnight, seaside, sky, mountain air, cloud.
       ink and seaside-deep are working shades derived from them (DIRECTION.md). */
    --white: #ffffff;
    --cloud: #efeaea;
    --air: #d3dbdd;
    --sky: #97bcc7;
    --seaside: #5f758a;
    --seaside-deep: #3d4f61;
    --ink: #0d1318;
    --midnight: #000000;

    --c-bg: var(--white);
    --c-fg: var(--ink);
    --c-muted: var(--seaside-deep);
    --c-line: var(--air);
    --c-rule: var(--ink);           /* the "horizon" hairline */
    --c-accent: var(--seaside);
    --c-on-accent: var(--white);
    --c-panel: var(--cloud);
    --c-focus: var(--seaside);
    --c-error: #a3271f;

    --font-display: "Bellefair", "Bellefair Fallback", Georgia, serif;
    --font-body: "Jost", "Jost Fallback", system-ui, sans-serif;
    --font-script: "Allison", "Segoe Script", cursive;

    /* Fluid type scale: 16 to 18 px base, ratio 1.2 to 1.333, 360 to 1440 px. */
    --step--1: clamp(0.83rem, 0.83rem + 0.02vw, 0.84rem);
    --step-0: clamp(1rem, 0.96rem + 0.19vw, 1.13rem);
    --step-1: clamp(1.2rem, 1.1rem + 0.44vw, 1.5rem);
    --step-2: clamp(1.44rem, 1.25rem + 0.83vw, 2rem);
    --step-3: clamp(1.73rem, 1.42rem + 1.39vw, 2.66rem);
    --step-4: clamp(2.07rem, 1.58rem + 2.19vw, 3.55rem);
    --step-5: clamp(2.49rem, 1.74rem + 3.33vw, 4.73rem);
    --step-6: clamp(2.99rem, 1.88rem + 4.93vw, 6.31rem);
    --step-hero: clamp(2.75rem, 7.8vw, 7rem);

    --space-2xs: clamp(0.5rem, 0.48rem + 0.1vw, 0.56rem);
    --space-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.84rem);
    --space-s: clamp(1rem, 0.96rem + 0.19vw, 1.13rem);
    --space-m: clamp(1.5rem, 1.44rem + 0.28vw, 1.69rem);
    --space-l: clamp(2rem, 1.85rem + 0.65vw, 2.44rem);
    --space-xl: clamp(3rem, 2.7rem + 1.3vw, 3.88rem);
    --space-2xl: clamp(4rem, 3.4rem + 2.6vw, 5.75rem);
    --space-3xl: clamp(6rem, 4.9rem + 4.9vw, 9.3rem);

    --gutter: clamp(1rem, 4vw, 3.5rem);
    --container: 1280px;
    --header-h: 5.25rem;
    --radius: 999px;       /* buttons */
    --radius-frame: 1.25rem; /* film and photo frames */
    --radius-field: 0;
    --track-display: -0.015em;

    /* Motion: the only eases and durations the site uses (GSAP names alongside). */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* expo.out */
    --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);  /* expo.inOut */
    --ease-ui: cubic-bezier(0.33, 1, 0.68, 1);      /* power2.out */
    --dur-micro: 180ms;
    --dur-ui: 400ms;
    --dur-reveal: 1100ms;
    --dur-line: 1200ms; /* LINE_MS in core/reveals.js */
  }

  /* A section opts into another palette; its children just use the tokens. */
  .theme-dark {
    --c-bg: var(--midnight); --c-fg: var(--cloud); --c-muted: var(--air); --c-line: #ffffff2e; --c-rule: var(--cloud);
    --c-accent: var(--sky); --c-on-accent: var(--ink); --c-focus: var(--sky); --c-panel: #12181d;
    background: var(--c-bg); color: var(--c-fg);
  }
  .theme-seaside {
    --c-bg: var(--seaside-deep); --c-fg: var(--white); --c-muted: var(--air); --c-line: #ffffff40; --c-rule: var(--white);
    --c-accent: var(--sky); --c-on-accent: var(--ink); --c-focus: var(--white); --c-panel: #ffffff14;
    background: var(--c-bg); color: var(--c-fg);
  }
  /* The blue of the home hero's opening field: the footer and the contact band. */
  .theme-field {
    --c-bg: #46596d; --c-fg: var(--white); --c-muted: var(--air); --c-line: #ffffff40; --c-rule: #ffffff66;
    --c-accent: var(--sky); --c-on-accent: var(--ink); --c-focus: var(--white); --c-panel: #ffffff14;
    background: var(--c-bg); color: var(--c-fg);
  }
  .theme-cloud { --c-bg: var(--cloud); --c-panel: var(--white); background: var(--c-bg); }
  /* Mountain air, straight from the brand board: the surface for forms and quiet bands. */
  .theme-air { --c-bg: var(--air); --c-panel: var(--white); --c-line: #0d131826; background: var(--c-bg); }
}

/* -------------------------------------------------------------------------- */
@layer base {
  html {
    scroll-padding-top: var(--header-h);
    scrollbar-gutter: stable;
    background: var(--c-bg);
  }
  body {
    min-height: 100svh;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--c-fg);
    background: var(--c-bg);
    overflow-x: clip; /* clip, not hidden: hidden breaks position: sticky */
    -webkit-font-smoothing: antialiased;
  }
  /* Headlines are the bold geometric sans; the serif (--font-display) is the accent for statements. */
  h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 600; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
  p, li { text-wrap: pretty; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
  ::selection { background: var(--seaside); color: var(--white); }
  .skip-link {
    position: absolute; left: var(--gutter); top: -100%; z-index: 1000;
    padding: 0.6rem 1rem; background: var(--c-fg); color: var(--c-bg);
  }
  .skip-link:focus { top: 0.5rem; }
}

/* -------------------------------------------------------------------------- */
@layer layout {
  .container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
  .section { padding-block: var(--space-2xl); }
  html.menu-open { overflow: hidden; }

  /* ---- Header: transparent over the sky, white with a hairline once scrolled ---- */
  .site-header {
    position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-s);
    padding-inline: max(var(--gutter), (100% - var(--container)) / 2);
    color: var(--ink);
    transition: background-color var(--dur-ui) var(--ease-ui), box-shadow var(--dur-ui) var(--ease-ui);
  }
  .site-header.is-stuck, .menu-open .site-header { background: var(--white); box-shadow: 0 1px 0 var(--air); }
  /* Pages that open on the film: white header until it turns solid. */
  .over-film .site-header:not(.is-stuck) { color: var(--white); --c-fg: var(--white); --c-bg: var(--ink); }
  html:not(.menu-open) .over-film .site-header:not(.is-stuck) :is(.lockup__name small) { color: inherit; opacity: 0.8; }
  html:not(.menu-open) .over-film .site-header:not(.is-stuck) .lockup__brokerage { filter: brightness(0) invert(1); }
  html:not(.menu-open) .over-film .site-header:not(.is-stuck) .site-header__menu-button { border-color: currentColor; color: inherit; }
  html.menu-open .site-header, html.menu-open .over-film .site-header:not(.is-stuck) { color: var(--ink); --c-fg: var(--ink); --c-bg: var(--white); }
  .lockup { display: flex; align-items: center; gap: 1rem; flex: none; text-decoration: none; }
  .lockup__name { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; }
  .lockup__name small { display: block; margin-top: 0.4rem; font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--seaside-deep); }
  /* The house icon is sized to sit level with the MMG mark beside it; the name carries the lockup. */
  .lockup__logo { display: flex; align-items: center; gap: 0.6rem; flex: none; }
  .lockup__mark { height: 1.9rem; width: auto; }
  .lockup__word { height: 2.15rem; width: auto; }
  /* Over photographs and on the footer the logo is shown in white. */
  html:not(.menu-open) .over-film .site-header:not(.is-stuck) .lockup__logo, .site-footer .lockup__logo { filter: brightness(0) invert(1); }
  @media (max-width: 560px) { .lockup__mark { height: 1.7rem; } .lockup__word { height: 1.9rem; } }
  .lockup__rule { width: 1px; height: 2.3rem; background: currentColor; opacity: 0.3; flex: none; }
  .lockup__brokerage { height: 2.1rem; width: auto; flex: none; }

  .site-nav > ul { display: flex; align-items: center; gap: 1.1rem; font-size: 0.88rem; white-space: nowrap; }
  .site-nav a, .site-nav__toggle { text-decoration: none; background: none; border: 0; padding: 0.5rem 0; cursor: pointer; }
  .site-nav > ul > li > :is(a, .site-nav__toggle) {
    background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.3rem) / 0 1px no-repeat;
    transition: background-size var(--dur-ui) var(--ease-out);
  }
  .site-nav > ul > li > :is(a, .site-nav__toggle):is(:hover, [aria-expanded="true"], [aria-current="page"]) { background-size: 100% 1px; }
  .site-nav__item { position: relative; }
  .site-nav__sub { display: none; }
  .site-header__actions { display: flex; align-items: center; gap: 0.9rem; flex: none; font-size: 0.9rem; white-space: nowrap; }
  .site-header__actions .tel { text-decoration: none; }
  .site-header__actions .btn { min-height: 2.75rem; padding-inline: 1.25rem; }
  .site-header__menu-button { min-height: 2.75rem; padding-inline: 1.1rem; background: none; border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 500; }

  @media (min-width: 1180px) {
    [data-menu-button] { display: none; }
    /* Dropdown: a white panel with ink text whatever the header's colour; a hover bridge covers the gap. */
    .site-nav__sub {
      position: absolute; left: -1.25rem; top: calc(100% + 0.4rem); min-width: 18rem; padding: 0.6rem 0;
      color: var(--ink); background: var(--white); border-radius: 0.9rem; box-shadow: 0 0 0 1px var(--air), 0 1.25rem 2.5rem -1rem #0d131840;
    }
    .site-nav__sub::before { content: ""; position: absolute; inset: -0.6rem 0 auto; height: 0.6rem; }
    .site-nav__item:hover > .site-nav__sub, .site-nav__toggle[aria-expanded="true"] + .site-nav__sub { display: block; }
    .site-nav__sub a { display: block; padding: 0.5rem 1.25rem; font-size: 0.95rem; line-height: 1.3; white-space: normal; transition: background-color var(--dur-micro) var(--ease-ui); }
    .site-nav__sub a:hover, .site-nav__sub a:focus-visible { background: var(--cloud); }
    .site-nav__sub a[aria-current="page"] { font-weight: 500; }
    .site-nav__toggle::after { content: ""; display: inline-block; width: 0.38em; height: 0.38em; margin-left: 0.45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.2em) rotate(45deg); }
    .site-nav .only-menu { display: none; }
  }
  @media (min-width: 1180px) and (max-width: 1499px) { .site-header__actions .tel { display: none; } }
  @media (min-width: 1180px) { .site-nav > ul > li > :is(a, button) { white-space: nowrap; } .site-nav > ul > li { flex: none; } }

  @media (max-width: 1179px) {
    .site-header__actions .tel { display: none; }
    .site-header { gap: 0.6rem; }
    .site-header__menu-button { margin-left: auto; }
    .site-nav {
      position: fixed; inset: var(--header-h) 0 0; overflow-y: auto; overscroll-behavior: contain;
      padding: var(--space-m) var(--gutter) var(--space-xl); background: var(--white);
      transition: opacity var(--dur-ui) var(--ease-ui), visibility 0s;
    }
    .js .site-nav:not([data-open]) { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity var(--dur-ui) var(--ease-ui), visibility 0s var(--dur-ui); }
    .site-nav > ul { display: block; font-size: 1rem; white-space: normal; }
    .site-nav > ul > li { border-top: 1px solid var(--ink); }
    .site-nav > ul > li > :is(a, .site-nav__toggle) { display: flex; width: 100%; justify-content: space-between; align-items: baseline; padding: 0.85rem 0; font-family: var(--font-display); font-size: var(--step-2); text-align: left; background: none; }
    .site-nav__toggle::after { content: "+"; font-family: var(--font-body); font-size: 1.2rem; }
    .site-nav__toggle[aria-expanded="true"]::after { content: "\2212"; }
    .site-nav__toggle[aria-expanded="true"] + .site-nav__sub, html:not(.js) .site-nav__sub { display: block; padding-bottom: 1rem; }
    .site-nav__sub a { display: block; padding: 0.55rem 0; }
    .site-nav .only-menu { border-top: 0; }
    .site-nav .only-menu .btn { width: 100%; margin-top: var(--space-s); font: 500 1rem/1.1 var(--font-body); justify-content: center; }
  }
  @media (max-width: 560px) { .lockup__rule, .lockup__brokerage { display: none; } }
}

/* -------------------------------------------------------------------------- */
@layer components {
  /* Contact form honeypot (docs/site-guide/form.md) */
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .display { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--track-display); line-height: 1.05; }
  .script { font-family: var(--font-script); font-weight: 400; line-height: 1; color: var(--c-accent); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 3.125rem; padding: 0 1.75rem;
    font: 500 1rem/1.1 var(--font-body); text-decoration: none; text-align: center; white-space: nowrap;
    color: var(--c-bg); background: var(--c-fg); border: 1px solid var(--c-fg); border-radius: var(--radius);
    transition: background-color var(--dur-micro) var(--ease-ui), border-color var(--dur-micro) var(--ease-ui), color var(--dur-micro) var(--ease-ui);
  }
  .btn:hover { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
  .btn:active { transform: translateY(1px); }
  .btn[disabled] { opacity: 0.55; cursor: progress; }
  .btn--ghost { color: var(--c-fg); background: transparent; border-color: color-mix(in oklab, var(--c-fg) 45%, transparent); }
  .btn--ghost:hover { background: var(--c-fg); border-color: var(--c-fg); color: var(--c-bg); }

  .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: var(--c-accent); }
  .link:hover { text-decoration-thickness: 2px; }

  .field { display: grid; gap: 0.35rem; align-content: end; }
  .field label { font-size: var(--step--1); line-height: 1.35; color: var(--c-muted); }
  .field :is(input, select, textarea) {
    width: 100%; min-height: 2.875rem; padding: 0.6rem 0; font-size: 1.05rem;
    background: transparent; border: 0; border-bottom: 1px solid color-mix(in oklab, var(--c-fg) 45%, transparent); border-radius: var(--radius-field);
    transition: border-color var(--dur-micro) var(--ease-ui);
  }
  .field textarea { resize: vertical; min-height: 6rem; }
  .field :is(input, textarea)::placeholder { color: var(--c-muted); opacity: 0.75; }
  .field :is(input, select, textarea):hover { border-bottom-color: var(--c-fg); }
  .field :is(input, select, textarea):focus-visible { outline: 2px solid var(--c-focus); outline-offset: 4px; border-bottom-color: transparent; }
  .field :is(input, textarea, select):user-invalid { border-bottom-color: var(--c-error); border-bottom-width: 2px; }
  .form-status { font-size: var(--step--1); min-height: 1.4em; }
  .form-status:empty { display: none; }
  form.is-error .form-status { color: var(--c-error); }
  form[aria-busy="true"] { cursor: progress; }
  /* Sent: the fields give way to the promise, set large. */
  form.is-sent > :not(.form-status, .form-title) { display: none; }
  form.is-sent .form-status { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; color: var(--c-fg); }

  /* ---- Footer ---- */
  .site-footer { padding-block: var(--space-2xl) var(--space-l); }
  .site-footer__areas h2 { font: 400 var(--step-0)/1.4 var(--font-body); letter-spacing: 0; color: var(--c-muted); margin-bottom: var(--space-s); }
  .site-footer__areas ul { display: flex; flex-wrap: wrap; gap: 0.1em 0.5em; font-family: var(--font-display); font-size: var(--step-5); line-height: 1.08; letter-spacing: var(--track-display); }
  .site-footer__areas a { text-decoration: none; transition: color var(--dur-micro) var(--ease-ui); }
  .site-footer__areas a:hover { color: var(--sky); }
  .site-footer__areas li:not(:last-child)::after { content: ","; }
  @media (max-width: 700px) { .site-footer__areas ul { flex-direction: column; gap: 0.15em; } .site-footer__areas li:not(:last-child)::after { content: none; } }
  .site-footer__cols { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-top: var(--space-2xl); padding-top: var(--space-l); border-top: 1px solid var(--c-rule); }
  .site-footer__cols h2 { font: 500 var(--step-0)/1.4 var(--font-body); letter-spacing: 0; margin-bottom: var(--space-xs); }
  .site-footer__cols ul a { display: inline-block; padding-block: 0.3rem; text-decoration: none; }
  .site-footer__cols ul a:hover { color: var(--sky); }
  .site-footer__logos { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
  .site-footer__logos .lockup__name small { color: var(--air); }
  .site-footer__logos .lockup__rule { background: var(--white); }
  .site-footer__logos > img { height: 2.4rem; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
  .site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-l); margin-top: var(--space-xl); font-size: var(--step--1); color: var(--c-muted); }
  .site-footer__legal p { max-width: 70ch; }
}

/* -------------------------------------------------------------------------- */
/* Blog (listing + post): public/blog/index.html and blog/_post.html, which the
   WavePoint dashboard fills (docs/site-guide/blog.md). Modest defaults on the
   tokens only; restyle them to DIRECTION.md. Renaming a class means changing
   it in both templates; the {{placeholders}} and markers stay as they are. */
@layer components {
  .blog-crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2xs); font-size: var(--step--1); color: var(--c-muted); }
  .blog-crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: var(--space-2xs); }
  .blog-crumbs [aria-current] { color: var(--c-fg); }

  /* Listing */
  .blog-index { padding-block: var(--space-2xl) var(--space-3xl); }
  .blog-index__title { font-size: var(--step-5); margin-block: var(--space-m) var(--space-s); }
  .blog-index__intro { max-width: 65ch; font-size: var(--step-1); color: var(--c-muted); }
  .post-list { display: grid; gap: var(--space-xl) var(--space-l); margin-block-start: var(--space-xl); }
  @media (min-width: 768px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1100px) { .post-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .post-list__empty { grid-column: 1 / -1; color: var(--c-muted); }
  .post-card__link { display: grid; align-content: start; gap: var(--space-2xs); height: 100%; text-decoration: none; }
  .post-card__image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-block-end: var(--space-2xs); }
  .post-card__meta { font-size: var(--step--1); color: var(--c-muted); }
  .post-card__title { font-size: var(--step-2); line-height: 1.15; }
  .post-card__link:is(:hover, :focus-visible) .post-card__title { text-decoration: underline; text-underline-offset: 0.15em; }
  .post-card__excerpt { color: var(--c-muted); }

  /* Post: one reading column; the hero takes its full width. */
  .post { width: min(65ch, 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: var(--space-2xl) var(--space-3xl); }
  .post__header { display: grid; gap: var(--space-xs); margin-block: var(--space-m) var(--space-l); }
  .post__category { font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
  .post__title { font-size: var(--step-4); }
  .post__meta { font-size: var(--step--1); color: var(--c-muted); }
  .post__author { display: flex; align-items: center; gap: var(--space-xs); }
  .post__author-photo { width: var(--space-xl); height: var(--space-xl); border-radius: 50%; object-fit: cover; }
  .post__author-name { display: block; font-weight: 600; }
  .post__author-title { display: block; font-size: var(--step--1); color: var(--c-muted); }
  .post__hero { margin-block-end: var(--space-l); }
  .post__hero img { width: 100%; border-radius: var(--radius); }
  .post__body { overflow-wrap: break-word; }
  .post__body :is(p, ul, ol, table, figure, blockquote) + :is(p, ul, ol, table, figure, blockquote) { margin-block-start: var(--space-s); }
  .post__body :is(ul, ol) { padding-inline-start: 1.25em; }
  .post__body li + li { margin-block-start: var(--space-2xs); }
  .post__body h2 { font-size: var(--step-3); margin-block: var(--space-xl) var(--space-s); }
  .post__body h3 { font-size: var(--step-1); line-height: 1.25; margin-block: var(--space-l) var(--space-2xs); }
  .post__body a { text-underline-offset: 0.15em; }
  .post__body table { display: block; overflow-x: auto; border-collapse: collapse; } /* wide tables scroll in their own box */
  .post__body :is(th, td) { padding: var(--space-2xs) var(--space-xs); border: 1px solid var(--c-line); text-align: start; }
  .post__panel { padding: var(--space-m); border: 1px solid var(--c-line); border-radius: var(--radius); margin-block-end: var(--space-l); }
  .post__body .post__label { font-size: var(--step-1); margin-block: 0 var(--space-2xs); }
  .post__conclusion { margin-block-start: var(--space-l); }
  .post-faq details { border-block-end: 1px solid var(--c-line); }
  .post-faq summary { padding-block: var(--space-s); font-weight: 600; cursor: pointer; }
  .post-faq details > div { padding-block-end: var(--space-s); }
  .post__cta { margin-block-start: var(--space-xl); padding: var(--space-l); background: var(--c-accent); color: var(--c-on-accent); border-radius: var(--radius); }
  .post__cta h2 { font-size: var(--step-2); }
  .post__cta p { margin-block: var(--space-xs) var(--space-m); }
  .post__cta-button {
    display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--space-m);
    background: var(--c-on-accent); color: var(--c-accent); font-weight: 600; text-decoration: none; border-radius: var(--radius);
  }
  .post__back { margin-block-start: var(--space-l); }
}

/* -------------------------------------------------------------------------- */
@layer sections {
  /* One block per section, in page order, named after the storyboard. */

  /* ---- Home / 01 Hero ("peak to base") --------------------------------------
     .hero__world is one photograph, sized by --ww and taller than the screen.
     Static: the stage is as tall as the picture, so all of it shows.
     Motion: the stage is one pinned screen and sections/opening.js moves the world up. */
  .hero {
    --ww: max(249svh, 130vw);                 /* world width; the photo is 1.5103 : 1 */
    --wh: calc(var(--ww) / 1.5103);
    --mist: 11vw;                             /* depth of the haze over the cloud bases */
    --cx: 0.44;                               /* the world x that sits at the screen centre */
    --edge: calc(var(--ww) * var(--cx) - 50vw); /* world x of the screen's left edge */
    position: relative; background: var(--ink); color: var(--white);
  }
  .hero__stage { position: relative; height: var(--wh); overflow: clip; isolation: isolate; }
  .hero__sky { position: absolute; inset: 0 0 auto; height: 100svh; z-index: 0; }
  .hero__sky img { width: 100%; height: 100%; object-fit: cover; }
  .hero__world { position: absolute; top: 0; left: calc(var(--edge) * -1); width: var(--ww); height: var(--wh); z-index: 1; }
  .hero__land { position: absolute; inset: 0; z-index: 1; }
  .hero__land img { display: block; width: 100%; height: 100%; }

  /* Beat 1: the headline, behind the peaks */
  .hero__title {
    position: absolute; z-index: 0; top: 6.6%; left: calc(var(--cx) * 100%); translate: -50% 0; width: max-content;
    font-size: calc(var(--ww) * 0.055); font-weight: 700; line-height: 0.9; letter-spacing: -0.045em; text-transform: uppercase; text-align: center; text-wrap: nowrap;
  }
  .hero__title span { display: block; }
  .hero__lead { position: absolute; z-index: 7; left: 0; right: 0; top: calc(100svh - 17rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
  .hero__lead::before { content: ""; position: absolute; z-index: -1; inset: -5rem -50vw -3rem; background: linear-gradient(to top, #080e1400 0, #080e1480 45%, #080e1400); pointer-events: none; }
  .hero__proof { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem; font-size: var(--step-0); font-weight: 500; line-height: 1.3; text-decoration: none; }
  .hero__proof span:last-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: #ffffff80; }
  .hero__proof:hover span:last-child { text-decoration-color: currentColor; }
  .hero__stars { letter-spacing: 0.18em; font-size: 1.1em; }
  .hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-size: var(--step-0); }
  .hero :is(.hero__cta, .hero__actions) .btn { --c-fg: var(--white); --c-bg: var(--ink); }
  .hero__actions .btn--ghost { border-color: #ffffffb3; }
  .hero__tel { text-decoration: none; font-weight: 500; padding-block: 0.5rem; }
  .hero__tel:hover { color: var(--sky); }

  /* Beat 3: at the foot of the mountain. Positions are in world coordinates. */
  .hero__base { position: absolute; inset: auto 0 0; height: 100svh; z-index: 2; }
  .hero__base::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, #06100acc 0, #06100a66 calc(var(--edge) + 30vw), #06100a00 calc(var(--edge) + 52vw)), linear-gradient(to top, #06100a80 0, #06100a00 30%); pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #0000 0, #000 45%); mask-image: linear-gradient(to bottom, #0000 0, #000 45%); }
  .hero__amanda { position: absolute; bottom: 0; left: calc(var(--edge) + 50vw + min(7vw, 9rem)); height: 84svh; aspect-ratio: 750 / 1140; }
  .hero__amanda picture, .hero__amanda img { display: block; width: 100%; height: 100%; }
  .hero__amanda img { object-fit: contain; object-position: 50% 100%; filter: drop-shadow(-0.4rem 0.6rem 1.2rem #06100a66); }
  .hero__welcome { position: absolute; left: calc(var(--edge) + max(var(--gutter), min((100vw - var(--container)) / 2, 9vw))); bottom: 27svh; width: min(42rem, 37vw); }
  .hero__statement { font-size: clamp(2.3rem, 4.7vw, 5.6rem); font-weight: 600; line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance; }
  .hero__statement .script { display: block; margin-top: 0.12em; font-size: 1.45em; font-weight: 400; letter-spacing: 0; line-height: 0.9; color: var(--sky); }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

  /* Beat 2: her name. Static: a band across the forest. */
  .hero__name { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--wh) * 0.3); display: grid; justify-items: center; gap: clamp(0.5rem, 1.4vw, 1.25rem); padding-inline: var(--gutter); text-align: center; }
  .hero__wordmark { font: 700 clamp(3rem, 12.5vw, 14rem)/0.86 var(--font-body); letter-spacing: -0.05em; text-transform: uppercase; }
  .hero__brokerage { width: clamp(9rem, 19vw, 18rem); height: auto; filter: brightness(0) invert(1); }
  .hero__cloudbank { display: none; }

  @media (max-width: 899px) {
    .hero { --cx: 0.455; --ww: 300svh; --mist: 26vw; }
    .hero__title { top: 7.2%; left: calc(var(--edge) + 50vw); font-size: 15.4vw; }
    .hero__title span { display: inline; }
    .hero__title { width: calc(100vw - 2 * var(--gutter)); text-wrap: balance; }
    .hero__lead { top: calc(100svh - 15.5rem); justify-content: flex-start; }
    .hero__amanda { left: calc(var(--edge) + 44vw); height: 46svh; }
    .hero__base::before { background: linear-gradient(to top, #06100a00 34%, #06100acc 62%, #06100a00 100%); }
    .hero__welcome { bottom: 49svh; width: calc(100vw - 2 * var(--gutter)); }
    .hero__statement { font-size: 2.1rem; }
    .hero__wordmark { font-size: clamp(3.4rem, 21vw, 7rem); }
    .hero__brokerage { width: 10.5rem; }
  }

  /* ---- The scene (motion on) ---- */
  /* The scene is held by CSS (position: sticky), not by a script: the section is as tall as the scroll it needs and
     the stage sticks to the top. On phones the browser does this itself while the finger moves, so nothing slips
     before the scene starts, which a script-driven pin cannot guarantee. opening.js only scrubs the timeline. */
  .motion .hero:not(.motion-off) { height: 600vh; height: calc(100lvh + 500svh); }
  .motion .hero:not(.motion-off) .hero__stage { position: sticky; top: 0; height: 100vh; height: 100lvh; }
  @media (max-width: 899px) { .motion .hero:not(.motion-off) { height: 540vh; height: calc(100lvh + 440svh); } }
  .motion .hero:not(.motion-off) .hero__sky { height: 108%; }
  .motion .hero:not(.motion-off) .hero__name { z-index: 6; top: 0; bottom: 0; align-content: center; pointer-events: none; }
  /* In the cloud, the letters are a window back onto the mountain. */
  .motion .hero:not(.motion-off) .hero__wordmark {
    color: var(--seaside-deep);
    background: var(--ink) url("/assets/img/three-sisters-1600.webp") 50% 30% / 135% auto;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .motion .hero:not(.motion-off) .hero__brokerage { filter: none; }
  /* The cloud bank: a tall column of white whose top and bottom dissolve. Cloud photographs sit
     along both ends, each faded out on the side that meets the white, so no edge is ever a line. */
  .motion .hero:not(.motion-off) .hero__cloudbank {
    display: block; position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 270svh; pointer-events: none;
    background: linear-gradient(to bottom, #f4f7f900 0, #f4f7f9b3 34svh, #f6f8fa 70svh, #f6f8fa calc(100% - 70svh), #f4f7f9b3 calc(100% - 34svh), #f4f7f900 100%);
  }
  .hero__cloudtop, .hero__cloudfoot { position: absolute; left: 0; right: 0; height: 0; }
  .hero__cloudtop { top: 0; }
  .hero__cloudfoot { bottom: 0; }
  .cloud { position: absolute; display: block; }
  .cloud img { display: block; width: 100%; height: auto; }
  /* Both ends of the bank are the same: the white thins out over a long distance, with a few heavily
     blurred cloud photographs inside it for texture. No cut-out shapes, so nothing can float off. */
  .hero__cloudtop .cloud, .hero__cloudfoot .cloud { opacity: 0.6; filter: blur(6px); }
  .cloud--m1 { left: -12%; top: 2svh; width: 62%; }
  .cloud--m2 { left: 26%; top: 14svh; width: 58%; }
  .cloud--m3 { right: -14%; top: 0; width: 64%; }
  .cloud--m3 img { transform: scaleX(-1); }
  /* Underside: thinning mist, not shapes. */
  .cloud--b1 { left: -12%; bottom: 2svh; width: 62%; }
  .cloud--b2 { left: 26%; bottom: 14svh; width: 58%; }
  .cloud--b3 { right: -14%; bottom: 0; width: 64%; }
  .cloud--b3 img { transform: scaleX(-1); }
  @media (max-width: 899px) {
    .cloud--m1 { left: -50%; width: 150%; }
    .cloud--m2 { left: 0; width: 140%; }
    .cloud--m3 { right: -60%; width: 160%; }
    .cloud--b1 { left: -50%; width: 150%; }
    .cloud--b2 { left: 0; width: 140%; }
    .cloud--b3 { right: -60%; width: 160%; }
  }
  /* ---- Variant "mark" (concept-mmg page): the view opens through the MMG peaks ---- */
  .hero__mark { display: none; }
  .hero--mark { --ms: max(100vw, 177.78svh); }
  .hero--mark .hero__title { z-index: 9; top: 58svh; left: max(var(--gutter), (100vw - var(--container)) / 2); translate: 0 -100%; width: 6.4em; font-size: clamp(2.6rem, 6.2vw, 6rem); font-weight: 700; line-height: 0.9; text-align: left; text-wrap: balance; }
  .hero--mark .hero__lead { z-index: 9; top: calc(58svh + 1.75rem); flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.25rem; }
  .hero--mark .hero__lead::before { content: none; }
  .motion .hero--mark:not(.motion-off) .hero__mark {
    display: block; position: absolute; z-index: 8; overflow: visible; pointer-events: none; max-width: none;
    width: var(--ms); height: calc(var(--ms) * 0.5625); left: calc((100vw - var(--ms)) / 2); top: calc((100svh - var(--ms) * 0.5625) / 2);
  }
  @media (max-width: 899px) {
    .hero--mark { --ms: 172vw; }
    .hero--mark .hero__title { top: calc(var(--header-h) + 2.5svh); left: 0; translate: none; width: 100%; padding-inline: var(--gutter); font-size: 11.6vw; line-height: 0.98; letter-spacing: -0.02em; text-align: center; }
    .hero--mark .hero__lead { top: calc(100svh - 9.75rem); align-items: center; text-align: center; gap: 1rem; }
    .hero--mark .hero__proof, .hero--mark .hero__cta { justify-content: center; }
    /* The mark sits midway between the foot of the headline and the reviews line. */
    .motion .hero--mark:not(.motion-off) .hero__mark { left: calc(50vw - var(--ms) * 0.6456); top: calc(51.25svh + 22.75vw - 2.25rem - var(--ms) * 0.28125); }
    /* Phones show only a strip of the world, so they get that strip alone, at the photograph's full resolution. */
  }
  @media (max-width: 899px) and (max-aspect-ratio: 9/10) {
    .hero__land img { position: absolute; left: 15.99%; top: 0; width: 45.99%; height: 100%; }
  }

  /* Without motion (reduced motion, or motion failed) the whole tall picture shows at once: her name
     is already in the header, so the big name is left out, and her promise sits under the buttons. */
  html:not(.motion) .hero__name, .hero.motion-off .hero__name { display: none; }
  html:not(.motion) .hero__promise, .hero.motion-off .hero__promise { top: calc(58svh + 9.5rem); padding-inline: max(var(--gutter), (100vw - var(--container)) / 2); font-size: var(--step-3); text-align: left; }

  @media (max-width: 899px) { html:not(.motion) .hero__promise, .hero.motion-off .hero__promise { top: calc(100svh + 1rem); } }

  /* A soft seaside shade over the top of the sky: the header and her promise read in white on it, and the overcast feels calmer. */
  .hero__stage::before { content: ""; position: absolute; inset: 0 0 auto; height: 62svh; z-index: 3; background: linear-gradient(#3d4f61e6 0, #3d4f6199 38%, #3d4f6100 100%); pointer-events: none; opacity: var(--shade, 1); }
  html:not(.motion) .hero__stage::before, .hero.motion-off .hero__stage::before { height: 11rem; }
  /* A short shade behind the header only, so the menu reads over snow at the arrival. */
  .hero__stage::after { content: ""; position: absolute; inset: 0 0 auto; height: 7.5rem; z-index: 3; background: linear-gradient(#0d131873, #0d131800); pointer-events: none; }
  .motion .hero:not(.motion-off) .hero__promise { text-transform: none; font-weight: 600; letter-spacing: -0.04em; font-size: clamp(2.2rem, 5.6vw, 6rem); line-height: 0.98; top: calc(var(--header-h) + 3svh); text-shadow: none; }

  /* Her promise, in the open sky. Static: a line across the mountain, lower down the picture. */
  .hero__promise { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--wh) * 0.2); padding-inline: var(--gutter); font: 700 clamp(2.4rem, 7.4vw, 8.5rem)/0.9 var(--font-body); letter-spacing: -0.045em; text-transform: uppercase; text-align: center; text-wrap: balance; text-shadow: 0 0.04em 0.6em #0b142066; }
  .motion .hero:not(.motion-off) .hero__promise { z-index: 4; top: calc(var(--header-h) + 5svh); }

  /* Before the scene script has started, the layers it places (her name, the cloud bank, the arrival) would show
     through the mark for a moment. They stay hidden until it is ready; the failsafe removes .motion if it never is. */
  .motion:not(.is-ready) .hero :is(.hero__name, .hero__cloudbank, .hero__base, .hero__promise) { visibility: hidden; }

  /* The picture is in place from the first paint. It then drifts very slowly, so the view through the mark feels alive.
     Transform only (no layout, no effect on loading); never runs for reduced motion. */
  .motion .hero:not(.motion-off) .hero__land img { animation: hero-drift 40s ease-in-out infinite alternate; transform-origin: 44% 20%; will-change: transform; }
  @keyframes hero-drift { from { transform: scale(1.012) translate3d(0.5%, 0, 0); } to { transform: scale(1.05) translate3d(-0.7%, -0.4%, 0); } }

  /* ---- Home / 02 Opening lines: her photograph, and her pitch set large ---- */
  .intro { padding-block: var(--space-3xl); }
  .intro__grid { display: grid; gap: var(--space-xl); align-items: center; }
  .intro__photo { border-radius: var(--radius-frame); overflow: clip; }
  .intro__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 45%; }
  .intro__lead { font-size: clamp(1.9rem, 4.1vw, 4rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
  .intro__more { margin-top: var(--space-m); font-size: var(--step-1); line-height: 1.45; max-width: 30rem; color: var(--c-muted); }
  .intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: var(--space-l); }
  @media (min-width: 900px) { .intro__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-2xl); } }
}

/* -------------------------------------------------------------------------- */
@layer motion {
  /* Hidden start states exist ONLY under .motion, which the head script adds
     (and removes again if motion never finishes starting). Never hide content
     anywhere else. Module start states are set in JS, not here. */
  .motion [data-reveal] {
    opacity: 0;
    transform: translateY(1.75rem);
    transition:
      opacity var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0ms),
      transform var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0ms);
  }
  .motion [data-reveal].is-revealed { opacity: 1; transform: none; }

  /* The wrapper stays unclipped (it is what the observer watches; a clip-path on
     it would hide it from IntersectionObserver) and frames the reveal; its
     children wipe up while the image settles from a slight zoom. */
  .motion [data-reveal="media"] { opacity: 1; transform: none; overflow: clip; }
  .motion [data-reveal="media"] > * {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1400ms var(--ease-in-out) var(--reveal-delay, 0ms);
  }
  .motion [data-reveal="media"] :is(img, video) {
    transform: scale(1.15);
    transition:
      clip-path 1400ms var(--ease-in-out) var(--reveal-delay, 0ms),
      transform 1800ms var(--ease-out) var(--reveal-delay, 0ms);
  }
  .motion [data-reveal="media"].is-revealed > * { clip-path: inset(0); }
  .motion [data-reveal="media"].is-revealed :is(img, video) { transform: none; }

  .motion [data-split]:not(.is-split) { visibility: hidden; }
  .motion [data-split] .split-line {
    transform: translateY(110%);
    transition: transform var(--dur-line) var(--ease-out);
    transition-delay: calc(var(--reveal-delay, 0ms) + var(--i, 0) * 80ms);
  }
  .motion [data-split].is-revealed .split-line { transform: none; }
}

/* Page-to-page transitions (multi-page sites; browsers without support just navigate). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* -------------------------------------------------------------------------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Inner pages and the rest of home (written by scripts/migrate-live.mjs). */
@layer sections {
  body:not(.over-film) main { padding-top: var(--header-h); }

  /* ---- Page hero: the top of the Canmore photograph, the title low on the left ---- */
  .page-hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(72svh, 46rem); padding-block: calc(var(--header-h) + var(--space-xl)) var(--space-xl); color: var(--white); background: var(--ink); }
  .page-hero__bg { position: absolute; inset: 0; z-index: -2; }
  .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
  .page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, #0b1420e6 0, #0b142073 50%, #0b14204d 100%); }
  .page-hero__credit { position: absolute; right: max(var(--gutter), (100% - var(--container)) / 2); bottom: 0.5rem; font-size: 0.7rem; line-height: 1.2; color: #ffffffb3; }
  .page-hero__credit a { color: inherit; text-decoration: none; }
  .page-hero__credit a:hover { text-decoration: underline; }
  .page-hero--slim { min-height: min(46svh, 30rem); }
  .page-hero__inner { display: grid; gap: var(--space-m) var(--space-xl); align-items: end; }
  .page-hero__title { font-size: clamp(2.3rem, 5.6vw, 5.4rem); font-weight: 700; line-height: 0.96; letter-spacing: -0.04em; max-width: 16em; }
  .page-hero__sub { max-width: 34rem; font-size: var(--step-1); line-height: 1.4; }
  .page-hero__sub p + p { margin-top: 0.75rem; font-size: var(--step-0); line-height: 1.6; }
  .page-hero .btn { --c-fg: var(--white); --c-bg: var(--ink); }
  @media (min-width: 1000px) { .page-hero__inner:has(.page-hero__sub) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

  /* ---- Article layout: a sticky list of the sections beside the text ---- */
  .page { display: grid; gap: var(--space-xl); padding-block: var(--space-2xl); }
  .page__aside { display: grid; gap: var(--space-m); align-content: start; }
  .author { display: grid; grid-template-columns: 6.5rem 1fr; column-gap: 1rem; align-items: start; }
  .author img { grid-row: span 4; width: 6.5rem; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 10%; border-radius: 0.75rem; }
  .author__name { font-weight: 600; font-size: var(--step-1); line-height: 1.1; letter-spacing: -0.02em; }
  .author__name a { text-decoration: none; }
  .author__name a:hover { color: var(--seaside); }
  .author__role, .author__note { font-size: 0.9rem; line-height: 1.4; color: var(--c-muted); }
  .author__links { display: grid; gap: 0.2rem; margin-top: 0.5rem; font-size: 0.9rem; }
  .toc { display: none; }
  @media (min-width: 1000px) {
    .page { grid-template-columns: 17rem minmax(0, 46rem); justify-content: space-between; }
    .page__aside { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; display: flex; flex-direction: column; max-height: calc(100svh - var(--header-h) - 3rem); }
    .toc { min-height: 0; display: flex; flex-direction: column; }
    .toc ol { min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
    .toc ol::-webkit-scrollbar { display: none; }
    .author { flex: none; grid-template-columns: 1fr; row-gap: 0.15rem; }
    .author img { grid-row: auto; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-frame); margin-bottom: 0.75rem; }
  }
  .toc__title { font: 500 var(--step--1)/1.4 var(--font-body); letter-spacing: 0; color: var(--c-muted); margin-bottom: 0.5rem; }
  .toc ol { border-top: 1px solid var(--ink); }
  .toc li { border-bottom: 1px solid var(--air); }
  .toc ol a { display: block; padding: 0.6rem 0; font-size: 0.92rem; line-height: 1.35; text-decoration: none; color: var(--c-muted); transition: color var(--dur-micro) var(--ease-ui), padding var(--dur-ui) var(--ease-out); }
  .toc ol a:hover, .toc ol a.is-current { color: var(--ink); }
  .toc ol a.is-current { padding-left: 0.75rem; box-shadow: inset 2px 0 0 var(--seaside); }


  .prose { min-width: 0; }
  .prose__section { scroll-margin-top: calc(var(--header-h) + 1rem); }
  .prose__section + .prose__section { margin-top: var(--space-xl); padding-top: var(--space-xl); border-top: 1px solid var(--ink); }
  .prose h2 { font-size: var(--step-4); line-height: 1.02; margin-bottom: var(--space-m); }
  .prose h3 { font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.025em; margin: var(--space-l) 0 var(--space-xs); }
  .prose h4, .prose h5 { font: 600 var(--step-1)/1.2 var(--font-body); letter-spacing: -0.01em; margin: var(--space-m) 0 var(--space-2xs); }
  .prose :is(p, ul, ol) + :is(p, ul, ol) { margin-top: var(--space-s); }
  .prose :is(ul, ol) { padding-left: 1.2em; }
  .prose li + li { margin-top: 0.4rem; }
  .prose li::marker { color: var(--seaside); }
  .prose a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: var(--seaside); }
  .prose a:not(.btn):hover { text-decoration-thickness: 2px; }
  .prose__lead { font-size: var(--step-1); line-height: 1.45; }
  .prose__lead + .prose__section, .prose > .prose__section:first-child:not(:has(h2)) + .prose__section { margin-top: var(--space-l); }
  .prose__figure { margin-block: var(--space-m); border-radius: var(--radius-frame); overflow: clip; }
  .prose__figure img { width: 100%; max-height: 32rem; object-fit: cover; }
  /* Portraits are never cropped: shown whole, at a sensible width. */
  .prose__figure--tall { max-width: 24rem; }
  .prose__figure--tall img { max-height: none; }
  .prose__cta { margin-top: var(--space-m); }
  .prose__table { overflow-x: auto; margin-block: var(--space-m); }
  .prose table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.95rem; }
  .prose :is(th, td) { padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--air); text-align: left; vertical-align: top; }
  .prose tr:first-child :is(th, td) { border-bottom-color: var(--ink); font-weight: 500; }

  /* Places: photo, name, a few lines. No card chrome. */
  .places { display: grid; gap: var(--space-l) var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin-top: var(--space-m); }
  .place img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0.75rem; }
  .prose .place h3 { margin-top: var(--space-xs); font-size: var(--step-1); }
  .place p { font-size: 0.95rem; }

  .faq { border-top: 1px solid var(--ink); }
  .faq details { border-bottom: 1px solid var(--air); }
  .faq summary { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; font-weight: 500; font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.015em; cursor: pointer; list-style: none; }
  .faq summary a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; flex: none; font-weight: 400; color: var(--seaside); }
  .faq details[open] summary::after { content: "\2212"; }
  .faq details > div { padding-bottom: 1.25rem; max-width: 40rem; }

  /* ---- Closing: the contact form, on every page ---- */
  .closing { padding-block: var(--space-2xl); scroll-margin-top: var(--header-h); }
  .closing__grid { display: grid; gap: var(--space-xl); }
  .closing__copy h2 { font-size: var(--step-5); line-height: 0.98; margin-bottom: var(--space-m); }
  .closing__copy p { max-width: 30rem; }
  .closing__copy p + p { margin-top: 0.75rem; }
  .closing__copy .closing__direct { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: var(--space-m); font-weight: 500; }
  .form { display: grid; gap: var(--space-m) var(--space-l); align-content: start; }
  .form .btn { justify-self: start; }
  .form .cf-turnstile:empty { display: none; }
  .form-after { display: none; }
  form.is-sent .form-after { display: block; }
  @media (min-width: 700px) { .form { grid-template-columns: 1fr 1fr; } .form :is(.field--wide, .cf-turnstile, .btn, .form-status, .form-after) { grid-column: 1 / -1; } }
  @media (min-width: 1000px) { .closing__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }

  /* ---- Calculator ---- */
  .calc { display: grid; gap: var(--space-l); padding-top: var(--space-2xl); }
  .calc__inputs { display: grid; gap: var(--space-m) var(--space-l); align-content: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
  .calc__result { padding: var(--space-l); color: var(--white); background: var(--seaside-deep); border-radius: var(--radius-frame); }
  .calc__label { color: var(--air); }
  .calc__figure { font: 700 clamp(3rem, 8vw, 6.5rem)/1 var(--font-body); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; margin-block: 0.1em 0.3em; }
  .calc__rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid #ffffff40; font-variant-numeric: tabular-nums; }
  .calc__rows dt { color: var(--air); }
  @media (min-width: 1000px) { .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }

  /* ---- Home / 03 Uncertain market: the question over the road to the Rockies ---- */
  .statement { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(92svh, 56rem); padding-block: var(--space-3xl) var(--space-2xl); color: var(--white); background: var(--ink); overflow: clip; }
  .statement__bg { position: absolute; inset: 0; z-index: -2; }
  .statement__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
  .statement::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, #0b1420f2 0, #0b142099 45%, #0b142026 100%); }
  .statement__grid { display: grid; gap: var(--space-l); align-items: end; }
  .statement__title { font-size: clamp(2.6rem, 7vw, 7rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; }
  .statement__body { font-size: var(--step-1); line-height: 1.45; }
  .statement__body p + p { margin-top: var(--space-m); }
  .statement .btn { --c-fg: var(--white); --c-bg: var(--ink); }
  @media (min-width: 1000px) { .statement__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-2xl); } }

  /* ---- Home / 04 Guide: seven topics, one open at a time ---- */
  .guide { padding-block: var(--space-3xl); }
  .guide__grid { display: grid; gap: var(--space-l); }
  .guide__title { font-size: var(--step-5); line-height: 0.98; }
  .guide__list { border-top: 1px solid var(--ink); }
  .guide details { border-bottom: 1px solid var(--ink); }
  .guide summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.1rem 0; font-size: var(--step-3); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; cursor: pointer; list-style: none; color: var(--seaside); transition: color var(--dur-micro) var(--ease-ui); }
  .guide summary::-webkit-details-marker { display: none; }
  .guide summary::after { content: "+"; font-weight: 400; font-size: 0.7em; }
  .guide details[open] summary::after { content: "\2212"; }
  .guide summary:hover, .guide details[open] summary { color: var(--ink); }
  .guide__body { max-width: 40rem; padding-bottom: var(--space-m); }
  .guide__body p + p { margin-top: 0.75rem; }
  @media (min-width: 1000px) { .guide__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } .guide__title { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; } }

  /* ---- Home / 05 Reviews ---- */
  .reviews { padding-block: var(--space-3xl) var(--space-2xl); overflow: clip; }
  .reviews__title { font-family: var(--font-display); font-weight: 400; font-size: var(--step-6); line-height: 1; letter-spacing: var(--track-display); max-width: 14em; }
  .reviews__track { display: flex; gap: var(--space-l); margin-top: var(--space-xl); padding: 0 max(var(--gutter), (100% - var(--container)) / 2) var(--space-m); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--seaside) transparent; }
  .review { flex: none; width: min(30rem, 82vw); padding-top: var(--space-m); border-top: 1px solid var(--ink); scroll-snap-align: start; display: grid; align-content: space-between; gap: var(--space-m); }
  .review blockquote { font-size: var(--step-0); line-height: 1.55; }
  .review figcaption { display: flex; gap: 0.75rem; align-items: baseline; }
  .review strong { font-weight: 500; font-size: var(--step-1); }
  .review span { color: var(--c-muted); }
  .reviews__widget { margin-top: var(--space-l); font-family: var(--font-body); }
  .reviews__widget [data-wp-reviews] { min-height: 16rem; }
  .reviews__more { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: var(--space-l); }

  /* ---- Home / 06 Team ---- */
  .team { padding-block: var(--space-3xl); }
  .team__title { font-size: var(--step-6); line-height: 0.94; letter-spacing: -0.045em; margin-bottom: var(--space-xl); }
  .member { display: grid; gap: var(--space-l); align-items: center; }
  .member + .member { margin-top: var(--space-2xl); }
  .member__photo { border-radius: var(--radius-frame); overflow: clip; }
  .member__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
  .member h3 { font-size: var(--step-4); }
  .member__role { color: var(--c-muted); margin-block: 0.3rem var(--space-m); }
  .member__copy p + p { margin-top: 0.75rem; }
  .member__copy .member__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-m); }
  @media (min-width: 900px) {
    .member { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); }
    .member--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
    .member--flip .member__photo { order: 2; }
  }

  /* ---- Home / 08 Latest resources ---- */
  .latest { padding-block: var(--space-3xl); }
  .latest__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-s) var(--space-l); margin-bottom: var(--space-l); }
  .latest__head h2 { font-size: var(--step-5); }
  .latest__grid { display: grid; gap: 0 var(--space-xl); }
  .latest__post { display: grid; gap: var(--space-m); align-content: start; padding-block: var(--space-m); border-top: 1px solid var(--ink); text-decoration: none; }
  .latest__post img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-frame); }
  .latest__meta { font-size: var(--step--1); color: var(--c-muted); }
  .latest__post h3 { font-size: var(--step-2); line-height: 1.08; letter-spacing: -0.03em; margin-block: 0.4rem 0.6rem; transition: color var(--dur-micro) var(--ease-ui); }
  .latest__post--lead h3 { font-size: var(--step-3); }
  .latest__post:hover h3 { color: var(--seaside); }
  @media (min-width: 900px) {
    .latest__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .latest__post--lead { grid-row: span 2; }
    .latest__post:not(.latest__post--lead) { grid-template-columns: 11rem minmax(0, 1fr); }
    .latest__post:not(.latest__post--lead) img { aspect-ratio: 1; border-radius: 0.75rem; }
    .latest__post:not(.latest__post--lead) h3 { font-size: var(--step-1); margin-top: 0.3rem; }
  }

  /* ---- Contact. Desktop: exactly one screen. The Three Sisters fill it, untinted; Amanda stands in front of
     them on the left, cut out; everything to read or fill in is on one white sheet, so legibility never
     depends on the photograph. Sizes follow the screen height. ---- */
  .contact { position: relative; isolation: isolate; overflow: clip; background: var(--air); }
  .contact__bg { position: absolute; inset: 0; z-index: -2; }
  .contact__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 100%; }
  .contact::before { content: ""; position: absolute; inset: 0 0 auto; height: 9rem; z-index: -1; background: linear-gradient(#0d131880, #0d131800); }
  .contact__grid { display: grid; gap: 0; padding-top: calc(var(--header-h) + 0.5rem); }
  .contact__amanda { align-self: end; justify-self: center; width: min(70vw, 22rem); margin-bottom: -1px; }
  .contact__amanda img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 2rem #0d131859); }
  .contact__sheet { display: grid; gap: clamp(0.7rem, 2.2vh, 1.6rem); padding: clamp(1.25rem, 3.4vh, 2.5rem) clamp(1.25rem, 2.6vw, 2.75rem); color: var(--ink); background: var(--white); border-radius: var(--radius-frame) var(--radius-frame) 0 0; }
  .contact__title { font-size: clamp(2.2rem, 6.6vh, 4.6rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; }
  .contact__lead { margin-top: -0.2rem; font-size: var(--step-1); line-height: 1.3; color: var(--c-muted); }
  .contact .form { gap: clamp(0.5rem, 1.7vh, 1.25rem) var(--space-m); }
  .contact .field :is(input, select, textarea) { min-height: 2.75rem; padding: 0.5rem 0.8rem; background: #f3f5f6; border: 1px solid var(--air); border-radius: 0.6rem; }
  .contact .field :is(input, select, textarea):hover { border-color: var(--seaside); }
  .contact .field :is(input, select, textarea):focus-visible { outline-offset: 2px; border-color: var(--seaside); }
  .contact .field textarea { height: clamp(3.5rem, 11vh, 7rem); min-height: 0; resize: none; }
  .contact__direct { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1.5rem; padding-top: clamp(0.7rem, 2vh, 1.25rem); border-top: 1px solid var(--ink); color: var(--c-muted); }
  .contact__phone { margin-left: 0.3rem; font-weight: 700; font-size: var(--step-2); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; white-space: nowrap; }
  .contact__links { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; font-size: 0.95rem; }
  .contact__links a { display: inline-block; padding-block: 0.3rem; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: var(--seaside); }
  .contact__phone:hover, .contact__links a:hover { color: var(--seaside); }
  @media (max-width: 999px) {
    .contact { background: var(--white); }
    .contact__bg { bottom: auto; height: 31rem; }
    .contact__bg img { object-position: 30% 55%; }
    .contact__grid { position: relative; padding-bottom: var(--space-xl); }
    .contact__amanda { position: relative; z-index: 1; margin-top: 1.1rem; }
    .contact__title { position: absolute; z-index: 0; top: calc(var(--header-h) + 0.25rem); left: 0; right: 0; font-size: 10.8vw; text-align: center; color: var(--white); white-space: nowrap; text-shadow: 0 0 1.5rem #0d131866; }
    .contact__sheet { position: static; border-radius: var(--radius-frame); box-shadow: 0 0 0 1px var(--air), 0 1.5rem 3rem -1.5rem #0d131859; z-index: 2; }
    .contact__lead { margin-top: 0; }
  }
  @media (min-width: 1000px) {
    .contact { min-height: 100svh; display: grid; }
    .contact__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-xl); align-items: end; padding-bottom: clamp(1rem, 3.5vh, 2.5rem); }
    .contact__amanda { width: auto; height: min(78svh, 46rem); aspect-ratio: 632 / 791; margin-bottom: calc(-1 * clamp(1rem, 3.5vh, 2.5rem)); }
    .contact__amanda img { height: 100%; width: auto; }
    .contact__sheet { align-self: center; border-radius: var(--radius-frame); box-shadow: 0 1.5rem 4rem -1.5rem #0d131880; }
  }

  /* ---- Blog and the small pages ---- */
  .blog-index, .post { padding-top: var(--space-xl); }
  .blog-index__title { font-weight: 700; letter-spacing: -0.04em; }
  .post-card__image, .post__hero img { border-radius: var(--radius-frame); }
  .post__title { font-weight: 700; letter-spacing: -0.035em; }
  .post__panel { background: var(--cloud); border: 0; border-radius: var(--radius-frame); }
  .post__body h2 { letter-spacing: -0.03em; }
  .post__cta { background: var(--seaside-deep); border-radius: var(--radius-frame); }
  .post__cta-button { color: var(--ink); border-radius: var(--radius); }
  .plain { padding-block: var(--space-2xl) var(--space-3xl); max-width: 46rem; }
  .plain h1 { font-size: var(--step-5); margin-bottom: var(--space-m); }
  .plain h2 { font-size: var(--step-2); margin: var(--space-l) 0 var(--space-xs); }
  .plain p + p { margin-top: var(--space-s); }
}
