/* The Bulk Boys
   Layout idea: the page is the bag. Kraft ground, left-aligned type, white stickers for
   the brand's details and the selected store, and the yellow warning box where a bag
   carries it. The numerals for 28, 56 and 84 g are sized in proportion to the weight. */

:root {
  --ink: #232117;
  --cream: #F7EEDF;
  --kraft: #DDD0BB;
  --label: #FFFFFF;
  --warning: #FFFF00;
  --ink-muted: #56503F;
  --rule-soft: #9C9382;
  --focus: #1F5FD0;

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --legal: Arial, Helvetica, sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
  --sticker-shadow: 0 1px 0 rgba(35, 33, 23, 0.3), 0 14px 22px -14px rgba(35, 33, 23, 0.7);

  color-scheme: light;
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--kraft);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

a:hover {
  text-decoration-thickness: 0.16em;
}

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

[hidden] {
  display: none !important;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 5;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
}

.skip:focus {
  top: 0.5rem;
}

main:focus {
  outline: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #000;
  border-color: #000;
}

.button--quiet {
  background: transparent;
  color: var(--ink);
}

.button--quiet:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.button--light {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--ink);
}

.button--light:hover {
  border-color: #fff;
  background: #fff;
}

.textbutton {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.textbutton:hover {
  text-decoration-thickness: 0.16em;
}

/* Age gate */

.gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.5rem var(--gutter);
  overflow: auto;
  background: var(--ink);
  color: var(--cream);
}

.gate__panel {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  width: min(100%, 26rem);
}

.gate__mark {
  width: auto;
  height: clamp(7rem, 24vw, 9.5rem);
}

.gate h1 {
  font-size: clamp(2.5rem, 10vw, 3.5rem);
}

.gate form {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.gate fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.gate__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gate label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.gate input {
  width: 4.75rem;
  padding: 0.6rem 0.7rem;
  border: 2px solid var(--cream);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 400;
}

.gate input#dob-year {
  width: 6.5rem;
}

.gate__message {
  font-weight: 700;
}

.gate__fine {
  color: #CFC6B4;
  font-size: 0.875rem;
}

/* Header */

.site-header {
  padding-block: 1rem;
}

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

.site-header__mark {
  display: block;
}

.site-header__mark img {
  width: auto;
  height: 3.75rem;
}

.site-nav ul {
  display: flex;
  gap: clamp(0.9rem, 4vw, 2.25rem);
}

.site-nav a {
  display: block;
  padding-block: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  text-decoration: underline;
}

@media (min-width: 48rem) {
  .site-header__mark img {
    height: 4.75rem;
  }
}

/* Hero: pitch, Get Bulky sticker, details sticker, warnings */

.hero {
  display: grid;
  grid-template-areas:
    "text"
    "art"
    "sticker"
    "legal";
  gap: clamp(1.75rem, 5vw, 2.5rem);
  padding-block: clamp(1rem, 3vw, 2rem) clamp(2.5rem, 7vw, 4.5rem);
}

.hero__text {
  grid-area: text;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  justify-items: start;
}

.hero h1 {
  font-size: clamp(3.25rem, 13.5vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.hero h1 span {
  display: block;
}

.lede {
  max-width: 31rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__art {
  grid-area: art;
  max-width: 25rem;
  padding: 0.5rem 0.25rem;
}

.hero__art img {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: var(--sticker-shadow);
  transform: rotate(-2.5deg);
}

.hero__sticker {
  grid-area: sticker;
}

.hero__legal {
  grid-area: legal;
}

@media (min-width: 48rem) and (max-width: 63.99rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    grid-template-areas:
      "text text"
      "art sticker"
      "legal legal";
    column-gap: 2.5rem;
    align-items: center;
  }
}

@media (min-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    grid-template-areas:
      "text art"
      "legal sticker";
    column-gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
  }

  .hero h1 {
    font-size: clamp(4rem, 7vw, 6.25rem);
  }

  .hero__text {
    padding-top: 1rem;
  }

  .hero__art {
    max-width: none;
    padding-top: 1.5rem;
  }
}

/* Stickers */

.sticker {
  width: min(100%, 25rem);
  padding: 0.9rem 1.1rem 1rem;
  border-radius: 0.5rem;
  background: var(--label);
  box-shadow: var(--sticker-shadow);
  color: #111;
  font-family: var(--legal);
  font-size: 0.875rem;
  line-height: 1.3;
}

.hero__sticker .sticker {
  transform: rotate(-1.2deg);
}

.sticker__row {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 0.5rem;
  padding-block: 0.2rem;
}

.sticker__row dt::after {
  content: ":";
}

.sticker__row dd {
  overflow-wrap: anywhere;
}

.sticker__name {
  padding-bottom: 0.35rem;
  font-size: 1.1875rem;
  font-weight: 700;
}

/* Required warnings */

.legal {
  display: grid;
  gap: 0.6rem;
  font-family: var(--legal);
  font-size: 0.875rem;
  line-height: 1.4;
}

.legal__box {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ink);
  background: var(--warning);
  color: #000;
  font-size: 0.9375rem;
}

.legal__required {
  font-weight: 700;
}

.legal__line {
  max-width: 46rem;
}

/* Sections */

.section {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  border-top: 2px solid var(--ink);
}

.section__title {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(2.5rem, 8vw, 3.75rem);
}

.section__note {
  margin-top: -1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--ink-muted);
}

.draft-note {
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem 0.8rem;
  border: 2px dashed var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* Store locator */

.locator {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "finder"
    "map"
    "chips"
    "list";
  gap: 1.5rem;
}

.finder {
  grid-area: finder;
  min-width: 0;
}

.finder label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.finder__row {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
}

.finder input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--label);
  color: var(--ink);
  font: inherit;
}

.finder input::placeholder {
  color: #6F6959;
}

.finder .button {
  flex: none;
  white-space: nowrap;
}

.chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.chip span {
  font-weight: 400;
}

.chip:hover {
  background: var(--cream);
}

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

.locator__map {
  grid-area: map;
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.map {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.map__land {
  fill: var(--cream);
  stroke: var(--ink);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.map__lines {
  fill: none;
  stroke: var(--rule-soft);
  stroke-width: 0.75px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.pin {
  cursor: pointer;
}

.pin path,
.here path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pin__hit {
  stroke: transparent;
  stroke-width: 30px;
  pointer-events: stroke;
}

.pin__halo {
  stroke: var(--ink);
  stroke-width: 0;
}

.pin__ring {
  stroke: var(--label);
  stroke-width: 13px;
}

.pin__dot {
  stroke: var(--ink);
  stroke-width: 9px;
}

.pin.is-selected .pin__halo {
  stroke-width: 25px;
}

.pin.is-selected .pin__ring {
  stroke-width: 19px;
}

.pin.is-selected .pin__dot {
  stroke-width: 11px;
}

.here__outer {
  stroke: var(--ink);
  stroke-width: 22px;
}

.here__mid {
  stroke: var(--kraft);
  stroke-width: 16px;
}

.here__dot {
  stroke: var(--ink);
  stroke-width: 6px;
}

.callout {
  width: min(100%, 30rem);
  font-size: 0.9375rem;
}

.callout__name {
  margin-bottom: 0.15rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.locator__list {
  grid-area: list;
  display: grid;
  gap: 1rem;
  align-content: start;
  justify-items: start;
  min-width: 0;
}

.locator__status {
  width: 100%;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
}

.stores {
  width: 100%;
  margin-top: -1rem;
}

.store {
  display: grid;
  gap: 0.25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule-soft);
}

.store__name {
  font-size: 1.5rem;
  font-weight: 600;
}

.store__dist {
  font-size: 0.9375rem;
  font-weight: 700;
}

.store__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.15rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.store__links a,
.store__links .textbutton {
  display: inline-block;
  padding-block: 0.35rem;
  font-weight: 700;
}

@media (min-width: 60rem) {
  .locator {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
      "finder finder"
      "chips chips"
      "map list";
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }

  .locator__map {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

/* Three bags: numerals scale with the weight */

.sizes {
  --unit: 3.25rem;
  display: grid;
  gap: 2.25rem;
}

.size {
  display: grid;
  gap: 0.75rem;
}

.size__num {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: -0.02em;
}

.size__num span {
  margin-left: 0.07em;
  font-size: 0.44em;
  letter-spacing: 0;
}

.size--1 .size__num {
  font-size: var(--unit);
}

.size--2 .size__num {
  font-size: calc(var(--unit) * 2);
}

.size--3 .size__num {
  font-size: calc(var(--unit) * 3);
}

.size__body {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  max-width: 30rem;
}

.size__body h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

@media (min-width: 48rem) {
  .sizes {
    --unit: clamp(4rem, 8.2vw, 6rem);
    grid-template-columns: 1fr 2fr 3fr;
    grid-template-rows: auto auto;
    gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
  }

  .size {
    grid-row: span 2;
    grid-template-rows: subgrid;
    gap: 1.25rem;
  }

  .size__num {
    align-self: end;
  }
}

/* Lineup */

.lineup {
  display: grid;
  column-gap: clamp(2rem, 5vw, 4rem);
}

.lineup > li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-block: 1.4rem;
  border-top: 1px solid var(--rule-soft);
}

.product__name {
  font-size: 2rem;
  font-weight: 600;
}

.product__copy {
  max-width: 36rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.facts div {
  display: flex;
  gap: 0.3em;
}

.facts dt::after {
  content: ":";
}

.facts dd {
  color: var(--ink);
}

.product__lab {
  font-size: 0.9375rem;
}

.product__batch {
  margin-left: 0.5em;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

@media (min-width: 52rem) {
  .lineup {
    grid-template-columns: 1fr 1fr;
  }
}

/* Contact */

.contact {
  display: grid;
  gap: 1.75rem;
  justify-items: start;
}

.contact__lede {
  max-width: 34rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.contact__sticker {
  transform: rotate(0.8deg);
}

.contact__sticker .sticker__row {
  grid-template-columns: 6.5em minmax(0, 1fr);
}

@media (min-width: 52rem) {
  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    column-gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
  }
}

/* Retailers drawer */

.band {
  padding-block: clamp(1.75rem, 5vw, 3rem);
  background: var(--cream);
}

.drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  list-style: none;
  cursor: pointer;
}

.drawer > summary::-webkit-details-marker {
  display: none;
}

.drawer__title {
  font-size: clamp(2.25rem, 7vw, 3.25rem);
}

.drawer__hint {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink-muted);
  font-family: var(--text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.4;
}

.drawer__icon {
  position: relative;
  flex: none;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--ink);
}

.drawer__icon::before,
.drawer__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.1rem;
  height: 2px;
  margin: -1px 0 0 -0.55rem;
  background: var(--ink);
}

.drawer__icon::after {
  transform: rotate(90deg);
}

.drawer[open] .drawer__icon::after {
  display: none;
}

.drawer__body {
  display: grid;
  gap: 2.5rem;
  padding-block: 2rem 1rem;
}

.retail {
  display: grid;
  gap: 2.5rem clamp(2.5rem, 6vw, 5rem);
}

.retail h3 {
  margin-bottom: 0.75rem;
  font-size: 2rem;
  font-weight: 600;
}

.kit {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  justify-items: start;
}

.kit > h3 {
  margin-bottom: -0.5rem;
}

.kit__intro,
.ordering p {
  max-width: 38rem;
}

.ordering {
  display: grid;
  gap: 0.6rem;
}

.ordering h3 {
  font-size: 2rem;
  font-weight: 600;
}

.rows {
  width: 100%;
  border-top: 2px solid var(--ink);
}

.rows > div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule-soft);
}

.rows dt {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rows dd a {
  font-weight: 700;
}

.rows dd span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.kit__meta {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

@media (min-width: 36rem) {
  .rows > div {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

@media (min-width: 60rem) {
  .retail {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

/* Footer */

.site-footer {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--ink);
  color: var(--cream);
}

.site-footer__top {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  justify-items: start;
  margin-bottom: 2rem;
}

.site-footer__mark {
  width: auto;
  height: 6.5rem;
}

.site-footer__note {
  max-width: 28rem;
}

.site-footer .legal__box {
  border-color: var(--warning);
}

.copyright {
  margin-top: 1.75rem;
  color: #CFC6B4;
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  .site-footer__top {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2.5rem;
  }
}

/* Not-found page */

.lost {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding-block: clamp(2rem, 8vw, 5rem);
}

.lost img {
  width: auto;
  height: 7rem;
}

.lost h1 {
  font-size: clamp(2.75rem, 10vw, 4.5rem);
}
