/* GEODE site layout: base type, the felt surfaces, header and phone menu, heroes, footer.
   Loads last, after the design system's tokens, components, emphasis and felt divider.
   Colours are tokens; the only literal values left are shadow and tint strengths. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--foundation);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
p, li { text-wrap: pretty; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
.felt :focus-visible { outline-color: var(--accent); }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 32px; }
.mono { font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }

/* A fact still to be confirmed: honey-washed, with its label (preview only; public builds refuse them). */
.todo { padding: 1px 6px; border-radius: 6px; background: var(--accent-tint); color: var(--text-secondary); font-size: 0.92em; }
.todo::before { content: "To confirm · "; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.felt .todo { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--foundation); }
.felt .todo::before { color: var(--accent); }

/* ---------- Skip link and preview banner ---------- */
.skip {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  padding: 12px 22px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.preview-banner { background: var(--surface-4); color: var(--foundation); font-size: 14px; line-height: 1.4; }
.preview-banner p { max-width: 1240px; margin: 0 auto; padding: 9px 32px; }
.preview-banner strong { color: var(--accent); font-weight: 600; }
.preview-note {
  margin-block: 48px 0; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------- Felt: soft wool on burgundy surfaces only ---------- */
.felt {
  background-color: var(--secondary);
  background-image: url(../images/felt-texture-soft.png);
  background-size: 260px;
  background-blend-mode: soft-light;
  color: var(--foundation);
}
/* The hero divider's top band carries the same felt, so the surface runs on into the waves. */
.hero.felt + .felt-divider {
  background-color: var(--secondary);
  background-image: linear-gradient(transparent var(--felt-split), var(--felt-below) var(--felt-split)), url(../images/felt-texture-soft.png);
  background-size: auto, 260px;
  background-blend-mode: normal, soft-light;
}
/* On felt, headings are pale (the emphasis stylesheet makes them burgundy on light pages). */
.felt :where(h1, h2, h3) { color: var(--foundation); }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.25;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-fast) var(--easing-standard), box-shadow var(--duration-fast) var(--easing-standard);
}
.pill:hover { background: var(--accent-hover); }
.pill--ghost { background: transparent; color: var(--foundation); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foundation) 50%, transparent); }
.pill--ghost:hover { background: color-mix(in srgb, var(--foundation) 6%, transparent); box-shadow: inset 0 0 0 1px var(--foundation); }
/* On light pages the button is burgundy (colour option A); honey stays the button on burgundy. */
.pill--primary { background: var(--secondary); color: var(--on-secondary); }
.pill--primary:hover { background: color-mix(in srgb, var(--secondary) 86%, #000); }
.pill--outline { background: transparent; color: var(--secondary); box-shadow: inset 0 0 0 1.5px var(--secondary); }
.pill--outline:hover { background: color-mix(in srgb, var(--secondary) 6%, transparent); }

/* Visible to screen readers only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; }
.site-header .bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav call";
  align-items: center;
  column-gap: 40px;
  padding-block: 26px;
}
.site-header .bar--lockup { grid-template-areas: "brand nav call" "desc desc desc"; row-gap: 10px; }
.site-header .brand { grid-area: brand; display: block; justify-self: start; color: var(--foundation); line-height: 0; text-decoration: none; }
.site-header .wordmark { height: 48px; width: auto; }
.template-home .site-header .wordmark { height: 72px; } /* larger on the home page only (Sarah, 2026-11-05) */
.lockup-descriptor { grid-area: desc; margin: 0; color: var(--surface-low); font-size: 13px; line-height: 1.35; letter-spacing: 0.01em; }

.site-nav { grid-area: nav; justify-self: end; }
.site-nav ul { display: flex; gap: clamp(20px, 2.2vw, 30px); margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--surface); font-size: 15px; font-weight: 600; text-decoration: none; text-underline-offset: 7px; white-space: nowrap; }
.site-nav a:hover { color: var(--on-secondary); text-decoration-line: underline; text-decoration-thickness: 1px; }
.site-nav a[aria-current="page"] { color: var(--on-secondary); text-decoration-line: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.nav-fax { display: none; }

.site-header .call { grid-area: call; gap: 0.25em; }
.menu-btn {
  grid-area: menu; display: none; align-items: center;
  padding: 8px 15px; border: 1px solid color-mix(in srgb, var(--foundation) 45%, transparent); border-radius: var(--radius-pill);
  background: transparent; color: var(--foundation);
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; cursor: pointer;
}
.menu-btn[aria-expanded="true"] { background: var(--foundation); border-color: var(--foundation); color: var(--secondary); }

/* The name in type, when the brand is set in plain type instead of the mark. */
.wordmark-text { display: inline-block; font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: 0.06em; }
.site-header .wordmark-text { font-size: 34px; color: var(--foundation); }

/* ---------- Hero: home ---------- */
.hero { position: relative; overflow: hidden; }
.hero--home::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 65% at 78% 58%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%);
}
.hero--home > .wrap {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: center;
  padding-block: 48px 72px;
}
.hero .eyebrow { margin: 0 0 30px; color: var(--surface-low); }
.hero h1 {
  margin: 0 0 30px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(50px, 6.4vw, 92px); line-height: 1; letter-spacing: -0.02em;
  color: var(--foundation);
}
.hero h1 em { font-style: italic; font-weight: 400; }
.hero .lede { margin: 0 0 38px; max-width: 26em; color: var(--surface); font-size: 21px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.opening {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 34px 0 0; padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--foundation) 18%, transparent);
  color: var(--surface-low);
}
.portrait { position: relative; margin: 0 0 24px; }
.arch { overflow: hidden; aspect-ratio: 4 / 5; border-radius: 999px 999px 24px 24px; box-shadow: 0 30px 60px rgba(18, 18, 18, 0.3); }
.arch picture, .arch img { width: 100%; height: 100%; }
.arch img { object-fit: cover; }

/* ---------- Hero: inner pages (compact; the divider's felt band continues it) ---------- */
.hero--page > .wrap { position: relative; padding-block: 36px 28px; }
.hero--page h1 {
  max-width: 17em; margin: 0;
  font-size: clamp(42px, 5vw, 68px); line-height: 1.04; letter-spacing: -0.015em;
}
.page-intro { max-width: 36em; margin: 22px 0 0; color: var(--surface); font-size: 20px; line-height: 1.5; }
.page-intro p { margin: 0 0 0.6em; }
.page-intro > :last-child { margin-bottom: 0; }
.page-intro a { color: var(--foundation); }

/* ---------- Page body: a plain section until its kind has its own component ---------- */
.block { padding-block: 64px; }
.felt-divider + .block { padding-top: 40px; }
.prose > * { max-width: 40em; }
.prose h2 {
  margin: 1.6em 0 0.5em;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -0.012em;
}
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose .lede { color: var(--text-secondary); font-size: 21px; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer {
  background: url(../images/contours-footer.svg) center top / 100% 120px no-repeat, var(--surface);
  color: var(--text-secondary);
  font-size: 15px;
}
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 96px 48px; }
.site-footer p, .site-footer address { margin: 0; font-style: normal; }
.footer-brand .brand { display: inline-block; margin-bottom: 16px; color: var(--secondary); line-height: 0; text-decoration: none; }
.footer-brand .wordmark { height: 46px; width: auto; }
.site-footer .wordmark-text { font-size: 32px; color: var(--secondary); }
.footer-brand p { max-width: 24em; }
.footer-label { display: block; margin: 0 0 8px; color: var(--text-primary); }
.site-footer a { color: var(--text-primary); text-decoration-color: color-mix(in srgb, var(--text-primary) 35%, transparent); }
.site-footer a:hover { color: var(--link); text-decoration-color: currentColor; }
.footer-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding-block: 22px 40px; border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer-links ul { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { text-decoration: underline; }
.legal { color: var(--text-secondary); }
/* The land acknowledgement on every page, under the links and the legal line, in smaller type (Dr. Yim, 2026-11-22).
   The same colour as the legal line, so its contrast on the footer ground is unchanged. */
.footer-base:has(+ .land-acknowledgement) { padding-bottom: 18px; }
.land-acknowledgement { max-width: 78em; margin: 0; padding-bottom: 40px; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .wrap { padding-inline: 20px; }
  .preview-banner p { padding-inline: 20px; }

  .site-header .bar,
  .site-header .bar--lockup {
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "brand . call menu";
    column-gap: 10px;
    padding-block: 16px;
  }
  .site-header .bar--lockup { grid-template-areas: "brand . call menu" "desc desc desc desc"; row-gap: 8px; }
  .site-header .wordmark { height: 36px; }
  .template-home .site-header .wordmark { height: 48px; }
  .site-header .wordmark-text { font-size: 27px; }
  .lockup-descriptor { font-size: 12px; }
  .site-header .call { padding: 9px 15px; font-size: 14px; }

  /* Without the script, the menu sits under the header as a row of links. */
  .site-nav { grid-area: auto; grid-column: 1 / -1; justify-self: start; }
  .site-nav ul { flex-wrap: wrap; gap: 8px 20px; padding-top: 6px; }

  /* With it, the Menu button opens a panel under the header. */
  .js .menu-btn { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    justify-self: stretch; /* an absolutely placed grid child still honours justify-self */
    padding: 6px 20px 20px;
    background: var(--foundation); color: var(--text-primary);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(38, 36, 34, 0.18);
  }
  .js .menu-open .site-nav { display: block; }
  .js .site-nav :focus-visible { outline-color: var(--secondary); } /* the panel is light: burgundy focus, not honey */
  .js .site-nav ul { flex-direction: column; flex-wrap: nowrap; gap: 0; padding-top: 0; }
  .js .site-nav a { display: block; padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--text-primary); font-size: 17px; }
  .js .site-nav a:hover { color: var(--link); }
  .js .site-nav a[aria-current="page"] { color: var(--secondary); text-decoration-line: none; box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .js .nav-fax { display: block; margin: 16px 0 0; color: var(--text-secondary); font-size: 15px; font-weight: 600; }

  .hero--home > .wrap { grid-template-columns: 1fr; gap: 48px; padding-block: 32px 56px; }
  .hero .eyebrow { margin-bottom: 22px; }
  .hero .lede { font-size: 19px; }
  .portrait { max-width: 460px; }
  .hero--page > .wrap { padding-top: 28px; }
  .page-intro { font-size: 18px; }

  .footer-main { grid-template-columns: 1fr; gap: 32px; padding-block: 88px 40px; }
}

@media (max-width: 380px) {
  .site-header .wordmark { height: 32px; }
  .template-home .site-header .wordmark { height: 40px; }
  /* Narrowest phones: the pill reads "Call"; the number stays for screen readers. */
  .call-number { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
