/* The landing page (#55). The look is the app's (presentation/theme.dart):
   a cream base, brown ink, outlined "sticker" cards with a hard shadow, and
   Nunito. As in the app, colour only ever means a verdict: the verdict
   colours come from assets/verdicts.css, generated from RatingStyle, and
   nothing else on the page is green, amber or red. */

@font-face {
  font-family: Nunito;
  src: url(/assets/fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --base: #fff7ea;
  --surface: #fffdf8;
  --ink: #4a3b32;
  --ink-soft: #7d6a5e;
  --shadow: rgb(74 59 50 / 0.18);
  --rule: rgb(74 59 50 / 0.22);

  --t-small: 0.9375rem;
  --t-body: 1.125rem;
  --t-lead: 1.3125rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2.25rem, 4.6vw, 3.5rem);

  --wrap: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font: 500 var(--t-body) / 1.55 Nunito, ui-rounded, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

h2 {
  font-size: var(--t-h2);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: var(--t-h3);
  font-weight: 900;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 0.4rem;
}

::selection {
  background: var(--ink);
  color: var(--surface);
}

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--surface);
  border-radius: 99px;
  font-weight: 800;
}

.skip:focus {
  top: 1rem;
}

/* The intro to a section: its heading, then a paragraph beside it. */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.lead p {
  font-size: var(--t-lead);
  line-height: 1.45;
  max-width: 34rem;
}

/* The chicken (assets/chicken.js draws it). */
[data-chicken] {
  position: relative;
  aspect-ratio: 1;
}

[data-chicken] svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: inherit;
}

[data-chicken] img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24%;
}

/* The verdict's speech bubble, as on the app's home screen. Sized in em, so
   the phone in the scene shows the same one smaller. */
.bubble {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 1.5em;
  box-shadow: 0 4px 0 var(--shadow);
  padding: 1.25em 1.4em 1.35em;
  text-align: center;
}

.bubble::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1em;
  height: 1em;
  background: inherit;
  border: solid var(--ink);
  border-width: 2px 0 0 2px;
  border-top-left-radius: 0.2em;
  transform: translate(-50%, -58%) rotate(45deg);
}

.bubble__title {
  font-size: 1.22em;
  font-weight: 800;
  line-height: 1.25;
}

.bubble__message {
  margin-top: 0.5em;
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1.35;
}

.bubble__description {
  margin-top: 0.5em;
  color: var(--ink-soft);
  font-size: 0.95em;
  line-height: 1.4;
}

.bubble__lines {
  display: grid;
  gap: 0.5em;
  margin-top: 0.85em;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 0.92em;
  line-height: 1.3;
}

.bubble__lines li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.bubble__lines span:last-child {
  font-weight: 800;
  white-space: nowrap;
}

[data-rating="vegan"] > .bubble__message,
.bubble__lines [data-rating="vegan"] {
  color: var(--vegan-ink);
}

[data-rating="uncertain"] > .bubble__message,
.bubble__lines [data-rating="uncertain"] {
  color: var(--uncertain-ink);
}

[data-rating="notVegan"] > .bubble__message,
.bubble__lines [data-rating="notVegan"] {
  color: var(--notVegan-ink);
}

[data-rating="notInDatabase"] > .bubble__message,
.bubble__lines [data-rating="notInDatabase"] {
  color: var(--notInDatabase-ink);
}

/* Header */

.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  padding-top: 1.25rem;
}

.bar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--ink);
  border-radius: 28%;
}

.bar__language {
  padding: 0.35rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--surface);
  font-size: var(--t-small);
  font-weight: 800;
  text-decoration: none;
}

.bar__language:hover {
  background: var(--ink);
  color: var(--surface);
}

/* Hero: the page takes the verdict's colour, as the app's screen does. */

.hero {
  position: relative;
  padding: 7.5rem 0 4.5rem;
  background: var(--base);
  border-bottom: 2px solid var(--ink);
  border-radius: 0 0 clamp(1.75rem, 5vw, 3.5rem) clamp(1.75rem, 5vw, 3.5rem);
  box-shadow: 0 6px 0 var(--shadow);
  transition: background-color 0.45s ease;
}

.hero[data-rating="vegan"] {
  background: var(--vegan-bg);
}

.hero[data-rating="uncertain"] {
  background: var(--uncertain-bg);
}

.hero[data-rating="notVegan"] {
  background: var(--notVegan-bg);
}

.hero[data-rating="notInDatabase"] {
  background: var(--notInDatabase-bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

h1 {
  font-size: clamp(3.25rem, 17vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__sub {
  margin-top: 1.5rem;
  max-width: 17em;
  font-size: clamp(1.5rem, 2.9vw, 2.125rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__lede {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: var(--t-lead);
  line-height: 1.45;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.store {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 99px;
  box-shadow: 0 4px 0 var(--shadow);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.store:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--shadow);
}

.store:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--shadow);
}

/* Dashed: not there yet. */
.stores__soon {
  padding: 0.6rem 1.15rem;
  border: 2px dashed var(--ink);
  border-radius: 99px;
  font-size: var(--t-small);
  font-weight: 800;
}

.demo {
  width: 100%;
  max-width: 27rem;
  margin-inline: auto;
}

.demo__chicken {
  z-index: 1;
  width: min(14.5rem, 62%);
  margin: 0 auto -1.05rem;
}

.demo__chicken::before {
  content: "";
  position: absolute;
  inset: 6% 6% 2%;
  z-index: -1;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.5);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 4.5rem;
  padding: 0 0.75rem 0 1.5rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 1.75rem;
  box-shadow: 0 4px 0 var(--shadow);
}

.field:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 800 1.5rem/1 Nunito, ui-rounded, system-ui, sans-serif;
}

.field input::placeholder {
  color: var(--ink-soft);
  font-weight: 600;
  opacity: 1;
}

.field__clear {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.field__clear[hidden] {
  display: none;
}

.field__clear:hover {
  background: rgb(74 59 50 / 0.08);
}

.field__clear svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.demo__answer {
  min-height: 11.5rem;
  margin-top: 1.6rem;
  font-size: 1.0625rem;
}

.demo__answer .bubble {
  animation: pop 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

.demo__hint {
  padding: 0.25rem 1rem 0;
  text-align: center;
  line-height: 1.45;
}

.demo__try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: var(--t-small);
  font-weight: 700;
}

.chip {
  padding: 0.35rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  font: 800 1rem/1.3 Nunito, ui-rounded, system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 var(--shadow);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--surface);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-0.4rem) scale(0.96);
  }
}

/* The four verdicts: one strip, a segment each. */

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

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  list-style: none;
  border: 2px solid var(--ink);
  border-radius: 2rem;
  box-shadow: 0 5px 0 var(--shadow);
  overflow: hidden;
}

.swatch {
  padding: 1.5rem 1.5rem 1.9rem;
  border-left: 2px solid var(--ink);
}

.swatch:first-child {
  border-left: 0;
}

.swatch[data-rating="vegan"] {
  background: var(--vegan-bg);
}

.swatch[data-rating="uncertain"] {
  background: var(--uncertain-bg);
}

.swatch[data-rating="notVegan"] {
  background: var(--notVegan-bg);
}

.swatch[data-rating="notInDatabase"] {
  background: var(--notInDatabase-bg);
}

.swatch__chicken {
  width: 7.5rem;
  margin: 0 0 0.75rem -0.6rem;
}

.swatch__text p {
  margin-top: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.swatch__text .swatch__example {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--rule);
  font-size: var(--t-small);
}

.swatch__example b {
  font-weight: 800;
}

.verdicts__note {
  max-width: 44rem;
  margin-top: 1.75rem;
  color: var(--ink-soft);
  font-size: var(--t-small);
}

/* Three ways to ask: one label, a phone, and what each way does to them. */

.ways {
  padding-bottom: var(--section);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 5px 0 var(--shadow);
}

.stage__ways {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

/* The bar on the left says which way the scene is playing. */
.way {
  padding: 0.9rem 0 0.9rem 1.4rem;
  border-left: 4px solid var(--rule);
  transition: border-color 0.3s ease;
}

.way.is-on {
  border-left-color: var(--ink);
}

.way button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.way button:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}

.way p {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.45;
  transition: color 0.3s ease;
}

.way.is-on p {
  color: var(--ink);
}

.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.pack {
  position: relative;
  justify-self: end;
  width: min(100%, 21rem);
  /* Its right edge tucks under the phone, so the text keeps clear of it. */
  margin-right: -1.5rem;
  padding: 1.4rem 2.4rem 1.1rem 1.2rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 1.1rem;
  box-shadow: 0 5px 0 var(--shadow);
  transform: rotate(-3deg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.pack__name {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pack__listing {
  position: relative;
  margin: 0.7rem -0.45rem 0;
  padding: 0.45rem;
}

.part,
.code {
  border-radius: 0.35em;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.code {
  border-radius: 99px;
}

.pack__crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background:
    linear-gradient(var(--ink) 0 0) top left / 1.1rem 3px,
    linear-gradient(var(--ink) 0 0) top left / 3px 1.1rem,
    linear-gradient(var(--ink) 0 0) top right / 1.1rem 3px,
    linear-gradient(var(--ink) 0 0) top right / 3px 1.1rem,
    linear-gradient(var(--ink) 0 0) bottom left / 1.1rem 3px,
    linear-gradient(var(--ink) 0 0) bottom left / 3px 1.1rem,
    linear-gradient(var(--ink) 0 0) bottom right / 1.1rem 3px,
    linear-gradient(var(--ink) 0 0) bottom right / 3px 1.1rem;
  background-repeat: no-repeat;
}

.pack__crop::after {
  content: "";
  position: absolute;
  inset: -2.5rem 0 auto;
  height: 2.5rem;
  background: linear-gradient(transparent, rgb(74 59 50 / 0.16), transparent);
}

.pack__barcode {
  position: relative;
  width: 11rem;
  margin-top: 0.9rem;
  padding: 0.35rem 0.45rem 0.1rem;
  border-radius: 0.5rem;
  outline: 2px dashed transparent;
  outline-offset: 0.15rem;
  transition: outline-color 0.3s ease;
}

.pack__barcode svg {
  display: block;
  width: 100%;
  height: 2.6rem;
  fill: var(--ink);
}

.pack__digits {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
}

.pack__laser {
  position: absolute;
  inset: 0.35rem -0.5rem auto;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgb(74 59 50 / 0.15);
  opacity: 0;
}

/* Typing: each code is ringed on the label as it is typed. */
.stage[data-mode="type"]:not([data-step="0"]) .code[data-n="1"],
.stage[data-mode="type"]:is([data-step="1.5"], [data-step="2"]) .code[data-n="2"] {
  box-shadow: 0 0 0 0.12em #fff, 0 0 0 calc(0.12em + 2px) var(--ink);
}

/* The barcode: a line reads it, then the product's ingredients are marked. */
.stage[data-mode="barcode"]:not([data-step="0"]) .pack__barcode {
  outline-color: var(--ink);
}

.stage[data-mode="barcode"][data-step="0.5"] .pack__laser {
  opacity: 1;
  animation: laser 0.85s ease-in-out infinite alternate;
}

/* The photo: the list is framed and read, then marked as the chips are. */
.stage[data-mode="photo"]:not([data-step="0"]) .pack__crop {
  opacity: 1;
  transform: none;
}

.stage[data-mode="photo"][data-step="0.5"] .pack__crop::after {
  animation: sweep 1.5s ease-in-out 0.25s both;
}

.stage[data-mode="barcode"][data-step="2"] .part[data-rating="notVegan"],
.stage[data-mode="photo"]:is([data-step="1"], [data-step="1.5"], [data-step="2"]) .part[data-rating="notVegan"] {
  background: var(--notVegan-bg);
  box-shadow: 0 0 0 0.15em var(--notVegan-bg);
}

.stage[data-mode="barcode"][data-step="2"] .part[data-rating="uncertain"],
.stage[data-mode="photo"]:is([data-step="1"], [data-step="1.5"], [data-step="2"]) .part[data-rating="uncertain"] {
  background: var(--uncertain-bg);
  box-shadow: 0 0 0 0.15em var(--uncertain-bg);
}

@keyframes laser {
  to {
    transform: translateY(2.55rem);
  }
}

@keyframes sweep {
  to {
    transform: translateY(16rem);
  }
}

.phone {
  position: relative;
  z-index: 1;
  width: 17.5rem;
  height: 34rem;
  padding: 1.1rem 0.9rem 1rem;
  background: var(--base);
  border: 2px solid var(--ink);
  border-radius: 2.4rem;
  box-shadow: 0 5px 0 var(--shadow);
  overflow: hidden;
  font-size: 0.78rem;
  transition: background-color 0.45s ease;
}

.phone[data-rating="vegan"] {
  background: var(--vegan-bg);
}

.phone[data-rating="uncertain"] {
  background: var(--uncertain-bg);
}

.phone[data-rating="notVegan"] {
  background: var(--notVegan-bg);
}

.phone[data-rating="notInDatabase"] {
  background: var(--notInDatabase-bg);
}

.phone.is-plain .phone__top {
  display: none;
}

.phone__chicken {
  z-index: 1;
  width: 6.75rem;
  margin: 0 auto -0.5rem;
}

.minifield {
  display: flex;
  align-items: center;
  height: 2.7rem;
  padding: 0 1rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 1.15rem;
  box-shadow: 0 3px 0 var(--shadow);
  font-size: 1rem;
  font-weight: 700;
  white-space: pre;
}

.minifield__caret {
  width: 2px;
  height: 1.15rem;
  margin-left: 1px;
  background: var(--ink);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.phone__views {
  margin-top: 1.05rem;
}

.view {
  display: none;
}

.view.is-shown {
  display: block;
  animation: pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

.phone .bubble {
  padding: 1em 1.05em 1.1em;
}

.notice {
  padding: 1.5em 0.75em;
  font-size: 1.05em;
  font-weight: 700;
  text-align: center;
}

.review {
  padding: 0.6em 0.3em;
}

.review__title {
  font-size: 1.35em;
  font-weight: 800;
}

.review__hint {
  margin-top: 0.4em;
  color: var(--ink-soft);
  line-height: 1.4;
}

.review__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 1em;
  padding: 0;
  list-style: none;
}

.review__chips li {
  padding: 0.32em 0.85em;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 1.4em;
  font-weight: 700;
  animation: pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

.review__chips li:nth-child(2) { animation-delay: 0.12s; }
.review__chips li:nth-child(3) { animation-delay: 0.24s; }
.review__chips li:nth-child(4) { animation-delay: 0.36s; }
.review__chips li:nth-child(5) { animation-delay: 0.48s; }
.review__chips li:nth-child(6) { animation-delay: 0.6s; }
.review__chips li:nth-child(7) { animation-delay: 0.72s; }
.review__chips li:nth-child(n + 8) { animation-delay: 0.84s; }

/* The app outlines a chip in the colour of what it would flag. */
.review__chips li[data-rating="notVegan"] {
  border: 2px solid var(--notVegan-ink);
}

.review__chips li[data-rating="uncertain"] {
  border: 2px solid var(--uncertain-ink);
}

.review__button {
  display: block;
  margin-top: 1.3em;
  padding: 0.75em;
  background: var(--ink);
  color: var(--surface);
  border-radius: 99px;
  font-weight: 800;
  text-align: center;
}

/* What it is like to use: the claims, with the signal dropping beside them. */

.facts {
  padding-bottom: var(--section);
}

.facts__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}

.facts__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3rem);
  padding-top: 0.6rem;
}

.facts__list dt {
  font-size: var(--t-h3);
  font-weight: 900;
  line-height: 1.15;
}

.facts__list dd {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.offline {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
  margin-top: 2.5rem;
}

.offline__signal {
  display: flex;
  align-items: flex-end;
  gap: 0.9rem;
  height: 2.75rem;
}

.offline__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 100%;
}

.offline__bars i {
  width: 0.7rem;
  border-radius: 0.2rem;
  background: var(--ink);
}

.offline__bars i:nth-child(1) { height: 25%; }
.offline__bars i:nth-child(2) { height: 50%; }
.offline__bars i:nth-child(3) { height: 75%; }
.offline__bars i:nth-child(4) { height: 100%; }

.offline__label {
  font-weight: 800;
  line-height: 1.1;
}

.offline__answer {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1.25rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 1.4rem;
  box-shadow: 0 4px 0 var(--shadow);
  line-height: 1.3;
}

.offline__answer b {
  font-weight: 800;
}

.offline__answer span {
  font-weight: 800;
}

.offline__answer[data-rating="vegan"] {
  background: var(--vegan-bg);
}

.offline__answer[data-rating="vegan"] span {
  color: var(--vegan-ink);
}

/* The bars go one by one, and the verdict still comes. Without the
   animation, this is how it ends. */
.offline__bars i {
  opacity: 0.2;
}

.offline.is-inview .offline__bars i {
  animation: bar 9s ease both infinite;
}

.offline.is-inview .offline__bars i:nth-child(4) { animation-name: bar-4; }
.offline.is-inview .offline__bars i:nth-child(3) { animation-name: bar-3; }
.offline.is-inview .offline__bars i:nth-child(2) { animation-name: bar-2; }
.offline.is-inview .offline__bars i:nth-child(1) { animation-name: bar-1; }
.offline.is-inview .offline__label { animation: label 9s ease both infinite; }
.offline.is-inview .offline__answer { animation: answer 9s ease both infinite; }

@keyframes bar-4 { 0%, 8% { opacity: 1; } 12%, 100% { opacity: 0.2; } }
@keyframes bar-3 { 0%, 15% { opacity: 1; } 19%, 100% { opacity: 0.2; } }
@keyframes bar-2 { 0%, 22% { opacity: 1; } 26%, 100% { opacity: 0.2; } }
@keyframes bar-1 { 0%, 29% { opacity: 1; } 33%, 100% { opacity: 0.2; } }

@keyframes label {
  0%, 33% { opacity: 0; transform: translateX(-0.4rem); }
  38%, 100% { opacity: 1; transform: none; }
}

@keyframes answer {
  0%, 46% { opacity: 0; transform: translateY(-0.4rem) scale(0.94); }
  50% { opacity: 1; transform: scale(1.03); }
  53%, 100% { opacity: 1; transform: none; }
}

/* Screenshots */

.shots {
  padding-bottom: var(--section);
}

.shots__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  width: 100%;
  max-width: var(--wrap);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding: 0 var(--gutter) 0.75rem;
  list-style: none;
}

.shots__row li:nth-child(even) {
  margin-top: 2.5rem;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: clamp(1.25rem, 2.6vw, 2.1rem);
  box-shadow: 0 5px 0 var(--shadow);
  background: var(--surface);
}

.shots figcaption {
  margin-top: 1rem;
  font-size: var(--t-small);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

/* Open Food Facts */

.off {
  padding-bottom: var(--section);
}

.off__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem clamp(2.5rem, 7vw, 6rem);
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-block: 2px solid var(--ink);
}

.off__grid p {
  max-width: 38rem;
}

.off__grid p + p {
  margin-top: 1rem;
}

.off__grid p:nth-child(2) {
  font-weight: 800;
}

.off__grid .off__licence {
  color: var(--ink-soft);
  font-size: var(--t-small);
}

/* The last word */

.last {
  padding-bottom: var(--section);
  text-align: center;
}

.last__chicken {
  width: 11rem;
  margin: 0 auto 0.5rem;
}

.last .stores {
  justify-content: center;
}

.foot {
  padding: 2.25rem 0 3rem;
  border-top: 2px solid var(--ink);
  background: var(--surface);
  font-size: var(--t-small);
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 2.25rem;
}

.foot__grid .brand {
  font-size: 1.125rem;
}

.foot a {
  font-weight: 800;
}

/* The privacy policy and the support page: text in one readable column. */

.page-document main {
  padding-top: 7.5rem;
}

.document {
  width: 100%;
  max-width: calc(44rem + 2 * var(--gutter));
  margin-inline: auto;
  padding: 0 var(--gutter) var(--section);
}

.document__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.document h1 {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.document__date {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.document__chicken {
  flex: none;
  width: clamp(5.5rem, 18vw, 8.5rem);
  margin-bottom: -0.4rem;
}

/* The short version, set apart as a card. */
.document__short {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem 1.75rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 1.5rem;
  box-shadow: 0 4px 0 var(--shadow);
}

.document h2 {
  margin-top: 3.5rem;
  font-size: 1.875rem;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.document__short h2 {
  margin-top: 0;
  font-size: var(--t-h3);
}

.document h3 {
  margin-top: 2.25rem;
  font-size: 1.3125rem;
  font-weight: 800;
  line-height: 1.25;
}

.document p,
.document ul {
  margin-top: 1rem;
}

.document ul {
  padding-left: 1.3rem;
}

.document li + li {
  margin-top: 0.5rem;
}

.document li::marker {
  color: var(--ink-soft);
}

.document a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* The press kit: its facts as a table of two columns, and its images in
   rows, each one a link to the file. */
.press__facts {
  margin-top: 1.25rem;
  border-bottom: 2px solid var(--rule);
}

.press__facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 0.85rem 0;
  border-top: 2px solid var(--rule);
}

.press__facts dt {
  font-weight: 800;
}

.document .press__shots,
.document .press__mascots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.document .press__mascots {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document .press__shots li,
.document .press__mascots li {
  margin: 0;
  font-size: var(--t-small);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

/* The caption is part of the link, so the link is named by what it
   downloads as well as by what the picture shows. */
.press__shots a,
.press__mascots a {
  display: block;
  font-weight: 800;
  text-decoration: none;
}

.press__shots img,
.press__mascots img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.press__shots a:hover img,
.press__mascots a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--shadow);
}

.press__shots a:hover span,
.press__mascots a:hover span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

@media (max-width: 34rem) {
  .press__facts > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .document .press__shots,
  .document .press__mascots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On a phone the title takes the whole width ("privacidade" is one long
   word), and the chicken stands beside the line under it. */
@media (max-width: 30rem) {
  .document__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 1rem;
  }

  .document__head > div:first-child {
    display: contents;
  }

  .document h1 {
    grid-column: 1 / -1;
  }

  .document__date,
  .document__chicken {
    align-self: end;
  }

  .document__chicken {
    width: 5rem;
  }
}

/* Without scripts the demo can't answer, so it isn't offered, and the phone
   shows where typing ends. assets/site.js sets .js. */
html:not(.js) .field,
html:not(.js) .demo__answer,
html:not(.js) .demo__try {
  display: none;
}

html:not(.js) .view[data-view="type-2"] {
  display: block;
}

/* Narrower screens */

@media (min-width: 60rem) {
  h1 {
    font-size: clamp(5rem, 10.4vw, 8rem);
  }
}

@media (max-width: 59.99rem) {
  .hero {
    padding-top: 6rem;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* The demo comes right after the headline; the rest follows it. */
  .hero__say {
    display: contents;
  }

  .hero__say > h1 { order: 1; }
  .hero__say > .hero__sub { order: 2; }
  .demo { order: 3; margin-top: 1.5rem; }
  .hero__say > .hero__lede { order: 4; margin-top: 2rem; }
  .hero__say > .stores { order: 5; margin-top: 1.25rem; }

  .lead,
  .facts__grid,
  .off__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .scene {
    order: -1;
    justify-content: center;
  }

  .swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swatch:nth-child(odd) {
    border-left: 0;
  }

  .swatch:nth-child(n + 3) {
    border-top: 2px solid var(--ink);
  }
}

@media (max-width: 40rem) {
  /* The four examples stay on one line of a phone. */
  .demo__try {
    gap: 0.35rem;
  }

  .chip {
    padding: 0.3rem 0.7rem;
    font-size: 0.9375rem;
  }

  .swatches {
    grid-template-columns: minmax(0, 1fr);
  }

  .swatch {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 1.25rem 1.1rem 1.4rem;
    border-left: 0;
  }

  .swatch + .swatch {
    border-top: 2px solid var(--ink);
  }

  .swatch__chicken {
    width: 5.5rem;
    margin: 0;
  }

  .scene {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .pack {
    justify-self: center;
    margin: 0 0 -1.5rem;
    padding-right: 1.2rem;
    transform: rotate(-2deg);
  }

  .phone {
    width: min(100%, 17.5rem);
  }

  .facts__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .shots__row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }

  .shots__row li {
    flex: 0 0 64%;
    scroll-snap-align: center;
  }

  .shots__row li:nth-child(even) {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
