/* ==========================================================================
   STARTER KIT: paste this whole file into Style Manager > Stylesheets > Main.
   Section 1 is the only part you change for each new site.
   ========================================================================== */
/* 1. SITE SETTINGS ------------------------------------------------------- */
/* html:root outweighs ACSS's own :root values.
   New maker: change the colours below, nothing else in this file. */
html:root {
  --site-text: #1e2b27;          /* Body text, nav links, headings */
  --site-action: #2f5d50;        /* Buttons, links, section titles. Check 4.5:1 on white */
  --site-action-hover: #1e2b27;  /* Hover and focus */
  --site-surface: #eef0ea;       /* Alternating sections, tiles, footer */
  --site-band: #2f5d50;          /* Hero wash and the dark call-to-action band */
  --site-line: #dfe3dc;          /* Header and footer edges */
  --site-line-strong: #c8cfc7;   /* Footer divider, photo frames */
  --site-page: #fbfbf8;          /* Page background and cards */
  --site-on-dark: #fff;          /* Text on dark bands and the hero */

  /* Body text size: 19px on phones, growing to 22px from about 1200px wide. */
  --site-body-text: clamp(1.1875rem, 1.1rem + 0.365vw, 1.375rem);

  /* Heading sizes, phone to wide screen: H1 36 to 56px, H2 28 to 42px,
     H3 22 to 28px. Sized to sit well above the large body text. */
  --site-h1: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem);
  --site-h2: clamp(1.75rem, 1.3rem + 1.5vw, 2.625rem);
  --site-h3: clamp(1.375rem, 1.15rem + 0.75vw, 1.75rem);

  /* Hand these values to ACSS, so you never need a Dashboard save for them. */
  --primary: var(--site-action);
  --text-color: var(--site-text);
  --heading-color: var(--site-text);
  --link-color: var(--site-action);
  --link-color-hover: var(--site-action-hover);
  --text-m: var(--site-body-text);

  /* Colours only: ACSS's default animates sizes during page load in Chrome. */
  --link-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, text-decoration-color 0.3s ease-in-out;
  --btn-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* PALETTES: the eight standard colour schemes. A store picks one at signup.
   To switch, replace the nine --site- colour lines at the top of section 1
   with one block below. Copy only the nine lines that start with --, never
   the palette's name, or the first line breaks. All eight pass contrast checks (6.5:1 or better).
   Nothing else in this file changes.

   FOREST GREEN (default)
  --site-text: #1e2b27;
  --site-action: #2f5d50;
  --site-action-hover: #1e2b27;
  --site-surface: #eef0ea;
  --site-band: #2f5d50;
  --site-line: #dfe3dc;
  --site-line-strong: #c8cfc7;
  --site-page: #fbfbf8;
  --site-on-dark: #fff;

   HARBOUR NAVY
  --site-text: #1d2533;
  --site-action: #2b4a6f;
  --site-action-hover: #1d2533;
  --site-surface: #eceff3;
  --site-band: #2b4a6f;
  --site-line: #dde2e9;
  --site-line-strong: #c5ccd6;
  --site-page: #fbfbfa;
  --site-on-dark: #fff;

   OXBLOOD
  --site-text: #2b1f22;
  --site-action: #7a2e3a;
  --site-action-hover: #2b1f22;
  --site-surface: #f3eeee;
  --site-band: #6e2a35;
  --site-line: #e6dcdc;
  --site-line-strong: #d2c4c5;
  --site-page: #fcfbfa;
  --site-on-dark: #fff;

   WALNUT
  --site-text: #2a221c;
  --site-action: #6b4a2f;
  --site-action-hover: #2a221c;
  --site-surface: #f2eee8;
  --site-band: #5e4029;
  --site-line: #e4ddd3;
  --site-line-strong: #cfc4b6;
  --site-page: #fcfbf8;
  --site-on-dark: #fff;

   CHARCOAL
  --site-text: #1f2326;
  --site-action: #3d4a52;
  --site-action-hover: #1f2326;
  --site-surface: #eef0f1;
  --site-band: #343e45;
  --site-line: #dfe2e4;
  --site-line-strong: #c7cccf;
  --site-page: #fbfbfb;
  --site-on-dark: #fff;

   DEEP TEAL
  --site-text: #18292b;
  --site-action: #1f5c63;
  --site-action-hover: #18292b;
  --site-surface: #eaf1f1;
  --site-band: #1d545a;
  --site-line: #d9e4e4;
  --site-line-strong: #c0d0d0;
  --site-page: #fafbfb;
  --site-on-dark: #fff;

   PLUM
  --site-text: #2a1f2b;
  --site-action: #5e3560;
  --site-action-hover: #2a1f2b;
  --site-surface: #f2eef2;
  --site-band: #553058;
  --site-line: #e3dbe3;
  --site-line-strong: #cfc3cf;
  --site-page: #fcfbfc;
  --site-on-dark: #fff;

   OLIVE
  --site-text: #262819;
  --site-action: #4f5427;
  --site-action-hover: #262819;
  --site-surface: #f1f1e8;
  --site-band: #4a4f24;
  --site-line: #e2e2d4;
  --site-line-strong: #cbcbb8;
  --site-page: #fbfbf7;
  --site-on-dark: #fff;
*/

/* 2. SITE-WIDE ----------------------------------------------------------- */
.contact-link {
  display: inline-block;
  padding-block: 0.5rem;
  font-weight: 600;
}

.site-button {
  display: inline-block;
  background: var(--site-action);
  color: var(--site-on-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 0.75em 1.5em;
  border-radius: 0.3em;

  &:hover,
  &:focus-visible {
    background: var(--site-action-hover);
    color: var(--site-on-dark);
  }
}

/* 3. SITE HEADER --------------------------------------------------------- */
.site-header {
  position: relative;
  background: var(--site-page);
  border-bottom: 1px solid var(--site-line);

  .site-header__inner {
    max-width: var(--content-width, 1280px);
    margin-inline: auto;
    padding: var(--space-s, 1rem) var(--gutter, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-m, 1.5rem);
  }

  .site-header__logo img {
    display: block;
    height: 5rem;
    width: auto;
  }

  .site-header__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--space-m, 1.5rem);
  }

  .site-header__list a {
    color: var(--site-text);
    font-weight: 600;
    text-decoration: none;
  }

  .site-header__list a:hover,
  .site-header__list a:focus-visible {
    color: var(--site-action);
    text-decoration: underline;
  }

  .site-header__list .site-header__cta {
    background: var(--site-action);
    color: var(--site-on-dark);
    padding: 0.6em 1.2em;
    border-radius: 0.3em;
  }

  .site-header__list .site-header__cta:hover,
  .site-header__list .site-header__cta:focus-visible {
    background: var(--site-action-hover);
    color: var(--site-on-dark);
  }

  .site-header__toggle {
    display: none;
    background: none;
    border: 2px solid var(--site-text);
    color: var(--site-text);
    font-weight: 600;
    padding: 0.4em 0.9em;
    border-radius: 0.3em;
    cursor: pointer;
  }

  @media (max-width: 767px) {
    .site-header__inner {
      gap: var(--space-s, 1rem);
      flex-wrap: nowrap;
    }

    .site-header__toggle {
      display: block;
      min-height: 2.75rem;
    }

    .site-header__toggle[aria-expanded='true'] {
      background: var(--site-text);
      color: var(--site-on-dark);
    }

    .site-header__nav {
      display: none;
      position: absolute;
      inset-block-start: 100%;
      inset-inline: 0;
      z-index: 100;
      background: var(--site-page);
      border-block-end: 1px solid var(--site-line);
      box-shadow: 0 0.75rem 1.5rem color-mix(in srgb, var(--site-text) 15%, transparent);
    }

    .site-header__nav.is-open {
      display: block;
    }

    .site-header__list {
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 0 var(--gutter, 1.5rem) var(--space-m, 1.5rem);
    }

    .site-header__list a {
      display: block;
      padding-block: 0.75rem;
      border-block-end: 1px solid var(--site-line);
    }

    .site-header__list .site-header__cta {
      margin-block-start: var(--space-s, 1rem);
      padding: 0.75rem 1.2em;
      border-block-end: 0;
      text-align: center;
    }
  }
}

/* 4. SITE FOOTER --------------------------------------------------------- */
.site-footer {
  background: var(--site-surface);
  color: var(--site-text);
  border-top: 1px solid var(--site-line);
  padding-block: 0;

  a {
    color: var(--site-action);
    text-underline-offset: 0.2em;
  }

  a:hover,
  a:focus-visible {
    color: var(--site-text);
  }

  .site-footer__inner {
    max-width: var(--content-width, 1280px);
    margin-inline: auto;
    padding: var(--space-l, 3rem) var(--gutter, 1.5rem) var(--space-m, 1.5rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-l, 3rem);
  }

  .site-footer__brand img {
    display: block;
    height: 5rem;
    width: auto;
    margin-bottom: var(--space-s, 1rem);
  }

  .site-footer__brand p {
    margin: 0 0 0.5em;
  }

  .site-footer__heading {
    font-size: var(--text-m, 1.125rem);
    margin: 0 0 var(--space-s, 1rem);
    color: var(--site-text);
  }

  .site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5em;
  }

  .site-footer__legal {
    width: calc(100% - 2 * var(--gutter, 1.5rem));
    max-width: calc(var(--content-width, 1280px) - 2 * var(--gutter, 1.5rem));
    margin-inline: auto;
    padding-block: var(--space-m, 1.5rem);
    border-top: 1px solid var(--site-line-strong);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-s, 1rem);
    font-size: var(--text-s, 0.875rem);
  }

  .site-footer__legal ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s, 1rem);
  }

  .site-footer__legal p {
    margin: 0;
  }
}

/* 5. HERO ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: 0;
  display: grid;
  min-height: clamp(26rem, 70vh, 40rem);

  .hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* ACSS rounds images by default */
  }

  &::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      to top,
      color-mix(in srgb, var(--site-band) 85%, transparent),
      color-mix(in srgb, var(--site-band) 20%, transparent)
    );
  }

  .hero__content {
    position: relative;
    z-index: 2;
    align-self: end;
    width: 100%;
    max-width: var(--content-width, 1280px);
    margin-inline: auto;
    padding: var(--space-xl, 4rem) var(--gutter, 1.5rem) var(--space-m, 1.5rem);
    color: var(--site-on-dark);
  }

  .hero__title {
    color: var(--site-on-dark);
    line-height: 1.1;
    margin: 0 0 0.2em;
  }

  .hero__tagline {
    max-width: 30ch;
    margin: 0 0 var(--space-m, 1.5rem);
  }

  /* Add hero--right to the section to right-align the text on wide screens. */
  @media (min-width: 992px) {
    &.hero--right .hero__content {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      text-align: right;
      padding-block-end: var(--space-l, 3rem);
    }

    .hero__tagline {
      max-width: 40ch;
    }
  }
}

/* 6. PAGE INTRO ---------------------------------------------------------- */
.page-intro {
  background-color: var(--site-surface);
  text-align: center;
  padding-block-end: var(--space-xl, 3rem);

  .page-intro__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .page-intro__title {
    color: var(--site-text);
    text-wrap: balance;
    margin-block-end: var(--space-m, 1.5rem);

    &::after {
      content: '';
      display: block;
      width: 4rem;
      height: 4px;
      background-color: var(--primary);
      margin: var(--space-s, 1rem) auto 0;
    }
  }

  .page-intro__text {
    max-width: 55ch;
    margin-inline: auto;
    margin-block-end: var(--space-l, 2rem);

    &:last-child {
      margin-block-end: 0;
    }
  }

  .page-intro__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-s, 1rem) var(--space-m, 1.5rem);
  }

  .page-intro__links a {
    color: var(--site-action);
    font-weight: 600;
    text-decoration: none;
  }

  .page-intro__links a:hover,
  .page-intro__links a:focus-visible {
    color: var(--site-action-hover);
    text-decoration: underline;
  }
}

/* 7. SPLIT: text beside a 4:5 photo --------------------------------------- */
/* Add split--alt for the light background, split--reverse for the photo on the left. */
.split {
  &.split--alt {
    background-color: var(--site-surface);
  }

  .split__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
    display: grid;
    gap: var(--space-xl, 3rem);
    align-items: center;
  }

  .split__text {
    max-width: 55ch;
  }

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

  .split__title {
    color: var(--primary);
  }

  .split__quote {
    margin-inline: 0;
    padding-inline-start: var(--space-m, 1.5rem);
    border-inline-start: 4px solid var(--primary);
    font-style: italic;
  }

  .split__media {
    margin: 0;
  }

  .split__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 4px;
  }

  @media (min-width: 768px) {
    .split__inner {
      grid-template-columns: 1fr 1fr;
    }

    &.split--reverse .split__media {
      order: -1;
    }
  }
}

/* 8. CARD GRID AND CARD --------------------------------------------------- */
.card-grid {
  background-color: var(--site-surface);

  .card-grid__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .card-grid__header {
    text-align: center;
    max-width: 55ch;
    margin: 0 auto var(--space-l, 2.5rem);
  }

  .card-grid__header > * + * {
    margin-block-start: var(--space-s, 1rem);
  }

  .card-grid__title {
    color: var(--primary);
  }

  .card-grid__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
    gap: var(--space-l, 2.5rem);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--site-page);
  border-radius: 0.5rem;
  overflow: hidden;

  .card__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-s, 1rem);
    padding: var(--space-m, 1.5rem);
  }

  .card__title {
    color: var(--primary);
    margin: 0;
  }

  .card__text {
    margin: 0;
  }

  .site-button {
    margin-top: auto;
  }
}

.card__link {
  &::after {
    content: ' →';
  }

  &[target='_blank']::after {
    content: ' ↗';
  }
}

/* 9. TILES: contact methods, services, ways to do something --------------- */
/* Add tiles--alt for the light background. The tiles then turn white. */
.tiles {
  .tiles__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .tiles__header {
    max-width: 55ch;
    margin-inline: auto;
    margin-block-end: var(--space-l, 2rem);
    text-align: center;
  }

  .tiles__header > * + *,
  .tiles__item > * + * {
    margin-block-start: var(--space-s, 1rem);
  }

  .tiles__title {
    color: var(--primary);
  }

  .tiles__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
    gap: var(--space-m, 1.5rem);
  }

  .tiles__item {
    background-color: var(--site-surface);
    border-block-start: 3px solid var(--primary);
    padding: var(--space-m, 1.5rem);
  }

  &.tiles--alt {
    background-color: var(--site-surface);

    .tiles__item {
      background-color: var(--site-page);
    }
  }
}

/* 10. STEPS: a numbered list ---------------------------------------------- */
.steps {
  .steps__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .steps__content {
    max-width: 55ch;
    margin-inline: auto;
  }

  .steps__title {
    color: var(--primary);
  }

  .steps__list {
    list-style: none;
    padding: 0;
    margin: var(--space-l, 2rem) 0 0;
    counter-reset: steps;
    display: grid;
    gap: var(--space-l, 2rem);
  }

  .steps__item {
    counter-increment: steps;
    display: grid;
    grid-template-columns: 2.25em 1fr;
    column-gap: var(--space-s, 1rem);
    row-gap: var(--space-2xs, 0.25rem);

    &::before {
      content: counter(steps);
      grid-row: 1 / span 2;
      width: 2.25em;
      height: 2.25em;
      display: grid;
      place-items: center;
      border: 2px solid var(--primary);
      border-radius: 50%;
      color: var(--site-action);
      font-weight: 600;
      line-height: 1;
    }

    & > * {
      grid-column: 2;
      margin: 0;
    }

    & > p + p {
      margin-block-start: var(--space-s, 1rem);
    }
  }
}

/* 11. MAP: a linked image, not an embedded Google Map ---------------------- */
.map {
  .map__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .map__header {
    margin-block-end: var(--space-l, 2rem);
    text-align: center;
  }

  .map__title {
    color: var(--primary);
    text-wrap: balance;
    margin-block-end: var(--space-s, 1rem);
  }

  .map__text {
    max-width: 55ch;
    margin-inline: auto;
    margin-block-end: var(--space-m, 1.5rem);
  }

  .map__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
  }

  /* Change object-position on phones so the crop keeps the pin in view. */
  @media (max-width: 767px) {
    .map__img {
      aspect-ratio: 4 / 3;
      object-fit: cover;
      object-position: 50% 50%;
    }
  }
}

/* 12. BAND: the dark call to action ---------------------------------------- */
.band {
  background-color: var(--site-band);
  color: var(--site-on-dark);
  text-align: center;

  .band__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

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

  .band__title {
    color: var(--site-on-dark);
    text-wrap: balance;
  }

  .band__note {
    margin-block-start: var(--space-m, 1.5rem);

    a {
      color: var(--site-on-dark);
      text-decoration: underline;
    }
  }

  .site-button:focus-visible {
    outline: 2px solid var(--site-on-dark);
    outline-offset: 3px;
  }
}

/* 13. LEGAL: Privacy Policy and Accessibility Statement --------------------- */
.legal {
  .legal__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .legal__text {
    max-width: 55ch;
    margin-inline: auto;
  }

  .legal__text p,
  .legal__text li {
    line-height: 1.5;
  }

  .legal__text li + li {
    margin-block-start: var(--space-xs, 0.5rem);
  }

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

  .legal__text > h2 {
    color: var(--primary);
    margin-block-start: var(--space-l, 3rem);
  }

  .legal__text > h2:first-child {
    margin-block-start: 0;
  }

  .legal__text > h3 {
    margin-block-start: var(--space-m, 1.5rem);
  }

  .legal__text ul,
  .legal__text ol {
    padding-inline-start: 1.25em;
  }
}

/* ARTISAN: HEADER --------------------------------------------------------- */
/* Light header. The maker's name can be text (site-header__name) instead of
   a logo, because most makers don't have one. Use a logo image when they do. */
.site-header {
  background: var(--site-page);

  .site-header__name {
    display: block;
    color: var(--site-text);
    font-size: var(--site-h3);
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
  }

  /* Optional second line under the name, such as "Pottery · Bracebridge" */
  .site-header__name small {
    display: block;
    margin-block-start: 0.2em;
    color: var(--site-action);
    font-size: 0.6em;
    font-weight: 600;
  }

  .site-header__name:hover,
  .site-header__name:focus-visible {
    color: var(--site-action);
  }

  a:focus-visible,
  .site-header__toggle:focus-visible {
    outline: 2px solid var(--site-action);
    outline-offset: 3px;
  }

  /* Skip link: hidden above the page until a keyboard user tabs to it,
     then it appears top left and jumps past the menu to the content */
  .skip-link {
    position: absolute;
    inset-inline-start: var(--gutter, 1.5rem);
    inset-block-start: -10rem;
    z-index: 200;
    padding: 0.6em 1em;
    border-radius: 0.3em;
    background: var(--site-action);
    color: var(--site-on-dark);
    font-weight: 600;
    text-decoration: none;
  }

  .skip-link:focus {
    inset-block-start: var(--space-s, 1rem);
  }

  /* Logo, when there is one: fixed height, never distorted */
  .site-header__logo img {
    height: 4rem;
    width: auto;
    object-fit: contain;
  }

  /* Phones: the kit's Menu button and dropdown panel (section 3) do the work,
     as on Patmos. The name gives way to the button, and the logo shrinks. */
  @media (max-width: 767px) {
    .site-header__name {
      min-width: 0;
    }

    .site-header__toggle {
      flex-shrink: 0;
      position: relative;
    }

    /* Open menu: the button reads Close. The word Menu stays in the
       button (made invisible) so screen readers keep hearing "Menu,
       expanded"; Close is drawn on top for sighted users only. The first
       content line is a fallback for older browsers. */
    .site-header__toggle[aria-expanded='true'] {
      color: transparent;
    }

    .site-header__toggle[aria-expanded='true']::after {
      content: 'Close';
      content: 'Close' / '';
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: var(--site-on-dark);
    }

    .site-header__logo img {
      height: 3rem;
    }
  }
}
/* The skip link moves focus to <main>; no outline box around the whole page */
main:focus {
  outline: none;
}
/* END ARTISAN: HEADER ----------------------------------------------------- */

/* ARTISAN: HERO ----------------------------------------------------------- */
.hero {
  /* Solid colour if the photo is missing or still loading */
  background: var(--site-band);

  /* object-position: the second number picks the vertical slice.
     0% = show the top of the photo, 100% = show the bottom. */
  .hero__img {
    object-position: 50% 50%;
  }

  /* Wash: heavier at the bottom behind the words, lighter at the top.
     If white text gets hard to read on a bright photo, raise both numbers. */
  &::after {
    background: linear-gradient(
      to top,
      color-mix(in srgb, var(--site-band) 90%, transparent),
      color-mix(in srgb, var(--site-band) 45%, transparent)
    );
  }

  .hero__title {
    text-wrap: balance;
  }

  /* White button, so it stands out on any photo */
  .site-button {
    background: var(--site-on-dark);
    color: var(--site-text);
  }

  .site-button:hover,
  .site-button:focus-visible {
    background: var(--site-surface);
    color: var(--site-text);
  }

  .site-button:focus-visible {
    outline: 2px solid var(--site-on-dark);
    outline-offset: 3px;
  }

  @media (max-width: 767px) {
    min-height: 32rem;

    .hero__title {
      font-size: 2rem;
    }
  }
}
/* END ARTISAN: HERO ------------------------------------------------------- */

/* ARTISAN: SPLIT ---------------------------------------------------------- */
/* Use for Meet the maker and Where to find me. */
.split {
  /* Softer, rounder photo corners */
  .split__img {
    border-radius: 0.75rem;
  }

  /* A little more space above the button than between paragraphs */
  .split__action {
    margin-block-start: var(--space-m, 1.5rem);
  }

  /* Bulleted lists (markets, shops, studio hours): bullets forced back on,
     because ACSS removes them */
  .split__text ul {
    padding-inline-start: 1.25em;
    list-style: disc outside;
  }

  .split__text li {
    display: list-item;
  }

  .split__text li + li {
    margin-block-start: var(--space-xs, 0.5rem);
  }

  .split__text li::marker {
    color: var(--primary);
  }
}
/* END ARTISAN: SPLIT ------------------------------------------------------ */

/* ARTISAN: QUOTE BAND ----------------------------------------------------- */
/* A customer's words or the maker's own, centred on the dark band */
.quote-band {
  background: var(--site-band);
  color: var(--site-on-dark);
  text-align: center;

  --quote-band-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);

  /* Turn off ACSS's quote box using ACSS's own settings, for this band only */
  --blockquote-background: transparent;
  --blockquote-padding: 0;
  --blockquote-gap: 0;
  --blockquote-border-width: 0;
  --blockquote-border-radius: 0;
  --blockquote-box-shadow: none;
  --blockquote-text-color: var(--site-on-dark);
  --blockquote-text-font-size: var(--quote-band-size);
  --blockquote-text-font-style: italic;

  .quote-band__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  /* ACSS styles any figure holding a blockquote as a grey box. Clear it. */
  .quote-band__figure {
    display: block;
    max-width: 46rem;
    margin: 0 auto;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .quote-band__quote,
  .quote-band__quote p {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: var(--site-on-dark);
    font-size: var(--quote-band-size);
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
  }

  .quote-band__cite {
    display: block; /* ACSS sets figcaptions in quotes to a flex row */
    margin-block-start: var(--space-m, 1.5rem);
    font-size: var(--site-body-text);
    font-weight: 600;

    &::before {
      content: '— ';
    }
  }
}
/* END ARTISAN: QUOTE BAND ------------------------------------------------- */

/* ARTISAN: TILES ---------------------------------------------------------- */
/* Add tiles--pairs for two tiles per row on wide screens (2 x 2, not 3 + 1).
   Long words and email addresses wrap instead of spilling out of a tile.
   Standard look: the section sits halfway between the header's off-white
   and the light surface colour, and the tiles are white with a thin border.
   Mixed from section 1, so it follows whichever palette is chosen. */
.tiles {
  background-color: color-mix(in srgb, var(--site-surface) 50%, var(--site-page));

  .tiles__item {
    overflow-wrap: break-word;
    background-color: var(--site-on-dark);
    border: 1px solid var(--site-line);
    border-block-start: 3px solid var(--primary);
  }

  @media (min-width: 768px) {
    &.tiles--pairs .tiles__list {
      grid-template-columns: 1fr 1fr;
    }
  }
}
/* END ARTISAN: TILES ------------------------------------------------------ */

/* ARTISAN: BODY TEXT ------------------------------------------------------ */
/* Sets the body size directly as well, in case ACSS doesn't use --text-m for it. */
body {
  font-size: var(--site-body-text);
}

/* Links jump straight to their section. ACSS turns on smooth scrolling,
   which on a long phone page becomes a fast, dizzying slide. */
html:root {
  scroll-behavior: auto;
}
/* END ARTISAN: BODY TEXT -------------------------------------------------- */

/* ARTISAN: HEADINGS ------------------------------------------------------- */
/* Sizes come from section 1. "html h2" outweighs ACSS's own heading sizes.
   The font is named here too, with fallbacks, so a heading never drops to
   the browser's default serif (Times) if the ACSS heading font doesn't apply.
   The header name and footer headings use it too, so every heading matches. */
html :is(h1, h2, h3, h4, h5, h6),
.site-header__name,
.site-footer__name,
.site-footer__heading {
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
}

/* The town line under the name stays in the body font */
.site-header__name small,
.site-footer__name small {
  font-family: 'Inter', system-ui, sans-serif;
}

html h1 {
  font-size: var(--site-h1);
  line-height: 1.15;
}

html h2 {
  font-size: var(--site-h2);
  line-height: 1.2;
}

html h3 {
  font-size: var(--site-h3);
  line-height: 1.25;
}
/* END ARTISAN: HEADINGS --------------------------------------------------- */

/* ARTISAN: BAND ----------------------------------------------------------- */
/* White button on the dark band; the default green one would disappear */
.band {
  .site-button {
    background: var(--site-on-dark);
    color: var(--site-text);
  }

  .site-button:hover,
  .site-button:focus-visible {
    background: var(--site-surface);
    color: var(--site-text);
  }

  /* Add band--outline for a lighter call to action: white section, green
     rounded outline, green title and button */
  &.band--outline {
    background-color: var(--site-page);
    color: var(--site-text);

    .band__inner {
      max-width: 48rem;
      padding: var(--space-l, 2.5rem) var(--space-xl, 4rem);
      border: 2px solid var(--site-action);
      border-radius: 1.5rem;
    }

    .band__title {
      color: var(--site-action);
    }

    .site-button {
      background: var(--site-action);
      color: var(--site-on-dark);
    }

    .site-button:hover,
    .site-button:focus-visible {
      background: var(--site-action-hover);
      color: var(--site-on-dark);
    }

    .site-button:focus-visible {
      outline-color: var(--site-action);
    }

    @media (max-width: 767px) {
      .band__inner {
        padding: var(--space-l, 2.5rem) var(--space-m, 1.5rem);
      }
    }
  }
}
/* END ARTISAN: BAND ------------------------------------------------------- */

/* ARTISAN: TEXT ----------------------------------------------------------- */
/* Plain text section: heading and paragraphs in one centred column.
   Add text-block--alt for the light background.
   Add text-block--card to set the text in a white card with a rounded
   border, like a note from the owner (About the store). */
.text-block {
  &.text-block--alt {
    background-color: var(--site-surface);
  }

  &.text-block--card .text-block__content {
    max-width: 46rem;
    padding: var(--space-l, 2.5rem) var(--space-xl, 4rem);
    background: var(--site-page);
    border: 2px solid var(--site-action);
    border-radius: 1.5rem;
  }

  @media (max-width: 767px) {
    &.text-block--card .text-block__content {
      padding: var(--space-l, 2.5rem) var(--space-m, 1.5rem);
    }
  }

  .text-block__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .text-block__content {
    max-width: 55ch;
    margin-inline: auto;
  }

  .text-block__content > * + * {
    margin-block-start: var(--space-s, 1rem);
  }

  .text-block__title {
    color: var(--primary);
    text-wrap: balance;
  }

  .text-block__content ul {
    padding-inline-start: 1.25em;
    list-style: disc outside;
  }

  .text-block__content li {
    display: list-item;
  }

  .text-block__content li + li {
    margin-block-start: var(--space-xs, 0.5rem);
  }

  .text-block__content li::marker {
    color: var(--primary);
  }
}
/* END ARTISAN: TEXT ------------------------------------------------------- */

/* ARTISAN: GALLERY -------------------------------------------------------- */
/* Pieces from the database, grouped by category (Gallery page).
   Add gallery--preview for the six pieces on Home: light background,
   centred heading and a See all the work button underneath. */
.gallery {
  .gallery__inner {
    max-width: var(--content-width, 1280px);
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
    display: grid;
    gap: var(--space-xl, 4rem);
  }

  /* Jump links land with a little room above the heading */
  .gallery__group {
    scroll-margin-block-start: var(--space-l, 2rem);
  }

  .gallery__title {
    color: var(--primary);
    margin-block-end: var(--space-m, 1.5rem);
  }

  .gallery__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
    gap: var(--space-l, 2.5rem) var(--space-m, 1.5rem);
  }

  .gallery__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Every photo shows at 4:3, whatever shape it was uploaded at */
  .gallery__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-block-end: var(--space-s, 1rem);
  }

  .gallery__name,
  .gallery__text {
    margin: 0;
  }

  .gallery__meta {
    margin-block: var(--space-xs, 0.5rem);
  }

  .gallery__price {
    font-weight: 600;
  }

  .gallery__ask {
    display: inline-block;
    padding-block: 0.5rem;
    font-weight: 600;
    text-underline-offset: 0.2em;
  }

  .gallery__more {
    text-align: center;
  }

  &.gallery--preview {
    background-color: var(--site-surface);

    .gallery__header {
      max-width: 55ch;
      margin-inline: auto;
      text-align: center;
    }

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

    .gallery__title {
      margin-block-end: 0;
      text-wrap: balance;
    }

    .gallery__inner {
      gap: var(--space-l, 2.5rem);
    }
  }
}
/* END ARTISAN: GALLERY ---------------------------------------------------- */

/* ARTISAN: STEPS ---------------------------------------------------------- */
/* Add steps--alt for the light background, so How to buy stands apart from
   the white sections above and below it. */
.steps {
  &.steps--alt {
    background-color: var(--site-surface);
  }
}
/* END ARTISAN: STEPS ------------------------------------------------------ */

/* ARTISAN: PHOTOS --------------------------------------------------------- */
/* Six square photos of the store, from the Photos content type.
   2 across on phones, 3 across from 768px. Capped at 72rem (1152px):
   wide enough for large tiles, and both rows still fit on a laptop screen.
   Any photo shape is cropped square from the centre, so the grid always
   lines up. The dark band and white borders make the photos stand out,
   like prints with a white mat on a dark table. */
.photos {
  background-color: var(--site-band);
  color: var(--site-on-dark);

  .photos__inner {
    max-width: 72rem;
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter, 1.5rem);
  }

  .photos__header {
    max-width: 55ch;
    margin-inline: auto;
    margin-block-end: var(--space-l, 2rem);
    text-align: center;
  }

  .photos__title {
    color: var(--site-on-dark);
    text-wrap: balance;
  }

  .photos__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-s, 1rem);
  }

  .photos__item {
    margin: 0;
  }

  .photos__img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 0.4rem solid var(--site-on-dark);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1.25rem color-mix(in srgb, #000 30%, transparent);
  }

  /* Each photo is a button that opens it larger (the browser's built-in
     popover: no script). Tap outside the photo or press Escape to close. */
  .photos__open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
  }

  .photos__open:focus-visible {
    outline: 3px solid var(--site-on-dark);
    outline-offset: 4px;
  }

  /* The enlarged photo, centred on screen over a dark backdrop.
     Position and margin are set here because ACSS's reset sets every
     margin to 0, which would undo the browser's own centring. */
  .photos__large {
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    width: min(90vw, 78vh, 1080px);
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
  }

  .photos__large::backdrop {
    background: color-mix(in srgb, #000 85%, transparent);
  }

  .photos__large img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 0.5rem solid var(--site-on-dark);
    border-radius: 0.25rem;
  }

  .photos__close {
    display: block;
    margin: var(--space-s, 1rem) auto 0;
    min-height: 2.75rem;
    padding: 0.5em 1.4em;
    border: 0;
    border-radius: 0.3em;
    background: var(--site-on-dark);
    color: var(--site-text);
    font-weight: 600;
    cursor: pointer;
  }

  .photos__close:focus-visible {
    outline: 3px solid var(--site-on-dark);
    outline-offset: 3px;
  }

  @media (min-width: 768px) {
    .photos__list {
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-m, 1.5rem);
    }
  }
}
/* END ARTISAN: PHOTOS ----------------------------------------------------- */

/* ARTISAN: WORDMARK ------------------------------------------------------- */
/* The store name set as a sign-style wordmark, so no logo file is needed.
   THE FORMULA:
   - Big line: the store's short name only, about 20 characters at most.
   - Small line: everything else, i.e. what they sell and the town.
   - Write both in normal case; the CSS makes them capitals.
   Example:
   <a class="site-header__name" href="/">Old Mill<small>Antiques · Bracebridge</small></a>
   Colours come from section 1, so it follows whichever palette is chosen.
   The footer repeats it, a size smaller, with the same formula:
   <p class="site-footer__name">{site.name}<small>{site.town}, Ontario</small></p> */
.site-header .site-header__name,
.site-footer .site-footer__name {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  text-wrap: balance;
}

/* The small line sits under a coloured rule, in widely spaced capitals,
   like the lower line of a painted shop sign. The rule runs the width
   of whichever line is longer. */
.site-header .site-header__name small,
.site-footer .site-footer__name small {
  display: block;
  width: 100%;
  margin-block-start: 0.6rem;
  padding-block-start: 0.45rem;
  border-block-start: 3px solid var(--site-action);
  font-size: clamp(0.7rem, 0.65rem + 0.2vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.2;
}
/* END ARTISAN: WORDMARK --------------------------------------------------- */

/* ARTISAN: FOOTER --------------------------------------------------------- */
/* Two touches, both from section 1 so they follow the palette:
   the wordmark repeated in the first column (see ARTISAN: WORDMARK),
   and a dark strip across the very bottom for the copyright line. */
.site-footer {
  /* ACSS pads the footer's sides, which stopped the dark strip short of
     the screen edges. The columns keep their own side padding (section 4). */
  padding-inline: 0;

  .site-footer__name {
    font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    color: var(--site-text);
    margin-block-end: var(--space-s, 1rem);
  }

  /* Full-width dark strip. The side padding keeps the text lined up with
     the columns above, however wide the screen. */
  .site-footer__legal {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: max(
      var(--gutter, 1.5rem),
      calc((100% - var(--content-width, 1280px)) / 2 + var(--gutter, 1.5rem))
    );
    border-top: 0;
    background: var(--site-band);
    color: var(--site-on-dark);
    font-size: 0.9375rem;
  }

  .site-footer__legal a {
    color: var(--site-on-dark);
    text-decoration: underline;
  }

  .site-footer__legal a:hover,
  .site-footer__legal a:focus-visible {
    color: var(--site-on-dark);
    text-decoration-thickness: 2px;
  }

  .site-footer__legal a:focus-visible {
    outline: 2px solid var(--site-on-dark);
    outline-offset: 3px;
  }
}
/* END ARTISAN: FOOTER ----------------------------------------------------- */