/* ==================================================================
   Nourish — Chicken Bone Broth

   The page is a table laid with dark green linen. Everything on it
   is kitchen paperwork: a tape label, a priced menu, the back of the
   pot label, the specials board and the deli stamp.
   ================================================================== */

@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Reenie Beanie';
  src: url('../fonts/reenie-beanie.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* type on the cloth */
  --cream: #efe7d8;
  --text: #d6cebe;
  --muted: #a6aa9b;
  --line: rgb(239 231 216 / 15%);

  /* accents */
  --amber: #d7a24e;
  --amber-hi: #e4b665;
  --tape: #e9dfc6;
  --ink: #25221e;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --hand: 'Reenie Beanie', 'Bradley Hand', cursive;
  --on-amber: #17231b;
  --line-strong: rgb(239 231 216 / 42%);
  --surface-sunk: rgb(0 0 0 / 18%);
  --surface-panel: rgb(239 231 216 / 3%);
  --error: #f0a58c;
  --error-line: #e08a6d;

  /* type scale: one family per job (serif to read, sans for interface, hand for notes) */
  --text-xs: 0.8125rem; /* 13px  small labels */
  --text-sm: 0.875rem; /* 14px  secondary interface text */
  --text-ui: 0.9375rem; /* 15px  buttons, inputs, menu */
  --text-body-sm: 1.0625rem; /* 17px  dense reading text */
  --text-body: 1.1875rem; /* 19px  reading text */
  --text-lead: 1.25rem; /* 20px  hero copy */
  --text-md: 1.375rem; /* 22px  small headings, prices */
  --text-lg: clamp(1.5rem, 2.2vw, 1.875rem); /* 24-30px  list names, sub-headings */
  --text-xl: clamp(2.25rem, 4.4vw, 3.5rem); /* 36-56px  section headings */
  --text-2xl: clamp(2.75rem, 6vw, 4.5rem); /* 44-72px  page headings */
  --text-display: clamp(3.4rem, 8.4vw, 7.25rem); /* 54-116px  the hero */
  --text-hand: 1.5rem;
  --text-hand-lg: 2.4rem;

  /* spacing scale */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --section-space: clamp(72px, 9vw, 128px);
  --section-space-sm: clamp(56px, 6vw, 88px);

  /* shape, depth, motion */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-raised:
    inset 0 1px 0 rgb(255 255 255 / 28%), 0 1px 0 rgb(0 0 0 / 35%), 0 6px 16px -8px rgb(0 0 0 / 60%);
  --shadow-paper: 0 2px 3px rgb(0 0 0 / 22%), 0 8px 18px -10px rgb(0 0 0 / 55%);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 0.18s;
  --control-h: 48px;
  --control-h-sm: 40px;

  /* layout. Breakpoints (media queries cannot read variables):
     480 small phones, 600 phones, 760 menu collapses, 900 columns stack */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 68px;

  /* Background: forest green at the top, shading into apothecary teal,
     ending near-black at the footer */
  --ground: #1f3528;
  --page: linear-gradient(
    180deg,
    #2c4433 0%,
    #223a2e 16%,
    #1a332f 34%,
    #152b2c 52%,
    #0e1e20 74%,
    #0a1517 100%
  );
  --glow: rgb(222 240 226 / 8%);
  --board: #0d1b1d;
  --board-glow: radial-gradient(ellipse 70% 120% at 50% 0%, rgb(120 180 170 / 6%), transparent 70%);
}

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

[hidden] {
  display: none !important;
}

/* Smooth scrolling for menu links, switched on by main.js after the page has
   loaded. Arriving at a link like /#order then jumps straight there instead
   of starting a slow scroll that the 3D stage could interrupt. */
html.smooth-scroll {
  scroll-behavior: smooth;
}

/* The cloth: woven texture under a warm pool of light, darker at the edges */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background-color: var(--ground);
  background-image: url('../images/linen.svg'), var(--page);

  /* one size per layer: the linen tile, then up to three gradient layers from the theme */
  background-size:
    180px 180px,
    100% 100%,
    100% 100%,
    100% 100%;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  hanging-punctuation: first last;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 760px at 14% -6%, var(--glow), transparent 62%),
    radial-gradient(900px 700px at 96% 108%, rgb(0 0 0 / 22%), transparent 60%),
    radial-gradient(130% 95% at 50% 42%, transparent 58%, rgb(0 0 0 / 34%) 100%);
}

/* fine print grain over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection {
  background: var(--amber);
  color: var(--ground);
}

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

img {
  height: auto;
}

a {
  color: var(--cream);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    text-decoration-color var(--fast) ease,
    color var(--fast) ease;
}

a:hover {
  text-decoration-color: var(--amber);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  color: var(--cream);
  font-weight: 350;
  letter-spacing: -0.012em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-display);
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 0.95;
}

h2 {
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.2;
}

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

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

:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--amber);
  color: var(--ground);
  padding: 10px 16px;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

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

/* Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-ui);
  letter-spacing: 0.01em;
  min-height: var(--control-h);
  padding: 0 var(--space-m);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--fast) ease,
    color var(--fast) ease,
    border-color var(--fast) ease,
    box-shadow var(--fast) ease,
    transform 0.08s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-amber {
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: var(--shadow-raised);
}

.btn-amber:hover {
  background: var(--amber-hi);
}

.btn-line {
  border-color: var(--line-strong);
  color: var(--cream);
  background: rgb(239 231 216 / 2%);
}

.btn-line:hover {
  background: var(--cream);
  color: var(--ground);
  border-color: var(--cream);
}

.text-link {
  display: inline-block;
  padding-block: var(--space-2xs);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-ui);
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgb(239 231 216 / 35%);
  transition: text-decoration-color var(--fast) ease;
}

.text-link:hover {
  text-decoration-color: var(--amber);
}

/* Tape: a strip of masking tape, written on in marker ------------------ */

.tape {
  --tilt: -4deg;

  display: inline-block;
  padding: 12px 24px 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 22%), transparent 40%, rgb(0 0 0 / 4%)),
    repeating-linear-gradient(90deg, rgb(0 0 0 / 2.5%) 0 2px, transparent 2px 7px), var(--tape);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 2rem;
  line-height: 0.9;
  word-spacing: 0.18em;
  transform: rotate(var(--tilt));
  box-shadow: var(--shadow-paper);
  clip-path: polygon(
    1.5% 4%,
    4% 0,
    97% 2%,
    100% 0,
    98.5% 30%,
    100% 58%,
    98% 82%,
    100% 100%,
    3% 97%,
    0 100%,
    1.5% 70%,
    0 44%,
    1% 20%
  );
}

/* Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--ground) 93%, transparent);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  height: var(--header-h);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  margin-right: -0.24em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--sans);
  font-size: var(--text-ui);
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  padding: 6px 0;
  transition: color 0.18s ease;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover {
  color: var(--cream);
}

.site-nav a:hover::after,
.site-nav a[aria-current='true']::after {
  transform: scaleX(1);
}

.site-nav a[aria-current='true'] {
  color: var(--cream);
}

.bar .btn {
  min-height: var(--control-h-sm);
  padding: 0 20px;
}

/* the extra Order link is for the phone menu; desktop has the button */
.site-nav .nav-extra {
  display: none;
}

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .bar {
    gap: var(--space-xs);
  }

  .bar .btn {
    min-height: 44px;
  }

  .bar .wordmark {
    margin-right: auto;
  }

  .menu-toggle:not([hidden]) {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--cream);
    cursor: pointer;
  }

  .menu-icon,
  .menu-icon::before {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentcolor;
    transition: transform 0.25s var(--ease);
  }

  .menu-icon {
    position: relative;
    transform: translateY(-3.5px);
  }

  .menu-icon::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
  }

  .menu-open .menu-icon {
    transform: translateY(0) rotate(45deg);
  }

  .menu-open .menu-icon::before {
    transform: translateY(-7px) rotate(-90deg);
  }

  .site-nav {
    display: none;
  }

  .menu-open .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2xs) var(--gutter) var(--space-m);
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(0 0 0 / 70%);
    animation: menu-in 0.22s var(--ease);
  }

  .menu-open .site-nav a {
    padding: var(--space-s) 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: var(--text-md);
    color: var(--cream);
  }

  .menu-open .site-nav a:last-child {
    border-bottom: 0;
  }

  .menu-open .site-nav a::after {
    display: none;
  }

  .menu-open .site-nav .nav-extra {
    display: block;
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (max-width: 480px) {
  .bar .wordmark {
    font-size: 1.15rem;
    letter-spacing: 0.2em;
  }

  .bar .btn {
    padding: 0 var(--space-s);
  }
}

/* Hero ---------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 48px);
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: clamp(16px, 2.4vw, 32px);
}

.hero-title {
  grid-column: 1 / 9;
  grid-row: 1;
  padding-top: clamp(8px, 5vw, 72px);
}

.hero-copy {
  grid-column: 1 / 6;
  grid-row: 2;
  align-self: end;
  padding-top: 48px;
}

.hero-copy > p:first-child {
  font-size: var(--text-lead);
  line-height: 1.55;
  max-width: 30ch;
  color: var(--text);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-top: var(--space-l);
  flex-wrap: wrap;
}

.next-delivery {
  margin-top: var(--space-m);
  text-wrap: balance;
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: lining-nums;
}

.next-delivery strong {
  color: var(--cream);
  font-weight: 500;
}

.next-delivery .from-price {
  color: var(--cream);
  font-weight: 600;
}

.hero-media {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
  position: relative;
  margin: 0;
  align-self: center;
}

/* The 3D jar is drawn on one fixed layer behind the page; the hero figure
   is where it starts, and where you drag it. A still image shows until it's ready. */
.jar-world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.jar-stage {
  aspect-ratio: 4 / 5;
  width: 100%;
  touch-action: pan-y;
}

.jar-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.6s ease;
}

.jar3d-ready .jar-stage {
  cursor: grab;
}

.jar3d-ready .jar-stage.is-dragging {
  cursor: grabbing;
}

.jar3d-ready .jar-still {
  opacity: 0;
}

.jar-stage:focus-visible {
  outline-offset: -6px;
  border-radius: var(--radius-md);
}

.jar-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  text-align: center;
  font-family: var(--sans);
  font-size: var(--text-xs);
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.jar3d-ready .jar-hint {
  opacity: 0.85;
}

.jar3d-ready .jar-stage.has-turned .jar-hint {
  opacity: 0;
}

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

  .hero-title,
  .hero-copy,
  .hero-media {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-title {
    padding-top: 0;
  }

  .hero-copy {
    padding-top: 28px;
  }

  .hero-media {
    margin-top: 32px;
    max-width: 460px;
    width: 100%;
    justify-self: center;
  }
}

/* Sections: rules run the width of the text, like a printed menu ------ */

.section > .container {
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.split-head p {
  margin-top: var(--space-s);
  color: var(--muted);
  font-size: var(--text-body);
  max-width: 28ch;
}

@media (min-width: 901px) {
  .split-head {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}

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

/* Ingredients ------------------------------------------------------ */

.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ingredients li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 20px;
  flex-wrap: wrap;
  padding: 19px 0 18px;
  border-bottom: 1px solid var(--line);
}

.ingredients .name {
  font-size: var(--text-lg);
  color: var(--cream);
  font-weight: 350;
  letter-spacing: -0.01em;
}

.ingredients .detail {
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--muted);
}

.ingredients .detail strong {
  color: var(--cream);
  font-weight: 700;
}

/* What goes in: the jar opens -------------------------------------- */

/* Without 3D: a plain two-column list */
.reveal-track {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.reveal-stage {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.reveal-head {
  width: auto;
  margin: 0;
}

.reveal-head > p:not(.reveal-hint) {
  margin-top: var(--space-s);
  color: var(--muted);
  font-size: var(--text-body);
  max-width: 28ch;
}

.reveal-hint,
.reveal-jar {
  display: none;
}

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

/* With 3D: a tall track with a pinned stage */
.jar3d .reveal-track {
  width: auto;
  padding: 0;
  border: 0;
  height: 290vh;
}

.jar3d .reveal-stage {
  display: block;
  position: sticky;
  overflow: clip; /* a label can never make the page scroll sideways */
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
}

.jar3d .reveal-head {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-top: clamp(28px, 6vh, 64px);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.jar3d .reveal-hint {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--amber);
}

.jar3d .reveal-jar {
  display: block;
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  left: 50%;
  z-index: 1;
  height: min(46%, 390px);
  aspect-ratio: 4 / 5;
  transform: translateX(-50%);
  bottom: 8%;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.jar3d .reveal-jar:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 4px;
}

.jar3d .reveal-list {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  pointer-events: none;
  z-index: 2;
}

.jar3d .reveal-list li {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  padding: 0;
  border: 0;
  width: max-content;
  max-width: min(320px, var(--room, 42vw));
  transform: translate(calc(var(--x, 0px) + var(--gap, 50px)), var(--y, 0)) translateY(-50%);
  opacity: 0;
  will-change: transform, opacity;
}

.jar3d .reveal-list li[data-side='left'] {
  transform: translate(calc(var(--x, 0px) - var(--gap, 50px) - 100%), var(--y, 0)) translateY(-50%);
  text-align: right;
}

.jar3d .reveal-list li::before {
  content: '';
  position: absolute;
  top: 0.95em;
  width: 22px;
  height: 1px;
  background: rgb(239 231 216 / 40%);
}

.jar3d .reveal-list li[data-side='right']::before {
  left: -32px;
}

.jar3d .reveal-list li[data-side='left']::before {
  right: -32px;
}

.jar3d .reveal-list .name {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--cream);
  line-height: 1.25;
}

.jar3d .reveal-list .detail {
  display: block;
  margin-top: var(--space-3xs);
  font-family: var(--sans);
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 760px) {
  .jar3d .reveal-track {
    height: 260vh;
  }

  .jar3d .reveal-jar {
    height: min(30%, 250px);
    bottom: 7%;
  }

  .jar3d .reveal-list li {
    max-width: min(66vw, var(--room, 66vw));
  }

  .jar3d .reveal-list .name {
    font-size: 1.12rem;
  }

  .jar3d .reveal-list li::before {
    width: 14px;
    top: 0.8em;
  }

  .jar3d .reveal-list li[data-side='right']::before {
    left: -22px;
  }
}

@media (max-width: 760px) and (max-height: 760px) {
  .jar3d .reveal-head {
    padding-top: 18px;
  }

  .jar3d .reveal-head h2 {
    font-size: 2rem;
  }

  .jar3d .reveal-head > p:not(.reveal-hint) {
    margin-top: 6px;
    font-size: 1rem;
  }

  .jar3d .reveal-hint {
    margin-top: 6px;
  }
}

/* Nutrition ---------------------------------------------------------- */

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums lining-nums;
}

.nutrition-table th,
.nutrition-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.nutrition-table thead th {
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
}

.nutrition-table tbody th {
  font-weight: 400;
  color: var(--cream);
  font-size: var(--text-body);
}

.nutrition-table td {
  color: var(--text);
  font-size: var(--text-body-sm);
  padding-left: var(--space-s);
  white-space: nowrap;
}

.nutrition-table th:not(:first-child),
.nutrition-table td {
  text-align: right;
}

.nutrition-table .sub th {
  padding-left: 20px;
  font-size: var(--text-body-sm);
  color: var(--text);
  font-style: italic;
}

@media (max-width: 600px) {
  .nutrition-table tbody th {
    font-size: var(--text-body-sm);
  }

  .nutrition-table td {
    font-size: var(--text-ui);
    padding-left: 10px;
  }

  .nutrition-table .sub th {
    padding-left: var(--space-xs);
    white-space: nowrap;
    font-size: var(--text-ui);
  }
}

@media (max-width: 480px) {
  .nutrition-table td {
    white-space: normal;
    padding-left: 8px;
  }

  .nutrition-table thead th {
    font-size: var(--text-xs);
  }

  .nutrition-table .sub th {
    white-space: normal;
  }
}

/* Order: the menu ---------------------------------------------------- */

.menu-title {
  font-size: var(--text-lg);
  font-weight: 400;
}

.prices {
  list-style: none;
  margin: var(--space-m) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.prices li {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, auto) minmax(16px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.pot {
  width: 46px;
  height: 40px;
  color: var(--cream);
  opacity: 0.85;
}

.prices .item {
  font-size: var(--text-md);
  color: var(--cream);
  line-height: 1.25;
}

.prices .item small {
  display: block;
  font-family: var(--sans);
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-3xs);
}

.prices .leader {
  border-bottom: 1px dotted rgb(239 231 216 / 35%);
  transform: translateY(5px);
}

.prices .price {
  font-size: var(--text-md);
  color: var(--cream);
  font-variant-numeric: tabular-nums lining-nums;
}

.prices .btn {
  min-width: 112px;
}

.prices .tape {
  position: absolute;
  top: -13px;
  right: 128px;
  font-size: var(--text-hand);
  padding: 7px 14px 4px;

  --tilt: 3deg;
}

@media (max-width: 600px) {
  .prices li {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    row-gap: 14px;
  }

  .pot {
    width: 40px;
  }

  .prices .leader {
    display: none;
  }

  .prices .btn {
    grid-column: 1 / -1;
  }

  .prices .tape {
    right: 0;
  }
}

.next {
  margin-top: var(--space-2xl);
  padding: var(--space-l);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-panel);
}

.next h3 {
  font-size: var(--text-md);
}

.next ul {
  list-style: none;
  margin: var(--space-xs) 0 0;
  padding: 0;
}

.next li {
  padding: 6px 0;
  color: var(--text);
}

.next li small {
  font-family: var(--sans);
  font-size: var(--text-xs);
  color: var(--amber);
  margin-left: 10px;
}

.notify-note {
  margin-top: var(--space-m);
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--muted);
}

@media (max-width: 600px) {
  .next {
    padding: var(--space-m) var(--space-m) var(--space-s);
  }
}

.notify {
  display: flex;
  gap: 10px;
  margin-top: var(--space-xs);
  max-width: 460px;
}

.notify input {
  flex: 1;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-sunk);
  color: var(--cream);
  font: 400 var(--text-ui) var(--sans);
  transition: border-color var(--fast) ease;
}

.notify input::placeholder {
  color: var(--muted);
}

.notify input:focus {
  outline: none;
  border-color: var(--amber);
}

.notify input:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 2px;
}

.notify input:hover {
  border-color: rgb(239 231 216 / 60%);
}

.notify input[aria-invalid='true'] {
  border-color: var(--error-line);
}

.notify .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* a field only bots fill in */
.notify .trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notify .btn {
  padding: 0 var(--space-m);
}

.notify-msg {
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 10px;
  min-height: 1.4em;
}

.notify-msg:empty {
  min-height: 0;
  margin-top: 0;
}

.notify-msg[data-tone='ok'] {
  color: var(--amber-hi);
}

.notify-msg[data-tone='ok']::before {
  content: '\2713';
  margin-right: 0.45em;
}

.notify-msg[data-tone='error'] {
  color: var(--error);
}

@media (max-width: 480px) {
  .notify {
    flex-direction: column;
  }
}

/* Today's specials: the board --------------------------------------- */

.specials {
  background-color: var(--board);
  background-image:
    var(--board-glow), radial-gradient(ellipse 50% 60% at 18% 28%, rgb(255 255 255 / 3.5%), transparent 70%),
    radial-gradient(ellipse 40% 50% at 82% 72%, rgb(255 255 255 / 2.8%), transparent 70%),
    radial-gradient(ellipse 30% 30% at 55% 10%, rgb(255 255 255 / 2%), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 4%),
    inset 0 -1px 0 rgb(0 0 0 / 50%),
    inset 0 18px 30px -24px rgb(0 0 0 / 80%);
}

.specials > .container {
  border-top: 0;
}

.specials-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 40px;
  flex-wrap: wrap;
}

.specials-date {
  font-family: var(--hand);
  font-size: var(--text-hand-lg);
  line-height: 1;
  color: var(--cream);
  position: relative;
}

.specials-date svg {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -10px;
  width: 104%;
  height: 10px;
  color: var(--amber);
  opacity: 0.8;
}

.specials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.special {
  padding: 30px 32px 8px 0;
}

.special + .special {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.special .kind {
  font-family: var(--sans);
  font-size: var(--text-xs);
  color: var(--amber);
  font-variant-numeric: lining-nums;
}

.special h3 {
  margin-top: 10px;
}

.special .desc {
  margin-top: 10px;
  font-size: var(--text-body-sm);
  color: var(--text);
}

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

  .special,
  .special + .special {
    padding: 24px 0;
    border-left: 0;
  }

  .special + .special {
    border-top: 1px solid var(--line);
  }
}

/* Good to know ----------------------------------------------------- */

.section--compact > .container {
  padding-block: var(--section-space-sm);
}

.facts-title {
  font-size: var(--text-lg);
  font-weight: 400;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 32px 0 0;
}

.facts dt {
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--cream);
}

.facts dd {
  margin: var(--space-2xs) 0 0;
  font-size: var(--text-body-sm);
  color: var(--text);
  max-width: 30ch;
}

@media (max-width: 760px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Footer: the stamp -------------------------------------------------- */

.site-footer {
  padding: 0 0 44px;
}

.foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px 48px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.stamp {
  width: 118px;
  height: 118px;
  color: var(--amber);
  transform: rotate(-9deg);
  opacity: 0.9;
}

.foot-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.foot-links {
  display: flex;
  gap: 0 var(--space-m);
  flex-wrap: wrap;
}

.foot-links a,
.foot p {
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--muted);
}

.foot-links a {
  display: inline-block;
  padding-block: 6px;
  text-decoration-color: rgb(166 170 155 / 40%);
}

.foot-links a:hover {
  color: var(--cream);
}

.foot .copyright {
  align-self: end;
  font-variant-numeric: lining-nums;
}

@media (max-width: 760px) {
  .foot {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .stamp {
    width: 104px;
    height: 104px;
  }
}

/* Motion preferences ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html,
  html.smooth-scroll {
    scroll-behavior: auto;
  }

  .btn,
  a,
  .site-nav a::after,
  .site-header,
  .menu-icon,
  .menu-icon::before {
    transition: none;
  }

  .menu-open .site-nav {
    animation: none;
  }
}

/* Print: just the useful information --------------------------------- */

@media print {
  html {
    background: #fff;
  }

  body {
    color: #222;
  }

  body::before,
  body::after,
  .site-header,
  .hero-media,
  .notify,
  .stamp,
  .jar-world {
    display: none !important;
  }

  h1,
  h2,
  h3,
  .ingredients .name,
  .prices .item,
  .prices .price {
    color: #111;
  }
}

/* Small pages: privacy, terms, not found ---------------------------- */

.doc {
  padding-block: var(--section-space);
}

.doc-body > * {
  max-width: 68ch;
}

.doc h1 {
  font-size: var(--text-2xl);
}

.doc .lede {
  margin-top: var(--space-s);
  color: var(--muted);
}

.doc h2 {
  margin-top: var(--space-xl);
  font-size: var(--text-lg);
}

.doc p,
.doc ul {
  margin-top: var(--space-xs);
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

.doc .todo {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgb(215 162 78 / 18%);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.85em;
}
