/* Amelia Brauer Makeup
   Tokens come from brand/amelia-brauer-brand-identity.pdf. See brand/README.md
   for contrast rules and DESIGN.md for layout rules before changing anything. */

/* Polymath is served by Adobe Fonts, web project ycs0kna (linked in each page's <head>).
   The project holds exactly the three weights used, all in the "polymath"
   family: Medium 500, Black 800, Super 900. */

:root {
  /* Palette: the whole brand, nothing else */
  --deep-teal: #004851;
  --teal: #00737F;
  --yellow: #F2AD00;
  --sand: #F1E8D4;
  --cream: #FAF4E6;

  /* Tints of the teal, flat. Used for dividers and photo placeholders */
  --line: rgb(0 115 127 / 0.22);
  --tint: color-mix(in srgb, var(--teal) 26%, var(--cream));

  /* Type */
  --font: "polymath", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --w-body: 500;    /* Medium */
  --w-head: 800;    /* Black */
  --w-display: 900; /* Super */

  /* Scale: guideline sizes (42 / 30 / 18) as the floor, growing on big screens */
  --fs-small: 0.8125rem;                             /* 13px */
  --fs-body: 1.125rem;                               /* 18px */
  --fs-lead: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h3: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --fs-h2: clamp(1.875rem, 1.6rem + 1.2vw, 2.625rem); /* 30 → 42 */
  --fs-h1: clamp(2.625rem, 1.8rem + 4vw, 5rem);       /* 42 → 80 */

  /* Space. Sections pick one of three rhythms so the page doesn't beat evenly */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-s: clamp(3rem, 2.5rem + 3vw, 5rem);
  --space-m: clamp(4rem, 3rem + 5vw, 7.5rem);
  --space-l: clamp(5rem, 3.5rem + 7vw, 10rem);
  --measure: 36rem;
  --wrap: 69rem; /* about 1100px of content */

  /* Square corners everywhere (Ben, 29 Sept). Only the step numbers stay round */
  --radius: 0;
  --header-h: 4.5rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
img, svg, picture { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

body {
  background: var(--cream);
  color: var(--deep-teal);
  font-family: var(--font);
  font-weight: var(--w-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: var(--w-head);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: var(--w-display); letter-spacing: -0.03em; line-height: 0.95; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
p { max-width: var(--measure); text-wrap: pretty; }

a { color: var(--teal); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--deep-teal); text-decoration-color: var(--yellow); }

/* Focus ring: brand colour, chosen for 3:1 against the background it sits on.
   Teal on cream and sand, yellow on deep teal, cream on teal and yellow. */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
:is(.site-header, .section--deep, .site-footer) :focus-visible { outline-color: var(--yellow); }
:is(.hero__half--teal, .section--teal, .cta-split__main, .site-nav.is-open) :focus-visible { outline-color: var(--cream); }
.on-yellow :focus-visible { outline-color: var(--deep-teal); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--yellow);
  color: var(--deep-teal);
  font-weight: var(--w-head);
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

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

/* Two button styles only: solid yellow for the main action, a text link for
   the secondary one */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--deep-teal);
  font-weight: var(--w-head);
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  background-image: linear-gradient(var(--deep-teal), var(--deep-teal));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.25s ease, color 0.2s ease, scale 0.1s ease;
}
.button:hover {
  background-size: 100% 100%;
  color: var(--cream);
}
.button:active { scale: 0.97; }
.button:disabled { background-size: 0% 100%; color: var(--deep-teal); }

/* Always underlined; on hover a yellow line draws over it from the left */
.text-link {
  font-weight: var(--w-head);
  text-decoration: none;
  padding-bottom: 2px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  transition: background-size 0.25s ease, color 0.2s ease;
}
.text-link:hover { background-size: 100% 2px, 100% 2px; }

/* Header: deep teal, so it frames the page with the footer and stays clear of
   both halves of the homepage hero */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--deep-teal);
  color: var(--cream);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: 11rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem 0.5rem 0.75rem;
  border: 0;
  background: none;
  color: var(--cream);
  font-weight: var(--w-head);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.5rem;
  height: 3px;
  background: currentColor;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

/* Mobile menu: full-screen teal panel */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) 2rem;
  background: var(--teal);
  color: var(--cream);
  overflow-y: auto;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.3s;
}
.site-nav.is-open {
  visibility: visible;
  transform: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (max-width: 59.99rem) {
  .site-nav ul li {
    opacity: 0;
    translate: 0 0.75rem;
    transition: opacity 0.2s ease, translate 0.2s ease;
  }
  .site-nav.is-open ul li {
    opacity: 1;
    translate: 0;
    transition-duration: 0.3s;
    transition-delay: calc(0.12s + var(--i, 0) * 0.05s);
  }
  .site-nav ul li:nth-child(2) { --i: 1; }
  .site-nav ul li:nth-child(3) { --i: 2; }
  .site-nav ul li:nth-child(4) { --i: 3; }
}
.site-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}
.site-nav__top img { width: 3.25rem; }
.nav-close {
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem 0.5rem 0.75rem;
  border: 0;
  background: none;
  color: var(--cream);
  font-weight: var(--w-head);
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  padding: 0;
  margin-top: clamp(2rem, 8vh, 4rem);
}
.site-nav li + li { margin-top: 0.25rem; }
.site-nav a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--cream);
  font-size: clamp(2.25rem, 9vw, 3rem);
  font-weight: var(--w-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 0.15em;
}
.site-nav__foot {
  margin-top: auto;
  padding-top: 2rem;
  font-size: var(--fs-body);
}
.site-nav__foot a {
  font-size: inherit;
  font-weight: var(--w-head);
  letter-spacing: 0;
}
/* Phone number shows in the nav bar on desktop; on mobile it's in the menu foot */
.site-nav .site-nav__phone { display: none; }

@media (min-width: 60rem) {
  .nav-toggle, .nav-close, .site-nav__top, .site-nav__foot { display: none; }
  .site-nav {
    position: static;
    flex-direction: row;
    padding: 0;
    background: none;
    color: var(--cream);
    overflow: visible;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .site-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
    margin: 0;
  }
  .site-nav li + li { margin-top: 0; }
  .site-nav a {
    padding-block: 0.5rem;
    color: var(--cream);
    font-size: 1.0625rem;
    font-weight: var(--w-head);
    letter-spacing: 0;
  }
  .site-nav a { position: relative; }
  .site-nav a:hover { color: var(--yellow); text-decoration: none; }
  .site-nav li:not(.site-nav__phone) a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.15rem;
    height: 3px;
    background: var(--yellow);
    scale: 0 1;
    transform-origin: left;
    transition: scale 0.2s ease;
  }
  .site-nav li a:hover::after,
  .site-nav a[aria-current="page"]::after { scale: 1 1; }
  .site-nav a[aria-current="page"] { color: var(--cream); text-decoration: none; }
  .site-nav .site-nav__phone { display: list-item; }
  .site-nav .site-nav__phone a {
    color: var(--yellow);
    padding-left: clamp(1.25rem, 2.5vw, 2.25rem);
    border-left: 1px solid var(--teal);
  }
  .site-nav .site-nav__phone a:hover { color: var(--cream); }
}

/* Placeholder image: a flat teal tint block with a caption saying what goes
   there. Swap for <img> when real photos arrive. */
.placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 1.25rem;
  background: var(--tint);
  color: var(--deep-teal);
  border-radius: var(--radius);
  text-align: center;
}
.placeholder__label {
  max-width: 18rem;
  font-size: var(--fs-small);
  line-height: 1.4;
}
.placeholder__label strong { display: block; font-size: 1rem; font-weight: var(--w-head); }
.placeholder--landscape { aspect-ratio: 3 / 2; }
.placeholder--portrait { aspect-ratio: 4 / 5; }

/* Plain linen block for a photo that hasn't arrived yet. No text on purpose */
.placeholder--plain { background: var(--sand); padding: 0; }

/* Real photos. width/height attributes set the ratio so nothing shifts on load */
.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--tint);
  object-fit: cover;
}
.photo-credit {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
}

/* Hero rule, all four heroes: text on the left sets the height; the photo
   fills the right column top to bottom and runs off the right edge.
   Bottom padding under the text: 40px on mobile, 64px on desktop. */
.hero { display: grid; }
.hero__half { padding: clamp(2.5rem, 8vw, 5rem) var(--gutter) 2.5rem; }
.hero__half--teal {
  background: var(--teal);
  color: var(--cream);
}
.hero__half--yellow {
  background: var(--yellow);
  color: var(--deep-teal);
}
.hero h1 { max-width: 11ch; }
.hero__lead {
  margin-top: 1.25rem;
  font-size: var(--fs-lead);
  max-width: 26rem;
}
.hero .button { margin-top: 2rem; }

/* Home: a yellow bar, then the photo. Teal, yellow and photo meet at hard
   edges. On mobile the bar is a 24px band between the words and the photo. */
.hero__media { display: grid; grid-template-rows: 1.5rem auto; }
.hero__media::before { content: ""; background: var(--yellow); }
.hero__photo { display: block; }
.hero__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center top; }

@media (min-width: 60rem) {
  /* Fills the screen below the sticky header */
  .hero {
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
  }
  .hero__half { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .hero__half--teal {
    padding-bottom: 4rem;
    padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  }
  .hero__media { grid-template-rows: none; grid-template-columns: 6rem 1fr; }
  .hero__photo { position: relative; }
  .hero__photo img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
}

/* Draft marker: visible only while ?review is in the URL, so Ben and Amelia
   can see which copy still needs approval. Harmless if left in. */
.review [data-draft] { outline: 2px dashed var(--yellow); outline-offset: 4px; }

/* Sections */
.section { padding-block: var(--space-m); }
.section--s { padding-block: var(--space-s); }
.section--l { padding-block: var(--space-l); }
.section--sand { background: var(--sand); }
.section--deep { background: var(--deep-teal); color: var(--cream); }
.section--teal { background: var(--teal); color: var(--cream); }
:is(.section--deep, .section--teal) a:not(.button) { color: var(--cream); }
:is(.section--deep, .section--teal) a:not(.button):hover { color: var(--yellow); }
.section h2 { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.lead { font-size: var(--fs-lead); }
.price { font-weight: var(--w-head); color: var(--teal); }

/* One oversized line per page, in dark teal. On Home it heads the services;
   on Lessons and Weddings it sits in a linen band with a picture */
.statement-band { padding-block: 5rem; background: var(--sand); }
.statement-band__grid { display: grid; gap: 2.5rem; align-items: center; }
.statement-band__grid > * { max-width: none; }
@media (min-width: 48rem) {
  .statement-band__grid { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
}
.section .statement { margin-bottom: 3rem; }
.statement {
  max-width: 17ch;
  font-size: clamp(2.5rem, 1.5rem + 3.2vw, 4rem); /* 40 to 64 */
  font-weight: var(--w-display);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Services: lessons leads with a big row, the other two sit beneath it.
   Plain type on the background with a photo alongside, no cards. */
.services {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}
.service { display: grid; gap: 1.25rem; align-content: start; }
.service__body > * + * { margin-top: 0.75rem; }
.service__body .button { margin-top: 1.25rem; }
.service--main h3 { font-size: var(--fs-h2); }
/* Two square photos side by side in the Home lessons row */
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.photo-pair img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.service--main .service__body p:not(.price) { font-size: var(--fs-lead); }

@media (min-width: 48rem) {
  .services { grid-template-columns: 1fr 1fr; }
  .service--main {
    grid-column: 1 / -1;
    grid-template-columns: 5fr 6fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
  /* The two smaller services: photo beside the words, not stacked like cards */
  .service:not(.service--main) { grid-template-columns: 2fr 3fr; align-items: start; }
}
@media (min-width: 48rem) and (max-width: 64rem) {
  .services { grid-template-columns: 1fr; }
  .service:not(.service--main) { grid-template-columns: 5fr 6fr; gap: clamp(2rem, 5vw, 5rem); }
}

/* References: the bride's words big on the left, the other two stacked
   beside them. Plain type on linen, no cards, no carousel */
.refs { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
.ref { max-width: var(--measure); }
.ref blockquote { margin: 0; }
.ref blockquote > * + * { margin-top: 1rem; }
.ref p { font-size: var(--fs-lead); }
.ref--main { max-width: 44rem; }
.ref--main p {
  font-size: var(--fs-h3);
  font-weight: var(--w-head);
  line-height: 1.3;
  color: var(--deep-teal);
}
.ref figcaption {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 3px solid var(--yellow);
  width: fit-content;
  font-weight: var(--w-head);
  color: var(--teal);
}
@media (min-width: 60rem) {
  .refs { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .refs .ref--main { grid-row: span 3; }
}

/* Credits band */
.credits h2 { color: var(--yellow); }
.credits__list {
  list-style: none;
  padding: 0;
  font-size: var(--fs-lead);
}
.credits__list li {
  padding-block: 0.9rem;
  border-top: 1px solid var(--teal);
}
@media (min-width: 60rem) {
  .credits {
    display: grid;
    grid-template-columns: 4fr 7fr;
    gap: 4rem;
    align-items: start;
  }
  .credits h2 { max-width: 8ch; margin-bottom: 0; }
}

/* Photo wall: square tiles in teal, captions underneath. Each tile is the
   colour photo with a second copy of the same file on top, run through the
   #duo SVG filter in the page (deep teal, teal, cream). Same file twice, so
   one download. Hovering, or tapping on a phone, fades the teal copy off. */
.onset {
  padding-block: var(--space-m);
  background: var(--deep-teal);
  color: var(--cream);
}
.onset__grid { display: grid; gap: 2.5rem; }
.onset__grid > * { min-width: 0; }
.onset h2 {
  margin-bottom: 0;
  color: var(--yellow);
  font-size: var(--fs-h1);
  font-weight: var(--w-display);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.onset__num { display: block; font-size: clamp(5rem, 3rem + 6vw, 7.5rem); line-height: 0.85; } /* 80 to 120 */
.onset__line { margin-top: 1.5rem; max-width: 24rem; font-size: var(--fs-lead); }

.wall {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.wall figure, .wall picture { display: block; }
.wall figure { position: relative; }
.wall__duo {
  position: absolute;
  inset: 0 0 auto;
  filter: url(#duo);
  transition: opacity 0.35s ease;
}
.wall li:hover .wall__duo,
.wall li.is-colour .wall__duo { opacity: 0; }
.wall img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--teal); }
.wall figcaption {
  padding: 0.4rem 0 0.6rem;
  font-size: var(--fs-small);
  line-height: 1.3;
  overflow-wrap: break-word;
}
.credits-line {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  font-size: 1rem;
}
.credits-line li { display: inline; }
.credits-line li + li::before { content: "\00b7" / ""; margin-inline: 0.5em; color: var(--yellow); }

@media (min-width: 40rem) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .wall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .wall--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 80rem) {
  .onset__grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
}
/* About: the wall carries on straight under the Credits band, with a heading
   the same size as Credits */
.onset--flush { padding-top: 0; }
.onset--flush h2 {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  font-size: var(--fs-h2);
  font-weight: var(--w-head);
  letter-spacing: -0.015em;
  line-height: 1.05;
}

/* CSS duotone: greyscale, then a multiply tint and a deep teal floor.
   Close to the baked files, not identical. Tune with the two variables. */
.duotone {
  --duo-tint: color-mix(in srgb, var(--teal) 55%, var(--cream));
  --duo-floor: var(--deep-teal);
  position: relative;
  display: block;
  isolation: isolate;
}
.duotone img { filter: grayscale(1) contrast(1.05); }
.duotone::before,
.duotone::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.duotone::before { background: var(--duo-tint); mix-blend-mode: multiply; }
.duotone::after { background: var(--duo-floor); mix-blend-mode: lighten; }

/* Half and half: the left of the face in colour, the right in the baked
   duotone, meeting at a hard vertical edge */
.half-face { position: relative; view-timeline: --face; }
.half-face img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.half-face__duo { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.half-face__duo img { height: 100%; }

/* Two-column row: picture or heading on one side, words on the other */
.split-row { display: grid; gap: 2rem; align-items: center; }
.split-row__body > * + * { margin-top: 1rem; }
.split-row :is(.placeholder, .photo-figure) { max-width: 24rem; }
.split-row--text { align-items: start; }
.split-row--text h2,
.split-row__body h2 { margin-bottom: 0; }
@media (min-width: 48rem) {
  .split-row { grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); }
}

/* Closing call to action: the split. Teal with the words, yellow with the
   monogram, hard edge, no gap */
.cta-split { display: grid; }
.cta-split__main {
  padding: var(--space-m) var(--gutter);
  background: var(--teal);
  color: var(--cream);
}
.cta-split__main a:not(.button) { color: var(--cream); }
.cta-split__main a:not(.button):hover { color: var(--yellow); }
/* Monogram: a in deep teal, b in cream, 60% of the band's height, centred */
.cta-split__mark {
  position: relative;
  min-height: 15rem;
  overflow: hidden;
  background: var(--yellow);
}
.cta-split__monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  height: 60%;
  max-width: 80%;
  width: auto;
  aspect-ratio: 157.41 / 108.16;
}
@media (min-width: 48rem) {
  .cta-split { grid-template-columns: 1fr 1fr; }
  .cta-split__main {
    padding-block: var(--space-l);
    padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  }
}

/* Closing call to action */
.cta > p { font-size: var(--fs-lead); }
.cta h2 { margin-bottom: 1rem; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

/* Inner page intro, same hero rule as Home. On mobile the photo runs edge
   to edge under the words */
.page-intro { padding-block: clamp(2.5rem, 6vw, 5rem) var(--space-m); }
.page-intro:has(.page-intro__grid) { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.page-intro__grid { display: grid; gap: 2.5rem; align-items: center; }
.page-intro__grid > div:first-child { padding-bottom: 0; }
.page-intro__photo { margin-inline: calc(-1 * var(--gutter)); }
.page-intro__photo img { display: block; width: 100%; height: auto; object-fit: cover; object-position: center top; }
.page-intro h1 { color: var(--teal); }
.page-intro .lead { margin-top: 1.25rem; }
.page-intro .button { margin-top: 2rem; }
@media (min-width: 60rem) {
  .page-intro:has(.page-intro__grid) { padding: 0; }
  .page-intro__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
    max-width: none;
    padding-right: 0;
    padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  }
  .page-intro__grid > div:first-child { padding-block: clamp(3rem, 6vw, 5rem) 4rem; }
  .page-intro__photo { position: relative; margin: 0; }
  .page-intro__photo img { position: absolute; inset: 0; height: 100%; }
}

/* Kit strip across the Lessons page: 4:1 photo, 160px tall, 240px on desktop */
.kit-strip img { width: 100%; height: 10rem; object-fit: cover; }
.kit-strip figcaption { padding-block: 0.5rem 2rem; font-size: var(--fs-small); }
@media (min-width: 60rem) {
  .kit-strip img { height: 15rem; }
}

/* Key facts as a definition list */
.facts {
  display: grid;
  margin-top: 2rem;
  max-width: var(--measure);
  border-top: 2px solid var(--deep-teal);
}
.facts > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: var(--w-head); }
.facts dd { margin: 0; }

/* Numbered steps: a real sequence, so the numbers carry meaning.
   Stacked beside the heading rather than three in a row. */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 2rem;
}
.steps li {
  view-timeline: --step;
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1.25rem;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--deep-teal);
  font-size: 1.375rem;
  font-weight: var(--w-display);
}
.steps h3 { align-self: center; min-height: 3rem; display: flex; align-items: center; }


/* FAQ */
.faq > * { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font-weight: var(--w-head);
  font-size: var(--fs-lead);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* Plus drawn from two bars. Opening shrinks the upright bar and turns it */
.faq summary::after {
  content: "";
  flex: none;
  align-self: center;
  width: 0.875rem;
  height: 0.875rem;
  background:
    linear-gradient(var(--teal), var(--teal)) center / 100% 3px no-repeat,
    linear-gradient(var(--teal), var(--teal)) center / 3px 100% no-repeat;
  transition: background-size 0.25s ease, rotate 0.25s ease;
}
.faq details[open] summary::after { background-size: 100% 3px, 3px 0%; rotate: 180deg; }
/* Answers slide open where the browser can animate to auto height */
.faq details { interpolate-size: allow-keywords; }
.faq details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
.faq details p { padding-bottom: 1.25rem; }

/* Running text on inner pages */
.prose > * + * { margin-top: 1rem; }
.page-intro .prose { margin-top: 1.25rem; }
.page-intro .prose .lead { margin-top: 0; }
.section--deep h2 { color: var(--yellow); }

/* Contact */
.page-intro--tight { padding-bottom: 0; }
.contact { display: grid; gap: 3.5rem; }
@media (min-width: 60rem) {
  .contact { grid-template-columns: 7fr 4fr; gap: 5rem; align-items: start; }
}
.contact__mark { width: 5rem; margin-bottom: 1.5rem; }
@media (min-width: 60rem) {
  /* Label line plus the field gap, so the monogram lines up with the Name box */
  .contact__direct { padding-top: calc(var(--fs-body) * 1.55 + 0.4rem); }
}
.contact__direct h2 { font-size: var(--fs-h3); margin-bottom: 1rem; }
.contact__direct .facts { margin-top: 0; }
/* Narrow column: label above value, so the email address never breaks */
.contact__direct .facts > div { grid-template-columns: 1fr; gap: 0.15rem; }

.form { display: grid; gap: 1.5rem; max-width: 36rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: var(--w-head); }
.field__optional { font-weight: var(--w-body); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--deep-teal);
  font-weight: var(--w-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--deep-teal); }
/* Focus thickens the border to 3px without moving anything */
.field :is(input, select, textarea):focus { border-color: var(--deep-teal); box-shadow: inset 0 0 0 1px var(--deep-teal); }
.field :focus-visible { outline-offset: 1px; }
.field .is-shaking { animation: shake 0.3s ease; }
.field [aria-invalid="true"] { border-color: var(--deep-teal); }
/* No red anywhere: errors are bold deep teal with a yellow bar */
.field__error,
.form__status {
  padding-left: 0.75rem;
  border-left: 4px solid var(--yellow);
  font-weight: var(--w-head);
}
.field__error[hidden],
.form__status[hidden] { display: none; }
.form__note { font-size: var(--fs-small); }
.form .button { justify-self: start; }
.form .button:disabled { cursor: progress; }

.form-done { display: none; }
.form-done h2 { margin-bottom: 0.5rem; }
.form-done p { font-size: var(--fs-lead); }
.form-done:focus { outline: none; }
.is-sent .form-done,
.form-done:target { display: block; animation: rise-in 0.4s ease both; }
.form-done h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 0.75rem;
  background: var(--yellow);
  transform-origin: left;
  animation: grow-x 0.5s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.is-sent .form,
.contact__form:has(.form-done:target) .form { display: none; }

/* Privacy notice */
.policy > * { max-width: 42rem; }
.policy h2 { font-size: var(--fs-h3); margin: 2.5rem 0 0; }
.policy h2:first-child { margin-top: 0; }
.policy__date { font-size: var(--fs-small); margin-top: 2.5rem; }

/* 404 */
.missing__title { color: var(--teal); max-width: 12ch; }
.missing__lead { margin-top: 1.25rem; }
.missing__links { list-style: none; padding: 0; margin: 2rem 0 2.5rem; display: grid; gap: 0.75rem; font-size: var(--fs-lead); }

/* Footer: contact details and privacy, nothing more */
.site-footer {
  background: var(--deep-teal);
  color: var(--cream);
  padding-block: var(--space-s) 2rem;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.site-footer__grid {
  display: grid;
  gap: 2.5rem;
}
.site-footer__brand { display: flex; align-items: center; gap: 1.25rem; }
.site-footer__brand img { width: 12rem; }
.site-footer__brand .site-footer__mark { width: 3.5rem; }
.site-footer__brand p { margin-top: 1rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--teal);
  font-size: var(--fs-small);
}

@media (min-width: 45rem) {
  .site-footer__grid { grid-template-columns: 3fr 2fr; }
}

/* Motion. Rules in DESIGN.md. Every element's resting style is its finished
   state, so with reduced motion, an older browser or no JavaScript the page
   simply appears as designed. Only transform, opacity and clip-path move. */

/* Home hero, once on load, done in about a second: the yellow bar wipes in,
   the headline rises word by word, then the photo opens out from the bar */
.hero h1 .rise {
  display: inline-block;
  overflow: clip;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.hero h1 .rise > span {
  display: inline-block;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(0.15s + var(--i) * 0.07s);
}
.hero__lead,
.hero .button { animation: rise-in 0.5s 0.5s ease both; }
.hero__media::before { animation: wipe-right 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__photo { animation: open-right 0.7s 0.3s cubic-bezier(0.6, 0, 0.2, 1) both; }
@media (min-width: 60rem) {
  .hero__media::before { animation-name: wipe-down; }
}

/* Lessons, "I do one half. You do the other.": the teal half slides across
   her face as the picture scrolls into view */
@supports (animation-timeline: view()) {
  .half-face__duo {
    animation: half-face linear both;
    animation-timeline: --face;
    animation-range: entry 25% cover 50%;
  }
  /* Steps: each circle fills with yellow as it reaches the middle of the screen */
  .steps li::before {
    animation: step-fill linear both;
    animation-timeline: --step;
    animation-range: entry 80% cover 45%;
  }
}

/* The monogram: a and b slide in from either side and lock together.
   js/site.js adds .is-waiting only when the band starts off screen */
.cta-split__monogram { overflow: visible; }
.cta-split__monogram path {
  transform-box: fill-box;
  transition: translate 0.8s cubic-bezier(0.5, 0, 0.15, 1), opacity 0.5s ease;
}
.cta-split__monogram .mono-b { transition-delay: 0.1s; }
.is-waiting .mono-a { translate: -60% 0; opacity: 0; }
.is-waiting .mono-b { translate: 60% 0; opacity: 0; }

/* Page to page: the header stays put while the page underneath cross-fades */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.2s; }

@keyframes rise { from { translate: 0 110%; } }
@keyframes rise-in { from { opacity: 0; translate: 0 0.6rem; } }
@keyframes wipe-right { from { clip-path: inset(0 100% 0 0); } }
@keyframes wipe-down { from { clip-path: inset(0 0 100% 0); } }
@keyframes open-right { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes half-face { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 50%); } }
@keyframes step-fill {
  from { background: transparent; box-shadow: inset 0 0 0 3px var(--yellow); }
  to { background: var(--yellow); box-shadow: inset 0 0 0 3px var(--yellow); }
}
@keyframes grow-x { from { scale: 0 1; } }
@keyframes shake {
  25% { translate: -4px 0; }
  50% { translate: 4px 0; }
  75% { translate: -2px 0; }
}

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