/* Preppy Slimes — site styles. Tokens come from the Preppy Slimes design system. */

:root {
  /* color */
  --baby-pink: #F8BBD0;
  --plum: #7B1A5C;
  --hot-pink: #D6457F;
  --berry: #7A1E4A;
  --berry-deep: #4A0F2C;
  --blush: #FFE6F0;
  --white: #FFFFFF;

  /* type */
  --font-script: Pacifico, cursive;
  --font-rounded: Fredoka, system-ui, sans-serif;

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-8: 32px;

  /* radius */
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* shadow */
  --shadow-drip: 0 6px 0 rgba(214, 69, 127, 0.5);

  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--berry-deep);
  font-family: var(--font-rounded);
  font-size: 17px;
  line-height: 26px;
}

img, svg { max-width: 100%; }

a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--berry-deep); }

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1, h2, h3 { color: var(--berry); margin: 0 0 var(--space-4); }
h1 { font-size: 40px; line-height: 1.1; font-weight: 700; }
h2 { font-size: 28px; line-height: 1.2; font-weight: 600; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 var(--space-4); }

.script { font-family: var(--font-script); font-weight: 400; }
.tagline {
  font-size: 14px; line-height: 20px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--berry);
}
.caption { font-size: 14px; line-height: 20px; }
.muted { color: var(--berry); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-4); }
.section { padding: 56px 0; }
.section--blush { background: var(--blush); }

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

.skip-link {
  position: absolute; left: var(--space-4); top: -60px; z-index: 100;
  background: var(--plum); color: var(--white); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--space-4); color: var(--white); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--blush);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: 72px;
}
.brand { display: inline-flex; text-decoration: none; }
.brand svg { height: 48px; width: auto; display: block; }

.nav-toggle {
  display: none;
  font: 600 16px var(--font-rounded);
  color: var(--white); background: var(--plum);
  border: 0; border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4); cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-1); align-items: center; }
.site-nav a {
  display: block; padding: var(--space-2) 14px; border-radius: var(--radius-pill);
  text-decoration: none; font-weight: 600; color: var(--berry);
}
.site-nav a:hover { background: var(--blush); color: var(--berry-deep); }
.site-nav a[aria-current="page"] { background: var(--blush); color: var(--berry-deep); }
.site-nav a.nav-cta { background: var(--plum); color: var(--white); margin-left: var(--space-2); }
.site-nav a.nav-cta:hover { background: var(--berry-deep); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 2px solid var(--blush); padding: var(--space-2) var(--space-4) var(--space-4); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a.nav-cta { margin: var(--space-2) 0 0; text-align: center; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font: 600 17px/1 var(--font-rounded);
  padding: 14px 26px; border-radius: var(--radius-pill);
  border: 3px solid var(--plum);
  background: var(--plum); color: var(--white);
  text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-drip);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: var(--white); transform: translateY(2px); box-shadow: 0 4px 0 rgba(214, 69, 127, 0.5); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 rgba(214, 69, 127, 0.5); }
.btn--ghost { background: var(--white); color: var(--plum); }
.btn--ghost:hover { color: var(--plum); background: var(--blush); }
.btn--small { font-size: 15px; padding: 10px 18px; border-width: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- drip edge (signature) ---------- */

.drip-edge { display: block; width: 100%; height: 48px; }
.drip-edge path, .drip-edge circle { fill: var(--blush); }
.drip-edge--pink path, .drip-edge--pink circle { fill: var(--baby-pink); }

/* ---------- hero ---------- */

.hero { padding: 40px 0 24px; }
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-8); align-items: center; }
.hero h1 { font-family: var(--font-script); font-weight: 400; font-size: 52px; line-height: 1.25; color: var(--berry-deep); }
.hero p.lead { font-size: 20px; line-height: 30px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero-logo svg { width: 100%; height: auto; display: block; }

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-logo { order: -1; max-width: 420px; margin: 0 auto; }
  .hero h1 { font-size: 40px; }
}

.page-head { padding: 48px 0 8px; }
.page-head h1 { font-family: var(--font-script); font-weight: 400; font-size: 48px; line-height: 1.3; color: var(--berry-deep); }
.page-head p { max-width: 60ch; font-size: 19px; line-height: 28px; }

/* ---------- cards & grids ---------- */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

.card {
  background: var(--white);
  border: 3px solid var(--plum);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-drip);
  padding: 24px;
}
.card--blush { background: var(--blush); }
.card h3 { margin-bottom: var(--space-2); }

.price {
  display: inline-block; font-weight: 700; color: var(--white); background: var(--plum);
  border-radius: var(--radius-pill); padding: 2px 12px; font-size: 15px; line-height: 24px;
}
.chip {
  display: inline-block; font-size: 14px; line-height: 20px; font-weight: 600;
  padding: 2px 10px; border-radius: var(--radius-pill);
  background: var(--blush); color: var(--berry-deep);
}
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 var(--space-4); }

/* texture cards */
.texture-card { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: start; }
.texture-card .blob { width: 140px; height: 140px; }
@media (max-width: 520px) { .texture-card { grid-template-columns: 1fr; } }
.texture-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 var(--space-4); font-size: 15px; line-height: 22px; }
.texture-card dt { font-weight: 600; color: var(--berry); }
.texture-card dd { margin: 0; }

/* swatches */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--space-4); }
.swatch {
  border: 3px solid var(--plum); border-radius: var(--radius-lg); overflow: hidden; background: var(--white);
}
.swatch-color { height: 88px; position: relative; }
.swatch-body { padding: 10px 12px 12px; }
.swatch-body strong { display: block; font-weight: 600; line-height: 22px; }
.swatch-body span { font-size: 14px; line-height: 20px; color: var(--berry); }

.addon-icon { width: 100%; height: 88px; display: block; background: var(--blush); }

/* steps */
.steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--plum); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
  box-shadow: var(--shadow-drip);
}

/* ---------- reviews ---------- */

.stars { color: var(--hot-pink); letter-spacing: 2px; font-size: 18px; white-space: nowrap; }
.stars .off { color: var(--baby-pink); }
.review-card .meta { font-size: 14px; line-height: 20px; color: var(--berry); margin-bottom: var(--space-2); }
.review-card blockquote { margin: 0; }

.review-summary { display: grid; grid-template-columns: auto 1fr; gap: var(--space-8); align-items: center; }
.review-summary .big { font-size: 64px; line-height: 1; font-weight: 700; color: var(--berry); }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 52px 1fr 32px; gap: 12px; align-items: center; font-size: 14px; }
.bar { height: 12px; background: var(--white); border: 2px solid var(--plum); border-radius: var(--radius-pill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--hot-pink); }
@media (max-width: 560px) { .review-summary { grid-template-columns: 1fr; gap: var(--space-4); } }

.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: var(--space-8) 0 24px; }
.filter-btn {
  font: 600 15px var(--font-rounded); color: var(--berry);
  background: var(--white); border: 2px solid var(--plum); border-radius: var(--radius-pill);
  padding: 6px 14px; cursor: pointer;
}
.filter-btn:hover { background: var(--blush); }
.filter-btn[aria-pressed="true"] { background: var(--plum); color: var(--white); }
.select {
  font: 600 15px var(--font-rounded); color: var(--berry-deep);
  border: 2px solid var(--plum); border-radius: var(--radius-pill);
  padding: 6px 12px; background: var(--white);
}

.notice {
  border: 2px dashed var(--hot-pink); border-radius: var(--radius-lg);
  background: var(--blush); padding: 12px 16px; font-size: 15px; line-height: 22px; margin-bottom: 24px;
}

/* ---------- builder ---------- */

.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-8); align-items: start; padding-bottom: 64px; }
.builder-steps { display: grid; gap: 24px; }
.builder-aside { position: sticky; top: 96px; }
@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .builder-aside { position: static; order: -1; }
}

.b-step { padding: 24px; }
.b-step legend, .b-step .b-step-title {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 22px; line-height: 1.2; font-weight: 600; color: var(--berry); padding: 0; margin-bottom: 4px;
}
.b-step .num {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--plum); color: var(--white);
  display: inline-grid; place-items: center; font-size: 16px; font-weight: 700;
}
fieldset.b-step { min-width: 0; margin: 0; }
.b-hint { font-size: 14px; line-height: 20px; color: var(--berry); margin: 0 0 var(--space-4); }
.b-step.is-locked { opacity: .5; }

.opt-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.opt-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt .opt-box {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  border: 2px solid var(--baby-pink); border-radius: var(--radius-lg);
  padding: 12px; background: var(--white);
  transition: border-color .1s, box-shadow .1s, transform .1s;
}
.opt:hover .opt-box { border-color: var(--hot-pink); }
.opt input:checked + .opt-box { border: 3px solid var(--plum); padding: 11px; background: var(--blush); box-shadow: var(--shadow-drip); }
.opt input:focus-visible + .opt-box { outline: 3px solid var(--plum); outline-offset: 3px; }
.opt input:disabled + .opt-box { opacity: .4; cursor: not-allowed; }
.opt-name { font-weight: 600; line-height: 22px; }
.opt-meta { font-size: 14px; line-height: 20px; color: var(--berry); }
.opt-dot { width: 100%; height: 40px; border-radius: var(--radius-sm); border: 2px solid rgba(74, 15, 44, .2); }
.opt-icon { width: 100%; height: 56px; display: block; }
.opt .opt-check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--plum); color: var(--white); font-size: 13px; font-weight: 700;
  display: none; place-items: center;
}
.opt input:checked + .opt-box .opt-check { display: grid; }

.qty-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 2px solid var(--baby-pink); border-radius: var(--radius-lg); padding: 8px 10px; background: var(--white);
}
.qty-row.has-qty { border: 3px solid var(--plum); padding: 7px 9px; background: var(--blush); }
.qty-row .qty-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qty-row .qty-info svg { width: 44px; height: 44px; flex: none; }
.qty-ctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.qty-ctrl button {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--plum);
  background: var(--white); color: var(--plum); font: 700 18px/1 var(--font-rounded); cursor: pointer;
}
.qty-ctrl button:hover:not([disabled]) { background: var(--plum); color: var(--white); }
.qty-ctrl button[disabled] { opacity: .35; cursor: not-allowed; }
.qty-ctrl output { min-width: 18px; text-align: center; font-weight: 700; }

.text-input {
  width: 100%; font: 400 17px var(--font-rounded); color: var(--berry-deep);
  border: 2px solid var(--plum); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--white);
}

.preview-card { padding: 20px; }
.jar-wrap { background: var(--blush); border-radius: var(--radius-lg); padding: 8px; }
.jar-wrap svg { display: block; width: 100%; height: auto; max-height: 340px; }
.jar-name { text-align: center; font-family: var(--font-script); font-size: 26px; line-height: 1.4; color: var(--berry-deep); margin: 12px 0 4px; min-height: 36px; word-break: break-word; }

.summary { list-style: none; margin: 12px 0; padding: 0; font-size: 15px; line-height: 22px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--baby-pink); }
.summary li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary .empty { color: var(--berry); justify-content: center; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 16px; }
.total-row strong { font-size: 32px; line-height: 1; color: var(--berry); font-variant-numeric: tabular-nums; }
.aside-actions { display: grid; gap: 12px; }
.aside-actions .btn { width: 100%; }
.toast { min-height: 20px; font-size: 14px; color: var(--berry); text-align: center; margin: 8px 0 0; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--plum); color: var(--white); border-radius: var(--radius-lg); padding: 40px 32px; text-align: center; box-shadow: var(--shadow-drip); }
.cta-band h2 { color: var(--white); font-family: var(--font-script); font-weight: 400; font-size: 36px; line-height: 1.4; }
.cta-band p { max-width: 48ch; margin: 0 auto 24px; }
.cta-band .btn { background: var(--white); color: var(--plum); border-color: var(--white); }
.cta-band .btn:hover { background: var(--blush); color: var(--plum); }

/* ---------- footer ---------- */

.site-footer { background: var(--blush); margin-top: 0; }
.site-footer .inner { padding-top: 32px; padding-bottom: 40px; display: grid; gap: 24px; grid-template-columns: 1fr auto; align-items: center; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; }
.site-footer a { font-weight: 600; }
.site-footer .small { font-size: 14px; line-height: 20px; color: var(--berry); margin: 8px 0 0; }
@media (max-width: 640px) { .site-footer .inner { grid-template-columns: 1fr; } }

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

/* logo svg fills (shared with the design system marks) */
.c-slime { fill: var(--baby-pink); }
.c-tag { fill: var(--berry); }
.c-white { fill: var(--white); }

.btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-drip); }
.need { font-size: 14px; line-height: 20px; color: var(--berry); text-align: center; margin: 0; min-height: 20px; }

/* keep fieldset legends inside the card instead of on the border */
fieldset.b-step > legend { float: left; width: 100%; }
fieldset.b-step > legend + * { clear: both; }
.opt-grid--sizes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); }

/* anchors land below the sticky header */
[id] { scroll-margin-top: 88px; }

/* phones: smaller jar, sticky running total */
.mobile-total { display: none; }
@media (max-width: 900px) {
  .jar-wrap svg { max-height: 220px; }
  .mobile-total {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
    background: var(--plum); color: var(--white); text-decoration: none;
    border-radius: var(--radius-pill); padding: 10px 20px; box-shadow: var(--shadow-drip);
    font-weight: 600;
  }
  .mobile-total:hover { color: var(--white); }
  .mobile-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
  .builder { padding-bottom: 96px; }
}
