/* The Farmhouse Retreat
   Palette from the colour-balance guide: ivory backgrounds, stone for
   alternating sections and borders, sage for small accents, deep olive for
   buttons, headings and navigation, charcoal for body text. */

:root {
  --ivory: #F5F1E6;
  --paper: #FBF9F4;
  --stone: #D7D0C0;
  --stone-tint: #EBE6DA;
  --sage: #A3AD95;
  --sage-tint: #E2E6DA;
  --olive: #58644E;
  --olive-deep: #46503E;
  --charcoal: #3C3B36;
  --muted: #5C5A52;
  --line: #D9D2C3;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --container: 90rem;
  --gutter: clamp(1rem, 5vw, 5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --header-h: 4.75rem;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (max-width: 760px), (max-height: 500px) { :root { --header-h: 4rem; } }

/* Base */

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

html {
  /* The one fluid unit the whole site is sized from (everything below is in rem): about
     15px on a small phone, 16px on a normal phone, 17px on a laptop, 24px on a very large screen */
  font-size: clamp(93.75%, max(min(4.1vw, 97.7% + 0.095vw), 50% + 0.625vw), 150%);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--olive); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--olive-deep); }

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--olive);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.125rem); line-height: 1.06; }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); line-height: 1.12; }
h3 { font-size: clamp(1.375rem, 2vw, 1.625rem); line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
figure { margin: 0; }
figcaption { margin-top: 0.625rem; font-size: 0.9375rem; color: var(--muted); }

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  top: -6.25rem;
  left: 1rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  background: var(--olive);
  color: var(--ivory);
}
.skip-link:focus { top: 0.75rem; }

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

/* Layout */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--stone-tint); }
.section--flush-top { padding-top: 0; }
.section--compact { padding-block: clamp(3rem, 6vw, 4.5rem); }

.eyebrow {
  margin: 0 0 0.875rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead { font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--muted); }

.section-head { max-width: 47.5rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head > * + * { margin-top: 1rem; }

.stack > * + * { margin-top: 1.5rem; }
.stack > .eyebrow + * { margin-top: 0; }
.flow > * + * { margin-top: clamp(2.5rem, 5vw, 4rem); }

.prose { max-width: 68ch; }
.prose--wide { max-width: none; }
.prose h2 { margin: 0 0 0.6em; }
.prose h3 { margin: 1.8em 0 0.6em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose > .actions, .prose > .link-arrow { margin-top: 0.5rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.split--top { align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--reverse > :first-child { order: 2; }
.sticky-media { position: sticky; top: calc(var(--header-h) + 2rem); }

@media (max-width: 720px) {
  .split, .split--even { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .sticky-media { position: static; }
}

.photo { overflow: hidden; border-radius: var(--radius); background: var(--stone); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--portrait { aspect-ratio: 4 / 5; }
.photo--landscape { aspect-ratio: 3 / 2; }
.photo--square { aspect-ratio: 1; }
.photo.photo--natural, .page-hero .photo.photo--natural { aspect-ratio: auto; }
.photo--natural img { height: auto; }
.media-stack { display: grid; gap: clamp(1rem, 2vw, 1.5rem); align-content: start; }

@media (min-width: 721px) {
  .split--narrow-media { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); }
  .split--reverse.split--narrow-media { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); }
  /* Text, photo, more text: phones show the photo between the two text blocks,
     wider screens join the text into one column beside the photo */
  /* (the empty last row takes up any height the photo needs beyond the text) */
  .split--photo-mid { grid-template-rows: auto auto 1fr; row-gap: 0; }
  .split--photo-mid > .prose { grid-column: 1; }
  .split--photo-mid > .prose + .photo + .prose { margin-top: 1em; } /* the usual gap between paragraphs */
  .split--photo-mid > .photo { grid-column: 2; grid-row: 1 / -1; }
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 1.5px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  color: var(--ivory);
  font: 600 1rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--olive-deep); border-color: var(--olive-deep); color: var(--ivory); }
.btn .icon { width: 1.25rem; height: 1.25rem; }
.btn--outline { background: transparent; color: var(--olive); }
.btn--outline:hover { background: var(--olive); color: var(--ivory); }
.btn--small { min-height: max(2.75rem, 44px); padding: 0 1.125rem; font-size: 0.9375rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .icon { width: 1.125rem; height: 1.125rem; transition: transform 0.2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1.75rem; min-height: var(--header-h); }

.wordmark {
  margin-right: auto;
  font-family: var(--serif);
  font-size: 1.4375rem;
  line-height: 1.05;
  color: var(--olive);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--olive-deep); }

.nav { display: flex; align-items: center; gap: 0.25rem 1.625rem; }
.nav a {
  padding: 0.5rem 0;
  border-bottom: 1.5px solid transparent;
  color: var(--charcoal);
  font-size: 1rem;
  text-decoration: none;
}
.nav a:hover { color: var(--olive); }
.nav a[aria-current="page"] { color: var(--olive); border-bottom-color: var(--sage); }

/* Treatments dropdown: the link goes to the Treatments page, the chevron
   (or hovering) opens the three treatment pages. */
.nav-group { position: relative; display: flex; align-items: center; gap: 0.125rem; }
.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: -0.375rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--charcoal);
  cursor: pointer;
}
.nav-sub-toggle:hover { color: var(--olive); }
.nav-sub-toggle .icon { width: 1rem; height: 1rem; transition: transform 0.2s; }
.nav-group.is-open .nav-sub-toggle .icon { transform: rotate(180deg); }

.nav-sub {
  position: absolute;
  top: calc(100% + 0.625rem);
  left: -1rem;
  z-index: 10;
  width: max-content;
  max-width: 20rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(30, 29, 26, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 0.75rem; } /* keeps hover alive across the gap */
.nav-group.is-open .nav-sub,
html:not(.js) .nav-group:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.3s var(--ease-out); }
.nav .nav-sub a { display: block; padding: 0.625rem 0.875rem; border: 0; border-radius: 8px; font-size: 0.9375rem; line-height: 1.4; }
.nav .nav-sub a:hover { background: var(--stone-tint); color: var(--olive); }
/* Sections of a treatment page, indented under its link */
.nav-sub__sections { margin: 0 0 0.25rem; padding: 0; list-style: none; }
.nav .nav-sub__sections a { padding-block: 0.375rem; padding-left: 1.75rem; color: var(--muted); font-size: 0.875rem; }

@media (hover: hover) and (min-width: 921px) {
  .nav-group:hover .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.3s var(--ease-out); }
  .nav-group:hover .nav-sub-toggle .icon { transform: rotate(180deg); }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--charcoal);
  cursor: pointer;
}
/* The three bars of the menu button turn into a cross */
.nav-toggle .icon path { transform-box: fill-box; transform-origin: center; transition: transform 0.32s var(--ease-out), opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .icon path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .icon path:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
.nav-toggle[aria-expanded="true"] .icon path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 920px) {
  .site-header__inner { gap: 0.75rem; }
  .nav-toggle { display: inline-flex; }
  .js .nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; /* on short screens the menu scrolls first, then the page scrolls and it collapses */
    padding: 0.25rem var(--gutter) 1rem;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1rem 2rem rgba(30, 29, 26, 0.12);
    /* Closed: folded up under the header */
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transition: opacity 0.2s ease, clip-path 0.24s ease, visibility 0s linear 0.24s;
  }
  .js .nav.is-open {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0 0 -3rem 0); /* (leaves room for the shadow) */
    transition: opacity 0.15s ease, clip-path 0.36s var(--ease-out);
  }
  /* The rows drift in one after another */
  .js .nav > * { opacity: 0; transform: translateY(-0.5rem); transition: opacity 0.12s ease, transform 0.12s ease; }
  .js .nav.is-open > * { opacity: 1; transform: none; transition: opacity 0.28s ease, transform 0.36s var(--ease-out); }
  .js .nav.is-open > :nth-child(2) { transition-delay: 0.03s; }
  .js .nav.is-open > :nth-child(3) { transition-delay: 0.06s; }
  .js .nav.is-open > :nth-child(4) { transition-delay: 0.09s; }
  .js .nav.is-open > :nth-child(5) { transition-delay: 0.12s; }
  .js .nav a { padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
  /* In the mobile menu the treatment pages sit indented under Treatments */
  .js .nav-group { display: block; }
  .js .nav-group > a { display: block; }
  .js .nav-sub-toggle { display: none; }
  .js .nav-sub {
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: inherit;
    transform: none;
    transition: none;
  }
  .js .nav-sub::before { content: none; }
  .js .nav .nav-sub a { padding: 0.75rem 0 0.75rem 1.125rem; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--muted); }
  .js .nav .nav-sub a:hover { background: none; color: var(--olive); }
  .js .nav .nav-sub__sections a { padding: 0.625rem 0 0.625rem 2.25rem; font-size: 0.9375rem; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.75rem; }
  html:not(.js) .nav { order: 3; width: 100%; flex-wrap: wrap; }
  html:not(.js) .nav-toggle { display: none; }
}

@media (max-width: 480px) {
  .wordmark { max-width: 6.6em; font-size: 1.25rem; white-space: normal; }
  .site-header .btn { padding: 0 0.875rem; white-space: nowrap; }
}

/* Home hero: the original photo with the words bottom left over a soft dark fade, at every
   screen size. From tablet size up it fills the screen below the header, and the photo crops
   to fit. Phones get a fixed 4:5 shape with the oast house in frame. */

.hero { display: grid; overflow: hidden; min-height: calc(100vh - var(--header-h) - 1px); min-height: calc(100svh - var(--header-h) - 1px); background: var(--charcoal); } /* (1px: the header's bottom line) */
.hero__media, .hero__content, .hero::after { grid-area: 1 / 1; }
.hero__media { position: relative; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 55%; }
.hero::after { content: ""; z-index: 0; background: linear-gradient(to top, rgba(30, 29, 26, 0.8) 0%, rgba(30, 29, 26, 0.5) 38%, rgba(30, 29, 26, 0) 72%); }
.hero__content { z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-block: 1.25rem clamp(1.5rem, min(8vw, 12vh), 6rem); }
.hero h1 { color: var(--ivory); font-size: max(3rem, min(5.2vw, 11vh)); line-height: 1.06; }
.hero p { max-width: 36em; margin-block: 1.25rem 0; color: rgba(245, 241, 230, 0.94); font-size: max(1.125rem, min(1.6vw, 3.4vh)); line-height: 1.55; text-wrap: pretty; }
.hero .actions { margin-top: 2rem; }
.hero .btn { border-color: var(--ivory); background: var(--ivory); color: var(--charcoal); }
.hero .btn:hover { border-color: #fff; background: #fff; color: var(--charcoal); }

@media (max-width: 559px), (max-width: 640px) and (min-height: 501px) {
  .hero { width: 100%; min-height: 0; aspect-ratio: 4 / 5; max-height: 34rem; }
  .hero h1 { font-size: clamp(1.75rem, 8.8vw, 3rem); line-height: 1.1; }
  .hero p { max-width: 34em; margin-top: 0.5rem; font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem); line-height: 1.5; }
  .hero .actions { margin-top: 1rem; }
}

/* Inner page hero */

.page-hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }
.page-hero h1 { max-width: 15em; font-size: clamp(2.375rem, 4.4vw, 3.625rem); }
.page-hero .lead { max-width: 34em; margin-top: 1.25rem; }
.page-hero .photo { aspect-ratio: 5 / 4; }
.page-hero--compact { padding-bottom: clamp(2rem, 4vw, 3rem); }

.breadcrumb { margin: 0 0 1.125rem; font-size: 0.9375rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--charcoal);
  font-size: 0.9375rem;
  text-decoration: none;
}
.jump a:hover { border-color: var(--olive); color: var(--olive); }

/* Cards (icons on cards) */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards:not(.cards--two) { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cards--two { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
/* Side by side, cards share rows so titles, text, tags and footers line up
   even when one title wraps onto more lines than the others. */
@media (min-width: 761px) {
  @supports (grid-template-rows: subgrid) {
    .card { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0.875rem; }
    .card:has(> .tags) { grid-row: span 5; }
  }
}
.card > .icon { width: 1.875rem; height: 1.875rem; margin-bottom: 0.375rem; color: var(--olive); }
.card h3 { font-size: clamp(1.375rem, 2vw, 1.5625rem); }
.card p { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.125rem;
  border-top: 1px solid var(--line);
}

.card__footer--start { justify-content: flex-start; gap: 0.75rem 1.25rem; }

.card--link { transition: border-color 0.2s; }
.card--link:hover { border-color: var(--sage); }
.card--link h3 a { color: inherit; text-decoration: none; }
.card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link .card__footer > .icon { color: var(--olive); transition: transform 0.2s; }
.card--link:hover .card__footer > .icon { transform: translateX(3px); }
.card__note { position: relative; z-index: 1; font-size: 0.9375rem; color: var(--muted); }
.card__note a { font-weight: 600; }
.card__cue { font-size: 0.9375rem; font-weight: 600; color: var(--olive); }

/* Home page treatments: three columns, photo on top; each column's parts line up across the row */
.treatment-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 860px) { .treatment-list { grid-template-columns: 1fr; max-width: 560px; } }
@media (min-width: 861px) {
  @supports (grid-template-rows: subgrid) {
    .treatment { display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 0; }
  }
}
.treatment__media { overflow: hidden; margin: 0 0 1.375rem; aspect-ratio: 4 / 3; border-radius: 4px; background: var(--stone); }
.treatment__media img { width: 100%; height: 100%; object-fit: cover; }
.treatment__num { font-family: var(--serif); font-size: 1.125rem; font-style: italic; color: var(--sage); }
.treatment h3 { margin: 0.125rem 0 0.75rem; font-size: clamp(1.5rem, 2.2vw, 1.75rem); line-height: 1.15; }
.treatment p { margin: 0 0 0.75rem; font-size: 1rem; color: var(--muted); }
.treatment .treatment__helps { font-family: var(--serif); font-size: 1.0625rem; font-style: italic; color: var(--olive); }
.treatment__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 0.5rem; }

.tags { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 0.375rem; margin: 0.125rem 0 0; padding: 0; list-style: none; } /* tags keep their own height when the card row is taller */
.tags li {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--stone-tint);
  color: var(--charcoal);
  font-size: 0.84375rem;
  line-height: 1.35;
}
.section--tint .tags li { background: var(--ivory); }

/* Lists with icons (not cards) */

.creds { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.creds li {
  display: grid;
  grid-template-columns: 1.625rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.6;
}
.creds .icon { margin-top: 2px; color: var(--olive); }

.checklist { display: grid; gap: 0.75rem; margin: 0 0 1em; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.75rem; margin: 0; }
.checklist .icon { width: 1.375rem; height: 1.375rem; margin-top: 0.1875rem; color: var(--olive); }
.checklist--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2.5rem; }
@media (max-width: 720px) { .checklist--grid { grid-template-columns: 1fr; } }

/* Panels, notes and bands */

.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 760px) { .panels { grid-template-columns: 1fr; } }

.panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.panel--sage { border-color: transparent; background: var(--sage-tint); }
.panel .actions { margin-top: 1.25rem; }

.help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--sage-tint);
}
.help p { max-width: 36em; margin: 0; font-size: 1.125rem; }
.help--flush { margin-top: 0; }

.placeholder {
  padding: 0.0625rem 0.375rem;
  border-radius: 4px;
  background: #F3E3B5;
  color: var(--charcoal);
}

.quote { padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--olive); color: var(--ivory); text-align: center; }
.quote blockquote {
  max-width: 30em;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.625rem, 3.2vw, 2.375rem);
  font-style: italic;
  line-height: 1.3;
}

.faq-note { padding-block: clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.faq-note p { margin: 0; font-size: 1.125rem; color: var(--muted); }
.faq-note a { font-weight: 600; }

/* Research papers: blurred page with the study name over it, opens a pop-up */

.sources { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.source {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--charcoal);
  font: 600 0.875rem/1.2 var(--sans);
  cursor: pointer;
}
.source .icon { width: 1.125rem; height: 1.125rem; color: var(--olive); }
.source:hover { border-color: var(--olive); }

.papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.paper {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.paper::before {
  content: "";
  position: absolute;
  top: 1.125rem;
  left: 1rem;
  width: 62%;
  height: 0.625rem;
  border-radius: 2px;
  background: #B5AD9B;
  filter: blur(2px);
}
.paper::after {
  content: "";
  position: absolute;
  inset: 2.625rem 1rem 30% 1rem;
  background: repeating-linear-gradient(to bottom, #CFC8B9 0 3px, transparent 3px 10px);
  filter: blur(2px);
}
.paper:hover { border-color: var(--olive); transform: translateY(-2px); }
.paper__label {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 1;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  font-size: 0.875rem;
  line-height: 1.35;
}
.paper__label strong { display: block; font-weight: 600; color: var(--olive); }
.paper__label span { display: block; margin-top: 0.1875rem; font-size: 0.8125rem; color: var(--muted); }

.modal {
  width: min(35rem, calc(100% - 2rem));
  max-height: calc(100% - 3rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--charcoal);
  box-shadow: 0 24px 64px rgba(30, 29, 26, 0.28);
}
.modal::backdrop { background: rgba(30, 29, 26, 0.55); }
.modal__inner { padding: clamp(1.75rem, 4vw, 2.5rem); }
.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
}
.modal__close:hover { background: var(--stone-tint); }
.modal h3 { margin-bottom: 0.75rem; padding-right: 2.25rem; font-size: 1.375rem; }
.modal__meta { margin-bottom: 1.5rem; font-size: 0.9375rem; color: var(--muted); }

/* Picture viewer (About page): main.js fills it from the picture that was clicked */
.zoom { display: block; border-radius: 8px; cursor: zoom-in; }
.zoom img { transition: opacity 0.2s; }
.zoom:hover img { opacity: 0.9; }
.lightbox { width: fit-content; max-width: min(87.5rem, calc(100% - 2rem)); overflow: hidden; }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 8.75rem); }
.lightbox figcaption { margin: 0; padding: 0.875rem 1.25rem 1rem; }
.lightbox .modal__close { background: rgba(255, 255, 255, 0.85); }
.lightbox .modal__close:hover { background: #fff; }
.lightbox__nav {
  position: absolute;
  top: calc(50% - 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--charcoal);
  cursor: pointer;
}
.lightbox__nav:hover { background: #fff; }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
.lightbox__nav--prev .icon { transform: rotate(90deg); }
.lightbox__nav--next .icon { transform: rotate(-90deg); }

/* FAQ */

.search { position: relative; max-width: 40rem; margin-top: 2rem; }
.search .icon { position: absolute; top: 50%; left: 1.25rem; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search input {
  width: 100%;
  min-height: 3.625rem;
  padding: 0 1.375rem 0 3.375rem;
  border: 1px solid var(--stone);
  border-radius: 999px;
  background: var(--paper);
  color: var(--charcoal);
  font: 400 1.0625rem var(--sans);
}
.search input:focus { border-color: var(--olive); outline: 2px solid var(--olive); outline-offset: 2px; }

.faq-results { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.faq-group + .faq-group { margin-top: 2.5rem; }
.faq-empty { margin: 0 0 2.5rem; color: var(--muted); }

.faq-list { max-width: 51.25rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.375rem 0;
  color: var(--olive);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { margin-top: 0.25rem; transition: transform 0.2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item__body { max-width: 68ch; padding-bottom: 1.625rem; }
.faq-item__body ul { padding-left: 1.2em; }

/* Booking */

.booking { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .booking { grid-template-columns: 1fr; } }

/* Cliniko booking widget; main.js sets the frame's height to fit its content */
.booking-embed {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.booking-embed iframe { display: block; width: 100%; border: 0; }
.booking-note { margin: 1rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.booking-note p { margin: 0 0 0.5rem; }
.booking-days { display: grid; gap: 0.375rem; margin: 0; }
.booking-days div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; }
.booking-days dt { font-weight: 600; color: var(--charcoal); }
.booking-days dd { margin: 0; }

.appointments { margin: 0 0 1.5rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.appointments li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.appointments strong { display: block; font-weight: 600; }
.appointments span { font-size: 0.9375rem; color: var(--muted); }
.appointments .price { color: var(--olive); font-family: var(--serif); font-size: 1.375rem; white-space: nowrap; }
.appointments li:target { margin-inline: -0.75rem; padding-inline: 0.75rem; border-radius: 8px; background: var(--sage-tint); }
.booking .appointments + p { font-size: 1rem; color: var(--muted); }

/* Price list on the booking page, one group per treatment */
.prices h2 { margin: 0 0 0.875rem; font-size: clamp(1.5rem, 2.2vw, 1.875rem); line-height: 1.2; }
.prices .appointments { margin-bottom: 2.5rem; }

/* About */

.history img { width: 100%; height: auto; border-radius: 8px; }
.history-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
@media (min-width: 761px) { .history-gallery img { aspect-ratio: 4 / 3; object-fit: cover; } } /* even row; phones show each picture whole */
@media (max-width: 760px) { .history-gallery { grid-template-columns: 1fr; } }

/* Footer */

.site-footer { padding-block: clamp(3rem, 7vw, 5rem) 2rem; background: var(--olive); color: var(--ivory); }
.site-footer a { color: var(--ivory); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.8fr); gap: 2.5rem; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* Contact straight after the blurb, so the header's Contact link lands on it */
  .footer-brand { order: -2; }
  .footer-contact { order: -1; }
}
.footer-brand .wordmark { color: var(--ivory); }
.footer-brand p { max-width: 28em; margin-top: 1rem; font-size: 0.9375rem; color: rgba(245, 241, 230, 0.9); }
.footer-title {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.9);
}
/* Contact cards: one tap to call, email or open the map */
.contact-cards { display: grid; gap: 0.625rem; }
.site-footer .contact-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 4rem;
  padding: 0.625rem 1rem 0.625rem 0.75rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--charcoal);
  transition: background-color 0.2s;
}
.site-footer .contact-card:hover { background: #fff; color: var(--charcoal); text-decoration: none; }
.contact-card__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  background: var(--olive);
  color: var(--ivory);
}
.contact-card__icon .icon { width: 1.25rem; height: 1.25rem; }
.contact-card__text { min-width: 0; font-size: min(1rem, 4.3vw); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.contact-card__text small { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }

/* Instagram strip above the footer: Alice's latest posts, filled in by main.js */
.insta { padding: clamp(3rem, 6vw, 4.5rem) 0; background: var(--stone-tint); }
.insta[hidden] { display: none; }
.insta__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.insta__handle { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.375rem; color: var(--olive); font-size: 0.9375rem; font-weight: 600; }
.insta__handle .icon { width: 1.125rem; height: 1.125rem; }
.insta h2 { margin: 0; }
.insta__follow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; text-decoration: none; }
.insta__follow .icon { width: 1.125rem; height: 1.125rem; }
.insta__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.insta__grid a { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--stone); }
.insta__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.insta__video { position: absolute; top: 0.625rem; right: 0.625rem; display: none; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45)); }
.insta__video .icon { width: 1.25rem; height: 1.25rem; }
.insta__grid a[data-video] .insta__video { display: block; }
.insta__hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(60, 59, 54, 0.35); color: #fff; opacity: 0; transition: opacity 0.3s; }
.insta__hover .icon { width: 2rem; height: 2rem; }
.insta__grid a:hover img, .insta__grid a:focus-visible img { transform: scale(1.05); }
.insta__grid a:hover .insta__hover, .insta__grid a:focus-visible .insta__hover { opacity: 1; }
@media (max-width: 760px) {
  /* A row to swipe through, with the next photo peeking in */
  .insta__grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .insta__grid::-webkit-scrollbar { display: none; }
  .insta__grid li { scroll-snap-align: start; }
}

/* The header's Contact link: a brief glow shows where it landed */
.footer-contact:target { animation: contact-glow 2.4s ease-out; border-radius: 10px; }
@keyframes contact-glow {
  from { box-shadow: 0 0 0 12px rgba(245, 241, 230, 0.18); background: rgba(245, 241, 230, 0.18); }
  to { box-shadow: 0 0 0 12px rgba(245, 241, 230, 0); background: rgba(245, 241, 230, 0); }
}
.site-footer ul { display: grid; gap: 0.625rem; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(245, 241, 230, 0.25);
  font-size: 0.875rem;
  color: rgba(245, 241, 230, 0.9);
}

