/* batchfromscratch.app. Colours, type and radii are the app's design tokens
   (packages/ui/src/tokens.ts, from the Figma file's "Brand colours" and text styles). */

:root {
  --oat-milk: #f3f6f1;
  --plate: #ffffff;
  --pine: #1f3a34;
  --muted: #465651;
  --line: #dce4dd;
  --sage: #4a7868;
  --sage-mist: #dce9e1;
  --dew-chilled: #bfe3dd;
  --frost-frozen: #c9d2f0;
  --oat-cupboard: #eadfc8;
  --apricot: #f2b48a;
  --rhubarb: #d9808a;

  --abril: 'Abril Fatface', Georgia, 'Times New Roman', serif;
  --nunito: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-card: 18px;
  --radius-pill: 99px;
  --gutter: 20px;
  --measure: 62ch;
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--oat-milk);
  color: var(--pine);
  font: 17px/1.5 var(--nunito);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sage);
  font-weight: 700;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--pine);
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--abril);
  font-weight: 400;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
}

h3 {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.3;
}

p {
  margin: 0;
}

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

/* Header and footer */

.site-header {
  padding-block: 18px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--abril);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--pine);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--sage);
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--pine);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--sage);
  text-decoration: underline;
}

.site-footer {
  margin-top: 72px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--muted);
}

/* Home */

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

.hero {
  padding-block: 28px 8px;
  overflow: hidden;
}

.hero-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  max-width: 820px;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: var(--measure);
}

.get-app {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  min-width: 156px;
  padding: 8px 24px;
  border-radius: 28px;
  background: var(--plate);
  color: var(--pine);
  border: 1.5px solid var(--line);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
}

.store-button small {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.store-button.beta {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--plate);
}

.store-button.beta small {
  color: var(--sage-mist);
}

.store-button.beta:hover {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--plate);
}

.beta-tag {
  position: absolute;
  right: 14px;
  top: -9px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--apricot);
  color: var(--pine);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* The dish carousel: scroll-snapping, given depth by js/carousel.js. */

.carousel {
  --card: min(300px, 62vw);
  margin-top: 28px;
}

.track {
  position: relative;
  display: flex;
  margin: 0;
  padding: 28px calc(50% - var(--card) * 0.41) 20px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}

.track::-webkit-scrollbar {
  display: none;
}

.track:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: -2px;
}

.track li {
  flex: 0 0 var(--card);
  margin-inline: calc(var(--card) * -0.09);
  scroll-snap-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  transform-origin: center center;
  will-change: transform;
}

.track img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 40px -18px rgb(31 58 52 / 0.45);
  background: var(--sage-mist);
}

.track span {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  max-width: 26ch;
  opacity: 0;
  transition: opacity 0.2s;
}

.track li[data-centre] span,
.carousel:not(.ready) .track span {
  opacity: 1;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.carousel-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--plate);
  color: var(--pine);
  font: 800 1.5rem/1 var(--nunito);
  cursor: pointer;
}

.carousel-controls button:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.carousel:not(.ready) .carousel-controls button {
  visibility: hidden;
}

.values {
  padding-block: 56px 40px;
}

.values .wrap {
  display: grid;
  gap: 24px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 32px;
}

.value-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 14px;
  border-top: 3px solid var(--sage);
}

.value-grid p {
  color: var(--muted);
}

.intents {
  padding-block: 16px 24px;
}

.intents .wrap {
  display: grid;
  gap: 24px;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.intent {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--plate);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.intent img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.intent div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 20px 22px;
}

.intent p {
  color: var(--muted);
}

.chip {
  justify-self: start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip.eat {
  background: var(--dew-chilled);
}

.chip.cook {
  background: var(--apricot);
}

.chip.shop {
  background: var(--frost-frozen);
}

.band {
  margin-top: 48px;
  padding-block: 56px;
  background: var(--sage-mist);
}

.band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px 56px;
  align-items: center;
}

.band-copy {
  display: grid;
  gap: 16px;
}

.band-copy h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
}

.table-card {
  background: var(--plate);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 40px -24px rgb(31 58 52 / 0.4);
}

.people {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.people li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--oat-milk);
}

.who {
  font-weight: 800;
}

.size {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--sage-mist);
  font-size: 0.85rem;
  font-weight: 700;
}

.sum {
  color: var(--muted);
}

.sum strong {
  color: var(--pine);
}

.checks {
  padding-block: 56px 8px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.check-grid .card {
  align-content: start;
  gap: 12px;
  padding: 24px 26px;
}

.check-grid h2 {
  font-size: 1.6rem;
}

.check-grid ul:not(.diet-chips) {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}

.diet-chips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diet-chips li {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--oat-milk);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
}

.closing {
  padding-block: 64px 0;
}

.closing .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

/* Text pages: privacy, support, deletion */

.page {
  padding-block: 32px 0;
}

.page .wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  display: grid;
  gap: 28px;
}

.page header {
  display: grid;
  gap: 12px;
}

.page section {
  display: grid;
  gap: 10px;
}

.page h2 {
  font-size: 1.45rem;
}

.page ol,
.page ul {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}

.card {
  background: var(--plate);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  display: grid;
  gap: 10px;
}

.address {
  font-weight: 700;
  font-size: 1.1rem;
  user-select: all;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .value-grid,
  .intent-grid,
  .band .wrap,
  .check-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-block: 12px 0;
  }

  .hero-copy {
    gap: 14px;
  }

  .lede {
    font-size: 1.05rem;
  }

  .store-button {
    min-width: 0;
    flex: 1 1 140px;
  }

  .carousel {
    margin-top: 12px;
  }

  .site-header {
    padding-block: 14px;
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .site-nav {
    gap: 14px;
  }
}
