/* KC Web Studio foundation, v1.
   Copied into every site as assets/foundation.css and never edited there.
   It guarantees responsiveness and accessibility; every visual decision
   (palette, type, layout, texture) belongs to the site's own assets/site.css,
   which loads after this file and overrides the tokens below. */

/* ---------- Tokens ---------- */

:root {
  /* Colour: six roles. Text roles must keep 4.5:1 against the background roles. */
  --color-bg: #ffffff;
  --color-fg: #1e2226;
  --color-muted: #59616a;
  --color-surface: #f3f4f5;
  --color-accent: #1f5c99;
  --color-accent-fg: #ffffff;
  --color-border: #d3d7db;
  --color-focus: var(--color-accent);

  /* Type */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);
  --weight-body: 400;
  --weight-heading: 700;
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --measure: 66ch;

  /* Fluid type scale: about 16 to 18 px body, ratio 1.2 at 320 px growing to 1.25 at 1280 px */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.21vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.41rem);
  --step-2: clamp(1.44rem, 1.33rem + 0.55vw, 1.76rem);
  --step-3: clamp(1.73rem, 1.56rem + 0.83vw, 2.2rem);
  --step-4: clamp(2.07rem, 1.82rem + 1.23vw, 2.75rem);
  --step-5: clamp(2.49rem, 2.13rem + 1.8vw, 3.43rem);

  /* Spacing scale (the larger steps grow with the viewport) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --space-xl: clamp(2.5rem, 2rem + 2.4vw, 4rem);
  --space-2xl: clamp(3.5rem, 2.6rem + 4.4vw, 6rem);
  --space-3xl: clamp(5rem, 3.6rem + 6.8vw, 9rem);

  /* Shape and layout */
  --radius: 6px;
  --border-width: 1px;
  --wrap-max: 72rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --tap: 44px;

  color-scheme: light;
}

/* ---------- Reset ---------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-l);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- Text ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-2);
}

h4 {
  font-size: var(--step-1);
}

h5,
h6 {
  font-size: var(--step-0);
}

p,
li,
dd,
dt,
blockquote,
figcaption,
caption {
  max-inline-size: var(--measure);
}

p {
  text-wrap: pretty;
}

small,
.text-small {
  font-size: var(--step--1);
}

.text-muted {
  color: var(--color-muted);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.45;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
}

.prose > * + * {
  margin-block-start: var(--space-s);
}

.prose > * + :is(h2, h3, h4) {
  margin-block-start: var(--space-l);
}

/* ---------- Accessibility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-s);
  inset-block-start: var(--space-s);
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border-radius: var(--radius);
  transform: translateY(calc(-100% - 2rem));
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-inline-size: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-inline-size: calc(var(--measure) + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-space, var(--space-2xl));
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-block-start: var(--stack-space, var(--space-s));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cluster-space, var(--space-s));
  align-items: center;
  justify-content: flex-start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--grid-min, 16rem), 100%), 1fr));
  gap: var(--grid-gap, var(--space-m));
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--switcher-gap, var(--space-m));
}

.switcher > * {
  flex-grow: 1;
  flex-basis: calc((var(--switcher-at, 40rem) - 100%) * 999);
}

.sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sidebar-gap, var(--space-m));
}

.sidebar > :first-child {
  flex-basis: var(--sidebar-width, 18rem);
  flex-grow: 1;
}

.sidebar > :last-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: var(--sidebar-content-min, 55%);
}

.sidebar--end > :first-child {
  flex-basis: 0;
  flex-grow: 999;
  min-inline-size: var(--sidebar-content-min, 55%);
}

.sidebar--end > :last-child {
  flex-basis: var(--sidebar-width, 18rem);
  flex-grow: 1;
  min-inline-size: 0;
}

/* ---------- Header and navigation ---------- */

.site-header {
  border-bottom: var(--border-width) solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-m);
  padding-block: var(--space-xs);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--tap);
  color: inherit;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--step-1);
  line-height: 1.1;
  text-decoration: none;
}

.site-brand img {
  max-height: 3rem;
  width: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--tap);
  min-width: var(--tap);
  padding: var(--space-2xs) var(--space-s);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-m);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: inherit;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.3em;
}

/* Below 48em the menu folds behind the toggle (only when foundation.js runs). */
@media (max-width: 47.99em) {
  .has-js .nav-toggle {
    display: inline-flex;
  }

  .has-js .site-nav {
    flex-basis: 100%;
  }

  .has-js .site-nav:not([data-open]) {
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
    padding-block: var(--space-2xs);
  }

  .site-nav a {
    display: flex;
    width: 100%;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: var(--tap);
  padding: var(--space-2xs) var(--space-m);
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-accent-fg);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

.button--quiet {
  background: transparent;
  color: var(--color-accent);
}

/* ---------- Forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  max-inline-size: 36rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.field label {
  font-weight: 600;
}

.field-hint {
  color: var(--color-muted);
  font-size: var(--step--1);
}

.input,
.form input:not([type="hidden"], [type="checkbox"], [type="radio"]),
.form select,
.form textarea {
  width: 100%;
  min-height: var(--tap);
  padding: var(--space-2xs) var(--space-xs);
  border: var(--border-width) solid var(--color-muted);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-fg);
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
}

/* The honeypot: off screen, out of the tab order (tabindex="-1"), hidden from screen readers. */
.form-hp {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------- Figures and gallery ---------- */

figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

figure img {
  width: 100%;
}

figcaption {
  color: var(--color-muted);
  font-size: var(--step--1);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--gallery-min, 14rem), 100%), 1fr));
  gap: var(--gallery-gap, var(--space-s));
  padding: 0;
  list-style: none;
}

.gallery img {
  width: 100%;
  aspect-ratio: var(--gallery-ratio, 4 / 3);
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Hours ---------- */

.hours {
  width: 100%;
  max-inline-size: 24rem;
}

.hours caption {
  text-align: start;
  font-weight: 600;
  padding-block-end: var(--space-2xs);
}

.hours th,
.hours td {
  padding-block: var(--space-3xs);
  border-bottom: var(--border-width) solid var(--color-border);
  vertical-align: top;
}

.hours th {
  text-align: start;
  font-weight: 400;
  padding-inline-end: var(--space-m);
}

.hours td {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

/* ---------- Map embed ---------- */

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: var(--map-ratio, 4 / 3);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-block-start: var(--space-xl);
  padding-block: var(--space-xl) var(--space-l);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--step--1);
}

.site-footer address {
  font-style: normal;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-m);
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.site-credit {
  color: var(--color-muted);
}

.site-credit a {
  color: inherit;
}
