/* The Ledger frame: what every page of the site shares (the product switch in
   the menu, the "Also from Ledger" card, the "Talk to us" section), followed
   by the sections of the Ledger home page. Product pages keep their own look;
   only these pieces are common. */
:root {
  --display: system-ui, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --pickup: #3c7d58;
  --pickup-ink: #1f2a24;
  --pickup-line: #dde4de;
}

/* Product switch, beside the Ledger name. */
.products {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #ebeee6;
}
.products a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px 0 11px;
  border-radius: 999px;
  color: #3a4a40;
  font: 600 0.9rem/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
}
.products a:hover {
  color: var(--ink);
}
.products a[aria-current='page'] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 44, 32, 0.18);
  color: var(--ink);
}
.product-mark {
  flex: none;
  width: 20px;
  height: 20px;
}
.nav nav a {
  white-space: nowrap;
}
@media (max-width: 1040px) and (min-width: 741px) {
  .nav {
    gap: 14px;
  }
  .nav nav {
    gap: 2px;
  }
  .nav nav a {
    padding-inline: 7px;
  }
  .products a {
    padding: 0 11px 0 8px;
    font-size: 0.85rem;
  }
  .nav-cta {
    display: none;
  }
}
@media (max-width: 740px) {
  /* Two rows on a phone. The Ledger name and the switch scroll away; the
     page's own links stay at the top. */
  html {
    scroll-padding-top: 48px;
  }
  .mast {
    top: -52px;
  }
  .nav {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .nav .ledger {
    min-height: 52px;
  }
  .products {
    margin-left: auto;
  }
  .products a {
    min-height: 34px;
    padding: 0 12px 0 9px;
    font-size: 0.82rem;
  }
  .nav > nav {
    flex: 1 0 100%;
    justify-content: space-around;
    margin-left: 0;
    border-top: 1px solid #e2e7dc;
  }
}

/* "Also from Ledger": the other product, drawn in its own look. */
main > .also,
main > .talk {
  min-height: 0;
}
.also {
  padding-block: clamp(44px, 5.5vw, 76px);
  border-top: 1px solid var(--line);
  background: #f4f1e8;
}
.also .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.also .eyebrow::before {
  content: '';
  width: 27px;
  height: 2px;
  background: #a5875d;
}
.also-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3.6vw, 48px);
  border-radius: 28px;
}
.also-pickup {
  border: 1px solid var(--pickup-line);
  background: #fff;
  color: var(--pickup-ink);
  font-family: var(--display);
}
.also-pickup h2 {
  margin: 0;
  color: #1f2a24;
  font:
    700 clamp(38px, 4.4vw, 58px) / 0.98 'Plus Jakarta Sans',
    var(--display);
  letter-spacing: -0.02em;
}
.also-copy > p {
  max-width: 46ch;
  margin: 16px 0 0;
  color: #3a4740;
  line-height: 1.5;
}
.also-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 20px;
  color: #545454;
  font-size: 0.9rem;
}
.also-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--pickup);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.also-cta:hover {
  background: #2f6a48;
}
.also-sample {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--pickup-line);
  border-radius: 22px;
  background: #f5f7f4;
  font-size: 0.9rem;
}
.also-chip {
  justify-self: start;
  padding: 5px 12px;
  border: 1px solid var(--pickup-line);
  border-radius: 999px;
  background: #fff;
  color: #545454;
  font-size: 0.78rem;
}
.also-booking {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--pickup-line);
  border-radius: 16px;
  background: #fff;
}
.also-booking small {
  color: #545454;
}
.also-booking b {
  font-size: 1rem;
}
.also-booking div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.also-booking div span {
  display: grid;
  place-items: center;
  height: 40px;
  border: 1px solid var(--pickup-line);
  border-radius: 999px;
  font-weight: 600;
}
.also-booking div span:first-child {
  border-color: var(--pickup);
  background: var(--pickup);
  color: #fff;
}

/* "Talk to us": one section on every page. A visitor says what they need and
   is sent to the right place: PickedUp's demo form, the Restock sign-up form,
   or a WhatsApp chat. */
.talk {
  padding-block: clamp(44px, 5.5vw, 84px);
}
.talk-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 64px);
  padding: clamp(26px, 4vw, 52px);
  border-radius: 32px;
  background: #e2eee7;
  color: #16241c;
}
.talk h2 {
  margin: 12px 0 0;
  font: 700 clamp(34px, 4vw, 52px) / 1.02 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.talk h2 em {
  color: #225d40;
  font: italic 400 1em var(--serif);
  letter-spacing: -0.03em;
}
.talk-line {
  max-width: 40ch;
  margin: 14px 0 0;
  color: #33483c;
  line-height: 1.5;
}
.talk-direct {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.talk .start-scan {
  margin-top: 16px;
}
.talk-choices {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.talk-choices a {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  border: 1.5px solid #c3d3c8;
  border-radius: 20px;
  background: #fff;
  color: #16241c;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    translate 0.2s ease;
}
.talk-choices a.is-here {
  border-color: #225d40;
  box-shadow: 0 0 0 3px #cfe1d5;
}
.talk-choices b {
  font: 700 1.2rem/1.2 var(--display);
  letter-spacing: -0.02em;
}
.talk-choices a > span {
  color: #2f6a48;
  font-size: 0.93rem;
  font-weight: 600;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .talk-choices a:hover {
    border-color: var(--pickup);
    translate: 0 -2px;
  }
}
@media (max-width: 820px) {
  .also-card,
  .talk-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The footer names both products, so it has one more column of links. */
.footer-grid {
  grid-template-columns:
    minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.9fr)
    minmax(0, 1.1fr);
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Ledger home page ---- */
.home {
  background: #f5f7f4;
}
.home .mast {
  border-bottom-color: var(--pickup-line);
  background: #fff;
}
.home main > section {
  min-height: 0;
}
.home .eyebrow {
  color: #2f6a48;
}

/* First screen: one line about Ledger, then both products side by side, each
   in the look of its own site. */
.lead {
  padding-top: clamp(32px, 4.4vw, 56px);
}
.lead-head {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.lead h1 {
  margin: 0;
  font: 700 clamp(34px, 5vw, 62px) / 1 var(--display);
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.lead h1 em,
.day h2 em,
.habits h2 em,
.home .supporters h2 em,
.home .about h2 em {
  color: var(--pickup);
  font: italic 400 1em var(--serif);
  letter-spacing: -0.03em;
}
.lead-head p {
  max-width: 52ch;
  margin: 0;
  color: #3a4740;
  font-size: 1.08rem;
  line-height: 1.5;
}
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(24px, 3vw, 36px);
}
.door {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(22px, 2.8vw, 36px);
  border-radius: 32px;
}
.door-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.door-tag {
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 0.8rem/1.2 var(--display);
}
.door > p {
  margin: 0;
  line-height: 1.5;
}
.door-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-top: auto;
  font-size: 0.92rem;
}
.door-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.door-pickup {
  border: 1px solid var(--pickup-line);
  background: #fff;
  color: var(--pickup-ink);
  font-family: var(--display);
}
/* PickedUp's own headline: its brand typeface, then its logo as the second line,
   set the way the PickedUp site sets it. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./assets/fonts/plus-jakarta-sans-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
.door-pickup h2 {
  margin: 0;
  color: #1f2a24;
  font:
    700 clamp(40px, 5vw, 66px) / 0.98 'Plus Jakarta Sans',
    var(--display);
  letter-spacing: -0.02em;
}
.door-logo {
  display: block;
  width: 5.52em;
  max-width: 100%;
  height: auto;
  margin-top: 0.1em;
}
.door-pickup .door-tag {
  background: #e2eee7;
  color: #1b3d2d;
}
.door-pickup > p {
  color: #3a4740;
}
.door-pickup .door-foot {
  color: #545454;
}
.door-pickup .door-cta {
  background: var(--pickup);
  color: #fff;
}
.door-pickup .door-cta:hover {
  background: #2f6a48;
}
.door-restock {
  background: #173d2b;
  color: #fff;
}
.door-restock h2 {
  margin: 0;
  font: 400 clamp(36px, 4.2vw, 56px) / 1.14 var(--serif);
  letter-spacing: -0.02em;
}
.door-restock h2 em {
  color: #efd9a8;
}
.door-restock .door-tag {
  background: #efd9a8;
  color: #33301f;
}
.door-restock > p,
.door-restock .door-foot {
  color: #d9e5dc;
}
.door-restock .door-cta {
  background: #f6efdd;
  color: #142c20;
}
.door-restock .door-cta:hover {
  background: #fff;
}

/* A sample call, as PickedUp hears it. */
.call {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--pickup-line);
  border-radius: 22px;
  background: #f5f7f4;
  font-size: 0.9rem;
  line-height: 1.35;
}
.call-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.call-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #234d3a;
}
.call-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.call-who {
  display: grid;
  flex: 1;
  line-height: 1.25;
}
.call-who small {
  color: #545454;
}
.call-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--pickup-line);
  border-radius: 999px;
  background: #fff;
  color: #545454;
  font-size: 0.75rem;
}
.call-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pickup);
}
.call-guest,
.call-pickup {
  max-width: 82%;
  padding: 9px 13px;
}
.call-guest {
  justify-self: start;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
}
.call-pickup {
  justify-self: end;
  border-radius: 14px 4px 14px 14px;
  background: #234d3a;
  color: #fff;
  font-weight: 600;
}
.call-note {
  justify-self: start;
  padding: 4px 11px;
  border: 1px solid var(--pickup-line);
  border-radius: 999px;
  background: #fff;
  color: #545454;
  font-size: 0.78rem;
}

/* A WhatsApp chat, as both products write to the owner. */
.chat {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border-radius: 22px;
  background: #efeae2;
  color: #142c20;
  font: 0.82rem/1.35 var(--sans);
}
.chat-in,
.chat-out {
  display: grid;
  gap: 3px;
  max-width: 88%;
  padding: 8px 11px;
}
.chat-in {
  justify-self: start;
  border-radius: 4px 12px 12px 12px;
  background: #fff;
}
.chat-out {
  justify-self: end;
  border-radius: 12px 4px 12px 12px;
  background: #d9fdd3;
}
.chat small {
  color: #3c6a52;
  font-size: 0.7rem;
}
.chat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.chat-act {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #225d40;
  font: 700 0.82rem/1 var(--sans);
}
.chat .chat-act.is-pickup {
  color: var(--pickup);
}

/* Supporters and About moved here from the Restock page; the home page gives
   their headings its own lettering. */
.home .supporters {
  border: 0;
  background: none;
}
.home .supporters h2,
.home .about h2 {
  font: 700 clamp(30px, 3.6vw, 48px) / 1.04 var(--display);
  letter-spacing: -0.045em;
}
.home .supporters h2 {
  font-size: clamp(28px, 3vw, 40px);
}
.home .supporters h2 em {
  display: block;
  padding: 0;
  background: none;
}
.home .supporters li {
  background: #fff;
}

/* One day, two helpers: four moments that take turns. */
.day-inner {
  padding: clamp(28px, 4.4vw, 56px);
  border-radius: 36px;
  background: #0e1411;
  color: #fff;
}
.day h2,
.habits h2 {
  margin: 0;
  font: 700 clamp(32px, 4.2vw, 54px) / 1.02 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.day h2 em {
  color: #7be0a4;
}
.day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 32px;
}
.day-head p {
  margin: 10px 0 0;
  color: #d5e2d9;
  font-size: 1.05rem;
}
.day-head .pen {
  margin: 0;
  color: #efd9a8;
  font-size: 1.7rem;
  line-height: 1;
  rotate: -2deg;
}
.day-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.day-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.35s ease;
}
.day-when {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.day-when b {
  font: 800 1.6rem/1 var(--display);
  letter-spacing: -0.04em;
}
.day-tag {
  padding: 4px 11px;
  border-radius: 999px;
  font: 700 0.75rem/1.2 var(--display);
}
.tag-restock {
  background: #efd9a8;
  color: #183e2c;
}
.tag-pickup {
  background: #7be0a4;
  color: #0e1411;
}
.day-step .chat {
  flex: 1;
  min-height: 214px;
}
.day-step > p {
  margin: 0;
  color: #d5e2d9;
  font-size: 0.93rem;
  line-height: 1.45;
}
/* With the script running, the moment being shown is lit and its button asks
   to be tapped. Without it, all four simply stay visible. */
.day-steps.is-playing .day-step:not(.is-now) {
  opacity: 0.5;
}
.day-step.is-now [data-day-next] {
  outline: 3px solid #7be0a4;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .day-step.is-now .chat > * {
    animation: day-pop 0.45s ease both;
  }
  .day-step.is-now .chat > :nth-child(2) {
    animation-delay: 0.35s;
  }
  .day-step.is-now .chat > :nth-child(3) {
    animation-delay: 0.6s;
  }
  .day-step.is-now [data-day-next] {
    animation:
      day-pop 0.45s 0.35s ease both,
      day-tap 1.3s 0.9s ease-in-out infinite;
  }
  /* A small rise only, never a fade: the message stays readable even where
     the browser holds animations back. */
  @keyframes day-pop {
    from {
      translate: 0 10px;
    }
  }
  @keyframes day-tap {
    50% {
      outline-offset: 6px;
    }
  }
}

/* How we build: four habits both products share. */
.habits,
.day {
  padding-top: clamp(52px, 6.4vw, 92px);
}
.habits .eyebrow {
  margin-bottom: 12px;
}
.habit-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.habit-list li {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 216px;
  padding: 26px;
  border: 1px solid var(--pickup-line);
  border-radius: 26px;
  background: #fff;
}
.habit-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: #e2eee7;
}
.habit-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #234d3a;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.habit-list h3 {
  margin: 0;
  font: 700 1.2rem/1.2 var(--display);
  letter-spacing: -0.02em;
}
.habit-list p {
  margin: 0;
  color: #55635b;
  font-size: 0.93rem;
  line-height: 1.5;
}
.home .about {
  margin-top: clamp(52px, 6.4vw, 92px);
}
@media (max-width: 980px) {
  .day-steps,
  .habit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .doors {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .day-steps,
  .habit-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .day-step .chat,
  .habit-list li {
    min-height: 0;
  }
  /* The moments do not take turns on a phone, so nothing is lit to tap. */
  .day-head .pen {
    display: none;
  }
  .door,
  .day-inner {
    border-radius: 24px;
  }
}

/* The home page's first screen keeps its soft glow inside its own box. */
.lead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Both product cards are built the same way: a tag, a two-line headline that
   ends in the product's logo, a sample that plays, then the price and a
   button. */
.door .call,
.door .chat {
  flex: 1;
  align-content: start;
  min-height: 286px;
}
.chat .call-head {
  font-family: var(--display);
  font-size: 0.9rem;
}
.chat .call-icon {
  background: #225d40;
}

/* A sample that plays: once it is on screen its lines arrive one at a time,
   rest, and start again. Lines keep their place while hidden, so the card
   never changes size. Without the script every line simply shows. */
.is-live [data-line]:not(.is-said) {
  visibility: hidden;
}

/* More motion for the first screens. All of it only moves or tints things
   that are already readable, and none of it runs when a visitor asks for
   less motion. */
.lead h1 em {
  padding-bottom: 0.06em;
  background: url('./assets/scribble.svg') no-repeat 0 100% / 100% 0.14em;
}
.door {
  transition:
    box-shadow 0.3s ease,
    translate 0.3s ease;
}
@media (prefers-reduced-motion: no-preference) {
  /* A soft light moves behind the headline. */
  .lead::before {
    content: '';
    position: absolute;
    z-index: -2;
    inset: -160px -10% auto;
    height: 640px;
    background:
      radial-gradient(
        closest-side at 28% 46%,
        rgba(123, 224, 164, 0.3),
        transparent 72%
      ),
      radial-gradient(
        closest-side at 74% 36%,
        rgba(239, 217, 168, 0.42),
        transparent 72%
      );
    animation: glow 14s ease-in-out infinite alternate;
  }
  @keyframes glow {
    from {
      translate: -4% -3%;
    }
    to {
      scale: 1.12;
      translate: 5% 6%;
    }
  }
  /* The underline is drawn under "WhatsApp". */
  .lead h1 em {
    animation: underline 0.9s 0.5s ease-out backwards;
  }
  @keyframes underline {
    from {
      background-size: 0 0.14em;
    }
  }
  /* The two cards arrive one after the other. */
  .door {
    animation: door-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  }
  .door-restock {
    animation-delay: 0.14s;
  }
  @keyframes door-in {
    from {
      translate: 0 30px;
    }
  }
  /* Each new line of a sample pops into place. */
  .is-live [data-line].is-said {
    animation: line-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
  }
  @keyframes line-in {
    from {
      scale: 0.94;
      translate: 0 12px;
    }
  }
  /* The call rings, and the "sample" dot blinks while it plays. */
  .door .call-icon {
    animation: ring-out 1.9s ease-out infinite;
  }
  @keyframes ring-out {
    from {
      box-shadow: 0 0 0 0 rgba(35, 77, 58, 0.5);
    }
    to {
      box-shadow: 0 0 0 16px rgba(35, 77, 58, 0);
    }
  }
  .is-live .call-live i {
    animation: blink 1.2s ease-in-out infinite;
  }
  @keyframes blink {
    50% {
      scale: 0.5;
    }
  }
  /* The button a visitor would tap asks for it. */
  .is-live .chat-act.is-said {
    animation:
      line-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.25) both,
      tap 1.3s 0.6s ease-in-out infinite;
    outline: 2px solid #225d40;
    outline-offset: 2px;
  }
  @keyframes tap {
    50% {
      outline-offset: 6px;
    }
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .door:hover {
    box-shadow: 0 26px 50px -24px rgba(20, 44, 32, 0.45);
    translate: 0 -6px;
  }
}

/* About Ledger: one restaurant drawn as a line from its back door to its
   front door, with the product that looks after each half underneath. */
.story {
  padding-top: clamp(52px, 6.4vw, 92px);
}
.story-inner {
  padding: clamp(26px, 4.4vw, 56px);
  border: 1px solid var(--pickup-line);
  border-radius: 36px;
  background: #fff;
}
.story-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}
.story h2 {
  margin: 12px 0 0;
  font: 700 clamp(32px, 4.2vw, 54px) / 1.02 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.story h2 em {
  display: block;
  color: var(--pickup);
  font: italic 400 1em var(--serif);
  letter-spacing: -0.03em;
}
.story-head > p {
  max-width: 34ch;
  margin: 0;
  color: #3a4740;
  line-height: 1.5;
}
.story-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 16px;
  margin: clamp(32px, 4vw, 52px) 0 0;
  padding: 0;
  list-style: none;
}
/* The path through the restaurant, behind the four icons. */
.story-map::before {
  content: '';
  position: absolute;
  top: 31px;
  right: 12.5%;
  left: 12.5%;
  border-top: 2px dashed #c3d3c8;
}
.story-stop {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.story-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border: 2px solid #c3d3c8;
  border-radius: 50%;
  background: #fff;
}
.story-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #234d3a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.story-stop small {
  color: #2f6a48;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.story-stop h3 {
  margin: 0;
  font: 700 1.2rem/1.2 var(--display);
  letter-spacing: -0.02em;
}
.story-stop p {
  max-width: 24ch;
  margin: 0;
  color: #55635b;
  font-size: 0.93rem;
  line-height: 1.45;
}
/* On a wide screen the four stops share one row and each product's bar sits
   under its own two stops. */
.story-cover {
  grid-column: span 2;
  order: 1;
}
.story-cover a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 22px;
  border-radius: 20px;
  line-height: 1.4;
  text-decoration: none;
  transition:
    box-shadow 0.25s ease,
    translate 0.25s ease;
}
.story-cover .product-mark {
  width: 30px;
  height: 30px;
}
.story-cover a > span:not(.story-go) {
  display: grid;
  flex: 1;
  font-size: 0.93rem;
}
.story-cover b {
  font: 700 1.1rem/1.25 var(--display);
  letter-spacing: -0.02em;
}
.story-go {
  font-size: 1.2rem;
}
.cover-restock a {
  background: #173d2b;
  color: #d9e5dc;
}
.cover-restock b,
.cover-restock .story-go {
  color: #fff;
}
.cover-pickedup a {
  background: #e2eee7;
  color: #33483c;
}
.cover-pickedup b,
.cover-pickedup .story-go {
  color: #16241c;
}
.story-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(24px, 3vw, 36px) 0 0;
  color: #3a4740;
}
.story-next b {
  padding: 3px 11px;
  border-radius: 999px;
  background: #efd9a8;
  color: #33301f;
  font: 700 0.72rem/1.4 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  /* A dot walks the path from the back door to the front door, and each
     stop lights up as it passes. */
  .story-map::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 12.5%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background: var(--pickup);
    box-shadow: 0 0 0 5px rgba(60, 125, 88, 0.2);
    animation: story-walk 8s linear infinite;
  }
  @keyframes story-walk {
    to {
      left: 87.5%;
    }
  }
  .story-icon {
    animation: story-stop 8s linear infinite;
  }
  .story-stop:nth-child(2) .story-icon {
    animation-delay: 2.667s;
  }
  .story-stop:nth-child(4) .story-icon {
    animation-delay: 5.333s;
  }
  .story-stop:nth-child(5) .story-icon {
    animation-delay: 7.2s;
  }
  @keyframes story-stop {
    0%,
    10% {
      border-color: var(--pickup);
      background: #e2eee7;
      scale: 1.08;
    }
    22%,
    100% {
      border-color: #c3d3c8;
      background: #fff;
      scale: 1;
    }
  }
  /* The stops and the two bars rise into place when the section is reached. */
  [data-reveal].is-in .story-stop,
  [data-reveal].is-in .story-cover {
    animation: door-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  }
  [data-reveal].is-in .story-stop:nth-child(2) {
    animation-delay: 0.1s;
  }
  [data-reveal].is-in .story-stop:nth-child(4) {
    animation-delay: 0.2s;
  }
  [data-reveal].is-in .story-stop:nth-child(5) {
    animation-delay: 0.3s;
  }
  [data-reveal].is-in .story-cover {
    animation-delay: 0.45s;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .story-cover a:hover {
    box-shadow: 0 16px 30px -18px rgba(20, 44, 32, 0.5);
    translate: 0 -3px;
  }
}
@media (max-width: 820px) {
  /* Stacked: two stops, then the product that covers them. */
  .story-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-map::before,
  .story-map::after {
    display: none;
  }
  .story-cover {
    order: 0;
  }
  .story-inner {
    border-radius: 24px;
  }
}
@media (max-width: 420px) {
  .story-icon {
    width: 54px;
    height: 54px;
  }
  .story-stop h3 {
    font-size: 1.05rem;
  }
}

/* The Restock logo as the last word of "The fastest way to Restock". */
.door-mark {
  width: auto;
  height: 0.92em;
  vertical-align: -0.16em;
}
