/* Keystone Heights Tech Help: site styles.
   Fluid type and space by the Utopia method (320 to 1240 px, body 19 to 21 px, ratio 1.2 to 1.25).
   Display sizes: narrow (base), medium (min-width: 40em), wide (min-width: 64em). */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
/* Matched fallbacks, computed from font metrics against Arial (Liberation Sans). */
@font-face {
  font-family: "Body Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 99.97%;
  ascent-override: 98.43%;
  descent-override: 31.61%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Heading Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arial");
  font-weight: 700;
  size-adjust: 104.74%;
  ascent-override: 89.26%;
  descent-override: 23.87%;
  line-gap-override: 0%;
}

:root {
  /* Type scale */
  --step--1: clamp(0.9896rem, 0.9686rem + 0.1051vi, 1.0500rem);
  --step-0: clamp(1.1875rem, 1.1440rem + 0.2174vi, 1.3125rem);
  --step-1: clamp(1.4250rem, 1.3500rem + 0.3750vi, 1.6406rem);
  --step-2: clamp(1.7100rem, 1.5915rem + 0.5927vi, 2.0508rem);
  --step-3: clamp(2.0520rem, 1.8741rem + 0.8895vi, 2.5635rem);
  --step-4: clamp(2.4624rem, 2.2043rem + 1.2903vi, 3.2043rem);
  --step-5: clamp(2.9549rem, 2.5895rem + 1.8270vi, 4.0054rem);

  /* Space scale */
  --space-3xs: clamp(0.2969rem, 0.2860rem + 0.0543vi, 0.3281rem);
  --space-2xs: clamp(0.5938rem, 0.5720rem + 0.1087vi, 0.6562rem);
  --space-xs: clamp(0.8906rem, 0.8580rem + 0.1630vi, 0.9844rem);
  --space-s: clamp(1.1875rem, 1.1440rem + 0.2174vi, 1.3125rem);
  --space-m: clamp(1.7812rem, 1.7160rem + 0.3261vi, 1.9688rem);
  --space-l: clamp(2.3750rem, 2.2880rem + 0.4348vi, 2.6250rem);
  --space-xl: clamp(3.5625rem, 3.4321rem + 0.6522vi, 3.9375rem);
  --space-2xl: clamp(4.7500rem, 4.5761rem + 0.8696vi, 5.2500rem);
  --space-s-l: clamp(1.1875rem, 0.6875rem + 2.5000vi, 2.6250rem);
  --space-m-xl: clamp(1.7812rem, 1.0312rem + 3.7500vi, 3.9375rem);
  --space-l-2xl: clamp(2.3750rem, 1.3750rem + 5.0000vi, 5.2500rem);
  --space-xl-3xl: clamp(3.5625rem, 2.0625rem + 7.5000vi, 7.8750rem);

  /* Radix slate (neutral, cool beside the blue brand) */
  --gray-1: #fcfcfd; --gray-2: #f9f9fb; --gray-3: #f0f0f3; --gray-4: #e8e8ec;
  --gray-5: #e0e1e6; --gray-6: #d9d9e0; --gray-7: #cdced6; --gray-8: #b9bbc6;
  --gray-11: #60646c; --gray-12: #1c2024;
  /* Radix blue: the logo's blue sits at step 9, the logo's navy at step 12 */
  --blue-1: #fbfdff; --blue-2: #f4faff; --blue-3: #e6f4fe; --blue-4: #d5efff;
  --blue-5: #c2e5ff; --blue-6: #acd8fc; --blue-7: #8ec8f6; --blue-8: #5eb1ef;
  --blue-9: #0090ff; --blue-10: #0588f0; --blue-11: #0d74ce; --blue-12: #113264;
  /* Green built for the logo's green (no close Radix match), step 9 = logo green */
  --green-3: #eef6dc; --green-6: #c5dd8f; --green-9: #6c9c06; --green-11: #4a7300; --green-12: #2b4200;

  /* Roles */
  --color-page: #ffffff;
  --color-surface: var(--blue-2);
  --color-surface-green: var(--green-3);
  --color-fill: var(--gray-3);
  --color-border-subtle: var(--gray-6);
  --color-border: var(--gray-7);
  --color-action: var(--blue-11);       /* step 9 is too light for white text; step 11 gives 4.8:1 */
  --color-action-hover: var(--blue-12);
  --color-on-action: #ffffff;
  --color-text: var(--gray-12);
  --color-heading: var(--blue-12);
  --color-text-muted: var(--gray-11);
  --color-link: var(--blue-11);
  --color-focus: var(--blue-12);

  --radius: 0.5rem;
  --max-width: 77.5rem;
  --measure: 66ch;
  --side-margin: var(--space-s-l);
  --header-h: 4.5rem;
  --bar-h: 4.5rem;

  --font-body: "Atkinson Hyperlegible Next", "Body Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Rubik", "Heading Fallback", "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scroll-padding-bottom: calc(var(--bar-h) + 1rem);
}
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  padding-bottom: var(--bar-h); /* room for the pinned call bar on narrow displays */
}
img, svg, video { max-width: 100%; height: auto; display: block; }
::selection { background: var(--blue-5); color: var(--gray-12); }

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  font-weight: 700;
}
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0; text-wrap: pretty; max-width: var(--measure); }
ul, ol { margin: 0; padding-left: 1.25em; }
li + li { margin-top: var(--space-3xs); }
strong { font-weight: 700; }

a { color: var(--color-link); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { color: var(--color-action-hover); text-decoration-thickness: 0.12em; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100%; z-index: 100;
  background: var(--color-page); color: var(--color-link);
  padding: var(--space-2xs) var(--space-s); border: 2px solid var(--color-focus); border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Layout primitives */
.container { width: min(100% - 2 * var(--side-margin), var(--max-width)); margin-inline: auto; }
.stack { display: flex; flex-direction: column; justify-content: flex-start; }
.stack > * + * { margin-block-start: var(--stack-space, var(--space-s)); }
.stack > * + :is(h2, h3) { margin-block-start: var(--stack-space-heading, var(--space-l)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.with-sidebar { display: flex; flex-wrap: wrap; gap: var(--space-l); align-items: flex-start; }
.with-sidebar > .sidebar { flex-basis: 18em; flex-grow: 1; }
.with-sidebar > .main { flex-basis: 0; flex-grow: 999; min-inline-size: 55%; }
.switcher { display: flex; flex-wrap: wrap; gap: var(--space-m); }
.switcher > * { flex-grow: 1; flex-basis: calc((40em - 100%) * 999); }
.grid { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(17em, 100%), 1fr)); }
.frame { aspect-ratio: var(--ratio, 3 / 2); overflow: hidden; border-radius: var(--radius); }
.frame > img, .frame > picture > img { inline-size: 100%; block-size: 100%; object-fit: cover; }

/* Sections */
.band { padding-block: var(--space-xl-3xl); }
.band--tint { background: var(--color-surface); }
.band--green { background: var(--color-surface-green); }
.band--green a { color: var(--blue-12); }
.band + .band:not(.band--tint):not(.band--green) { border-top: 1px solid var(--color-border-subtle); }
.lead { font-size: var(--step-1); line-height: 1.45; }
.muted { color: var(--color-text-muted); }

/* Buttons and contact actions */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; min-width: 48px;
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 700; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 2px solid var(--color-action);
}
.button svg { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }
.button--call { background: var(--color-action); color: var(--color-on-action); }
.button--call:hover { background: var(--color-action-hover); border-color: var(--color-action-hover); color: var(--color-on-action); }
.button--text { background: var(--color-page); color: var(--color-action); }
.button--text:hover { background: var(--blue-3); color: var(--color-action-hover); border-color: var(--color-action-hover); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.more { font-weight: 700; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border-subtle);
}
.header-row {
  display: flex; align-items: center; gap: var(--space-xs);
  min-height: var(--header-h);
  padding-block: var(--space-3xs);
}
.brand { display: inline-flex; align-items: center; flex: none; margin-right: auto; padding-block: 4px; }
.brand img { height: 3.25rem; width: auto; }
.site-nav { display: flex; align-items: center; }
.menu-button {
  display: inline-flex; align-items: center; gap: 0.45em;
  min-height: 48px; padding: 0.4em 0.9em;
  font: 700 var(--step-0)/1 var(--font-body);
  color: var(--color-heading); background: var(--color-page);
  border: 2px solid var(--color-border); border-radius: var(--radius); cursor: pointer;
}
.menu-button:hover { border-color: var(--color-heading); }
.menu-icon { width: 1.1em; height: 1.1em; }
.menu-list {
  list-style: none; margin: 0; padding: 0;
}
.menu-list a {
  display: flex; align-items: center; min-height: 48px; padding-inline: 0.75em; white-space: nowrap;
  color: var(--color-heading); text-decoration: none; font-weight: 400; border-radius: var(--radius);
}
.menu-list a:hover { background: var(--blue-3); text-decoration: underline; }
.menu-list a[aria-current] { text-decoration: underline; text-decoration-thickness: 0.15em; text-underline-offset: 0.35em; font-weight: 700; }
.header-actions { display: none; }

/* Narrow display: the menu opens as a panel under the header. */
.js .menu-list[hidden] { display: none; }
.js .menu-list {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--color-page); border-bottom: 1px solid var(--color-border-subtle);
  box-shadow: 0 0.75rem 1.5rem rgba(17, 50, 100, 0.12);
  padding: var(--space-2xs) var(--side-margin) var(--space-s);
}
.js .menu-list li + li { margin-top: 0; border-top: 1px solid var(--gray-4); }
.no-js .menu-button { display: none; }
.no-js .site-nav { width: 100%; }
.no-js .menu-list { display: flex; flex-wrap: wrap; gap: 0 var(--space-xs); }

/* Pinned call bar, narrow displays only */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: var(--space-2xs);
  padding: var(--space-2xs) var(--side-margin) calc(var(--space-2xs) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--color-border-subtle);
  box-shadow: 0 -0.5rem 1.25rem rgba(17, 50, 100, 0.08);
}
.call-bar .button { flex: 1 1 auto; padding-inline: 0.6em; }
.call-bar .button--call { flex-grow: 3; }
.two-col > * + *, .with-sidebar + * { margin-top: var(--space-l); }
/* The narrowest displays: the call button keeps the number and its icon; the word Call is read, not shown. */
@media (max-width: 21.49em) {
  .call-bar .button--call .call-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Opening */
.opening { padding-block: var(--space-l-2xl) var(--space-xl); position: relative; overflow: hidden; }
.opening h1 { font-size: var(--step-4); max-width: 15ch; }
.opening-grid > * + * { margin-top: var(--space-m); }
.route { display: none; width: 100%; max-width: 30rem; }
.opening .lead { max-width: 34ch; }
.swoosh { display: block; width: min(100%, 34rem); height: auto; margin-top: var(--space-2xs); }
.opening .urgent {
  border-left: 0; padding: var(--space-xs) var(--space-s);
  background: var(--color-surface); border-radius: var(--radius); max-width: 42ch;
}
.opening-places { color: var(--color-text-muted); }

/* Services */
.service-list { list-style: none; padding: 0; margin: 0; }
@media (min-width: 64em) { .service-list.grid { grid-template-columns: repeat(4, 1fr); } }
.service-card {
  background: var(--color-page); border: 1px solid var(--color-border-subtle); border-radius: var(--radius);
  padding: var(--space-s); height: 100%;
  display: flex; flex-direction: column; gap: var(--space-2xs);
}
.service-list > li + li { margin-top: 0; }
.service-card h3 a { color: var(--color-heading); text-decoration-color: var(--blue-7); }
.service-card h3 a:hover { text-decoration-color: currentColor; }
.service-card p { color: var(--gray-12); }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(15em, 100%), 1fr)); }
.steps > li { counter-increment: step; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--space-2xs) var(--space-s); align-items: start; }
.steps > li::before {
  content: counter(step);
  font: 700 var(--step-2)/1 var(--font-heading); color: var(--color-on-action);
  background: var(--color-heading); width: 1.9em; height: 1.9em; border-radius: 50%;
  display: grid; place-items: center; grid-row: span 2;
}
.steps h3 { font-size: var(--step-1); align-self: center; }
.steps p { grid-column: 2; }

/* Proof number */
.big-number {
  font: 800 clamp(5rem, 3.2rem + 9vi, 9.5rem)/0.9 var(--font-heading);
  color: var(--green-11); letter-spacing: -0.03em; display: block;
}

/* Media and placeholders */
.placeholder {
  display: grid; place-items: center; width: 100%;
  background: var(--gray-2); border: 2px dashed var(--color-border); border-radius: var(--radius);
  color: var(--color-text-muted); font-size: var(--step-0); text-align: center; padding: var(--space-m);
}
.placeholder p { max-width: 28ch; }
.placeholder strong { color: var(--gray-12); }
figure { margin: 0; }
figcaption { font-size: var(--step-0); color: var(--color-text-muted); margin-top: var(--space-2xs); }

/* Page openings after Home */
.page-opening { padding-block: var(--space-l-2xl) var(--space-l); background: var(--color-surface); border-bottom: 1px solid var(--blue-5); }
.page-opening .swoosh { width: min(70%, 16rem); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25em 0.5em; font-size: var(--step-0); }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 0.5em; }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--gray-11); }
.breadcrumb a { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }

/* Lists of included and not included */
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.6em; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0.15em; top: 0.45em; width: 0.8em; height: 0.45em; border-left: 3px solid var(--green-11); border-bottom: 3px solid var(--green-11); transform: rotate(-45deg); }
.notlist { padding-left: 1.25em; }
.panel { background: var(--color-page); border: 1px solid var(--color-border-subtle); border-radius: var(--radius); padding: var(--space-s) var(--space-m); }
.panel--note { background: var(--color-surface-green); border-color: var(--green-6); }

/* FAQs */
.faq { }
.faq dt { font-family: var(--font-heading); font-weight: 600; color: var(--color-heading); font-size: var(--step-1); line-height: 1.3; }
.faq dd { margin: var(--space-3xs) 0 0; max-width: var(--measure); }
.faq dd + dt { margin-top: var(--space-m); }

/* Contact list */
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(17em, 100%), 1fr)); }
.contact-list > li { margin: 0; }
.contact-list h2 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }
.social-link { display: inline-flex; align-items: center; gap: 0.5em; min-height: 44px; }
.social-link svg { width: 1.4em; height: 1.4em; fill: currentColor; flex: none; }

/* Closing invitation */
.closing h2 { max-width: 22ch; }

/* Footer */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--blue-5); padding-block: var(--space-xl) var(--space-l); font-size: var(--step-0); }
.site-footer h2 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; color: var(--gray-12); margin-bottom: var(--space-2xs); }
.footer-grid { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(14em, 100%), 1fr)); }
.footer-list { list-style: none; padding: 0; }
.footer-list li + li { margin-top: 0; }
.footer-list a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom { max-width: none; margin-top: var(--space-l); padding-top: var(--space-s); border-top: 1px solid var(--blue-5); color: var(--color-text-muted); }

/* Medium display */
@media (min-width: 40em) {
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 1rem; }
  .call-bar { display: none; }
  .header-actions { display: flex; gap: var(--space-2xs); align-items: center; order: 3; }
  .header-actions .button { min-height: 46px; padding: 0.45em 0.8em; }
  .site-nav { order: 2; }
  .brand img { height: 3rem; }
  .opening h1 { font-size: var(--step-5); }
  .route { display: block; }
  .swoosh-narrow { display: none; }
  .with-photo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: center; }
}
/* Header room: the Text button drops its number before anything wraps. */
@media (min-width: 40em) and (max-width: 45.99em) {
  .menu-button .menu-icon { display: none; }
}
@media (min-width: 40em) and (max-width: 51.99em) {
  .header-actions .button--text .num { display: none; }
  .header-row { gap: var(--space-2xs); }
  .header-actions { gap: 0.4rem; }
  .header-actions .button { padding-inline: 0.6em; }
}
/* Navigation shows in full where its items fit on one line beside the logo and the actions. */
@media (min-width: 72em) {
  .js .menu-button, .no-js .menu-button { display: none; }
  .js .menu-list, .js .menu-list[hidden], .no-js .menu-list {
    display: flex; position: static; box-shadow: none; border: 0; padding: 0; background: none; gap: 0.15em;
  }
  .js .menu-list li + li { border-top: 0; }
  .site-nav { margin-right: var(--space-xs); }
}
/* Wide display */
@media (min-width: 64em) {
  .brand img { height: 3.4rem; }
  .opening-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: end; }
  .opening-grid > * + * { margin-top: 0; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: start; }
  .two-col > * + * { margin-top: 0; }
}

/* Touch: everything already sized for a finger; nothing depends on hover. */
@media (hover: hover) and (pointer: fine) {
  .service-card:hover { border-color: var(--blue-7); }
}
/* A narrow device turned sideways: keep pinned elements slim. */
@media (orientation: landscape) and (max-height: 30em) {
  :root { --header-h: 3.5rem; }
  .brand img { height: 2.5rem; }
  .header-actions .button { min-height: 44px; padding-block: 0.3em; }
  .opening { padding-block: var(--space-m) var(--space-l); }
  .call-bar { padding-block: 0.25rem; }
  .call-bar .button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .call-bar, .skip-link { position: static; }
  .call-bar { display: none; }
}
