:root {
  --bg: #eeebe5;
  --paper: #faf8f4;
  --tan: #d8c9b0;
  --tan-soft: #e7dece;
  --sage: #8fa58a;
  --sage-dark: #5e785b;
  --sage-deep: #4c6349;
  --sage-soft: #dfe6da;
  --gray: #8a8984;
  --ink: #2f312e;
  --muted: #676a63;
  --line: #dad4c8;
  --tile: #161616;
  --venmo: #3d95ce;
  --radius: 12px;
  --display: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Karla", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  padding-bottom: 96px; /* room for the cart bar */
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--sage-deep); }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
  text-wrap: balance;
}

/* ── Header ─────────────────────────────────────────── */
.hero {
  /* Soft sage with a faint scatter of little sparkles and dots. */
  background-color: var(--sage-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%235e785b' stroke-width='1.6' stroke-linecap='round' opacity='.22'%3E%3Cpath d='M24 14v12M18 20h12'/%3E%3Cpath d='M84 70v12M78 76h12'/%3E%3C/g%3E%3Cg fill='%235e785b' opacity='.18'%3E%3Ccircle cx='80' cy='22' r='2'/%3E%3Ccircle cx='28' cy='84' r='2'/%3E%3Ccircle cx='104' cy='108' r='1.5'/%3E%3Ccircle cx='54' cy='50' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  border-bottom: 1px solid #c9d3c3;
  padding-block: 40px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; }

/* Stickers stuck around the logo, like a laptop lid. */
.hero-sticker {
  position: absolute;
  width: clamp(70px, 10vw, 124px);
  height: clamp(70px, 10vw, 124px);
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(47, 49, 46, .22));
  transform: rotate(var(--r));
  transition: transform .25s ease;
}
.hero-sticker:nth-child(1) { --r: -12deg; top: 9%;  left: 5%; }
.hero-sticker:nth-child(2) { --r: 8deg;   top: 42%; left: 15%; }
.hero-sticker:nth-child(3) { --r: -6deg;  bottom: 8%; left: 4%; }
.hero-sticker:nth-child(4) { --r: 10deg;  top: 8%;  right: 6%; }
.hero-sticker:nth-child(5) { --r: -9deg;  top: 42%; right: 15%; }
.hero-sticker:nth-child(6) { --r: 7deg;   bottom: 7%; right: 4%; }
@media (max-width: 860px) {
  .hero-sticker:nth-child(2), .hero-sticker:nth-child(5) { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 76px; }
  .hero-sticker { width: 60px; height: 60px; }
  .hero-sticker:nth-child(3), .hero-sticker:nth-child(6) { display: none; }
  .hero-sticker:nth-child(1) { top: 12px; left: 16px; }
  .hero-sticker:nth-child(4) { top: 12px; right: 16px; }
}

.logo { margin: 0 auto; width: min(380px, 80vw); }
.logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(47, 49, 46, .18));
}

.tagline {
  max-width: 32rem;
  margin: 20px auto 18px;
  font-size: 1.08rem;
  color: var(--muted);
  text-wrap: balance;
}

.prices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.prices li, .prices a {
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.prices li {
  padding: 6px 16px;
  border: 1px solid #c9d3c3;
  border-radius: 999px;
  background: var(--paper);
}
.prices a:hover { color: var(--sage-deep); text-decoration: underline; }
.prices span { font-weight: 600; }

/* ── Toolbar ────────────────────────────────────────── */
.sample-note {
  margin: 24px 0 0;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px dashed var(--gray);
  border-radius: var(--radius);
  text-align: center;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 500 .98rem var(--display);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.tab:hover { border-color: var(--sage); }
.tab[aria-selected="true"] { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tab-count { opacity: .65; font-variant-numeric: tabular-nums; margin-left: 2px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin-block: 16px 24px;
}
.count { margin: 0; color: var(--muted); }

.picks-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.picks-toggle input { width: 18px; height: 18px; accent-color: var(--sage-dark); }

/* ── Sarah's picks ──────────────────────────────────── */
.favorites { margin-top: 36px; }
.favorites h2 { margin-bottom: 2px; }
.favorites-sub { margin: 0 0 16px; color: var(--muted); }
.grid.favorites-grid { grid-template-columns: repeat(4, 1fr); }
.card-collection {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: -4px;
}
/* On narrow screens the picks become a swipeable row. */
@media (max-width: 720px) {
  .grid.favorites-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: -16px;
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }
  .favorites-grid .card { flex: 0 0 160px; scroll-snap-align: start; }
}

/* ── Sticker grid ───────────────────────────────────── */
#grid { display: flex; flex-direction: column; gap: 48px; }

.collection-title {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.collection-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transform: rotate(-6deg);
  filter: drop-shadow(0 3px 4px rgba(47, 49, 46, .2));
}
.collection-title span {
  font-family: var(--body);
  font-size: .95rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card.picked {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 2px var(--sage-dark);
}

.tile {
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--tile);
  cursor: pointer;
}
.tile img {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  transform-origin: 30% 80%;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), filter .25s ease;
}
/* "Peel": the sticker lifts and tilts off its backing. */
.tile:hover img, .tile:active img {
  transform: perspective(500px) rotateX(10deg) rotate(-5deg) translateY(-5px) scale(1.08);
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(255, 255, 255, .4));
}
.tile:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 2px; }

.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font: 600 .85rem var(--display);
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.sticker-num {
  font-family: var(--display);
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.qty {
  display: flex;
  align-items: center;
  gap: 2px;
}
.qty button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font: 500 1.15rem/1 var(--display);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.qty .minus { background: var(--paper); color: var(--ink); }
.qty .minus:disabled { opacity: .35; cursor: default; }
.qty .plus { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.qty .plus:hover { background: var(--sage-deep); }
.qty button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.qty input {
  width: 28px;
  text-align: center;
  border: 0;
  background: transparent;
  font: 600 1rem var(--display);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qty input::-webkit-inner-spin-button,
.qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.empty-picks {
  text-align: center;
  color: var(--muted);
  padding-block: 32px;
}

/* ── Custom sticker ─────────────────────────────────── */
.custom {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px 40px;
  padding: 28px clamp(16px, 4vw, 40px);
  background: var(--sage-soft);
  border: 1px solid #c9d3c3;
  border-radius: 16px;
  scroll-margin-top: 16px;
  transition: box-shadow .15s ease;
}
.custom.picked { box-shadow: 0 0 0 2px var(--sage-dark); }
.surprise {
  margin-top: 40px;
  background: var(--tan-soft);
  border-color: var(--tan);
}
@media (max-width: 720px) {
  .custom { grid-template-columns: 1fr; }
}
.custom-intro p { margin: 0 0 12px; color: var(--muted); max-width: 30rem; }
.custom-intro .custom-price {
  font-family: var(--display);
  color: var(--ink);
  font-size: 1.05rem;
}
.custom-price span { font-weight: 600; }
.custom-form { display: flex; flex-direction: column; gap: 14px; }
.custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.custom-qty-label { font-weight: 700; }
.custom-note { text-align: left; margin: 0; }

/* ── Checkout ───────────────────────────────────────── */
.checkout, .thanks {
  margin-top: 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px clamp(16px, 4vw, 40px);
  max-width: 720px;
  margin-inline: auto;
  scroll-margin-top: 16px;
}

.summary { margin-bottom: 28px; }
.summary-empty { color: var(--muted); margin: 0; }
.summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.summary li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg);
  border-radius: 999px;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
}
.summary li img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: var(--tile);
  border-radius: 50%;
  padding: 4px;
}
.summary .summary-custom { padding: 6px 14px; background: var(--sage-soft); }
.summary-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: .92rem;
  overflow-wrap: anywhere;
}
.totals {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  font-variant-numeric: tabular-nums;
}
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--ink); }

fieldset {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
legend {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 8px;
  padding: 0;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 560px) {
  .row, .row-3 { grid-template-columns: 1fr; }
}

.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .delivery-options { grid-template-columns: 1fr; }
}
.delivery-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  line-height: 1.35;
}
.delivery-option input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--sage-dark); }
.delivery-option span { color: var(--muted); font-size: .92rem; }
.delivery-option b { display: block; color: var(--ink); font-size: 1rem; }
.delivery-option:has(input:checked) { border-color: var(--sage-dark); background: var(--sage-soft); }
.delivery-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(94, 120, 91, .2);
}
.field input[aria-invalid="true"] { border-color: #b4553f; }

.form-error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4e1da;
  color: #8a3522;
  font-weight: 700;
}

.fine-print { color: var(--muted); font-size: .9rem; margin: 10px 0 0; text-align: center; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font: 500 1rem var(--display);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-big { width: 100%; padding: 15px 24px; font-size: 1.1rem; }
.btn-primary { background: var(--sage-dark); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-venmo { background: var(--venmo); color: #fff; }
.btn-venmo:hover { background: #2f7fb4; }
.btn-ghost { background: transparent; color: var(--muted); text-decoration: underline; margin-top: 16px; }

/* ── Thank you ──────────────────────────────────────── */
.thanks { text-align: center; }
.thanks:focus { outline: none; }
.thanks > p { max-width: 30rem; margin-inline: auto; }
.thanks-total {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 500;
  margin: 8px 0 20px;
  font-variant-numeric: tabular-nums;
}
.thanks-details { margin-top: 20px; text-align: left; }
.thanks-details summary { cursor: pointer; font-weight: 700; text-align: center; }
.thanks-details pre {
  white-space: pre-wrap;
  background: var(--bg);
  padding: 14px;
  border-radius: 10px;
  font-size: .85rem;
  overflow-x: auto;
}

/* ── Cart bar ───────────────────────────────────────── */
.cart-bar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(540px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(47, 49, 46, .25);
  z-index: 10;
  animation: rise .25s ease-out;
}
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } }
.cart-info { display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cart-count { font-size: .85rem; opacity: .75; }
.cart-total { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
.cart-bar .btn-primary { background: var(--sage); color: var(--ink); }
.cart-bar .btn-primary:hover { background: #a3b79e; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  padding-block: 40px 16px;
}
