/* PLAZZE — sketchbook / marker-ink look.
   --accent is set per drop from data/site.json, so each drop can re-theme the site. */
:root {
  --paper: #f5f0e6;
  --paper-2: #ebe4d6;
  --ink: #141414;
  --muted: #6a6358;
  --accent: #e3342f;
  --on-accent: #ffffff;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 14px;
  --display: "Caveat", "Bradley Hand", cursive;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.muted { color: var(--muted); }
.center { text-align: center; }
.center .mascot { margin-inline: auto; }
.display, .page-title, .wordmark { font-family: var(--display); font-weight: 700; line-height: .9; letter-spacing: 0; }
.page-title { font-size: clamp(3.2rem, 8vw, 5.5rem); margin: 0 0 .3em; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 0 0 1rem; }
.link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); }
.link:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em;
  border: var(--border); border-radius: 999px;
  font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem;
  cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  background: var(--paper);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--ink); color: var(--paper);
  text-align: center; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .55em var(--gutter);
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem var(--gutter);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; transition: transform .2s ease; }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; padding: .3em 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.cart-btn {
  display: inline-flex; align-items: center; gap: .45em;
  background: var(--ink); color: var(--paper);
  border: var(--border); border-radius: 999px;
  padding: .45em 1em; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer;
}
.cart-count {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 .35em;
  background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: .8rem;
}
@media (max-width: 640px) {
  .header-inner { gap: .75rem; }
  .brand span { display: none; }
  .nav { gap: 1rem; }
  .nav a { font-size: .78rem; }
  .cart-btn .cart-label { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; margin-top: 1.5rem; }
.sticker {
  display: inline-block; margin: 0 0 1.2rem;
  background: var(--accent); color: var(--on-accent);
  border: var(--border); border-radius: 8px;
  padding: .35em .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
  transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--ink);
}
.wordmark { font-size: clamp(6rem, 20vw, 13rem); margin: 0; line-height: .85; }
.hero-tagline { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 600; line-height: 1.15; margin: 0 0 1.8rem; max-width: 30ch; }
.hero-art { position: relative; display: grid; place-items: center; width: 100%; }
.hero-art::before {
  content: ""; position: absolute; width: min(80%, 340px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); opacity: .14; filter: blur(2px);
}
.mascot { position: relative; width: min(75%, 300px); animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot.small { width: 160px; animation: none; margin-bottom: 1rem; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); border-block: var(--border); overflow: hidden; padding: .9rem 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 2.8rem); white-space: nowrap; padding-right: 2.5rem; }
.marquee-track span em { color: var(--accent); font-style: normal; padding-right: 2.5rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .mascot, .marquee-track { animation: none; }
}

/* ---------- Manifesto ---------- */
.manifesto { max-width: 920px; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); text-align: center; }
.manifesto .eyebrow { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: 0; text-transform: none; }
.manifesto-text { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; font-weight: 600; margin: 0; }
.manifesto-text mark { background: none; color: inherit; text-decoration: underline var(--ink); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.manifesto-sign { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-top: 2rem; }

/* ---------- Sections + product grid ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--gutter); }
.section.narrow { max-width: 720px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head .display { font-size: clamp(2.6rem, 6vw, 4rem); margin: 0; }
.drop-group + .drop-group { margin-top: 3.5rem; }
.drop-group h2 { font-family: var(--display); font-weight: 700; font-size: 2.6rem; margin: 0 0 1.2rem; display: flex; align-items: center; gap: .3rem .6rem; flex-wrap: wrap; }
.drop-group h2 img { width: 54px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1.6rem; }
.card { background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.product-card { display: block; text-decoration: none; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.product-card .img-wrap { position: relative; aspect-ratio: 1; background: var(--paper-2); border-bottom: var(--border); }
.product-card .img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.product-card .img-wrap img + img { opacity: 0; }
.product-card:hover .img-wrap img + img { opacity: 1; }
.product-card .meta { padding: .9rem 1rem 1rem; }
.product-card .name { font-family: var(--display); font-weight: 700; font-size: 1.8rem; line-height: 1.1; }
.product-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; }
.product-card .price { font-weight: 700; }
.dots { display: flex; gap: .3rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.empty { padding: 2rem; text-align: center; }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.gallery-main { aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: .7rem; margin-top: 1rem; flex-wrap: wrap; }
.thumbs button { width: 76px; aspect-ratio: 1; padding: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--paper-2); opacity: .6; }
.thumbs button[aria-pressed="true"], .thumbs button:hover { opacity: 1; border-width: 3px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { position: sticky; top: 90px; }
.pdp-info .sticker { font-size: .75rem; }
.pdp-info h1 { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 6vw, 4.4rem); line-height: .95; margin: 0 0 .4rem; }
.pdp-price { font-size: 1.4rem; font-weight: 700; margin: 0 0 1.2rem; }
.opt { margin: 1.3rem 0; }
.opt-label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: .55rem; }
.opt-label span { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: .4em; font-size: .95rem; }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: .55rem; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; padding: 0; outline-offset: 3px; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.size {
  min-width: 56px; padding: .6em .9em; border: var(--border); border-radius: 10px; background: #fff;
  font-weight: 700; cursor: pointer;
}
.size[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.buy-row { display: flex; gap: .8rem; margin: 1.6rem 0 1rem; }
.buy-row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: var(--border); border-radius: 999px; background: #fff; }
.qty button { background: none; border: 0; width: 2.4em; height: 2.4em; cursor: pointer; font-weight: 700; font-size: 1rem; }
.qty output { min-width: 1.6em; text-align: center; font-weight: 700; }
.pdp-desc { margin: 1.4rem 0 .6rem; }
.pdp-details { padding-left: 1.1em; margin: 0; }
.pdp-details li { margin: .2em 0; }
.pdp-note { font-size: .9rem; color: var(--muted); border-top: 2px dashed var(--ink); margin-top: 1.5rem; padding-top: 1rem; }
@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp-info { position: static; }
}

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(440px, 100vw); background: var(--paper); border-left: var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: var(--border); }
.drawer-head h2 { font-family: var(--display); font-weight: 700; margin: 0; font-size: 2.3rem; }
.icon-btn { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: .2em .4em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer-foot { border-top: var(--border); padding: 1rem 1.25rem 1.25rem; }
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: .9rem; padding: .9rem 0; border-bottom: 2px dashed rgba(20,20,20,.25); }
.line img { width: 80px; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); }
.line-name { font-weight: 700; }
.line-var { font-size: .88rem; color: var(--muted); }
.line .qty { margin-top: .45rem; transform: scale(.85); transform-origin: left center; }
.line-right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.remove { background: none; border: 0; font-size: .8rem; text-decoration: underline; cursor: pointer; color: var(--muted); padding: 0; }
.totals { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: .3rem; }
.ship-note { font-size: .85rem; color: var(--muted); margin: 0 0 1rem; }
.progress { height: 10px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin: .3rem 0 1rem; background: #fff; }
.progress span { display: block; height: 100%; background: var(--accent); }
.drawer-empty { text-align: center; padding: 2.5rem 0; }
.drawer-empty img { width: 120px; margin: 0 auto 1rem; }
.notice { background: #fff; border: 2px solid var(--ink); border-left: 8px solid var(--accent); border-radius: 8px; padding: .7rem .9rem; font-size: .9rem; margin-top: .8rem; }
.notice:empty { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 140%); transition: transform .25s ease;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: .75em 1.4em; font-weight: 700;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; padding: clamp(1.2rem, 3vw, 2rem); margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
.form input, .form textarea, .signup input {
  width: 100%; padding: .75em .9em; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 400;
}
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form-status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: clamp(3rem, 8vw, 6rem); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 3rem var(--gutter) 1.5rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.footer-inner h3 { font-family: var(--display); font-weight: 700; font-size: 2.1rem; margin: 0 0 .5rem; }
.footer-inner p { margin: 0 0 1rem; color: #cfc8bb; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-links a { text-decoration: none; color: var(--paper); }
.footer-links a:hover { color: var(--accent); }
.signup { display: flex; gap: .5rem; }
.signup input { background: var(--paper); color: var(--ink); border-color: var(--paper); min-width: 0; }
.signup .btn { box-shadow: none; padding-inline: 1.1em; border-color: var(--paper); }
.signup-status { font-size: .9rem; margin-top: .6rem; min-height: 1.2em; }
.footer-base { max-width: var(--max); margin: 0 auto; padding: 1.2rem var(--gutter) 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid #3a3a3a; font-size: .85rem; color: #a8a196; flex-wrap: wrap; }
.footer-base img { width: 40px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Prose ---------- */
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 2.3rem; margin: 2rem 0 .5rem; }
.prose p { margin: 0 0 1rem; }
.product-grid.few { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 440px)); }
