/* ClearBrook colour layer: loaded last, refines the system without replacing it.
   Rhythm down the page: sky-lit hero, surface blue (services), navy (process), light with
   lifted cards (FAQs), deeper tint (booking), navy close and footer.
   Every pair below keeps body text >= 4.5:1 on its ground. */

:root {
  --p-tint: #dbeaf6;          /* a step deeper than the surface blue */
  --p-sky: #6badde;           /* the light blue in the logo */
  --p-navy-2: #14304a;
  --shadow-sm: 0 1px 2px rgb(15 34 51 / .06), 0 2px 6px rgb(15 34 51 / .05);
  --shadow-md: 0 1px 2px rgb(15 34 51 / .05), 0 8px 24px -6px rgb(15 34 51 / .14);
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
}

/* a fourth ground: deeper tint */
.ground-tint {
  --bg: var(--p-tint); --surface: #f7fafc; --ink: var(--p-ink); --muted: #405569;
  --accent: var(--p-accent); --accent-ink: var(--p-accent-ink); --card: #ffffff;
  --action: var(--p-action); --action-ink: var(--p-action-ink);
  --line: color-mix(in oklab, var(--ink) 13%, transparent);
  --line-strong: color-mix(in oklab, var(--ink) 22%, transparent);
  background: var(--bg); color: var(--ink);
}

/* ------------------------------------------------ hero: morning light over a brook */
.hero--statement {
  background:
    radial-gradient(60% 70% at 88% 18%, color-mix(in oklab, var(--p-sky) 30%, transparent) 0%, transparent 70%),
    radial-gradient(50% 60% at 8% 100%, color-mix(in oklab, var(--p-accent) 12%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, #f7fafc 0%, var(--p-surface) 100%);
  overflow: clip;
}
/* the brook: three drawn currents along the foot of the hero, behind the facts */
.hero--statement::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'%3E%3Cpath d='M0 250C220 170 420 330 720 250S1180 150 1440 220V400H0Z' fill='%231a68a3' fill-opacity='.07'/%3E%3Cpath d='M0 300C260 230 470 370 760 300S1210 230 1440 280V400H0Z' fill='%231a68a3' fill-opacity='.08'/%3E%3Cpath d='M0 172C240 102 440 252 730 176S1190 84 1440 150' fill='none' stroke='%236badde' stroke-opacity='.55' stroke-width='1.5'/%3E%3Cpath d='M0 212C250 150 455 290 745 216S1200 130 1440 188' fill='none' stroke='%231a68a3' stroke-opacity='.25' stroke-width='1.2'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.hero-notice {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: color-mix(in oklab, #ffffff 75%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 22%, transparent);
  color: var(--p-ink);
}
.hero-notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); flex: none; }
.hero h1 { color: var(--p-ink); }
/* the facts become one lifted strip */
.hero--statement .hero__facts {
  background: #ffffff; border-radius: var(--r-lg, 16px); box-shadow: var(--shadow-md);
  padding: var(--s-5) var(--s-6); column-gap: 0;
}
.hero--statement .hero__facts > div { padding-inline: var(--s-5); border-left: 1px solid var(--line); }
.hero--statement .hero__facts > div:first-child { border-left: 0; padding-left: 0; }
.hero--statement .hero__facts dt { color: var(--p-accent); font-weight: 500; }
@media (max-width: 1023px) {
  .hero--statement .hero__facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero--statement .hero__facts > div { grid-column: auto / span 6; }
}

/* ------------------------------------------------ services on surface blue */
#services .rows__value {
  justify-self: end; align-self: start;
  padding: 3px 10px; border-radius: 999px; font-size: var(--t-small); font-weight: 500;
  background: #ffffff; color: var(--p-accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 18%, transparent);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
#services .rows > li { --line: color-mix(in oklab, var(--p-accent) 18%, transparent); }
#services .frame--photo { box-shadow: var(--shadow-md); }

/* ------------------------------------------------ process: navy, with a sky edge */
#process {
  background:
    radial-gradient(70% 60% at 100% 0%, color-mix(in oklab, var(--p-accent) 38%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--p-inv-bg), var(--p-navy-2));
}
#process .step-num { background: var(--p-sky); color: var(--p-inv-bg); border-color: transparent; font-weight: 600; }
@media (min-width: 640px) { #process .steps-row > div { padding-top: var(--s-4); border-top: 1px solid color-mix(in oklab, var(--p-sky) 35%, transparent); } }

/* ------------------------------------------------ FAQs: lifted question cards */
#questions {
  background:
    radial-gradient(45% 55% at 0% 100%, color-mix(in oklab, var(--p-sky) 18%, transparent) 0%, transparent 70%),
    var(--p-bg);
}
#questions h2 { color: var(--p-ink); }
#questions .faq { display: grid; gap: var(--s-3); align-content: start; }
#questions .faq > .faq__item {
  padding: var(--s-4) var(--s-5); border: 0; border-radius: var(--r-md, 12px);
  background: #ffffff; box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 10%, transparent);
  transition: box-shadow 200ms var(--ease-out-strong), transform 200ms var(--ease-out-strong);
}
#questions .faq > .faq__item:first-child { padding-top: var(--s-4); }
#questions .faq > .faq__item > h3 { font-size: var(--t-card); color: var(--p-ink); }
#questions .faq > .faq__item > p { color: var(--p-muted); }
@media (hover: hover) and (pointer: fine) {
  #questions .faq > .faq__item:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 22%, transparent); transform: translateY(-1px); }
}
@media (max-width: 1023px) { #questions .faq > .faq__item { padding-block: var(--s-3); } }

/* ------------------------------------------------ booking on the deeper tint */
#booking .booking-form { background: #ffffff; box-shadow: var(--shadow-md); border: 0; }
#booking .booking-frame { background: #ffffff; }
#booking .booking-photo { box-shadow: var(--shadow-md); }

/* ------------------------------------------------ close and footer: navy */
footer.closing.ground-inverse {
  background:
    radial-gradient(60% 50% at 100% 0%, color-mix(in oklab, var(--p-accent) 34%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--p-navy-2), var(--p-inv-bg));
}
footer.closing.ground-inverse .nav__logo .brand-mark { background: #ffffff; border-radius: 10px; padding: 4px; }
footer.closing.ground-inverse .footer__col h4 { color: var(--p-sky); }
footer.closing.ground-inverse a:hover { color: #ffffff; }
footer.closing.ground-inverse .close__media { box-shadow: 0 12px 40px -12px rgb(0 0 0 / .5); }

/* ------------------------------------------------ browser surfaces */
::selection { background: color-mix(in oklab, var(--p-sky) 45%, transparent); color: var(--p-ink); }
html { scrollbar-color: color-mix(in oklab, var(--p-accent) 45%, transparent) transparent; }
.btn { transition: background-color 160ms ease, transform 160ms var(--ease-out-strong), box-shadow 160ms ease; }
.btn--primary { box-shadow: 0 1px 2px rgb(15 34 51 / .12), 0 4px 12px -4px color-mix(in oklab, var(--p-accent) 55%, transparent); }
.btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  #questions .faq > .faq__item, .btn { transition: none; }
  #questions .faq > .faq__item:hover { transform: none; }
}

/* phones: the FAQ cards fit their screen; the notice pill sits clear of the heading */
@media (max-width: 639px) {
  #questions .faq { gap: var(--s-2); }
  #questions .faq > .faq__item, #questions .faq > .faq__item:first-child { padding: 12px 16px; gap: 4px; }
  #questions .faq > .faq__item > p { font-size: var(--t-small); }
  .hero--statement .hero-notice { margin-bottom: var(--s-4); border-radius: 14px; }
}
@media (max-width: 639px) { main > section#questions { height: auto; min-height: 100svh; } }

/* services: seven rows read in two columns beside a narrower photograph (desktop) */
@media (min-width: 1024px) {
  #services .services-list > .rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
  #services .services-list > .rows > li:nth-child(2) { padding-top: 0; }
  #services .services-list > .rows > li { grid-template-columns: minmax(0, 1fr); align-content: start; }
  #services .services-list > .rows .rows__value { justify-self: start; grid-row: 1; grid-column: 1; margin-left: auto; }
  #services .services-photo { aspect-ratio: auto !important; align-self: stretch; }
  #questions .faq { gap: 10px; }
}
/* tablet: the list and photograph stack at full width */
@media (min-width: 640px) and (max-width: 1023px) {
  #services .services-list, #services .services-photo { grid-column: 1 / -1; }
}
/* phones: seven services need more than one screen; the section grows to fit, photo under it */
@media (max-width: 639px) {
  main > section#services { height: auto; min-height: 100svh; }
  #services > .wrap { grid-template-rows: auto auto !important; row-gap: var(--s-7) !important; }
  #services .frame--photo { height: 280px !important; }
}

/* ------------------------------------------------ sections that size to their content
   (so nothing overlaps on short laptop screens or phones) */
main > section#services, main > section#process, main > section#help-center, footer.closing {
  height: auto; min-height: 0;
}
main > section#services { min-height: 100svh; }
footer.closing > .wrap { height: auto; }
footer.closing .closing__cta > .close__media { flex: none; height: clamp(160px, 26svh, 260px); }
footer.closing .closing__links { margin-top: var(--s-8); }
@media (min-width: 1024px) and (max-height: 820px) {
  #services .services-photo { max-height: calc(100svh - var(--nav, 72px) - 96px); }
}

/* process: the diagram box fits the diagram, steps follow close under it */
#process .dg { height: 150px !important; }
#process .grid:first-of-type { margin-top: var(--s-6); }
#process .steps-row { margin-top: var(--s-6) !important; }
@media (max-width: 639px) { #process .dg { height: 260px !important; } }

/* ------------------------------------------------ client links */
#help-center {
  background:
    radial-gradient(50% 60% at 100% 100%, color-mix(in oklab, var(--p-sky) 22%, transparent) 0%, transparent 70%),
    var(--p-surface);
}
#help-center .links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.portal-card {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  padding: var(--s-5) var(--s-6); border-radius: var(--r-lg, 16px);
  background: linear-gradient(135deg, var(--p-inv-bg), var(--p-navy-2)); color: var(--p-inv-ink);
  box-shadow: var(--shadow-md);
  --action: #ffffff; --action-ink: var(--p-inv-bg); --ink: var(--p-inv-ink);
}
.portal-card__title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--t-h3); }
.portal-card p { color: #b9c6d2; margin-top: var(--s-1); }
.portal-card .btn { flex: none; }
.link-card {
  position: relative; display: grid; gap: 2px; align-content: start;
  padding: var(--s-4) var(--s-6) var(--s-4) var(--s-5); border-radius: var(--r-md, 12px);
  background: #ffffff; color: var(--p-ink);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 12%, transparent);
  transition: box-shadow 200ms var(--ease-out-strong), transform 200ms var(--ease-out-strong);
}
.link-card__org { font-size: var(--t-small); font-weight: 500; color: var(--p-accent); }
.link-card__name { font-weight: 500; font-size: var(--t-card); }
.link-card__desc { font-size: var(--t-small); color: var(--p-muted); }
.link-card__ic { position: absolute; top: var(--s-4); right: var(--s-4); width: 16px; height: 16px; color: var(--p-accent);
  transition: transform 200ms var(--ease-out-strong); }
.link-card:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.link-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .link-card:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 28%, transparent); transform: translateY(-1px); }
  .link-card:hover .link-card__ic { transform: translate(2px, -2px); }
}
@media (max-width: 1023px) { #help-center .links-grid { grid-column: 1 / -1; } }
@media (max-width: 639px) {
  #help-center .links-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-card { flex-direction: column; align-items: stretch; padding: var(--s-5); }
}
@media (prefers-reduced-motion: reduce) { .link-card, .link-card__ic { transition: none; } .link-card:hover { transform: none; } }
main > section#questions, main > section#booking { height: auto; min-height: 100svh; }
/* phones: the close and the footer links follow each other, no two-screen split */
@media (max-width: 639px) {
  footer.closing > .wrap { display: block !important; }
  footer.closing .closing__links { margin-top: var(--s-8); }
}

/* ------------------------------------------------ help center: portal how-to guides */
#help-center .help-sub {
  grid-column: 1 / -1; margin-top: var(--s-5);
  font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; color: var(--p-ink);
}
#help-center .guides { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.guide {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-md, 12px);
  background: #ffffff; box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 12%, transparent);
}
.guide__video, .guide__frame {
  display: grid; place-items: center; align-content: center; gap: var(--s-2);
  width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: calc(var(--r-md, 12px) - 4px);
}
.guide__video {
  background:
    radial-gradient(80% 90% at 100% 0%, color-mix(in oklab, var(--p-sky) 35%, transparent), transparent 70%),
    linear-gradient(160deg, var(--p-surface), var(--p-tint));
  color: var(--p-accent); font-size: var(--t-small); font-weight: 500;
}
.guide__video svg { width: 40px; height: 40px; }
.guide__title { padding-inline: var(--s-2); font: 500 var(--t-body)/1.35 var(--font-text); letter-spacing: 0; color: var(--p-ink); }
.guide__steps { counter-reset: step; display: grid; gap: var(--s-2); padding-inline: var(--s-2); }
.guide__steps > li {
  counter-increment: step; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s-2);
  font-size: var(--t-small); line-height: 1.45; color: var(--p-muted);
}
.guide__steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--p-surface); color: var(--p-accent); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums;
}
.guide__steps b { font-weight: 600; color: var(--p-ink); }
@media (min-width: 640px) and (max-width: 1023px) { #help-center .guides { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { #help-center .guides { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) { .guide__video { aspect-ratio: 21 / 9; } }
