/* KurtConsulting — palette adapted from bhsg.com's named colour system.
   Beacon Hill names its colours for Boston: ocean, river, sky, brick,
   cobblestone, monument, fog, haze, mist, night. KurtConsulting keeps the
   structure and promotes brick — the fox colour — from a bit-part accent to
   the signature, so the site sits in the same sector without reading as a copy.

   Contrast measured, not assumed. brick #e56855 is 3.08:1 on mist, so it is a
   DISPLAY and SURFACE colour only. Small ember text uses --ember-700 (6.09:1);
   ember buttons use --ember-600 with white (4.57:1). */

:root {
  /* --- from bhsg.com, verbatim --- */
  --ocean:      #043769;   /* primary */
  --river:      #1c70c4;   /* secondary */
  --sky:        #6bb5ff;
  --brick:      #e56855;
  --night:      #1e2124;
  --cobblestone:#4a5157;
  --monument:   #6a7178;
  --fog:        #d7d9da;
  --haze:       #ebecec;
  --mist:       #f6f9fc;
  --white:      #ffffff;

  /* --- ramps built around them --- */
  --ocean-100: #e8f1fa; --ocean-200: #c7ddf2; --ocean-300: #93bfe8;
  --ocean-400: #4f95d6; --ocean-500: #1c70c4; --ocean-600: #14559b;
  --ocean-700: #0b4278; --ocean-800: #043769; --ocean-900: #02243f;

  --ember-100: #fdeeea; --ember-200: #fbd7cf; --ember-300: #f7b3a5;
  --ember-400: #ef8b76; --ember-500: #e56855; --ember-600: #cc4a35;
  --ember-700: #a83828; --ember-800: #7d2a1e; --ember-900: #4d1c15;

  /* --- roles --- */
  --color-bg:       var(--white);
  --color-surface:  var(--white);
  --color-tint:     var(--haze);
  --color-text:     var(--night);
  --color-muted:    var(--cobblestone);
  --color-primary:  var(--ocean);
  --color-accent:   var(--brick);
  --color-accent-ink: var(--ember-700);   /* accent as small text on light */
  --color-accent-btn: var(--ember-600);   /* accent as a button ground */
  --color-divider:  var(--fog);

  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;

  --space-1: 5px;  --space-2: 10px; --space-3: 15px;
  --space-4: 20px; --space-6: 30px; --space-8: 40px;

  --radius-sm: 1px; --radius-md: 2px; --radius-lg: 4px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, var(--ocean-900) 12%, transparent);
  --shadow-md: 0 6px 18px color-mix(in srgb, var(--ocean-900) 14%, transparent);
  --shadow-lg: 0 16px 40px color-mix(in srgb, var(--ocean-900) 20%, transparent);

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Signature: the full palette as a hairline across the top of every page. */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: 3px; z-index: 60;
  background: linear-gradient(90deg,
    var(--ocean) 0%, var(--ocean) 22%,
    var(--river) 44%, var(--sky) 60%,
    var(--brick) 82%, var(--ember-700) 100%);
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }
a { color: inherit; }

::selection { background: var(--ember-200); color: var(--night); }

:focus-visible { outline: 2px solid var(--river); outline-offset: 3px; border-radius: var(--radius-sm); }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); position: relative; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ocean); color: var(--white);
  padding: var(--space-2) var(--space-4); z-index: 100;
}
.skip:focus { left: var(--space-2); top: var(--space-2); }

/* ---------- placeholder marker — must be gone before launch ---------- */
.tbd {
  color: var(--ember-700);
  border-bottom: 1px dotted var(--brick);
  font-style: italic;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--space-6);
  min-height: 106px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 70px; width: auto; display: block; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-6); }
.site-nav a {
  text-decoration: none; font-size: 16px; letter-spacing: .01em;
  padding-block: 4px; border-bottom: 2px solid transparent; color: var(--ocean);
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { border-bottom-color: var(--brick); color: var(--ember-700); }
.site-nav .btn { border-bottom: 0; color: var(--white); }

.btn {
  display: inline-block; font-family: var(--font-heading); font-weight: 600;
  font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer;
  padding: 14px 24px; border-radius: var(--radius-md);
  border: 2px solid var(--ocean); background: var(--ocean); color: var(--white);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:hover, .btn:focus-visible { background: var(--ocean-700); border-color: var(--ocean-700); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--ocean); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ocean); color: var(--white); border-color: var(--ocean); }

.nav-toggle { display: none; }

/* ---------- section furniture ---------- */
.section { padding-block: clamp(64px, 9vw, 118px); position: relative; }
.section + .section { border-top: 1px solid var(--color-divider); }

.section--tint { background: var(--color-tint); border-top-color: transparent; }
.section--tint + .section { border-top-color: transparent; }

/* Bands alternate blue and white, so the change of ground is the divider. */
.section--white { background: var(--white); border-top-color: transparent; }
.section--white + .section { border-top-color: transparent; }

.kicker {
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ocean); margin: 0 0 var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
}

.section h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: var(--space-4); max-width: 22ch; color: var(--ocean); }
.lede { font-size: clamp(19px, 1.5vw, 21px); color: var(--color-muted); }

/* ---------- dark bands ---------- */
.section--dark {
  background: linear-gradient(160deg, var(--ocean) 0%, var(--ocean-900) 100%);
  color: var(--fog); border-top-color: transparent; overflow: hidden;
}
.section--dark + .section { border-top-color: transparent; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .lede { color: var(--ocean-200); }
.section--dark .kicker { color: var(--sky); }
.section--dark .btn { background: var(--white); border-color: var(--white); color: var(--ocean); }
.section--dark .btn:hover, .section--dark .btn:focus-visible { background: var(--ocean-100); border-color: var(--ocean-100); color: var(--ocean); }
/* A panel is a white surface sitting on the blue band, so its button goes back to blue. */
.section--dark .panel .btn { background: var(--ocean); border-color: var(--ocean); color: var(--white); }
.section--dark .panel .btn:hover, .section--dark .panel .btn:focus-visible { background: var(--ocean-700); border-color: var(--ocean-700); }
.section--dark .btn--ghost { color: var(--white); border-color: var(--white); background: transparent; }
.section--dark .btn--ghost:hover, .section--dark .btn--ghost:focus-visible { background: var(--white); color: var(--ocean); }
.section--dark :focus-visible { outline-color: var(--sky); }

/* fox watermark — brand asset used as texture, never as information */
.watermark {
  position: absolute; right: -3%; top: 50%; translate: 0 -50%;
  width: min(46%, 460px); opacity: .07; pointer-events: none; user-select: none;
}
@media (max-width: 900px) { .watermark { display: none; } }

/* ---------- hero ----------
   Photographic ground. Measured: the left of the frame — valley, treeline,
   dusk sky — averages 0.27 luminance, so it is NOT a white image where the
   text sits. Navy type direct on it clears 4.5:1 on only 34% of pixels, so a
   mist scrim carries the copy and the photograph keeps the right-hand side,
   where the snow, the sunset and the fox on the ridge actually are. */
.hero {
  padding-block: clamp(88px, 11vw, 150px);
  background-color: var(--mist);
  background-image:
    linear-gradient(96deg,
      rgba(246,249,252,.975) 0%,
      rgba(246,249,252,.95)  30%,
      rgba(246,249,252,.80)  48%,
      rgba(246,249,252,.34)  68%,
      rgba(246,249,252,.06)  87%,
      rgba(246,249,252,0)    100%),
    url("../img/hero-ridge.jpg");
  background-size: auto, cover;
  background-position: center, 64% 42%;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--color-divider);
}

/* Tagline reduced a further 30% (25/4.32vw/53 -> 17.5/3.02vw/37). */
.hero h1 {
  font-size: clamp(17.5px, 3.02vw, 37px);
  letter-spacing: -0.01em; margin-bottom: var(--space-6);
  color: var(--ocean);
}
.hero h1 span { display: block; white-space: nowrap; }
.hero .lede { max-width: 52ch; font-size: clamp(19px, 1.7vw, 23px); color: var(--cobblestone); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* Phones: text spans the full width, so the scrim runs top-to-bottom instead
   of left-to-right, and the smaller export saves ~88KB. */
@media (max-width: 700px) {
  .hero {
    background-image:
      linear-gradient(180deg,
        rgba(246,249,252,.96) 0%,
        rgba(246,249,252,.92) 52%,
        rgba(246,249,252,.74) 100%),
      url("../img/hero-ridge-900.jpg");
    background-position: center, 62% 40%;
  }
}

/* ---------- card grid ---------- */
.grid { display: grid; gap: var(--space-4); margin-top: var(--space-8); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--mist);
  border: 1px solid var(--color-divider);
  border-top: 4px solid var(--ocean);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-top-color .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-top-color: var(--ocean-600); }
.card h3 { font-size: 20px; margin-bottom: var(--space-2); color: var(--ocean); }
.card p { font-size: 16px; color: var(--color-muted); margin: 0; }

/* ---------- numbered points ---------- */
.points { list-style: none; margin: var(--space-8) 0 0; padding: 0; }
.points li {
  display: grid; grid-template-columns: 5rem 1fr; gap: var(--space-4);
  padding-block: var(--space-6); border-top: 1px solid var(--color-divider);
  max-width: 92ch; align-items: baseline;
}
.points li:last-child { border-bottom: 1px solid var(--color-divider); }
.points b {
  font-family: var(--font-heading); font-weight: 600; font-size: 30px;
  color: var(--ocean); line-height: 1;
}
.points span { color: var(--color-muted); }

/* ---------- split / panels ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: var(--color-surface); border: 1px solid var(--color-divider);
  border-left: 4px solid var(--ocean);
  border-radius: var(--radius-md); padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.panel:nth-child(2) { border-left-color: var(--brick); }
.panel h3 { font-size: 22px; margin-bottom: var(--space-3); color: var(--ocean); }
.panel p { font-size: 16px; color: var(--color-muted); }
.panel .btn { margin-top: var(--space-2); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* ---------- long-form legal copy ---------- */
.legal h2 {
  font-size: clamp(24px, 2.4vw, 30px); max-width: none;
  margin-top: var(--space-8); margin-bottom: var(--space-3);
}
.legal > h2:first-child { margin-top: 0; }
.legal h3 {
  font-size: 20px; color: var(--ocean);
  margin-top: var(--space-6); margin-bottom: var(--space-2);
}
.legal p { color: var(--color-muted); }
.legal ul { margin: 0 0 var(--space-4); padding-left: 1.3em; max-width: var(--measure); }
.legal li { color: var(--color-muted); margin-bottom: var(--space-2); }
.legal b { color: var(--color-text); }
.legal .actions { margin-top: var(--space-8); }
.legal-head h1 { margin-bottom: var(--space-4); }
.updated { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin-top: var(--space-6); }
.section--dark .updated { color: var(--ocean-200); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--white); color: var(--color-muted);
  padding-block: var(--space-8) var(--space-6);
}
.site-footer a { color: var(--ocean); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover, .site-footer a:focus-visible { border-bottom-color: var(--brick); color: var(--ember-700); }
.site-footer .tbd { color: var(--ember-700); border-bottom-color: var(--brick); }
.footer-top { display: flex; flex-wrap: wrap; gap: var(--space-8); justify-content: space-between; align-items: start; }
.site-footer img { height: 72px; width: auto; display: block; margin-bottom: var(--space-4); }
.footer-contact { font-size: 16px; line-height: 1.9; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); font-size: 16px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
  margin-top: var(--space-8); padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: 15px; color: var(--monument);
}

/* ---------- mobile nav ---------- */
@media (max-width: 820px) {
  .site-header .wrap { min-height: 92px; }
  .brand img { height: 62px; }
  .nav-toggle {
    display: inline-block; margin-left: auto; background: none;
    border: 2px solid var(--ocean); border-radius: var(--radius-md);
    font: inherit; font-size: 15px; font-weight: 600; padding: 8px 14px;
    cursor: pointer; color: var(--ocean);
  }
  .site-nav {
    display: none; position: absolute; inset: 100% 0 auto; background: var(--mist);
    border-bottom: 1px solid var(--color-divider); flex-direction: column; align-items: stretch;
    gap: 0; padding: var(--space-3) var(--gutter) var(--space-6);
    box-shadow: var(--shadow-md);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding-block: var(--space-3); border-bottom: 1px solid var(--color-divider); }
  .site-nav .btn { margin-top: var(--space-4); text-align: center; border-bottom: 0; }
}

/* ---------- print / PDF ----------
   A4 landscape gives a 1123px CSS viewport, which keeps the desktop layout
   (4-up card grid, full nav) rather than collapsing to the tablet breakpoint.
   print-color-adjust: exact is what makes Chrome paint the navy bands, the
   hero photograph and the card edges instead of dropping them. */
@media print {
  /* Chrome lays print out using the @page size treated as CSS px. A4 landscape
     therefore gives ~842px, which trips the 860px split breakpoint and the 900px
     grid breakpoint and collapses the desktop layout. An explicit 1280px page
     keeps the 4-up grid, the two-column split and the full nav. */
  @page { size: 1280px 800px; margin: 0; }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html, body { background: var(--white); font-size: 17px; }

  /* fixed/sticky chrome would otherwise repeat on every sheet */
  body::before { position: absolute; }
  .site-header { position: static; backdrop-filter: none; background: var(--white); }
  .skip, .nav-toggle { display: none; }
  /* Chrome lays print out at the window width, not the page width, so the
     mobile breakpoint can swallow the nav. Force it back. */
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center;
              gap: var(--space-6); padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav a { padding-block: 4px; border-bottom: 0; }

  .section { padding-block: 44px; break-before: page; }
  .hero { padding-block: 60px; break-before: auto; }
  .section h2 { font-size: 34px; }
  .points li { padding-block: 18px; }
  .grid, .points { margin-top: 26px; }
  .actions { margin-top: 22px; }
  .panel { padding: 26px; }
  .site-header { break-after: avoid; }

  /* The responsive breakpoints are evaluated against the print width, which
     Chrome derives from the page box and does not reliably match @page. Rather
     than chase it, pin the desktop layout for print explicitly. These rules sit
     after the screen media queries, so they win on source order. */
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .footer-links { flex-wrap: nowrap; }

  .card, .panel, .points li, .footer-top, .site-footer { break-inside: avoid; }
  h1, h2, h3 { break-inside: avoid; }
  h1, h2, h3, .kicker { break-after: avoid; }
  .card:hover { transform: none; box-shadow: var(--shadow-sm); }

  .site-nav a { border-bottom: 0; }
}
