/* Kinward Advisory site styles.
   Tokens follow the brand guide (sections 05 and 06) and the design handoff README. */

:root {
  --bg: #F6F1E7;          /* cream page */
  --sf: #FFFFFF;          /* cards, inputs */
  --s2: #ECE5D6;          /* wells, chips, notices */
  --ink: #111614;         /* text */
  --mu: #4A544F;          /* muted text */
  --pr: #1F4D3A;          /* forest: links, numbers, focus */
  --pf: #1F4D3A;          /* primary button fill */
  --opf: #F6F1E7;         /* text on primary fill */
  --ln: #DDD6C8;          /* lines */
  --tr: #B9D6C4;          /* range band on leak bars */
  --band: #1F4D3A;        /* closing call-to-action band */
  --accent: #E0A43B;      /* amber: always a fill with ink text */
  --cash-bg: #F7E6C4;
  --ph: #ECE5D6;          /* photo placeholder stripes */
  --phb: #E4DCCB;
  --ring: rgba(31,77,58,.07);
  --gutter: clamp(16px, 4.5vw, 56px);
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614; --sf: #1A2420; --s2: #24302A; --ink: #F6F1E7; --mu: #A7B0AA;
    --pr: #7FBF9A; --pf: #7FBF9A; --opf: #111614; --ln: #2F3B35; --tr: #2F5A45;
    --band: #24302A; --cash-bg: #1A2420; --ph: #24302A; --phb: #1E2924; --ring: rgba(127,191,154,.08);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111614; --sf: #1A2420; --s2: #24302A; --ink: #F6F1E7; --mu: #A7B0AA;
  --pr: #7FBF9A; --pf: #7FBF9A; --opf: #111614; --ln: #2F3B35; --tr: #2F5A45;
  --band: #24302A; --cash-bg: #1A2420; --ph: #24302A; --phb: #1E2924; --ring: rgba(127,191,154,.08);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 600px) { body { font-size: 18px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pr); font-weight: 700; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pr); outline-offset: 2px; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
.muted { color: var(--mu); }
.icon { width: 24px; height: 24px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 8px; top: -100px; z-index: 100; background: var(--pf); color: var(--opf); padding: 12px 16px; border-radius: 6px; }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Show the colour logo in light mode and the white one in dark mode. */
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

/* ---------- Type ---------- */
h1, h2, h3, .display, .num { font-family: var(--font-head); font-stretch: 112%; font-weight: 800; margin: 0; }
.display { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(25px, 2.6vw, 34px); line-height: 1.1; text-wrap: balance; }
h3 { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.2; }
.num { font-stretch: 110%; font-variant-numeric: tabular-nums; color: var(--pr); }
.eyebrow { font-size: 16px; font-weight: 700; color: var(--pr); }
.eyebrow-caps { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pr); }
.lead { font-size: clamp(18px, 1.5vw, 19px); line-height: 1.55; max-width: 640px; }
.small { font-size: 15px; line-height: 1.45; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 8px;
  font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; text-align: center;
}
.button:hover { filter: brightness(0.94); text-decoration: none; }
.button-primary { background: var(--pf); color: var(--opf); }
.button-amber { background: var(--accent); color: #111614; }
.button-cream { background: #F6F1E7; color: #111614; }
.button-outline { border-color: var(--pr); color: var(--pr); background: transparent; }
.button-outline:hover { background: var(--s2); filter: none; }
.button-small { min-height: 44px; padding: 0 18px; font-size: 16px; border-radius: 6px; }
.button-block { width: 100%; }
.button-stack { flex-direction: column; align-items: flex-start; padding-top: 8px; padding-bottom: 8px; min-height: 60px; }
.button-stack .sub { font-size: 14px; font-weight: 400; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.icon-button {
  width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--ln);
  background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-button:hover { background: var(--s2); }
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--ln); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand img { height: 30px; width: auto; }
.site-nav { margin-left: auto; }
.nav-list { list-style: none; padding: 0; display: flex; gap: 28px; }
.nav-list a, .mobile-nav-list a { color: var(--ink); text-decoration: none; font-size: 16px; padding-bottom: 4px; border-bottom: 3px solid transparent; }
.nav-list a:hover { border-bottom-color: var(--ln); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--pr); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-button { display: none; border-radius: 8px; }
.header-label { font-size: 15px; color: var(--mu); margin-right: auto; }
@media (max-width: 899px) {
  .site-nav, .header-book { display: none; }
  .menu-button { display: inline-flex; }
}
@media (max-width: 600px) { .header-label { display: none; } }
.mobile-menu {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column; gap: 24px; padding: 14px var(--gutter) 24px; overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.mobile-nav-list a { display: block; font-size: 22px; padding: 14px 0; border-bottom: 1px solid var(--ln); }
.mobile-nav-list a[aria-current="page"] { color: var(--pr); }
.mobile-menu > .button { margin-top: auto; }
body.menu-open { overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); }
.section-surface { background: var(--sf); border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln); }
.section-head { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin-bottom: 28px; }
.section-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.section-head p, .section-head-row p { color: var(--mu); }
.stack { display: flex; flex-direction: column; gap: 22px; }

.hero { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: center; padding-top: clamp(36px, 6vw, 80px); padding-bottom: clamp(36px, 6vw, 80px); }
.hero-main { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-side { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }

.card { background: var(--sf); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card-on-surface { background: var(--bg); border-radius: 14px; }
.card-band { background: var(--band); color: #F6F1E7; }
.card-band a:not(.button) { color: #F6F1E7; }
.card-border { border: 1px solid var(--ln); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-title { font-family: var(--font-head); font-stretch: 112%; font-weight: 800; font-size: 24px; line-height: 1.15; }
.card-tag { font-size: 14px; font-weight: 700; color: var(--mu); text-align: right; }
.card .icon-lg { width: 40px; height: 40px; }
.title-row { display: flex; align-items: center; gap: 12px; }

/* Leak example card with a range bar */
.leak-card { box-shadow: 0 16px 40px -20px rgba(17,22,20,.3); }
.leak-card .meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--mu); gap: 12px; }
.leak-value { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.leak-value .num { font-size: clamp(32px, 3.4vw, 40px); line-height: 1; }
.range { position: relative; height: 14px; border-radius: 7px; background: var(--s2); }
.range-band { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--tr); }
.range-tick { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--pr); }
.range-labels { display: flex; justify-content: space-between; font-size: 14px; }
.leak-card .basis { font-size: 15px; line-height: 1.45; border-top: 1px solid var(--ln); padding-top: 10px; }

/* Icon list (six leaks) */
.icon-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 32px; border-top: 1px solid var(--ln); list-style: none; padding: 0; }
.icon-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--ln); }
.icon-tile { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--s2); display: flex; align-items: center; justify-content: center; }
.icon-tile .icon { width: 26px; height: 26px; }
.icon-list b { display: block; font-size: 17px; }
.icon-list span { font-size: 16px; line-height: 1.45; color: var(--mu); }

/* Trades hero: the example card overlaps the photo on wide screens */
@media (min-width: 900px) {
  .trades-visual .leak-card { margin: -96px 0 0 -32px; position: relative; max-width: 380px; box-shadow: 0 16px 40px -16px rgba(17,22,20,.35); }
}

/* Price steps */
.steps { list-style: none; padding: 0; }
.step { border-top: 4px solid var(--ln); background: var(--bg); border-radius: 0 0 12px 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.step-amber { border-top-color: var(--accent); }
.step-primary { border-top-color: var(--pr); }
.step .label { font-size: 14px; font-weight: 700; color: var(--mu); }
.step b { font-size: 17px; line-height: 1.25; }
.step .num { font-size: 22px; }
.step p { font-size: 15px; line-height: 1.45; }

/* Founder note */
.note { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; }
.note .photo { flex: 0 0 auto; width: clamp(160px, 22vw, 260px); }
.note-body { flex: 1 1 380px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 16px; }
.note-body .quote { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; }

/* Photo placeholder until real photos arrive */
.photo { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--phb) 10px 20px); display: flex; align-items: flex-end; padding: 12px; font-size: 14px; color: var(--mu); }
.photo-wide { aspect-ratio: 5 / 4; }

/* Closing band */
.band { background: var(--band); color: #F6F1E7; border-radius: 16px; padding: clamp(28px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; margin-bottom: clamp(40px, 5vw, 64px); }
.band-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 8px; }
.band-title { font-family: var(--font-head); font-stretch: 112%; font-weight: 800; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.1; }

/* Label-and-content rows (Services, About, Succession) */
.rows > .row { display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 48px 0; border-top: 1px solid var(--ln); }
.rows > .row:first-child { border-top: 0; }
.row-label { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.row-label .row-num { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--pr); letter-spacing: .08em; }
.row-label h2 { font-size: clamp(22px, 2.2vw, 28px); }
.row-label p { color: var(--mu); }
.row-body { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* Offer rows (Services) and price tables (Pricing) */
.offer { background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.offer-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; }
.offer-text b { font-size: 17px; }
.offer-text .muted { font-size: 15px; }
.offer-price { font-family: var(--font-head); font-stretch: 110%; font-weight: 800; font-size: 20px; color: var(--pr); white-space: nowrap; }
.price-table { border: 1px solid var(--ln); border-radius: 14px; background: var(--sf); overflow: hidden; }
.price-group-head { padding: 18px 20px; border-bottom: 1px solid var(--ln); display: flex; flex-direction: column; gap: 2px; }
.price-group-head h2 { font-size: clamp(22px, 2.2vw, 28px); }
.price-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 16px 20px; border-top: 1px solid var(--ln); }
.price-row:first-of-type { border-top: 0; }
.price-amount { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.price-amount .unit { font-size: 14px; color: var(--mu); }
@media (max-width: 600px) { .price-amount { text-align: left; align-items: flex-start; } }

/* Chips and notices */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chip { background: var(--s2); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 700; }
.notice { background: var(--s2); border-radius: 12px; padding: 16px 18px; font-size: 16px; }
.dashed { border: 2px dashed var(--ln); border-radius: 10px; padding: 16px 18px; color: var(--mu); }

/* Facts list (About, Succession) */
.facts { background: var(--sf); border: 1px solid var(--ln); border-radius: 14px; padding: 8px 20px; margin: 8px 0 0; }
.facts div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--ln); }
.facts div:first-child { border-top: 0; }
.facts dt { flex: 0 0 140px; font-weight: 700; }
.facts dd { flex: 1 1 260px; margin: 0; }

/* Booking cards: the card linked from another page (/book#leak-check) is outlined */
.event:target { border: 2px solid var(--pr); }

/* Event chooser (Book a call) */
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--sf); color: var(--ink); border: 2px solid var(--ln); border-radius: 14px; padding: 18px 20px; font: inherit; cursor: pointer; }
.choice[aria-checked="true"] { border-color: var(--pr); }
.choice[aria-checked="true"]::after { content: "\2713"; position: absolute; top: 14px; right: 16px; width: 26px; height: 26px; border-radius: 999px; background: var(--pf); color: var(--opf); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.choice b { font-size: 19px; padding-right: 32px; }
.choice .meta { font-size: 15px; font-weight: 700; color: var(--pr); }
.choice span:last-child { font-size: 16px; }
.booking { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.booking-main { flex: 3 1 480px; min-width: 0; }
.booking-side { flex: 1 1 260px; }
.cal-frame { width: 100%; min-height: 640px; border: 1px solid var(--ln); border-radius: 14px; background: var(--sf); }

/* Long text pages (Privacy, Terms) */
.doc { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.doc-toc { flex: 0 0 260px; position: sticky; top: 16px; }
.doc-toc ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.doc-body { flex: 1 1 480px; max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.doc-body h2 { font-size: clamp(22px, 2.4vw, 26px); margin-top: 24px; }
.doc-body ul { display: flex; flex-direction: column; gap: 6px; padding-left: 22px; }
@media (max-width: 899px) { .doc-toc { position: static; flex-basis: 100%; } }
details.toc-fold summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

/* Accordions */
.accordion details { border-top: 1px solid var(--ln); }
.accordion details:last-child { border-bottom: 1px solid var(--ln); }
.accordion summary { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--s2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.accordion details[open] summary::after { content: "\2212"; }
.accordion .answer { padding: 0 0 18px; display: flex; flex-direction: column; gap: 10px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 17px; }
.field .hint { font-size: 15px; color: var(--mu); }
.input, .select, .textarea { font: inherit; font-size: 18px; color: var(--ink); background: var(--sf); border: 1.5px solid var(--mu); border-radius: 6px; min-height: 52px; padding: 10px 14px; width: 100%; }
.textarea { min-height: 120px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--mu); cursor: pointer; font-size: 17px; }
.pill input:checked + span { background: var(--pf); color: var(--opf); border-color: var(--pf); }
.pill input:focus-visible + span { outline: 3px solid var(--pr); outline-offset: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--s2); font-size: 16px; line-height: 1.5; padding: 40px 0 24px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px 56px; }
.footer-brand { flex: 2 1 280px; display: flex; flex-direction: column; gap: 10px; }
.footer-brand .footer-logo { height: 26px; width: auto; align-self: flex-start; }
.footer-grid > div:not(.footer-brand) { flex: 1 1 160px; }
.footer-heading { font-family: var(--font-body); font-stretch: 100%; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.footer-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-list a { color: var(--ink); font-weight: 400; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--ln); margin-top: 24px; padding-top: 16px; font-size: 14px; color: var(--mu); }
.footer-bottom a { color: var(--mu); font-weight: 400; }
.site-footer-quiet p { max-width: 760px; margin-bottom: 10px; }

/* ---------- Gentle effects ---------- */
/* Frosted menu bar that stays at the top. */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body.menu-open .site-header { position: static; }

/* Soft glow behind each page's opening section. */
main > .hero:first-child { position: relative; isolation: isolate; }
main > .hero:first-child::before {
  content: ""; position: absolute; inset: -40px 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px 320px at 88% 18%, rgba(224,164,59,.16), transparent 70%),
              radial-gradient(560px 360px at 6% 92%, rgba(31,77,58,.10), transparent 70%);
}

/* An amber underline under one key phrase in a headline (amber is decoration, never text colour). */
.display strong, h1 strong { font-weight: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .13em; text-underline-offset: .14em; text-decoration-skip-ink: none; }

/* Badge with a pulsing dot. */
.badge { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--s2); color: var(--pr); font-size: 15px; font-weight: 700; }
.badge .dot { position: relative; width: 8px; height: 8px; border-radius: 999px; background: var(--pr); flex: none; }
.motion .badge .dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--pr); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 70% { transform: scale(2.8); opacity: 0; } 100% { opacity: 0; } }

/* Buttons and booking cards lift a little on hover. */
.motion .button { transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease; }
.motion .button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(17,22,20,.45); }
.motion .event, .motion .card-border { transition: transform .2s ease, box-shadow .2s ease; }
.motion .event:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(17,22,20,.4); }

/* Sections fade and slide up as they come into view. */
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.motion .reveal.is-visible { opacity: 1; transform: none; }
@media print { .reveal { opacity: 1 !important; transform: none !important; } .site-header { position: static; backdrop-filter: none; } }

/* Proof ticks under the main buttons */
.ticks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--mu); }
.ticks li { display: inline-flex; align-items: center; gap: 6px; }
.ticks li::before { content: "\2713"; color: var(--pr); font-weight: 700; }

/* Mini calculator */
.mini-calc { gap: 14px; }
.mini-field { display: flex; flex-direction: column; gap: 2px; }
.mini-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.mini-label label { font-weight: 700; }
.mini-label output { font-weight: 700; color: var(--pr); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-calc input[type="range"] { width: 100%; min-height: 36px; accent-color: var(--pf); cursor: pointer; margin: 0; }
.mini-result { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--ln); padding-top: 12px; }

/* Numbers with sources (Trades) */
.proof { list-style: none; padding: 0 0 clamp(32px, 4vw, 48px); margin: 0; display: grid; gap: 12px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.proof li { display: flex; flex-direction: column; gap: 4px; border-top: 3px solid var(--pr); padding-top: 12px; font-size: 16px; }
.proof-num { font-family: var(--font-head); font-stretch: 110%; font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--pr); }
.proof-source { font-size: 14px; color: var(--mu); }
.proof-source a { font-weight: 400; color: var(--mu); }

/* Where jobs slip away: Today / With a fix */
.flow-switch { display: inline-flex; border: 2px solid var(--pr); border-radius: 999px; padding: 3px; gap: 3px; }
.flow-switch button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--pr); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.flow-switch button[aria-pressed="true"] { background: var(--pf); color: var(--opf); }
html:not(.js) .flow-switch { display: none; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: none; }
.flow-step { background: var(--bg); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.flow-num { width: 30px; height: 30px; border-radius: 999px; background: var(--s2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.flow-step b { font-size: 18px; }
.flow-leak, .flow-fix { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; border-radius: 10px; padding: 10px 12px; }
.flow-leak { background: var(--s2); color: var(--ink); }
.flow-leak .icon { width: 20px; height: 20px; color: var(--mu); margin-top: 2px; }
.flow-fix { border: 2px solid var(--pr); }
.flow-check { flex: none; width: 20px; height: 20px; border-radius: 999px; background: var(--pf); color: var(--opf); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.js .flow[data-view="today"] .flow-fix, .js .flow[data-view="fixed"] .flow-leak { display: none; }

/* Cards meant for a white band get a white card when they sit on the page background instead. */
.section:not(.section-surface) .card-on-surface { background: var(--sf); }

/* How a Money Leak Check works */
.how-check { list-style: none; padding: 0; margin: 0; }

/* FAQ */
.faq-wrap .accordion { max-width: 860px; }

/* Swipe rows on phones: cards sit side by side, the next one peeks in. No auto-play. */
.swipe-hint { display: none; }
@media (max-width: 700px) {
  .carousel {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter);
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px; scrollbar-width: thin;
  }
  .carousel > * { flex: 0 0 82%; scroll-snap-align: start; }
  .swipe-hint { display: block; margin: -16px 0 10px; font-size: 15px; color: var(--mu); }
  .swipe-hint::after { content: " \2192"; }
}

/* ---------- Succession page ---------- */
.succession { font-size: 18px; }
.succession .hero h1 { font-size: clamp(28px, 3.4vw, 42px); }
.succession-photo { margin: 0; max-width: 340px; }
.succession-photo .photo { max-height: 440px; }
.glance { background: var(--band); color: #F6F1E7; }
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px 32px; padding-top: 28px; padding-bottom: 28px; }
.glance-cell { display: flex; flex-direction: column; gap: 4px; }
.glance-k { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.glance-v { font-family: var(--font-head); font-stretch: 110%; font-weight: 800; font-size: clamp(21px, 2vw, 26px); line-height: 1.1; }
.glance-s { font-size: 15px; }
.dave-note { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 32px; }
.dave-note .note-photo { width: 76px; height: 76px; aspect-ratio: 1; border-radius: 999px; flex: none; padding: 0; }
.dave-note .note-photo span { display: none; }
.dave-note > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.dave-note .quote { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 24px 0 8px; }
.jump ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ln); color: var(--ink); text-decoration: none; font-size: 16px; }
.jump a.jump-contact { background: var(--pf); color: var(--opf); border-color: var(--pf); }
.criteria, .towns-table { width: 100%; border-collapse: collapse; background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; overflow: hidden; }
.criteria th, .criteria td, .towns-table th, .towns-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--ln); }
.criteria thead th, .towns-table thead th { border-top: 0; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); }
.criteria tbody th { width: 38%; }
.gloss { display: block; font-weight: 400; font-size: 15px; color: var(--mu); margin-top: 2px; }
.where { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.map { flex: 3 1 340px; min-width: 0; background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; padding: 12px; font-family: var(--font-body); }
.map .ring { fill: var(--ring); stroke: var(--pr); stroke-width: .7; stroke-dasharray: 2.5 2.5; }
.map .ring-inner { fill: none; stroke: var(--ln); stroke-width: .5; }
.map .lake { font-size: 8px; font-style: italic; fill: var(--mu); }
.map .ninety { font-size: 7px; fill: var(--pr); }
.map .towns { fill: var(--ink); font-size: 7.5px; }
.map .toronto { fill: var(--pr); }
.map .toronto-label { font-size: 9px; font-weight: 700; fill: var(--pr); }
.towns-table { flex: 2 1 240px; font-size: 16px; }
.towns-table td, .towns-table th { padding: 8px 14px; }
.industries { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.industry { background: var(--sf); border: 1px solid var(--ln); border-radius: 14px; padding: 0 18px; }
.industry summary { min-height: 60px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.industry p { padding-bottom: 16px; font-size: 17px; }
@media (min-width: 701px) { .industry summary { pointer-events: none; list-style: none; } .industry summary::-webkit-details-marker { display: none; } }
.not-fit { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; padding: 0; }
.not-fit li { background: var(--s2); border-radius: 12px; padding: 14px 16px; font-size: 17px; }
.fit { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.fit-questions { flex: 3 1 360px; display: flex; flex-direction: column; gap: 14px; }
.fit-q legend { font-weight: 700; margin-bottom: 8px; }
.fit-buttons { display: flex; gap: 8px; }
.fit-btn { min-width: 72px; min-height: 48px; padding: 0 18px; border-radius: 8px; border: 1.5px solid var(--ln); background: var(--sf); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.fit-btn[aria-pressed="true"] { background: var(--pf); color: var(--opf); border-color: var(--pf); }
.fit-result { flex: 2 1 260px; position: sticky; top: 16px; }
.link-button { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 700; color: var(--pr); text-decoration: underline; cursor: pointer; align-self: flex-start; min-height: 44px; }
.promises { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 24px; }
.promises li { background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; padding: 16px; }
.promises b { display: block; }
.pay { margin: 8px 0; }
.how-steps { list-style: none; padding: 0; margin-top: 8px; }
.how-steps li { border-top: 4px solid var(--pr); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.how-steps .num { font-size: 32px; line-height: 1; }
.row-body h3 { margin-top: 16px; }
.print-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.contact-band { background: var(--s2); margin-top: 24px; }
.contact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.print-header, .print-only { display: none; }

@media print {
  @page { size: letter; margin: 14mm 14mm 16mm; }
  :root, :root[data-theme="dark"] {
    --bg: #FFFFFF; --sf: #FFFFFF; --s2: #FFFFFF; --ink: #000000; --mu: #333333; --pr: #1F4D3A; --ln: #BBBBBB; --band: #FFFFFF;
    color-scheme: light;
  }
  .logo-dark { display: none !important; }
  .logo-light { display: block !important; }
  body.succession { font-size: 10.5pt; line-height: 1.35; }
  .site-header .header-actions, .header-label, .skip-link, .no-print, .jump, #fit, .fit, .button, .accordion summary::after, .dave-note, .site-footer-quiet a { display: none !important; }
  #fit { display: none !important; }
  .site-header { border: 0; }
  .header-row { padding: 0 0 6px; }
  .print-header { display: block; font-size: 9pt; color: #333; text-align: right; margin-top: -26px; }
  .wrap { max-width: none; padding: 0; }
  .hero { padding: 6px 0; gap: 12px 24px; flex-wrap: nowrap; }
  .succession .hero h1 { font-size: 18pt; line-height: 1.15; }
  .lead { font-size: 10.5pt; }
  .succession-photo { max-width: 90px; }
  .succession-photo figcaption { font-size: 8pt; }
  .glance { color: #000; border-top: 1px solid #000; border-bottom: 1px solid #000; }
  .glance-grid { grid-template-columns: repeat(4, 1fr); padding: 6px 0; gap: 8px; }
  .glance-v { font-size: 13pt; color: #1F4D3A; }
  .glance-k, .glance-s { font-size: 8pt; }
  .rows > .row { padding: 6px 0; gap: 4px 14px; flex-wrap: nowrap; }
  .row-label { flex: 0 0 120px; max-width: 120px; gap: 2px; }
  .row-label .row-num { font-size: 8pt; }
  .row-body { flex: 1 1 0; gap: 4px; }
  /* Printed profile (design B6): no FAQ, no map; towns as a compact list. */
  #questions, .map, .glance-s, .gloss { display: none !important; }
  .towns-table { display: block !important; border: 0; flex-basis: 100%; }
  .towns-table thead { display: none; }
  .towns-table tbody { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
  .towns-table tr, .towns-table td { display: inline; border: 0; padding: 0; }
  .towns-table td + td::before { content: " · "; }
  .facts { padding: 0; border: 0; margin: 2px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
  .facts div { padding: 1px 0; border: 0; }
  .facts dt { flex-basis: 80px; }
  .row-body p { margin: 0; }
  .criteria thead { display: none; }
  .criteria tbody th { width: 30%; }
  .promises { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
  .row-body h3 { margin-top: 4px; font-size: 11pt; }
  .succession-photo .photo { max-height: 100px; }
  /* Section intros hidden, towns on one line, compact contact: keeps the profile to 2 pages. */
  .row-label p { display: none !important; }
  .row-label { flex-basis: 105px !important; max-width: 105px !important; }
  .row-label h2 { font-size: 11.5pt !important; }
  .towns-table tbody { display: block !important; }
  .towns-table tr { display: inline !important; }
  .towns-table tr::after { content: " · "; }
  .towns-table tr:last-child::after { content: ""; }
  .contact-band .row { padding: 2px 0 !important; }
  .contact-list { gap: 0 16px !important; flex-direction: row !important; flex-wrap: wrap; }
  .site-footer-quiet p { margin-bottom: 2px !important; }
  .glance-grid { padding: 3px 0 !important; }
  .hero { padding: 0 !important; }
  .print-only { display: block !important; }
  .succession .hero h1 { font-size: 15pt !important; }
  .row-label p, .row-body p, .industry p, .promises li, .not-fit li, .criteria, .how-steps p, .card p, .contact-list { font-size: 9pt !important; line-height: 1.3; }
  .rows > .row { padding: 4px 0 !important; }
  .how-steps { grid-template-columns: repeat(4, 1fr); }
  .industries { gap: 2px 12px; }
  .promises { gap: 2px 12px; }
  .row-label h2 { font-size: 13pt; }
  .row-label p, .row-body p, .industry p, .promises li, .not-fit li, .criteria, .towns-table { font-size: 9.5pt; }
  .criteria th, .criteria td { padding: 3px 6px; }
  .towns-table { display: none; }
  .map { flex-basis: 220px; max-width: 260px; padding: 0; border: 0; }
  .industries, .not-fit, .promises { gap: 4px 12px; grid-template-columns: repeat(2, 1fr); }
  .industry { border: 0; padding: 0; }
  .industry summary { min-height: 0; font-size: 10pt; }
  .industry p { padding-bottom: 4px; }
  .not-fit li, .promises li { padding: 2px 0; background: none; border: 0; }
  .grid { gap: 6px 12px; grid-template-columns: repeat(4, 1fr); }
  .card { padding: 0; border: 0; gap: 2px; }
  .how-steps li { padding-top: 4px; }
  .how-steps .num { font-size: 14pt; }
  .accordion details { border: 0; }
  .accordion summary { min-height: 0; font-size: 10pt; }
  .accordion .answer { padding: 0 0 4px; }
  .contact-band { background: none; border: 1px solid #000; margin-top: 8px; }
  .site-footer-quiet { background: none; padding: 6px 0 0; font-size: 8.5pt; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
