/*
  Shared styles for every page.
  To change the look of the whole site, start with the variables below.
  The site follows the visitor's device: light colors first, then the dark set.
  Effects for a single page go in that page's own CSS file (see home.css).
*/
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Colors: light. Burgundy and plum come from the logo. */
  --color-bg: #fbf6f1;
  --color-surface: #ffffff;
  --color-text: #241519;
  --color-muted: #5e4a50;
  --color-rule: #e3d5cd;
  --color-accent: #8e1a33;
  --color-burgundy: #8e1a33;
  --color-plum: #4c264c;
  --color-blush: #f2e2df;
  --color-on-block: #fbf4ee;
  --color-on-block-muted: #efdce0;
  --color-button: #8e1a33;
  --color-button-hover: #74132a;
  --color-button-text: #fbf4ee;
  --color-inverse-bg: #241519;
  --color-inverse-text: #fbf6f1;
  --color-inverse-accent: #f2a5b4;
  --color-inverse-rule: rgb(251 246 241 / 0.2);
  --logo-a: #b01c2e;
  --logo-b: #4c264c;
  --grain: url("/images/texture/grain-light.svg");
  --grain-inverse: url("/images/texture/grain-light.svg");
  --image-filter: none;

  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);

  --width: 75rem;
  --space: 2.25rem;
  --section: clamp(4rem, 9vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #170f12;
    --color-surface: #22161b;
    --color-text: #f4ece6;
    --color-muted: #bcaaaf;
    --color-rule: #3a282f;
    --color-accent: #e37a8e;
    --color-burgundy: #6e1428;
    --color-plum: #3d1e3d;
    --color-blush: #2c1b21;
    --color-on-block: #f7ede6;
    --color-on-block-muted: #e2cdd2;
    --color-button: #e37a8e;
    --color-button-hover: #eb93a4;
    --color-button-text: #170f12;
    --color-inverse-bg: #f4ece6;
    --color-inverse-text: #170f12;
    --color-inverse-accent: #8e1a33;
    --color-inverse-rule: rgb(23 15 18 / 0.2);
    --logo-a: #e37a8e;
    --logo-b: #c79ac4;
    --grain-inverse: url("/images/texture/grain-dark.svg");
    --image-filter: brightness(0.9);
  }
}

@media (max-width: 40rem) {
  :root { --space: 1.25rem; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.8vw, 4.5rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 1.5rem; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.025em; margin: 0 0 1rem; }
h3 { font-size: 1.375rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }

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

img { max-width: 100%; height: auto; display: block; filter: var(--image-filter); }

.container {
  width: min(100% - 2 * var(--space), var(--width));
  margin-inline: auto;
}

/* Small label above a heading */
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.lead { font-size: 1.1875rem; color: var(--color-muted); max-width: 40rem; }
.muted { color: var(--color-muted); }
.small { font-size: 0.9375rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--color-rule); }
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.375rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
}
.logo__mark { flex: none; }
.logo__stop-a { stop-color: var(--logo-a); }
.logo__stop-b { stop-color: var(--logo-b); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
.logo__sub { margin-top: 0.3125rem; font-size: 0.65625rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-muted); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.site-nav a {
  display: inline-block;
  color: var(--color-text);
  text-decoration: none;
  padding-block: 0.375rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.site-nav a.site-nav__cta {
  padding: 0.6875rem 1.125rem;
  background: var(--color-text);
  color: var(--color-bg);
  border: 0;
}
.site-nav a.site-nav__cta:hover { background: var(--color-accent); }
@media (max-width: 40rem) {
  .site-nav { gap: 0.25rem 1.125rem; }
}

/* Buttons: square, solid */
.button {
  display: inline-block;
  background: var(--color-button);
  color: var(--color-button-text);
  padding: 1.125rem 1.625rem;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}
.button:hover { background: var(--color-button-hover); }
.button--outline {
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--color-text);
}
.button--outline:hover { background: var(--color-text); color: var(--color-bg); }
.button--on-block { background: var(--color-on-block); color: #241519; }
.button--on-block:hover { background: #ffffff; }
.button-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }

/* Page top: big heading and a lead paragraph */
.page-head { padding-block: clamp(3rem, 7vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { max-width: 18ch; }
.page-head .lead { margin-bottom: 0; }
.page-head .button-row { margin-top: 2rem; }

/* Sections */
.section { padding-bottom: var(--section); }
.section--ruled { border-top: 1px solid var(--color-rule); padding-top: clamp(2.5rem, 6vw, 4rem); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
}
.section-head h2, .section-head p { margin: 0; }
.section-head p { color: var(--color-muted); }

/* Two columns that stack on a phone */
.split { display: flex; flex-wrap: wrap; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split > * { flex: 1 1 24rem; min-width: 0; }
.split--top { align-items: flex-start; }

/* Photo with a color block set behind its lower-left corner */
.photo-offset { position: relative; padding: 0 0 1.75rem 1.75rem; }
.photo-offset::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72%;
  height: 78%;
  background: var(--color-burgundy);
}
.photo-offset--plum::before { background: var(--color-plum); }
.photo-offset img { position: relative; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

/* Color-block tiles (services, packages) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr)); }
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-height: 15rem;
  padding: 1.75rem;
  text-decoration: none;
  background: var(--color-surface);
  color: var(--color-text);
  outline: 1px solid var(--color-rule);
  outline-offset: -1px;
}
.tile__label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-accent); }
.tile__title { margin: auto 0 0; font-size: 1.625rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.tile__text { margin: 0; font-size: 0.9375rem; color: var(--color-muted); }
.tile__price { margin: 0; font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.tile--package { min-height: 0; padding-block: 2rem 2.25rem; }
.tile--package .tile__title { margin-top: 1.5rem; }
.tile--package .tile__price { margin-bottom: 0.75rem; }
.tile--burgundy, .tile--plum { color: var(--color-on-block); outline: 0; }
.tile--burgundy { background: var(--color-burgundy); }
.tile--plum { background: var(--color-plum); }
.tile--burgundy .tile__label, .tile--plum .tile__label { color: inherit; opacity: 0.85; }
.tile--burgundy .tile__text, .tile--plum .tile__text { color: var(--color-on-block-muted); }
.tile--blush { background: var(--color-blush); outline: 0; }
@media (max-width: 40rem) {
  .tile { min-height: 9.5rem; padding: 1.5rem; }
}
a.tile:hover .tile__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
a.tile:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; position: relative; z-index: 1; }

/* Fine paper grain over a color block */
.grain { position: relative; isolation: isolate; overflow: hidden; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grain) center / 600px;
  opacity: 0.08;
  pointer-events: none;
}

/* Inverted block: a quote beside big numbers */
.proof { display: flex; flex-wrap: wrap; background: var(--color-inverse-bg); color: var(--color-inverse-text); }
.proof::after { background-image: var(--grain-inverse); }
.proof__quote {
  flex: 2 1 26rem;
  margin: 0;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.proof__quote p { margin: 0; }
.proof__quote footer { margin-top: 1.25rem; font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; opacity: 0.8; }
.proof__stats {
  flex: 1 1 17.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-end;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border-left: 1px solid var(--color-inverse-rule);
  margin: 0;
}
.stat { margin: 0; }
.stat__number { display: block; font-size: 3.5rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--color-inverse-accent); }
.stat__label { display: block; margin-top: 0.375rem; font-size: 0.875rem; }
@media (max-width: 46rem) {
  .proof__stats { border-left: 0; border-top: 1px solid var(--color-inverse-rule); }
}

/* Numbered steps and value columns, divided by hairlines */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 2rem 2.5rem; margin: 0; padding: 0; list-style: none; }
.step { border-top: 1px solid var(--color-text); padding-top: 1.25rem; }
.step__number { display: block; margin-bottom: 1.5rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; color: var(--color-accent); }
.step h3 { margin-bottom: 0.75rem; }
.step p { margin: 0; color: var(--color-muted); font-size: 1rem; }
.step p + p { margin-top: 0.75rem; }
.step ul { margin: 0; padding-left: 1.1rem; color: var(--color-muted); font-size: 1rem; }
.step li + li { margin-top: 0.5rem; }

/* Checklist-style rows between hairlines */
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.rule-list li { padding: 0.875rem 0; border-bottom: 1px solid var(--color-rule); }
.rule-list--columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); column-gap: 3rem; border-top: 0; border-bottom: 1px solid var(--color-rule); }
.rule-list--columns li { border-top: 1px solid var(--color-rule); border-bottom: 0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); gap: 1.5rem; }
.quote { margin: 0; padding: 1.75rem; background: var(--color-surface); border: 1px solid var(--color-rule); display: flex; flex-direction: column; gap: 1.25rem; }
.quote p { margin: 0; }
.quote footer { margin-top: auto; font-size: 0.9375rem; }
.quote cite { display: block; font-style: normal; font-weight: 700; }
.quote--wide { padding: clamp(1.75rem, 5vw, 3rem); border-left: 0.5rem solid var(--color-burgundy); }
.quote--wide p { font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.45; }

/* Plum call-to-action band */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: var(--section);
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--color-plum);
  color: var(--color-on-block);
}
.cta-band__text { flex: 1 1 24rem; }
.cta-band h2 { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2.125rem); max-width: 24ch; }
.cta-band p { margin: 0; color: var(--color-on-block-muted); }

/* Text pages and blog posts */
.page { padding-block: clamp(3rem, 7vw, 4.5rem) var(--section); max-width: 46rem; }
.prose { max-width: 44rem; font-size: 1.125rem; line-height: 1.7; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); margin: 2.75rem 0 0.875rem; }
.prose h3 { font-size: 1.3125rem; margin: 2.25rem 0 0.75rem; }
.prose h4 { font-size: 1.125rem; margin: 2rem 0 0.5rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin: 0 0 1.25rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li > ul, .prose li > ol { margin: 0.4rem 0 0; }
.prose img { margin: 2rem 0; border: 1px solid var(--color-rule); }
.prose blockquote { padding: 0.25rem 0 0.25rem 1.25rem; border-left: 0.25rem solid var(--color-burgundy); color: var(--color-muted); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--color-rule); margin: 2.5rem 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 0.625rem 0.875rem; border: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
.prose th { background: var(--color-blush); }

.post { padding-top: clamp(3rem, 7vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 4.5rem); }
.post__head { max-width: 52rem; margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--color-rule); }
.post__head h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 0; }
.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 0; margin-bottom: var(--section); border-top: 1px solid var(--color-text); }
.post-nav__link { display: block; padding: 1.5rem 1.5rem 1.5rem 0; color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-rule); }
.post-nav__link--older { padding: 1.5rem 0 1.5rem 1.5rem; text-align: right; }
.post-nav__title { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.post-nav__link:hover .post-nav__title { text-decoration: underline; }
@media (max-width: 40rem) {
  .post-nav__link, .post-nav__link--older { padding-inline: 0; text-align: left; }
}

/* Blog list */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-text); }
.post-list li { border-bottom: 1px solid var(--color-rule); }
.post-list a { display: block; max-width: 56rem; padding: 1.375rem 0; color: var(--color-text); text-decoration: none; }
.post-list__title { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.post-list__text { display: block; margin-top: 0.375rem; color: var(--color-muted); font-size: 1rem; }
.post-list a:hover .post-list__title { color: var(--color-accent); text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-rule); font-size: 0.9375rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem 3rem; padding-block: 3rem 2rem; }
.site-footer__brand p { margin: 1.25rem 0 0; }
.site-footer__links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
ul.site-footer__links[aria-label="Elsewhere"] { columns: 1; }
.site-footer__links li { padding: 0.2rem 0; break-inside: avoid; }
.site-footer__links a { color: var(--color-text); text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__legal { padding-block: 1.25rem 2rem; border-top: 1px solid var(--color-rule); color: var(--color-muted); }
.site-footer__legal p { margin: 0; }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Respect visitors who turn off motion on their device. Keep this at the end. */
@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;
  }
}
