/* Public website. The admin and sign-in pages use styles.css. */

@font-face {
  font-family: "Boska";
  src: url("/assets/fonts/Boska-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Crumbs colours */
  --crimson: #8b162b;
  --crimson-deep: #6e0f21;
  --rose: #f9b6b8;
  --rose-soft: #fde6e6;
  --latte: #f6f3cf;
  --pear: #c6b63b;
  --sienna: #f37521;
  --blue: #a9e4ee;
  --blue-soft: #e4f6f9;
  --cream: #fcfbf2;
  --paper: #fffdf7;
  --ink: #263238;
  --muted: #5f696e;
  --line: rgba(139, 22, 43, 0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 48px -24px rgba(139, 22, 43, 0.4);
  --shadow-soft: 0 12px 28px -16px rgba(139, 22, 43, 0.3);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --serif: "Boska", Georgia, serif;
  --sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --wrap: min(1320px, 100% - 2 * var(--gutter));
  --section: clamp(88px, 11vw, 150px);
  /* The hero waits for the loading screen to lift. */
  --intro: 1.95s;
}

.intro-seen {
  --intro: 0s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--crimson);
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: var(--rose);
  color: var(--crimson-deep);
}

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

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--crimson);
  color: var(--cream);
  transform: translateY(-200%);
}

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

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.button:active {
  transform: scale(0.97);
}

.button-primary {
  background: var(--crimson);
  color: var(--cream);
  box-shadow: 0 10px 20px -12px rgba(139, 22, 43, 0.7);
}

.button-secondary {
  background: var(--paper);
  color: var(--crimson);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.icon-only {
  width: 48px;
  padding: 0;
}

@media (hover: hover) and (pointer: fine) {
  .button-primary:hover {
    background: var(--crimson-deep);
  }

  .button-secondary:hover {
    background: var(--rose-soft);
  }
}

/* Loading screen: a choc chip cookie is bitten three times, then the page is revealed. */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  background: var(--cream);
  animation: loader-out 720ms var(--ease-in-out) 1.7s forwards;
}

.intro-seen .loader {
  display: none;
}

.loader-cookie {
  position: relative;
  width: clamp(220px, 46vw, 320px);
  aspect-ratio: 640 / 401;
  animation: cookie-in 600ms var(--ease-out) both, chomp 1.6s linear both;
}

.loader-cookie svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 16px 18px rgba(74, 39, 23, 0.24));
}

/* Each bite snaps in from slightly smaller, like teeth closing. */
.bite {
  opacity: 0;
  transform: scale(0.7);
  transform-box: fill-box;
  transform-origin: right center;
  animation: bite 140ms var(--ease-out) forwards;
}

.bite-1 {
  animation-delay: 0.45s;
}

.bite-2 {
  animation-delay: 0.85s;
}

.bite-3 {
  animation-delay: 1.25s;
}

/* Crumbs are cut from the cookie photo itself; every third one is a chocolate chip. */
.crumb {
  position: absolute;
  width: 14px;
  height: 10px;
  border-radius: 40% 60% 35% 55%;
  background: url("/img/choc-chip-cookie-640.webp") 38% 30% / 900px auto;
  opacity: 0;
  animation: crumb-fall 900ms cubic-bezier(0.4, 0, 0.8, 1) forwards;
}

.crumb:nth-of-type(2n) {
  width: 10px;
  height: 8px;
  background-position: 62% 70%;
}

.crumb:nth-of-type(3n) {
  width: 8px;
  height: 7px;
  background: #3b2116;
}

.crumb:nth-of-type(1) { left: 84%; top: 12%; --dx: 26px; --rot: 160deg; animation-delay: 0.47s; }
.crumb:nth-of-type(2) { left: 78%; top: 8%; --dx: 10px; --rot: -120deg; animation-delay: 0.5s; }
.crumb:nth-of-type(3) { left: 90%; top: 20%; --dx: 34px; --rot: 220deg; animation-delay: 0.52s; }
.crumb:nth-of-type(4) { left: 97%; top: 46%; --dx: 30px; --rot: -200deg; animation-delay: 0.87s; }
.crumb:nth-of-type(5) { left: 95%; top: 58%; --dx: 14px; --rot: 140deg; animation-delay: 0.9s; }
.crumb:nth-of-type(6) { left: 99%; top: 52%; --dx: 40px; --rot: 260deg; animation-delay: 0.93s; }
.crumb:nth-of-type(7) { left: 80%; top: 90%; --dx: 18px; --rot: -150deg; animation-delay: 1.27s; }
.crumb:nth-of-type(8) { left: 72%; top: 94%; --dx: -6px; --rot: 190deg; animation-delay: 1.3s; }
.crumb:nth-of-type(9) { left: 88%; top: 82%; --dx: 28px; --rot: -240deg; animation-delay: 1.33s; }

.loader-word {
  color: var(--crimson);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  animation: rise 600ms var(--ease-out) 0.2s both;
}

@keyframes cookie-in {
  from {
    opacity: 0;
    transform: translateY(-28px) scale(0.92) rotate(-6deg);
  }
}

@keyframes chomp {
  0%, 27%, 34%, 52%, 59%, 77%, 84%, 100% { translate: 0 0; scale: 1; }
  29% { translate: -3px 2px; scale: 0.96; }
  54% { translate: -3px 1px; scale: 0.96; }
  79% { translate: -2px -2px; scale: 0.96; }
}

@keyframes bite {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes crumb-fall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), 150px) rotate(var(--rot));
  }
}

@keyframes loader-out {
  to {
    transform: translateY(-100%);
    visibility: hidden;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px max(var(--gutter), (100% - 1320px) / 2);
  background: rgba(252, 251, 242, 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(139, 22, 43, 0.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--crimson);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.brand span {
  transition: opacity 300ms ease, translate 300ms var(--ease-out);
}

.site-header:not(.past-name) .brand span {
  opacity: 0;
  translate: -6px 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  margin-left: auto;
}

.site-nav a {
  position: relative;
  color: var(--crimson);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav a:not(.nav-admin)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease-out);
}

.site-nav .nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color 200ms ease;
}

.header-order {
  min-height: 44px;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--crimson);
  cursor: pointer;
}

.nav-toggle .icon {
  width: 26px;
  height: 26px;
}

.nav-toggle .icon-close,
.site-header[data-menu="open"] .nav-toggle .icon-open {
  display: none;
}

.site-header[data-menu="open"] .nav-toggle .icon-close {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:not(.nav-admin):hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .site-nav .nav-admin:hover {
    background: var(--paper);
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
  }

  .header-order {
    margin-left: auto;
    padding: 0 16px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 32px -24px rgba(139, 22, 43, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms var(--ease-out), visibility 180ms;
  }

  .site-header[data-menu="open"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-duration: 260ms;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .site-nav a:not(.nav-admin)::after {
    display: none;
  }

  .site-nav .nav-admin {
    justify-content: center;
    margin-top: 16px;
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .brand span {
    display: none;
  }
}

/* Hero */

/* Masthead: a full-width crimson sign across the top half of the first screen,
   with the name in the middle and small labels either side, inside a double-ruled frame. */

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
  min-height: max(300px, 50svh - 72px);
  padding: 40px calc(var(--gutter) + 16px);
  overflow: hidden;
  background: var(--crimson);
  color: var(--latte);
  animation: band-open 1000ms var(--ease-in-out) var(--intro) both;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.4vw, 18px);
  z-index: 1;
  border: 5px double rgba(246, 243, 207, 0.6);
  pointer-events: none;
  animation: fade-in 800ms ease calc(var(--intro) + 500ms) both;
}

.masthead > :not(img) {
  position: relative;
  z-index: 2;
}

/* Sized from Boska's measured ink width (3.086em at -0.03em tracking); the negative margin trims the side bearing. */
.wordmark {
  margin-left: -0.03em;
  padding-top: 0.03em;
  overflow: clip;
  color: var(--latte);
  font-size: clamp(5rem, 17vw, 21rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.wordmark span {
  display: inline-block;
  animation: letter-up 1000ms var(--ease-out) calc(var(--intro) + 250ms + var(--i) * 60ms) both;
}

.masthead-side {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--rose);
  font-size: clamp(0.72rem, 0.55rem + 0.3vw, 0.86rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: fade-in 700ms ease calc(var(--intro) + 700ms) both;
}

.masthead-side-end {
  justify-self: end;
  text-align: right;
}

.masthead-side .icon {
  width: 14px;
  height: 14px;
  color: var(--sienna);
}

/* Real choc chip cookies peek in from two corners of the sign. */
.masthead-cookie {
  position: absolute;
  z-index: 0;
  width: clamp(150px, 21vw, 340px);
  height: auto;
  filter: drop-shadow(0 22px 22px rgba(40, 6, 14, 0.5));
  pointer-events: none;
}

.masthead-cookie-1 {
  top: -14%;
  left: -5%;
  rotate: 28deg;
  animation: cookie-in-left 1100ms var(--ease-out) calc(var(--intro) + 450ms) both;
}

.masthead-cookie-2 {
  right: -6%;
  bottom: -18%;
  rotate: -160deg;
  animation: cookie-in-right 1100ms var(--ease-out) calc(var(--intro) + 550ms) both;
}

@keyframes band-open {
  from {
    clip-path: inset(50% 0);
  }
  to {
    clip-path: inset(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes letter-up {
  from {
    transform: translateY(100%);
  }
}

@keyframes cookie-in-left {
  from {
    transform: translate(-50%, -40%) rotate(-50deg);
  }
}

@keyframes cookie-in-right {
  from {
    transform: translate(50%, 40%) rotate(50deg);
  }
}

/* Tablets and phones: the labels sit above and below the name. */
@media (max-width: 1100px) {
  .masthead {
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    gap: clamp(14px, 3vw, 28px);
    text-align: center;
  }

  .wordmark {
    font-size: min(calc((100vw - 2 * var(--gutter) - 32px) / 3.086), 15rem);
  }

  .masthead-side-end {
    justify-self: center;
    text-align: center;
  }

  .masthead-side br {
    display: none;
  }

  .masthead-side .icon {
    display: none;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  column-gap: clamp(40px, 6vw, 96px);
  width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 4.5vw, 64px) 0 clamp(64px, 8vw, 104px);
}

.hero-text {
  max-width: 34rem;
  margin-bottom: 32px;
  color: var(--ink);
  font-size: clamp(1.15rem, 1rem + 0.4vw, 1.4rem);
  font-weight: 500;
  line-height: 1.6;
  animation: rise 900ms var(--ease-out) calc(var(--intro) + 500ms) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 900ms var(--ease-out) calc(var(--intro) + 600ms) both;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  animation: visual-in 1100ms var(--ease-out) calc(var(--intro) + 300ms) both;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 9% -5% -5% 12%;
  z-index: -1;
  border-radius: var(--radius);
  background: var(--latte);
}

@keyframes visual-in {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }
}

.slideshow {
  position: relative;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--latte);
  box-shadow: var(--shadow);
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1200ms ease;
}

.slide.is-active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 7s linear;
}

.slide.is-active img {
  transform: scale(1.12);
}

.slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: flex;
  translate: -50% 0;
}

.slide-dots button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.slide-dots button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 253, 247, 0.7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 300ms var(--ease-out), background-color 300ms ease;
}

.slide-dots button[aria-current="true"]::before {
  background: var(--paper);
  transform: scaleX(2.5);
}

.badge {
  position: absolute;
  top: -28px;
  left: -34px;
  width: clamp(112px, 11vw, 150px);
  color: var(--crimson);
  animation: spin 24s linear infinite;
}

.badge circle {
  fill: var(--sienna);
}

.badge text {
  fill: var(--ink);
  font: 700 15px var(--sans);
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .hero-visual {
    max-width: 520px;
    margin-left: 24px;
  }

  .slideshow {
    aspect-ratio: 4 / 5;
  }
}

/* Ticker: the tilted band is wider than the screen, so its wrapper clips the overhang. */

.ticker-wrap {
  overflow: hidden;
  padding: 28px 0;
}

.ticker {
  overflow: hidden;
  margin: 0 -2vw;
  padding: 16px 0;
  background: var(--crimson);
  color: var(--cream);
  rotate: -1.2deg;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker 48s linear infinite;
}

.ticker-track > * {
  margin-right: 26px;
}

.ticker span {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 700;
  white-space: nowrap;
}

.ticker .icon {
  width: 22px;
  height: 22px;
  color: var(--rose);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (hover: hover) and (pointer: fine) {
  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }
}

/* Choc chip spotlight */

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 7vw, 112px);
  width: var(--wrap);
  margin: var(--section) auto;
}

.spotlight-art {
  position: relative;
  aspect-ratio: 1;
}

.spotlight-cookie {
  position: absolute;
  top: 50%;
  left: 2%;
  z-index: 1;
  width: 96%;
  height: auto;
  translate: 0 -50%;
  filter: drop-shadow(0 30px 30px rgba(74, 39, 23, 0.3));
}

.spotlight-photo {
  position: absolute;
  width: 36%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 6px solid var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.spotlight-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-photo-1 {
  top: 0;
  right: -2%;
  rotate: 6deg;
}

.spotlight-photo-2 {
  bottom: 0;
  left: -2%;
  rotate: -5deg;
}

.spotlight-copy h2 {
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
}

.spotlight-copy > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.15rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--latte);
}

.facts strong {
  display: block;
  color: var(--crimson);
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.1;
}

.facts span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Where scroll-driven animation is supported, the cookie lifts and tilts as you scroll past it. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .spotlight-cookie {
      animation: cookie-lift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
  }
}

@keyframes cookie-lift {
  from {
    transform: translateY(22%) rotate(-9deg) scale(0.9);
  }
  to {
    transform: translateY(-14%) rotate(7deg) scale(1.04);
  }
}

@media (max-width: 900px) {
  .spotlight {
    grid-template-columns: 1fr;
  }

  .facts li {
    padding: 12px;
  }

  .facts strong {
    font-size: 1.25rem;
  }

  .spotlight-art {
    width: min(100%, 460px);
    margin-inline: auto;
  }
}

/* What we make */

.make {
  width: var(--wrap);
  margin: 0 auto var(--section);
}

.section-title {
  max-width: 18ch;
  margin-bottom: clamp(36px, 5vw, 64px);
  font-size: clamp(2.3rem, 4.6vw, 4rem);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  margin-bottom: 24px;
  padding: clamp(28px, 4.5vw, 64px);
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.feature-flip {
  background: var(--rose-soft);
}

.feature-flip .fan {
  order: 2;
}

.feature-copy h3 {
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
}

.feature-copy p {
  margin: 16px 0 26px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Three photos dealt out like a fan; they gather while off screen and spread as the section arrives. */
.fan {
  position: relative;
  aspect-ratio: 5 / 4;
}

.fan-card {
  --x: 0%;
  --r: 0deg;
  --lift: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 6px solid var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  translate: -50% -50%;
  transform: translateX(var(--x)) translateY(var(--lift)) rotate(var(--r));
  transition: transform 800ms var(--ease-out);
}

.fan-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fan-card:nth-child(1) { --x: -64%; --r: -9deg; }
.fan-card:nth-child(2) { --x: 0%; --r: 2deg; z-index: 1; transition-delay: 70ms; }
.fan-card:nth-child(3) { --x: 64%; --r: 9deg; transition-delay: 140ms; }

.is-waiting .fan-card {
  --x: 0%;
  --r: 0deg;
}

@media (hover: hover) and (pointer: fine) {
  .fan-card:hover {
    --lift: -14px;
    z-index: 2;
    transition-delay: 0ms;
  }
}

.more-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.mini-card {
  padding: 12px 12px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 300ms var(--ease-out), box-shadow 300ms ease;
}

.mini-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.mini-card h3 {
  margin: 18px 8px 6px;
  font-size: 1.6rem;
}

.mini-card p {
  padding: 0 8px;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .mini-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-flip .fan {
    order: 0;
  }

  .more-cards {
    grid-template-columns: 1fr;
  }
}

/* Gallery */

.gallery {
  padding: var(--section) 0;
  background: var(--rose-soft);
}

.gallery > * {
  width: var(--wrap);
  margin-inline: auto;
}

.gallery-head h2 {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
}

.gallery-head p {
  max-width: 40rem;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  margin-bottom: 28px;
}

.filters button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--crimson);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}

.filters button:active {
  transform: scale(0.97);
}

.filters button[aria-pressed="true"] {
  background: var(--crimson);
  box-shadow: none;
  color: var(--cream);
}

.masonry {
  columns: 2;
  column-gap: 10px;
}

@media (min-width: 700px) {
  .masonry {
    columns: 3;
    column-gap: 16px;
  }
}

@media (min-width: 1100px) {
  .masonry {
    columns: 4;
  }
}

.tile {
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
  break-inside: avoid;
  border-radius: var(--radius-sm);
  background: var(--latte);
  box-shadow: var(--shadow-soft);
}

.tile img {
  width: 100%;
  height: auto;
  transition: transform 700ms var(--ease-out);
}

.tile[hidden] {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .tile:hover img {
    transform: scale(1.06);
  }

  .filters button[aria-pressed="false"]:hover {
    background: var(--cream);
  }
}

.show-more {
  display: flex;
  width: auto;
  margin: 28px auto 0;
}

.show-more[hidden] {
  display: none;
}

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
  width: var(--wrap);
  margin: var(--section) auto;
}

.about-photo {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 8px solid var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  rotate: -2deg;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy h2 {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
}

.about-copy p {
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 1.15rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--crimson);
  font-weight: 700;
  text-underline-offset: 0.3em;
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 420px;
  }
}

/* Pricing and contact */

.pricing {
  width: var(--wrap);
  margin: 0 auto var(--section);
}

.pricing-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(32px, 5vw, 72px);
  border-radius: var(--radius);
  background: var(--crimson);
  color: var(--cream);
}

.pricing h2 {
  color: var(--cream);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
}

.pricing-copy p {
  margin-top: 18px;
  color: rgba(252, 251, 242, 0.82);
  font-size: 1.1rem;
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.08);
  color: var(--cream);
  text-decoration: none;
  transition: background-color 200ms ease;
}

.contact strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.contact div > a,
.contact div > span {
  color: rgba(252, 251, 242, 0.8);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.pricing .button-primary {
  background: var(--cream);
  color: var(--crimson);
  box-shadow: none;
}

.pricing .button-secondary {
  width: 48px;
  padding: 0;
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(252, 251, 242, 0.4);
}

@media (hover: hover) and (pointer: fine) {
  .pricing .button-primary:hover {
    background: var(--latte);
  }

  .pricing .button-secondary:hover,
  .contact-instagram:hover {
    background: rgba(255, 253, 247, 0.14);
  }
}

@media (max-width: 900px) {
  .pricing-card {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 32px;
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .brand {
  font-size: 1.35rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

.site-footer nav a {
  color: var(--crimson);
  font-weight: 700;
  text-decoration: none;
}

.copyright {
  grid-column: 1 / -1;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

/* Order sheet: a bottom sheet on phones, a small card on larger screens */

.sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(100%);
  transition: transform 220ms var(--ease-out), opacity 220ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete;
}

.sheet:popover-open {
  opacity: 1;
  transform: none;
  transition-duration: 440ms, 200ms, 440ms, 440ms;
  transition-timing-function: var(--ease-drawer), ease;
}

@starting-style {
  .sheet:popover-open {
    opacity: 0;
    transform: translateY(100%);
  }
}

.sheet::backdrop {
  background: rgba(38, 50, 56, 0);
  transition: background-color 220ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete;
}

.sheet:popover-open::backdrop {
  background: rgba(38, 50, 56, 0.45);
}

@starting-style {
  .sheet:popover-open::backdrop {
    background: rgba(38, 50, 56, 0);
  }
}

.sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.sheet h2 {
  font-size: 1.9rem;
}

.sheet > p {
  margin: 8px 0 16px;
  color: var(--muted);
}

.sheet-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.sheet-people {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-people li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.sheet-people span {
  margin-right: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sheet-people strong {
  display: block;
  color: var(--ink);
}

@media (min-width: 640px) {
  .sheet {
    inset: 0;
    width: min(460px, calc(100% - 32px));
    height: fit-content;
    margin: auto;
    padding: 24px 28px 20px;
    border-radius: var(--radius);
    transform: translateY(12px) scale(0.98);
  }

  .sheet:popover-open {
    transition-duration: 280ms, 200ms, 280ms, 280ms;
    transition-timing-function: var(--ease-out), ease;
  }

  @starting-style {
    .sheet:popover-open {
      transform: translateY(12px) scale(0.98);
    }
  }
}

@media (hover: hover) and (pointer: fine) {
  .sheet-close:hover {
    background: var(--rose-soft);
  }
}

/* Lightbox */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px 16px;
  border: 0;
  background: transparent;
  color: var(--cream);
  opacity: 0;
  transition: opacity 180ms ease, overlay 180ms allow-discrete, display 180ms allow-discrete;
}

.lightbox[open] {
  display: grid;
  place-items: center;
  opacity: 1;
  transition-duration: 260ms;
}

@starting-style {
  .lightbox[open] {
    opacity: 0;
  }
}

.lightbox::backdrop {
  background: rgba(35, 12, 18, 0.9);
}

.lightbox figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: min(100%, 1000px);
  margin: 0;
}

.lightbox img {
  width: auto;
  max-height: calc(100dvh - 160px);
  border-radius: var(--radius-sm);
  transform: scale(0.97);
  transition: transform 320ms var(--ease-out);
  touch-action: pan-y;
}

.lightbox[open] img {
  transform: none;
}

@starting-style {
  .lightbox[open] img {
    transform: scale(0.97);
  }
}

.lightbox figcaption {
  max-width: 48ch;
  text-align: center;
  color: rgba(252, 251, 242, 0.9);
}

.lightbox-close,
.lightbox-step {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(252, 251, 242, 0.14);
  color: var(--cream);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}

.lightbox-close:active,
.lightbox-step:active {
  transform: scale(0.94);
}

.lightbox-close {
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
}

.lightbox-step {
  bottom: max(20px, env(safe-area-inset-bottom));
}

.lightbox-step[data-step="-1"] {
  left: calc(50% - 56px);
}

.lightbox-step[data-step="1"] {
  right: calc(50% - 56px);
}

@media (min-width: 900px) {
  .lightbox-step {
    top: 50%;
    bottom: auto;
    translate: 0 -50%;
  }

  .lightbox-step[data-step="-1"] {
    left: 24px;
  }

  .lightbox-step[data-step="1"] {
    right: 24px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .lightbox-close:hover,
  .lightbox-step:hover {
    background: rgba(252, 251, 242, 0.26);
  }
}

/* Sections ease up as they arrive. Items already on screen are never hidden. */

.reveal {
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

.reveal.is-waiting {
  opacity: 0;
  transform: translateY(32px);
}

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

  html {
    scroll-behavior: auto;
  }
}
