/* Dinky — dinkyphone.com. Palette lifted from the device photo:
   teal body, sunshine-yellow antenna/button, warm nursery light. */

:root {
  --cream: #FBF0DF;
  --cream-bright: #FFFDF6;
  --ink: #37302A;
  --teal: #2E9FA4;
  --teal-deep: #0F565C;
  --yellow: #FFC63F;
  --yellow-shadow: #C98A1E;
  --coral: #C4453B;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }

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

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

/* ---------- nav bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  transition: box-shadow 0.2s ease;
}

.top.is-stuck { box-shadow: 0 2px 0 rgba(15, 86, 92, 0.10), 0 10px 26px rgba(118, 76, 24, 0.12); }

.top-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--teal-deep);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark-dot { color: var(--yellow); }

/* ---------- chunky button ---------- */

.shop-btn {
  display: inline-block;
  padding: 0.8em 1.7em;
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--yellow-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease, visibility 0.15s;
}

.shop-btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--yellow-shadow); }

.shop-btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--yellow-shadow); }

.shop-btn:focus-visible { outline-color: var(--teal); outline-offset: 4px; }

.top-shop { font-size: 0.98rem; padding: 0.55em 1.3em; box-shadow: 0 4px 0 var(--yellow-shadow); }

.top-shop.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

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

.hero { padding: 2.2rem 1.5rem 0; text-align: center; }

h1 {
  margin: 0 auto;
  max-width: 21ch;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6.5vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--teal-deep);
}

.hero-sub {
  margin: 1.4rem auto 0;
  max-width: 54ch;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

/* The one loud thing on the page: the photo in a chunky toy frame. */
.snap {
  margin: 3rem auto 0;
  max-width: 1040px;
}

.snap img {
  display: block;
  width: 100%;
  height: auto;
  border: 10px solid var(--teal);
  border-radius: 34px;
  box-shadow: 0 12px 0 var(--teal-deep), 0 30px 60px rgba(118, 76, 24, 0.18);
  background: var(--teal);
}

/* ---------- facts ---------- */

.facts {
  margin: 4.5rem auto 0;
  max-width: 1040px;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
}

.fact h2 {
  margin: 0 0 0.45rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--teal-deep);
}

.fact p { margin: 0; }

/* ---------- shop band ---------- */

.band {
  margin: 4.5rem auto 0;
  max-width: 1040px;
  padding: 3rem 2rem 3.1rem;
  border-radius: 34px;
  background: var(--teal-deep);
  color: var(--cream);
  text-align: center;
  box-shadow: 0 10px 0 rgba(15, 86, 92, 0.35);
}

.band h2 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.1rem);
  line-height: 1.15;
  color: var(--cream-bright);
}

.band-lead { margin: 0.7rem auto 1.7rem; max-width: 44ch; }

.band .shop-btn { font-size: 1.18rem; padding: 0.85em 2.2em; }

.band .shop-btn:focus-visible { outline-color: var(--yellow); }

/* ---------- shop page (PDP) ---------- */

.pdp {
  max-width: 620px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 0;
  text-align: center;
}

.pdp-title {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 3.1rem);
  line-height: 1.05;
  color: var(--teal-deep);
}

.pdp-tag { margin: 0.45rem 0 1.7rem; }

.pdp-photo { margin: 0 auto; max-width: 470px; }

.pdp-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 9px solid var(--frame, var(--teal));
  border-radius: 30px;
  box-shadow: 0 10px 0 var(--frame-dark, var(--teal-deep)), 0 24px 48px rgba(118, 76, 24, 0.16);
  background: var(--cream-bright);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.colour-line { margin: 1.5rem 0 0.7rem; }

.colour-line strong { font-weight: 700; }

.swatches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(55, 48, 42, 0.18);
  padding: 0;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.08s ease;
}

.swatch:hover { transform: scale(1.12); }

.swatch[aria-checked="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--cream-bright);
}

.swatch:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.pdp-price {
  margin: 1.7rem 0 0.15rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--teal-deep);
}

.pdp-pricenote { margin: 0 0 1.3rem; font-size: 0.92rem; color: #8A7B68; }

.pdp .shop-btn { font-size: 1.18rem; padding: 0.85em 2.4em; }

.added {
  margin: 1.5rem auto 0;
  max-width: 440px;
  padding: 1.05rem 1.5rem;
  border-radius: 22px;
  background: #2F9E53;
  color: var(--cream-bright);
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  box-shadow: 0 6px 0 #1E6B37;
}

.added[hidden] { display: none; }

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

.foot {
  margin: 3.4rem 0 0;
  padding: 0 1.5rem 3rem;
  text-align: center;
}

.foot p { margin: 0.25rem 0; }

.foot-small { font-size: 0.9rem; color: #8A7B68; }

/* ---------- confetti canvas ---------- */

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .top-inner { padding: 0.7rem 1rem; }
  .wordmark { font-size: 1.55rem; }
  .facts { grid-template-columns: 1fr; gap: 1.9rem; }
  .band { margin-left: 1rem; margin-right: 1rem; padding: 2.4rem 1.4rem 2.5rem; }
  .snap { margin-top: 2.4rem; }
  .snap img { border-width: 7px; border-radius: 26px; box-shadow: 0 8px 0 var(--teal-deep), 0 22px 44px rgba(118, 76, 24, 0.18); }
  .pdp-photo img { border-width: 7px; border-radius: 24px; box-shadow: 0 8px 0 var(--frame-dark, var(--teal-deep)), 0 18px 36px rgba(118, 76, 24, 0.16); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shop-btn, .swatch, .pdp-photo img, .top { transition: none; }
}
