/* Stickee Stickers — shared site styles */

:root {
  --pink: #ffa8dc;
  --pink-soft: #ffd6ee;
  --blue: #cee5fd;
  --cream: #fffdd0;
  --cream-soft: #fffeea;
  --ink: #1b1449;
  --ink-soft: #4a4570;
  --green: #55bb70;
  --green-dark: #2f8a4a;
  --white: #ffffff;
  --danger: #c0264b;
  --danger-soft: #ffe3ea;
  --warn-soft: #fff4c7;

  --font-display: 'Pangolin', 'Comic Sans MS', cursive;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --outline: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --gutter: 16px;
  --max: 1120px;
}

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

/* Author display rules (e.g. img { display: block }) would otherwise override the hidden attribute. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--cream-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--pink);
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

/* ---------- Header ---------- */

.announce {
  margin: 0;
  background: var(--pink);
  text-align: center;
  font-size: 0.95rem;
  padding: 0.4rem var(--gutter);
  font-weight: 600;
}

.site-header {
  background: var(--white);
  border-bottom: var(--outline);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  white-space: nowrap;
}

.brand img {
  width: 38px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--blue);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: var(--outline);
}

.cart-count {
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  min-width: 1.6em;
  padding: 0 0.35em;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
}

.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    background: var(--blue);
    border: var(--outline);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    color: var(--ink);
    cursor: pointer;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: var(--outline);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem var(--gutter) 1rem;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0.9rem;
  }

  .cart-link {
    justify-content: space-between;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: var(--outline);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.button-primary {
  background: var(--green);
  color: var(--white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.button-pink {
  background: var(--pink);
}

.button-small {
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.button[disabled],
.button[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button.danger {
  color: var(--danger);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.section-blue {
  background: var(--blue);
}

.section-cream {
  background: var(--cream);
}

.section-pink {
  background: var(--pink-soft);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-head p {
  font-size: 1.15rem;
}

.page-head {
  background: var(--blue);
  border-bottom: var(--outline);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
}

.page-head p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0;
}

.card {
  background: var(--white);
  border: var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ---------- Home ---------- */

.hero {
  background: var(--blue);
  border-bottom: var(--outline);
  padding: clamp(2.5rem, 7vw, 5rem) 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero p.lead {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
}

/* The offset shadow is part of the image (mascot-hero.png): a CSS drop-shadow filter on an
   animated image renders washed out and blurry in Safari. */
.hero-art .mascot {
  width: 100%;
  transform: rotate(-6deg);
  animation: bob 4s ease-in-out infinite;
}

.hero-art .badge {
  position: absolute;
  font-family: var(--font-display);
  background: var(--cream);
  border: var(--outline);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  padding: 0.3rem 0.9rem;
  font-size: 1.1rem;
  white-space: nowrap;
}

.hero-art .badge-1 {
  top: 6%;
  right: -4%;
  transform: rotate(8deg);
  background: var(--pink);
}

.hero-art .badge-2 {
  bottom: 8%;
  left: -6%;
  transform: rotate(-8deg);
}

@keyframes bob {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(-3deg) translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .mascot {
    animation: none;
  }
}

@media (max-width: 760px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-art {
    width: min(70%, 260px);
    order: -1;
  }
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  row-gap: 2.5rem;
}

.step {
  position: relative;
  padding-top: 2.25rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -1.4rem;
  left: 1.25rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  background: var(--pink);
  border: var(--outline);
  border-radius: 50%;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-card .tag {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  margin-bottom: 0.75rem;
  background: var(--cream);
}

.product-card .tag.live {
  background: var(--green);
  color: var(--white);
}

.product-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.checklist li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.checklist li::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: var(--outline);
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 900;
}

.checklist strong {
  display: block;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.cta-box {
  text-align: center;
  background: var(--pink);
  border: var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
}

.cta-box .hero-actions {
  justify-content: center;
}

/* ---------- Finishes ---------- */

.finish-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.finish-card .finish-photo {
  aspect-ratio: 1;
  border-bottom: var(--outline);
  overflow: hidden;
  background: var(--blue);
}

.finish-card .finish-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.finish-card:hover .finish-photo img {
  transform: scale(1.06) rotate(1deg);
}

.finish-card .finish-body {
  padding: 1rem 1.25rem 1.25rem;
}

.finish-card h2,
.finish-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.framed {
  border: var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.spaced {
  margin-top: 3rem;
}

.finish-card p {
  margin: 0;
  font-size: 0.97rem;
}

.finish-card .price-note {
  margin-top: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
}

/* ---------- FAQ & prose ---------- */

.faq {
  display: grid;
  gap: 1rem;
}

.faq details {
  background: var(--white);
  border: var(--outline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 1rem 1.25rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq .answer {
  padding: 0 1.25rem 1rem;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

.faq-group + .faq-group {
  margin-top: 2.5rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.6rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose .updated {
  color: var(--ink-soft);
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label,
.field legend,
.field .label {
  font-weight: 800;
}

.field .hint {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='number'],
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: var(--outline);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  width: 100%;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 1px;
}

input[aria-invalid='true'],
select[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 600;
}

.checkbox input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.25rem;
  accent-color: var(--green);
  flex: none;
}

.notice {
  border: var(--outline);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--blue);
  margin-bottom: 1rem;
}

.notice.warn {
  background: var(--warn-soft);
}

.notice.error {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.notice > :last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.site-footer a {
  color: var(--cream);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-inner h2 {
  font-size: 1.2rem;
  color: var(--pink);
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.site-footer .brand {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.site-footer .copyright {
  text-align: center;
  margin: 2.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

/* Linked terms (e.g. /terms#smooth-outline): clear the sticky header and highlight the clause. */
.prose [id] {
  scroll-margin-top: 90px;
}

.prose li:target {
  background: var(--warn-soft);
  border-radius: 6px;
  outline: 6px solid var(--warn-soft);
}

/* Header sign-in: Google's button when signed out, "My orders" with your photo when signed in. */
.nav-account {
  display: flex;
  align-items: center;
}

.nav-account a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

/* Google draws its button in a frame we can't restyle, so we wrap it in the Cart button's outline,
   at the Cart button's height, and enlarge it slightly so Google's own thin grey border is
   clipped off underneath ours. */
.nav-signin {
  height: 2.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: var(--outline);
  border-radius: 999px;
  overflow: hidden;
}

.nav-signin > * {
  transform: scale(1.08);
}

.nav-signin:not([data-ready]) {
  visibility: hidden;
}

@media (max-width: 760px) {
  .nav-signin {
    align-self: flex-start;
    margin: 0.4rem 0.9rem;
  }
}
