/* cookiebakes: white, minimal, with pale flavour tints */

:root {
  --white: #ffffff;
  --ink: #3a2e27;
  --soft: #8c8079;
  --line: #efebe7;

  /* one pale tint per flavour, with a slightly deeper tint for the chips */
  --oat: #f4eadb;      --oat-chip: #dcc7a8;
  --cocoa: #e8d8ce;    --cocoa-chip: #bfa293;
  --matcha: #e4edda;   --matcha-chip: #bccfa8;
  --berry: #f7e1e4;    --berry-chip: #e6b1b8;
  --lemon: #f9f1cc;    --lemon-chip: #e8d990;
  --sesame: #ebe9e4;   --sesame-chip: #c0bbb0;

  --display: "Quicksand", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }

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

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

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* notice strip */
.notice {
  margin: 0;
  padding: 8px 24px;
  background: var(--oat);
  font-size: 0.875rem;
  text-align: center;
}

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.site-nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--berry-chip);
}

/* headings */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  line-height: 1.04;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.lede {
  margin-top: 24px;
  max-width: 46ch;
  font-size: 1.1875rem;
  color: var(--soft);
}

/* hero */
.hero {
  padding-top: clamp(40px, 9vw, 104px);
  padding-bottom: clamp(40px, 7vw, 80px);
}

.button {
  display: inline-block;
  margin-top: 32px;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}

.button:hover { background: #55443a; }

/* the cookie: a pale circle with a few chips, drawn in CSS */
.cookie {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 34%, var(--chip) 0 5.5%, transparent 6%),
    radial-gradient(circle at 63% 27%, var(--chip) 0 4.5%, transparent 5%),
    radial-gradient(circle at 71% 58%, var(--chip) 0 6%, transparent 6.5%),
    radial-gradient(circle at 42% 68%, var(--chip) 0 5%, transparent 5.5%),
    radial-gradient(circle at 24% 60%, var(--chip) 0 3.5%, transparent 4%),
    radial-gradient(circle at 52% 46%, var(--chip) 0 3.5%, transparent 4%),
    var(--dough);
}

.oat    { --dough: var(--oat);    --chip: var(--oat-chip); }
.cocoa  { --dough: var(--cocoa);  --chip: var(--cocoa-chip); }
.matcha { --dough: var(--matcha); --chip: var(--matcha-chip); }
.berry  { --dough: var(--berry);  --chip: var(--berry-chip); }
.lemon  { --dough: var(--lemon);  --chip: var(--lemon-chip); }
.sesame { --dough: var(--sesame); --chip: var(--sesame-chip); }

/* flavour row on the home page */
.flavours {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

.flavours li { text-align: center; }

.flavours a {
  display: block;
  text-decoration: none;
}

.flavours .cookie { transition: transform 0.25s ease; }
.flavours a:hover .cookie { transform: rotate(18deg); }

.flavours .name {
  display: block;
  margin-top: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.flavours .price {
  display: block;
  color: var(--soft);
  font-size: 0.9375rem;
}

/* sections */
.section {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.section + .section { border-top: 1px solid var(--line); }

.section > h2 { margin-bottom: 32px; }

.page-intro {
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.page-intro h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  max-width: 18ch;
}

/* ordering steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--matcha);
  font-family: var(--display);
  font-weight: 600;
}

.steps li:nth-child(2)::before { background: var(--lemon); }
.steps li:nth-child(3)::before { background: var(--berry); }

.steps p { margin-top: 6px; color: var(--soft); }

/* menu list */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.menu li:last-child { border-bottom: 1px solid var(--line); }

.menu p { color: var(--soft); }

.menu .price {
  font-family: var(--display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* boxes */
.boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.box {
  padding: 28px;
  border-radius: 20px;
  background: var(--oat);
}

.box:nth-child(2) { background: var(--matcha); }

.box .price {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 500;
}

.box p:last-child { margin-top: 10px; }

/* plain text pages */
.prose { max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin-top: 48px; margin-bottom: 14px; }

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 32px;
  max-width: 62ch;
}

.facts dt { color: var(--soft); }
.facts dd { margin: 0; }

/* files page */
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 62ch;
}

.file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.file-list li:last-child { border-bottom: 1px solid var(--line); }

.file-list .meta {
  display: block;
  color: var(--soft);
  font-size: 0.9375rem;
}

.file-list .button { margin-top: 0; padding: 10px 22px; }

.empty {
  max-width: 62ch;
  padding: 32px;
  border-radius: 20px;
  background: var(--sesame);
}

.empty p + p { margin-top: 6px; color: var(--soft); }

/* footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: clamp(32px, 6vw, 64px);
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.9375rem;
}

/* smaller screens */
@media (max-width: 760px) {
  .flavours { grid-template-columns: repeat(3, 1fr); gap: 24px 20px; }
  .steps { grid-template-columns: 1fr; }
  .boxes { grid-template-columns: 1fr; }
  .menu li { grid-template-columns: 52px 1fr auto; gap: 16px; }
}

@media (max-width: 420px) {
  .flavours { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .flavours .cookie { transition: none; }
  .flavours a:hover .cookie { transform: none; }
}
