/* ==========================================================================
   Crown Artisan Sourdough — main stylesheet
   Depends on tokens.css. Every colour comes from a token, never a raw hex,
   so light/dark both resolve as a set.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* The UA rule for [hidden] is a bare element selector, so any class that sets
   `display` silently overrides it. Everything here toggled with `hidden` uses
   flex or grid, so state it once and be done. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s var(--ease);
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button { font: inherit; cursor: pointer; }

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

.skip-link {
  position: absolute; top: -100%; left: var(--sp-3);
  z-index: 1000;
  background: var(--accent); color: var(--on-accent);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ----------------------------------------------------------- primitives -- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 768px)  { .container { padding-inline: var(--sp-5); } }
@media (min-width: 1200px) { .container { padding-inline: var(--sp-6); } }

.section { padding-block: var(--sp-7); }
@media (min-width: 768px) { .section { padding-block: var(--sp-8); } }
.section--sunk { background: var(--surface-sunk); }
.section--tint { background: var(--surface); }

.stack { display: flex; flex-direction: column; }
.stack--2 { gap: var(--sp-2); }
.stack--3 { gap: var(--sp-3); }
.stack--4 { gap: var(--sp-4); }
.stack--5 { gap: var(--sp-5); }

.lede {
  color: var(--text-muted);
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.6;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.eyebrow--center { justify-content: center; }

.section-head { display: flex; flex-direction: column; gap: var(--sp-3); }
.section-head h2 { font-size: var(--step-4); }
.section-head--center { align-items: center; text-align: center; }
.section-head--center .lede { text-align: center; margin-inline: auto; }

/* Scoring marks — the three diagonal slashes a baker cuts into a loaf, the
   same ones drawn on the logo. Used as the divider between sections. */
.scoring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding-block: var(--sp-5);
}
.scoring span {
  display: block;
  width: 4px;
  height: 30px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .38;
  transform: rotate(-28deg);
}
.scoring span:nth-child(2) { height: 40px; }

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: .01em;
  text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--secondary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn--secondary:hover { background: var(--accent-soft); }

.btn--quiet { background: var(--surface); border-color: var(--rule); color: var(--text); }
.btn--quiet:hover { border-color: var(--accent); color: var(--accent); }

/* Still 44px tall: "Add to cart" is the primary action on a phone and must
   clear the minimum touch target even in its compact form. */
.btn--sm { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.8125rem; }
.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.btn__spinner {
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn__spinner { animation-duration: 2s; }
}

/* -------------------------------------------------------------- header -- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-veil);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
@supports not (backdrop-filter: blur(10px)) {
  .header { background: var(--bg); }
}
.header[data-scrolled="true"] { border-bottom-color: var(--rule); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 74px;
}

.brand { display: flex; align-items: center; flex: none; min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; width: auto; }
@media (min-width: 768px) { .brand img { height: 44px; } }

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: var(--sp-5); }
}
.nav a {
  position: relative;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9375rem;
  padding-block: var(--sp-2);
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--sp-1); flex: none; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--text);
  transition: border-color .18s var(--ease), color .18s var(--ease),
              background-color .18s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--rule); }
.icon-btn svg { width: 22px; height: 22px; }

.cart-count {
  position: absolute;
  top: 4px; right: 2px;
  min-width: 20px; height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  padding-inline: 5px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cart-count[data-visible="true"] { display: flex; }

.nav-toggle { display: inline-flex; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* ---------------------------------------------------- theme toggle icon -- */
/* Both glyphs are stacked in the button; the current theme decides which one
   is showing. They swap with a short rotate-and-fade so the control feels
   connected to the change it just made. */
.theme-toggle { position: relative; }
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg)   scale(1);   }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-70deg) scale(.4); }

.theme-toggle[data-theme-state="dark"] .icon-sun  { opacity: 0; transform: rotate(70deg) scale(.4); }
.theme-toggle[data-theme-state="dark"] .icon-moon { opacity: 1; transform: rotate(0deg)  scale(1);  }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: opacity .01s; }
  .theme-toggle .icon-sun,
  .theme-toggle .icon-moon { transform: none; }
  .theme-toggle[data-theme-state="dark"] .icon-sun,
  .theme-toggle[data-theme-state="dark"] .icon-moon { transform: none; }
}

/* ------------------------------------------------------ language picker -- */
.lang { position: relative; flex: none; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 0.7rem;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: .04em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.lang-toggle:hover { color: var(--accent); border-color: var(--rule); }
.lang-toggle .globe { width: 18px; height: 18px; flex: none; }
.lang-toggle .chev {
  width: 13px; height: 13px; flex: none;
  transition: transform .22s var(--ease);
}
.lang-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-toggle[aria-expanded="true"] { border-color: var(--rule); color: var(--accent); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.lang-menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .lang-menu { transition: visibility .01s; transform: none; }
  .lang-menu[data-open="true"] { transform: none; }
}

.lang-menu__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 44px;
  padding: 0 0.7rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  text-align: left;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.lang-menu__item:hover { background: var(--accent-soft); color: var(--accent); }
.lang-menu__code {
  flex: none;
  min-width: 2.1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.lang-menu__item:hover .lang-menu__code { color: inherit; }
.lang-menu__name { flex: 1; }
.lang-menu__tick { flex: none; width: 16px; height: 16px; opacity: 0; color: var(--accent); }
.lang-menu__tick svg { width: 16px; height: 16px; }
.lang-menu__item[aria-checked="true"] { font-weight: 700; }
.lang-menu__item[aria-checked="true"] .lang-menu__tick { opacity: 1; }

/* The picker adds a fourth control to the header, which no longer fits on a
   small phone. Below 430px the row tightens: the globe drops, the gaps close
   and the wordmark steps down — everything stays at 44px for touch. */
@media (max-width: 430px) {
  .header__inner { gap: var(--sp-2); min-height: 66px; }
  .header__actions { gap: 2px; }
  .brand img { height: 32px; }
  .icon-btn { width: 44px; height: 44px; }
  .lang-toggle { padding: 0 0.4rem; gap: 3px; }
  .lang-toggle .globe { display: none; }
  .lang-toggle .chev { width: 12px; height: 12px; }
}

/* mobile menu */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  padding-block: var(--sp-3) var(--sp-4);
}
.mobile-nav[data-open="true"] { display: block; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  padding: var(--sp-3) 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--step-2);
  border-bottom: 1px solid var(--rule);
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- hero -- */
.hero { position: relative; padding-block: var(--sp-7) var(--sp-6); overflow: hidden; }
@media (min-width: 768px) { .hero { padding-block: var(--sp-8) var(--sp-7); } }

.hero__grid {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-7); }
}

.hero__title {
  font-size: var(--step-5);
  margin-block: var(--sp-3) var(--sp-4);
}
.hero__title em {
  display: block;
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.15em;
  line-height: 1.05;
  margin-top: .12em;
}
.hero__copy { color: var(--text-muted); max-width: 46ch; font-size: var(--step-1); }

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }

/* Her own bread, not the logo: the header already carries the mark. */
/* Her own bread, not the logo: the header already carries the mark. */
.hero__art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-sunk);
  box-shadow: var(--shadow-lg);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --------------------------------------------------------- credibility -- */
.strip {
  border-block: 1px solid var(--rule);
  background: var(--surface);
  padding-block: var(--sp-4);
}
.strip__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-6);
}
.strip__list li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.strip__list svg { width: 19px; height: 19px; color: var(--olive); flex: none; }

/* ------------------------------------------------------------- product -- */
.product-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease),
              border-color .22s var(--ease);
}
@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--rule));
  }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; transition: box-shadow .22s var(--ease); }
}
.card[data-sold-out="true"] { opacity: .78; }
.card[data-sold-out="true"]:hover { transform: none; }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 92% at 50% 0%,
      color-mix(in srgb, var(--wheat) 60%, var(--surface)),
      var(--surface-sunk));
  border-bottom: 1px solid var(--rule);
}
.card__media img { width: 34%; max-width: 96px; opacity: .3; }

/* A real product photo fills the frame instead. */
.card__media[data-has-photo="true"] { background: var(--surface-sunk); }
.card__media .card__photo {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }
.card__name { font-size: var(--step-1); }
.card__name a { color: inherit; text-decoration: none; }
.card__name a:hover { text-decoration: underline; }
/* The photo is also a link to the product page, but a purely visual,
   mouse-only shortcut — the name link right below it is the one keyboard
   and screen-reader users get, so this one stays out of the tab order. */
.card__media-link { display: contents; }
.card__desc { font-size: var(--step--1); color: var(--text-muted); flex: 1; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.card__price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Stock badges. Colour never carries the meaning on its own — each badge
   states its status in words, so it reads the same to a screen reader or a
   colour-blind customer. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}
.badge svg { width: 13px; height: 13px; flex: none; }
.badge--low     { background: var(--wheat); color: var(--on-wheat); }
.badge--out     { background: transparent; border: 1.5px solid var(--text-muted); color: var(--text-muted); }
.badge--season  { background: var(--calm); color: var(--calm-ink); }

.card__media .badge { position: absolute; top: var(--sp-3); left: var(--sp-3); }

/* skeletons while the catalogue loads */
.skeleton { pointer-events: none; }
.skeleton .sk {
  background: color-mix(in srgb, var(--text-muted) 16%, transparent);
  border-radius: var(--radius-sm);
  animation: pulse 1.5s ease-in-out infinite;
}
.skeleton .sk--media { aspect-ratio: 4/3; border-radius: 0; }
.skeleton .sk--line { height: 14px; }
.skeleton .sk--line.is-short { width: 55%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton .sk { animation: none; opacity: .75; }
}

/* -------------------------------------------------------------- filter -- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.chip {
  min-height: 44px;
  padding: 0.45rem 1.05rem;
  background: transparent;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* --------------------------------------------------------------- story -- */
.story__grid { display: grid; gap: var(--sp-6); align-items: center; }
/* Two columns while her photo is in place; text alone otherwise. */
@media (min-width: 900px) { .story__grid:has(.story__portrait) { grid-template-columns: 0.85fr 1.15fr; gap: var(--sp-7); } }

.story__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: var(--surface-sunk);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.story__portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Her opening line, so it is a sentence, not a headline: one step smaller
   than a section title, with room to breathe below. */
.story__title {
  font-size: var(--step-3);
  line-height: 1.3;
  margin-block: var(--sp-3) var(--sp-4);
  text-wrap: balance;
}
.story__body p + p { margin-top: var(--sp-3); }

/* The rest of the story. A plain text link rather than a button: it reads
   as "keep reading", which is what it is. */
.story__more { margin-top: var(--sp-3); }
.story__more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--accent);
}
.story__more summary::-webkit-details-marker { display: none; }
.story__more summary::after { content: "↓"; transition: transform .18s var(--ease); }
.story__more[open] summary::after { transform: rotate(180deg); }
.story__more[open] summary { margin-bottom: var(--sp-2); }
.story__more p + p { margin-top: var(--sp-3); }
@media (prefers-reduced-motion: reduce) {
  .story__more summary::after { transition: none; }
}
.story__body p { max-width: var(--measure); color: var(--text-muted); }
.story__sign {
  font-family: var(--font-script);
  font-size: var(--step-3);
  color: var(--text);
  margin-top: var(--sp-4);
}

/* --------------------------------------------------------------- steps -- */
.steps {
  list-style: none;
  display: grid;
  gap: var(--sp-4);
  counter-reset: step;
  margin-top: var(--sp-6);
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }

.steps li {
  position: relative;
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}
/* An ordered list, not three identical cards. */
.steps li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--accent);
}
/* Facts, not a sequence: no numbers. */
.steps--plain li::before { content: none; }
.steps h3 { font-size: var(--step-2); margin-top: var(--sp-2); }
.steps p { font-size: var(--step--1); color: var(--text-muted); }

.fee-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
}
.fee-note strong { font-family: var(--font-display); font-size: var(--step-1); color: var(--accent); }

/* -------------------------------------------------------- testimonials -- */
.quotes {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
@media (min-width: 768px) { .quotes { grid-template-columns: repeat(3, 1fr); } }

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}
.quote__stars { display: flex; gap: 3px; color: var(--accent); }
.quote__stars svg { width: 17px; height: 17px; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.5; }
.quote figcaption { font-size: var(--step--1); color: var(--text-muted); }
.quote figcaption strong { color: var(--text); font-weight: 700; }

/* ------------------------------------------------------------- contact -- */
.info-cols { display: grid; gap: var(--sp-5); margin-top: var(--sp-6); }
@media (min-width: 768px) { .info-cols { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); } }

.info-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.info-col__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin-bottom: var(--sp-2);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  color: var(--accent);
}
.info-col__icon svg { width: 22px; height: 22px; }
.info-col h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.info-col p, .info-col a { font-size: var(--step-0); }
.info-col address { font-style: normal; color: var(--text); }
/* Standalone contact links, not inline prose — give them a real tap area. */
.info-col p > a { display: inline-flex; align-items: center; min-height: 44px; }

.hours { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.hours li { display: flex; justify-content: space-between; gap: var(--sp-3); max-width: 22rem; }
.hours dt, .hours .day { color: var(--text-muted); }
.hours .time { font-variant-numeric: tabular-nums; }
.hours li[data-closed="true"] .time { color: var(--text-muted); }

.socials { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); }
.socials a {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--text);
  transition: all .18s var(--ease);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.socials svg { width: 21px; height: 21px; }

/* The handle spelled out under the icons. Smaller than body copy — it is a
   pointer, not a sentence — and allowed to break mid-word, since a long
   handle has no spaces to wrap at on a narrow phone. */
.social-handle { margin-top: var(--sp-1); }
.info-col .social-handle a {
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------- footer -- */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: var(--sp-6) var(--sp-5);
  margin-top: var(--sp-7);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
.footer__mark img { height: 68px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); list-style: none; }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9375rem;
}
.footer__links a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.footer__bottom p { max-width: 52ch; }

/* --------------------------------------------------- light/dark artwork -- */
/* The logo files are single-colour PNGs, so each mark ships twice and the
   theme picks one. The base state lives on the utility class itself — hanging
   it off each component meant any new use of .on-dark showed both marks. */
.on-light { display: block; }
.on-dark  { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none !important; }
  :root:not([data-theme="light"]) .on-dark  { display: block !important; }
}
:root[data-theme="dark"] .on-light { display: none !important; }
:root[data-theme="dark"] .on-dark  { display: block !important; }
:root[data-theme="light"] .on-light { display: block !important; }
:root[data-theme="light"] .on-dark  { display: none !important; }

/* --------------------------------------------------------- cart drawer -- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: rgba(33, 20, 12, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.scrim[data-open="true"] { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: var(--z-drawer);
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--rule);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .32s var(--ease), visibility .32s var(--ease);
}
.drawer[data-open="true"] { transform: translateX(0); visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: visibility .01s; }
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--rule);
  flex: none;
}
.drawer__head h2 { font-size: var(--step-2); }

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-4);
}

.drawer__foot {
  flex: none;
  padding: var(--sp-4);
  border-top: 1px solid var(--rule);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  /* keep the checkout button clear of the iOS home indicator */
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}

.line-items { list-style: none; display: flex; flex-direction: column; gap: var(--sp-4); }
.line-item { display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-3); align-items: start; }
.line-item__thumb {
  aspect-ratio: 1;
  display: grid; place-items: center;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.line-item__thumb img { width: 60%; opacity: .4; }
.line-item__main { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.line-item__name { font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; }
.line-item__price { font-size: var(--step--1); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.line-item__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-1); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty button {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.qty button:hover { background: var(--accent-soft); color: var(--accent); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty button svg { width: 15px; height: 15px; }
.qty output {
  min-width: 2.1rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.link-danger {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: none; border: 0;
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-danger:hover { color: var(--danger); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; padding-block: var(--sp-6); }
.empty-state svg { width: 44px; height: 44px; color: var(--text-muted); opacity: .55; }
.empty-state p { color: var(--text-muted); max-width: 30ch; }

/* delivery block inside the drawer */
.delivery { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem; /* >=16px so iOS does not zoom on focus */
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--rule);
  /* WCAG 1.4.11: a field edge needs 3:1 against the page; --rule is too faint. */
  border-color: color-mix(in srgb, var(--text-muted) 80%, var(--bg));
  border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input::placeholder { color: var(--text-muted); opacity: 1; }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__help { font-size: 0.8125rem; color: var(--text-muted); margin-top: 6px; }

.field__error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--danger);
}
.field__error svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.field__error:empty { display: none; }

.quote-ok {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: var(--sp-3);
  background: color-mix(in srgb, var(--calm) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--calm) 45%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}
.quote-ok svg { width: 16px; height: 16px; color: var(--olive); flex: none; margin-top: 2px; }
.quote-ok:empty { display: none; }

.totals { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.totals li { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--step--1); color: var(--text-muted); }
.totals .amount { font-variant-numeric: tabular-nums; color: var(--text); }
.totals .is-total {
  padding-top: var(--sp-2);
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
}
.totals .is-total .amount { color: var(--accent); }
.totals .is-pending .amount { color: var(--text-muted); font-style: italic; }

/* Mini-cart preview in the drawer: subtotal only, no delivery breakdown —
   that lives on checkout.html once fulfillment is chosen. */
.totals-mini {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
}
.totals-mini .amount { font-variant-numeric: tabular-nums; color: var(--accent); }

.fine-print { font-size: 0.75rem; color: var(--text-muted); text-align: center; }

/* On a short phone the fixed footer eats the item list. Tighten it so at
   least two products stay visible while the checkout stays reachable. */
@media (max-height: 740px) {
  .drawer__foot { gap: var(--sp-2); padding-block: var(--sp-3); }
  .drawer__foot .field__help { font-size: 0.75rem; }
  .line-items { gap: var(--sp-3); }
}

/* --------------------------------------------------------------- toast -- */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: min(400px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 700;
  animation: toast-in .28s var(--ease);
}
.toast svg { width: 17px; height: 17px; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ------------------------------------------------------------- reveals -- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal[data-shown="true"] {
  opacity: 1;
  transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
/* If JS never runs, content must still be visible. */
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------- notes -- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-sunk);
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }

/* --------------------------------------------------- theme change fade -- */
/* A short colour fade on the large surfaces, so browsers without view
   transitions still get an eased change instead of a hard flash. Limited to
   the few properties that actually differ between themes — a blanket
   `transition: all` on every element would cost far more than it buys. */
@media (prefers-reduced-motion: no-preference) {
  body, .header, .footer, .section--tint, .section--sunk,
  .card, .drawer, .drawer__foot, .steps li, .quote, .compcard,
  .field input, .chip, .lang-menu, .btn, .badge {
    transition-property: background-color, border-color, color;
    transition-duration: .35s;
    transition-timing-function: var(--ease);
  }
  /* Buttons keep their own faster hover timing. */
  .btn { transition-duration: .18s; }
}

/* While the circular reveal runs, the two snapshots must simply sit on top of
   each other — the default cross-fade would wash the new theme out. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; }

/* ==========================================================================
   Reviews add-on — public form, star rating, moderation panel
   ========================================================================== */

/* A rendered review can be any rating, so stars come in two states rather
   than always drawing five filled ones. */
.quote__star { display: inline-flex; }
.quote__star svg { width: 17px; height: 17px; }
.quote__star.is-empty { color: var(--text-muted); opacity: .3; }

.reviews__cta {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-6);
}

.review-form {
  max-width: 34rem;
  margin: var(--sp-6) auto 0;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.review-form textarea {
  width: 100%;
  min-height: 8.5rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;               /* >=16px so iOS does not zoom on focus */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--rule);
  border-color: color-mix(in srgb, var(--text-muted) 80%, var(--bg));
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.review-form textarea::placeholder { color: var(--text-muted); opacity: 1; }
.review-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.review-form__counter {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.review-form__counter[data-near-limit="true"] { color: var(--accent); font-weight: 700; }

/* ---- star rating input --------------------------------------------------
   Real radio buttons under the stars: one tab stop, arrow keys move between
   values, and it still submits with the form. The SVGs are decoration on top
   of that, never a replacement for it. */
.rating { border: 0; padding: 0; margin: 0; }
.rating legend {
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 8px;
}
.rating__row { display: flex; gap: 2px; }

.rating__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rating__star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;                 /* full touch target per star */
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s var(--ease), transform .12s var(--ease);
}
.rating__star svg { width: 26px; height: 26px; opacity: .35; transition: opacity .15s var(--ease); }
.rating__star:hover { transform: scale(1.08); }

/* Fill every star up to the chosen one. */
.rating[data-rating="1"] .rating__star:nth-of-type(-n+1),
.rating[data-rating="2"] .rating__star:nth-of-type(-n+2),
.rating[data-rating="3"] .rating__star:nth-of-type(-n+3),
.rating[data-rating="4"] .rating__star:nth-of-type(-n+4),
.rating[data-rating="5"] .rating__star:nth-of-type(-n+5) { color: var(--accent); }

.rating[data-rating="1"] .rating__star:nth-of-type(-n+1) svg,
.rating[data-rating="2"] .rating__star:nth-of-type(-n+2) svg,
.rating[data-rating="3"] .rating__star:nth-of-type(-n+3) svg,
.rating[data-rating="4"] .rating__star:nth-of-type(-n+4) svg,
.rating[data-rating="5"] .rating__star:nth-of-type(-n+5) svg { opacity: 1; }

/* Keyboard focus has to land on something visible, and the input is hidden. */
.rating__input:focus-visible + .rating__star {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .rating__star:hover { transform: none; }
}

/* ---- honeypot -----------------------------------------------------------
   Off-screen rather than display:none, because some bots skip hidden fields.
   aria-hidden + tabindex="-1" keep it away from people and screen readers. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.review-form__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}
.review-form__status:empty { display: none; }
.review-form__status[data-kind="error"] { color: var(--danger); }
.review-form__status[data-kind="ok"]    { color: var(--olive); }

.reviews__note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--sp-2);
}

/* ---- moderation panel --------------------------------------------------- */
.admin { max-width: 46rem; }
.admin__setup { margin-top: var(--sp-5); }

.admin__login {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 24rem;
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.admin__count { font-variant-numeric: tabular-nums; }

.admin__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.admin__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}
.admin__item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
}
.admin__who { font-size: var(--step--1); color: var(--text-muted); }
.admin__who strong { color: var(--text); font-weight: 700; }
.admin__text {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.5;
  /* A review is stranger-supplied text: let a pasted URL wrap instead of
     stretching the card off the screen. */
  overflow-wrap: anywhere;
}
.admin__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ------------------------------------------------- long-form prose page -- */
/* Privacy and any future policy page. One measure, generous rhythm — these
   are read, not scanned. */
.prose { max-width: 68ch; }
.prose h1 { font-size: var(--step-4); margin-block: var(--sp-3) var(--sp-4); }
.prose h2 {
  font-size: var(--step-2);
  margin-block: var(--sp-6) var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}
.prose p { margin-bottom: var(--sp-3); }
.prose ul { margin: 0 0 var(--sp-3) 1.15rem; }
.prose li { margin-bottom: var(--sp-2); }
.prose strong { color: var(--text); }
.prose .lede { margin-bottom: var(--sp-4); }
.prose__updated {
  font-size: var(--step--1);
  color: var(--text-muted);
  padding-bottom: var(--sp-2);
}

/* Bilingual documents ship both languages in the markup and let the language
   already chosen in the header decide which one shows. No JavaScript, and the
   text a search engine indexes matches the page's declared language. */
html[lang="en"] [data-lang-block="es"] { display: none; }
html[lang="es"] [data-lang-block="en"] { display: none; }

/* A standalone link in the footer bottom row is a navigation target, not
   inline prose, so it gets a real tap area. */
.footer__bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ==========================================================================
   FAQ accordion — recipe questions on the thank-you page
   ========================================================================== */

/* Native <details>, so every question is readable and openable even if the
   JavaScript never runs. The row is a 44px tap target. */
.faq {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 44px;
  padding: var(--sp-2) 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

/* Chevron drawn in CSS rather than shipped as an icon — it is one glyph and
   it has to rotate. */
.faq summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s var(--ease);
}
.faq[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.faq p {
  margin: 0;
  padding: 0 0 var(--sp-3);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ==========================================================================
   Texas cottage food disclosure
   ========================================================================== */

/* Shown right above the pay button: the rules require the label information
   to be visible on the site before the buyer pays. Quiet, but not hidden. */
.cottage-notice {
  margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-sunk);
  border-radius: var(--radius-md);
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.cottage-notice p { margin: 0; }
.cottage-notice__lead {
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}
.cottage-notice__statute {
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

.footer__legal {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 60ch;
}
