/* Enough: the website. It is the pack's cover and pages brought to a screen.
   One family (Archivo, weight and width), white paper, true black, and one
   wayfinding colour per week. The heavy-ruled label is used for facts only. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --soft: #4a4a4a;        /* secondary text; 8.9:1 on white */
  --bar: 10px;            /* the heavy rule that opens and closes a label */
  --rule: 2.5px;          /* the rule under a list heading */
  --hair: 1px;
  --gutter: 20px;
  --edge: 0px;            /* width of the four-colour band down the right edge */
  --wk: #000;
}
.wk1 { --wk: var(--wk1); }
.wk2 { --wk: var(--wk2); }
.wk3 { --wk: var(--wk3); }
.wk4 { --wk: var(--wk4); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: lining-nums;
  text-align: left;
}
h1, h2, h3, p, ul, ol, dl, dd, dt, table, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { text-wrap: pretty; }
.nw { white-space: nowrap; }

/* ------------------------------------------------------------ type */
h2 {
  font-weight: 800; font-stretch: 78%;
  font-size: clamp(34px, 8.6vw, 54px); line-height: 1.02;
  letter-spacing: -0.012em; word-spacing: 0.08em;
  text-wrap: balance;
  max-width: 16em;
}
h3 { font-weight: 800; font-stretch: 88%; font-size: 22px; line-height: 1.15; word-spacing: 0.04em; }
.lede { font-size: 18px; line-height: 1.45; margin-top: 12px; max-width: 34em; }
.fine { font-size: 15px; line-height: 1.45; color: var(--soft); max-width: 36em; }

/* ------------------------------------------------------------ actions */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 8px 24px;
  background: var(--ink); color: var(--paper);
  border: var(--rule) solid var(--ink); border-radius: 0;
  font: inherit; font-weight: 800; font-stretch: 86%; font-size: 19px; line-height: 1.15;
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.compact { min-height: 44px; padding: 6px 16px; font-size: 16px; }
.textlink {
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
  display: inline-flex; align-items: center; min-height: 44px;
}
.textlink:hover { text-decoration-thickness: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, h1:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.buttons { display: grid; gap: 12px; }
.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 5;
  background: var(--ink); color: var(--paper); padding: 12px 16px; font-weight: 800;
}
.skip:focus { top: 22px; }

/* ------------------------------------------------------------ the cover */
.cover { position: relative; }
.edge { display: flex; height: 14px; }
.edge i { flex: 1; display: block; }
.edge i:nth-child(1) { background: var(--wk1); }
.edge i:nth-child(2) { background: var(--wk2); }
.edge i:nth-child(3) { background: var(--wk3); }
.edge i:nth-child(4) { background: var(--wk4); }

.top { display: none; }
.top nav { display: flex; justify-content: flex-end; align-items: center; gap: 28px; }

.hero { padding: 26px var(--gutter) 64px; }
.wordmark {
  font-weight: 900; font-stretch: 66%;
  font-size: clamp(104px, 34vw, 168px); line-height: 0.8;
  letter-spacing: -0.035em; margin-left: -0.03em;
  padding-bottom: 0.17em;      /* room for the descender of the g */
}
.hero h1 {
  font-weight: 800; font-stretch: 84%;
  font-size: clamp(24px, 6.6vw, 34px); line-height: 1.1;
  word-spacing: 0.08em; text-wrap: balance;
  max-width: 14em; margin-top: 8px;
}

/* The label: the grammar of a food label. Heavy rules top and bottom, bold name
   left, value right, a hairline between rows. Protein first and largest. */
.label {
  margin-top: 32px;
  border-top: var(--bar) solid var(--ink);
  border-bottom: var(--bar) solid var(--ink);
}
.label .row {
  display: flex; justify-content: space-between; align-items: baseline; column-gap: 16px;
  border-bottom: var(--hair) solid var(--ink);
  padding: 8px 0 7px; font-size: 17px; line-height: 1.2;
}
.label .row:last-child { border-bottom: 0; }
.label dt { font-weight: 800; }
.label dd { font-weight: 800; font-stretch: 82%; text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.label .row.big { display: block; border-bottom: var(--rule) solid var(--ink); padding: 9px 0 10px; }
.label .row.big dt { font-size: 18px; line-height: 1.1; }
.label .row.big dd {
  text-align: left; font-weight: 900; font-stretch: 70%;
  font-size: clamp(58px, 17.5vw, 96px); line-height: 0.9;
  letter-spacing: -0.02em; word-spacing: 0.08em; margin-top: 5px;
}

.act { margin-top: 16px; }
.audience { font-size: 16px; line-height: 1.4; max-width: 30em; }
.act .buttons { margin-top: 18px; }
.act .fine { margin-top: 12px; }
.launch { font-weight: 800; font-size: 18px; line-height: 1.3; margin-top: 14px; max-width: 30em; }

/* ------------------------------------------------------------ sections */
.band { padding: 0 var(--gutter) 76px; }
.band > h2 + * { margin-top: 26px; }
.band > h2 + .lede { margin-top: 12px; }

/* ------------------------------------------------------------ the menu
   Each week reads like the pack's page for the fridge: the dinner's number in
   the week's colour, the name, then the numbers for one serving. */
.weeks { display: grid; gap: 34px; margin-top: 26px; }
.week .tab {
  display: flex; justify-content: space-between; align-items: baseline; column-gap: 12px;
  background: var(--wk); color: #fff;
  font-weight: 800; font-stretch: 100%; font-size: 16px; line-height: 1.15; word-spacing: 0;
  padding: 9px 12px 8px;
}
.week .tab .aside { font-weight: 600; font-size: 14px; }
.nights { counter-reset: night; }
.nights li {
  counter-increment: night;
  display: grid; grid-template-columns: 42px 1fr; align-items: start;
  border-bottom: var(--rule) solid var(--ink);
  padding: 13px 0 11px;
}
.nights li::before {
  content: counter(night);
  font-weight: 900; font-stretch: 72%; font-size: 44px; line-height: 0.84;
  color: var(--wk);
}
.nights .t { font-weight: 800; font-stretch: 84%; font-size: 20px; line-height: 1.14; letter-spacing: -0.006em; word-spacing: 0.06em; }
.nights .m { font-size: 16px; line-height: 1.3; margin-top: 3px; font-variant-numeric: lining-nums tabular-nums; }
.nights .m b { font-weight: 800; }
.menu .after { margin-top: 26px; max-width: 36em; }
.menu .after-link { margin-top: 4px; }

/* ------------------------------------------------------------ inside the pack */
.features { display: grid; gap: 52px; margin-top: 26px; }
.feature h3 { margin-top: 18px; }
.feature p { margin-top: 6px; max-width: 30em; }
.shot { display: block; border: var(--hair) solid var(--ink); background: var(--paper); }
.shot img { width: 100%; }
/* a page cut short fades out, so it reads as "this page goes on" */
.shot.fade {
  border-bottom: 0;
  -webkit-mask-image: linear-gradient(#000 76%, transparent 100%);
          mask-image: linear-gradient(#000 76%, transparent 100%);
}
.wide-only { display: none; }
.pair { grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* ------------------------------------------------------------ free week and full pack */
.compare { width: 100%; border-collapse: collapse; margin-top: 26px; table-layout: fixed; border-top: var(--bar) solid var(--ink); border-bottom: var(--bar) solid var(--ink); }
.compare caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 9px 0 8px 12px; border-bottom: var(--hair) solid var(--ink); font-size: 16px; line-height: 1.25; }
.compare tr > :first-child { padding-left: 0; width: 38%; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-weight: 800; font-stretch: 84%; font-size: 19px; line-height: 1.12; vertical-align: bottom; border-bottom: var(--rule) solid var(--ink); padding-top: 10px; padding-bottom: 9px; }
.compare thead td { border-bottom: var(--rule) solid var(--ink); }
.compare tbody th { font-weight: 800; }
.compare tbody td { font-weight: 700; font-stretch: 90%; font-variant-numeric: lining-nums tabular-nums; }
.compare td.no { font-weight: 400; color: var(--soft); }
.get .buttons { margin-top: 26px; }
.next { margin-top: 18px; display: grid; gap: 8px; max-width: 38em; font-size: 16px; line-height: 1.45; }
.placeholder { display: inline-block; white-space: nowrap; outline: 2px dashed var(--ink); outline-offset: -1px; font-weight: 700; padding: 0 6px; }
.signup { margin-top: 30px; max-width: 34em; }
.signup label { display: block; font-weight: 800; font-size: 16px; }
.signup .field { display: grid; gap: 12px; margin-top: 8px; }
.signup input { min-width: 0; }
.signup input {
  min-height: 54px; width: 100%; padding: 8px 14px;
  border: var(--rule) solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
  font: inherit; font-size: 18px;
}
.signup .fine { margin-top: 10px; }

/* ------------------------------------------------------------ method and questions */
.prose { display: grid; gap: 12px; max-width: 36em; }
.qa { border-top: var(--rule) solid var(--ink); max-width: 44em; }
.qa details { border-bottom: var(--rule) solid var(--ink); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; column-gap: 16px;
  min-height: 56px; padding: 12px 0 11px;
  font-weight: 800; font-stretch: 90%; font-size: 19px; line-height: 1.2;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-weight: 900; font-stretch: 72%; font-size: 30px; line-height: 0.8; flex: none; }
.qa details[open] summary::after { content: "\2013"; }
.qa details p { padding: 0 0 16px; max-width: 36em; }

.close h2 { max-width: 20em; }
.close .buttons { margin-top: 24px; }
.close .fine { margin-top: 12px; }

/* ------------------------------------------------------------ foot */
.foot { margin: 0 var(--gutter); padding: 16px 0 44px; border-top: var(--bar) solid var(--ink); display: grid; gap: 8px; font-size: 15px; line-height: 1.45; color: var(--soft); }
.foot p { max-width: 40em; }
.foot a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ------------------------------------------------------------ preview builds only */
.preview-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--ink); color: var(--paper);
  font-size: 14px; line-height: 1.3; font-weight: 700; text-align: left;
  padding: 10px var(--gutter);
}
.preview-banner:target { background: var(--wk2); }
body.preview { padding-bottom: 52px; }

/* ------------------------------------------------------------ wider than a phone */
@media (min-width: 560px) {
  .buttons { grid-auto-flow: column; justify-content: start; }
  .signup .field { grid-template-columns: 1fr auto; }
}

@media (min-width: 760px) {
  :root { --gutter: 40px; }
  body { font-size: 18px; }
  .weeks { grid-template-columns: 1fr 1fr; column-gap: 44px; row-gap: 44px; }
  .features { grid-template-columns: 1fr 1fr; column-gap: 44px; row-gap: 60px; }
  .shot.fade { border-bottom: var(--hair) solid var(--ink); -webkit-mask-image: none; mask-image: none; }
  .narrow-only { display: none; }
  .wide-only { display: grid; }
  .compare th, .compare td { font-size: 18px; padding-top: 11px; padding-bottom: 10px; padding-left: 24px; }
  .compare thead th { font-size: 24px; }
  .band { padding-bottom: 104px; }
  .nights .t { font-size: 21px; }
}

/* ------------------------------------------------------------ desktop: the cover, with its edge */
@media (min-width: 960px) {
  :root { --gutter: clamp(40px, 6.2vw, 96px); --edge: 56px; }
  .edge { position: absolute; top: 0; right: 0; bottom: 0; width: var(--edge); height: auto; flex-direction: column; }
  .top { display: block; padding: 22px calc(var(--edge) + 36px) 0 var(--gutter); }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    grid-template-areas: "brand label" "act label";
    column-gap: clamp(40px, 5vw, 80px);
    align-items: start;
    padding: 26px calc(var(--edge) + 36px) 96px var(--gutter);
  }
  .brand { grid-area: brand; }
  .label { grid-area: label; margin-top: 0.19em; align-self: start; }
  .act { grid-area: act; margin-top: 30px; }
  .wordmark { font-size: clamp(150px, 16.6vw, 240px); }
  .hero h1 { font-size: clamp(30px, 2.9vw, 40px); margin-top: 10px; }
  .label .row { font-size: 19px; padding: 10px 0 9px; }
  .label .row.big dt { font-size: 20px; }
  .label .row.big dd { font-size: clamp(64px, 7.2vw, 100px); }
  .audience { font-size: 17px; }
  .band { padding-right: calc(var(--gutter) + 20px); }
  .foot { margin-right: calc(var(--gutter) + 20px); }
  .features { column-gap: 64px; }
  .weeks { column-gap: 64px; }
  .feature .shot, .feature .pair { max-width: 520px; }
  .compare { max-width: 940px; }
  /* on very wide screens the page keeps the width of a generous spread; the edge band stays at the edge */
  .top, .hero, .band { max-width: 1420px; }
  .foot { max-width: 1208px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .textlink { transition: background-color 120ms linear, color 120ms linear; }
}
@media print {
  .preview-banner, .top, .skip { display: none; }
}
