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

:root {
  --paper: #fff;
  --ink: #111;
  --ink-soft: #3d3d3d;
  --green: #007d3b;
  --green-deep: #005f2c;
  --wash: #f1f6ef;
  --rule-hair: 1px solid var(--ink);
  --rule-mid: 6px solid var(--ink);
  --rule-bar: 12px solid var(--ink);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  padding-bottom: var(--analytics-space, 0px);
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--green); color: var(--paper); }

a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--green-deep); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
.sprite { position: absolute; }

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  vertical-align: -0.15em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons: square label stock, black rule, green when it takes you somewhere. */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-stretch: 87%;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover { background: var(--ink); color: var(--paper); }

.button-go { border-color: var(--green); background: var(--green); color: var(--paper); }
.button-go:hover { border-color: var(--green-deep); background: var(--green-deep); color: var(--paper); }

/* Masthead: logo and statement beside the Shop Facts panel. */
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-bottom: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.75rem, 5vw, 4rem) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) clamp(3rem, 7vw, 5rem);
  background: var(--wash);
}

.masthead-copy { padding-top: clamp(0rem, 2vw, 1.5rem); }

.logo img { width: min(100%, 30rem); }

.statement {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 15ch;
  font-size: clamp(2.35rem, 5.4vw, 4.4rem);
  font-weight: 900;
  font-stretch: 80%;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.statement span { color: var(--green); }

.intro {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
}

.masthead .actions { margin-top: 1.75rem; }

/* The Shop Facts panel follows the Nutrition Facts label: 12px, 6px and hairline rules. */
.facts {
  container-type: inline-size;
  border: 2px solid var(--ink);
  padding: 0.5rem 0.75rem 0.75rem;
  background: var(--paper);
}

.facts-title {
  font-size: clamp(2.75rem, 5vw, 3.4rem);
  font-size: 22cqi;
  font-weight: 900;
  font-stretch: 75%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  white-space: nowrap;
  padding-bottom: 0.1rem;
  border-bottom: var(--rule-hair);
}

.facts-serving {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-weight: 800;
  font-size: 1.125rem;
  border-bottom: var(--rule-bar);
}
.facts-serving span:first-child { font-weight: 500; }

.facts-list { margin: 0; }

.facts-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: var(--rule-hair);
}

.facts-list dt { font-weight: 800; }
.facts-list dd { margin: 0; text-align: right; }

.facts-list .rule-thick { border-bottom: var(--rule-mid); }

.facts-today { padding-block: 0.6rem; }
.facts-today dt,
.facts-today dd { font-size: 1.25rem; font-weight: 900; font-stretch: 85%; }

.yes {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  color: var(--green);
  font-weight: 800;
}
.facts-list dd.yes { display: block; }
.facts-list dd.yes .icon { margin-right: 0.3rem; }

.facts-list sup,
.facts-notes sup { font-size: 0.7em; line-height: 0; }

.facts-declare {
  padding: 0.55rem 0;
  border-bottom: var(--rule-mid);
}
.facts-declare strong { font-weight: 900; }

.facts-notes {
  padding-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* On the shelf: one ruled table of brands, not a row of cards. */
.shelf,
.visit {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3.5rem, 8vw, 6rem);
}

.shelf-head,
.visit h2 {
  border-top: var(--rule-bar);
  padding-top: 0.75rem;
}

.shelf-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-bottom: 1rem;
  border-bottom: var(--rule-hair);
}

.shelf h2,
.visit h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  font-stretch: 75%;
  line-height: 1;
}
.shelf-head p { color: var(--ink-soft); }

.brands {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: var(--rule-mid);
}

.brands li {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  align-content: start;
  row-gap: 0.3rem;
  padding: 1rem 1rem 1.25rem;
  border-left: var(--rule-hair);
}
.brands li:first-child { border-left: 0; padding-left: 0; }
.brands li:last-child { padding-right: 0; }

.brands img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 0.65rem;
}

.brands h3 { font-size: 1.25rem; font-weight: 900; font-stretch: 85%; line-height: 1.1; }
.brands p { color: var(--ink-soft); }
.brands .yes { justify-content: flex-start; align-self: end; padding-top: 0.4rem; color: var(--green); }

.ingredients {
  max-width: 62rem;
  padding-top: 0.85rem;
  font-size: 1.125rem;
}
.ingredients strong { font-weight: 900; }

/* Come in: address and details share one block, bottoms aligned, under a hairline like the shelf. */
.visit h2 { padding-bottom: 1rem; border-bottom: var(--rule-hair); }

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.75rem clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding-top: 1.5rem;
}

.visit-address {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 900;
  font-stretch: 80%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.visit-detail { display: grid; gap: 0.75rem; max-width: 30rem; }
.visit-detail > p:first-child { font-size: 1.125rem; }
.visit-hours { font-weight: 800; font-size: 1.25rem; }
.visit .actions { margin-top: 0.5rem; }

/* The sweet side: a closing label line pointing to The Chocolate Shoppe. */
.sweet {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(var(--ink), var(--ink)) no-repeat top / 100% 12px content-box;
}
.sweet > * { padding-top: calc(12px + 0.9rem); }
.sweet p { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 900; font-stretch: 80%; line-height: 1.05; }
.sweet a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a,
.analytics-preferences {
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.analytics-preferences { padding: 0; border: 0; background: none; cursor: pointer; }
.analytics-preferences:hover,
.footer-links a:hover { color: var(--green-deep); }

/* Consent bar: a hairline-and-bar strip in the same label grammar. */
.analytics-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-height: 50vh;
  overflow: auto;
  padding: 0.85rem max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-top: var(--rule-mid);
  background: var(--paper);
  font-size: 1rem;
}
.analytics-panel[hidden],
.analytics-preferences[hidden] { display: none; }
.analytics-panel p { flex: 1 1 20rem; }

/* Decline and Allow share one style so neither choice is favored. */
.analytics-actions { display: flex; gap: 0.5rem; }
.analytics-actions button {
  min-width: 6.5rem;
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.analytics-actions button:hover { background: var(--ink); color: var(--paper); }

/* Privacy and 404 pages */
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--gutter) 3rem;
}
.page-logo img { width: 14rem; }
.page h1 {
  margin-top: 2rem;
  padding-top: 0.6rem;
  border-top: var(--rule-bar);
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 900;
  font-stretch: 75%;
  line-height: 1;
}
.page .actions { margin-top: 1.5rem; }
.page .updated { margin-top: 0.5rem; color: var(--ink-soft); font-size: 0.95rem; }
.page h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
  border-top: var(--rule-mid);
  font-size: 1.4rem;
  font-weight: 900;
  font-stretch: 85%;
}
.page p { max-width: 65ch; margin-top: 0.75rem; }
.page .site-footer { padding-inline: 0; margin-top: 3rem; border-top: var(--rule-hair); }

/* One authored moment: the panel's rules print in, left to right, on first paint. */
@media (prefers-reduced-motion: no-preference) {
  .facts-serving,
  .facts-list > div,
  .facts-title {
    border-bottom-color: transparent;
    background: linear-gradient(var(--ink), var(--ink)) no-repeat left bottom / 0 var(--rule-h, 1px) border-box;
    animation: print-rule 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 45ms + 120ms);
  }
  .facts-serving { --rule-h: 12px; --i: 1; }
  .facts-list .rule-thick { --rule-h: 6px; }
  .facts-list > div:nth-child(1) { --i: 2; }
  .facts-list > div:nth-child(2) { --i: 3; }
  .facts-list > div:nth-child(3) { --i: 4; }
  .facts-list > div:nth-child(4) { --i: 5; }
  .facts-list > div:nth-child(5) { --i: 6; }
  .facts-list > div:nth-child(6) { --i: 7; }
  .facts-list > div:nth-child(7) { --i: 8; }
  .facts-list > div:nth-child(8) { --i: 9; }
}

@keyframes print-rule {
  to { background-size: 100% var(--rule-h, 1px); }
}

@media (max-width: 1080px) {
  .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brands li:nth-child(4) { border-left: 0; padding-left: 0; }
  .brands li:nth-child(3) { padding-right: 0; }
  .brands li:nth-child(-n+3) { border-bottom: var(--rule-hair); }
}

@media (max-width: 860px) {
  .masthead { grid-template-columns: minmax(0, 1fr); }
  .statement { max-width: 18ch; }
  .facts { max-width: 30rem; }
  .visit-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 640px) {
  .brands { grid-template-columns: minmax(0, 1fr); }
  .brands li,
  .brands li:nth-child(n) {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-row: auto;
    column-gap: 1rem;
    row-gap: 0.2rem;
    padding: 1rem 0;
    border-left: 0;
    border-bottom: var(--rule-hair);
  }
  .brands li:last-child { border-bottom: 0; }
  .brands img { grid-row: 1 / span 3; margin: 0; }
  .brands .yes { margin-top: 0; padding-top: 0.2rem; align-self: start; }
  .logo img { width: min(100%, 21rem); margin-inline: auto; }
  .masthead .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .masthead .actions .button { padding-inline: 0.6rem; font-size: 1rem; }
  .visit .actions .button { flex: 1 1 12rem; }
  .analytics-panel { padding-block: 0.85rem 1rem; }
  .analytics-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-actions button { min-width: 0; }
}
