/* =========================================================
   CHIBI DUCKZ — styles
   1. Colors + fonts (light + dark)   5. Meet the Duckz
   2. Base + type                     6. Our Story
   3. Header + menu                   7. Stay in Touch (footer)
   4. Hero + pond                     8. Motion (hover, bobbing, squeeze)
   ========================================================= */

/* ---------- 1. COLORS + FONTS ----------
   Change a value here and it updates everywhere on the page. */
:root {
  /* Fonts */
  --font-heading: "Fredoka", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, sans-serif;

  /* Brand colors (from the brief) */
  --duck:      #FFD23F;  /* duck yellow: buttons, highlights */
  --duck-dark: #E0AE12;  /* darker yellow: button "edge" */
  --pool:      #3BA7E5;  /* pool blue: the water + Meet the Duckz section */
  --pool-soft: #A8DBF6;  /* light pool blue: back wave */
  --offduty-bg: #FFF1BF; /* pale yellow behind the Off duty drawings */

  /* Page colors */
  --bg:        #FFFBEF;  /* cream page background */
  --surface:   #FFFFFF;  /* cards */
  --text:      #2B2B2B;  /* soft charcoal */
  --muted:     #4D4D4D;  /* softer text (still easy to read) */
  --on-pool:   #1C1C1C;  /* text that sits on the blue section */
  --btn-text:  #2B2B2B;  /* text on yellow buttons */
  --line:      rgba(43, 43, 43, .12);
  --focus:     #0B5FA5;  /* keyboard focus ring */
  --shadow:    0 1px 0 rgba(43,43,43,.05), 0 12px 28px -14px rgba(43,43,43,.35);

  /* Placeholder highlight: shows clearly where you still need to fill something in */
  --fill-bg:   #FFE3EE;
  --fill-text: #A3134F;

  color-scheme: light;
}

/* Dark mode colors ("night pool"). The site always opens in light mode;
   dark is only used when the visitor picks it with the moon button (remembered on their device). */
:root[data-theme="dark"] {
  --bg: #0C1F2C; --surface: #15344A; --text: #EEF6FA; --muted: #B9CFDB; --on-pool: #F4FAFD;
  --pool: #1C6A94; --pool-soft: #164B69; --offduty-bg: #112B3D;
  --line: rgba(238,246,250,.16); --focus: #8BD3FF;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 30px -14px rgba(0,0,0,.65);
  --fill-bg: #4A1630; --fill-text: #FFC2DA;
  color-scheme: dark;
}

/* ---------- 2. BASE + TYPE ----------
   clamp(smallest, preferred, largest) makes text grow smoothly with the screen. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem); /* 18–20px: easy for young readers */
  line-height: 1.6;
  overflow-x: hidden;               /* safety net: never scroll sideways */
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h3 { font-size: 1.6rem; }
p  { margin: 0 0 1em; max-width: 62ch; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }

/* Content width: fills small screens, stops at 1180px on big ones */
.wrap { width: min(100% - 2rem, 1180px); margin-inline: auto; }

/* Keyboard focus ring: always visible when tabbing */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }

/* Hidden on screen, but read aloud by screen readers */
.sr-only {
  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: 1rem; top: -4rem; z-index: 100;
  background: var(--duck); color: var(--btn-text); padding: .75rem 1rem;
  border-radius: 12px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* [FILL IN] placeholders: bright on purpose so you can't miss them. Delete once filled. */
.fill-in {
  display: inline-block; padding: .35rem .7rem; border-radius: 10px;
  background: var(--fill-bg); color: var(--fill-text);
  border: 2px dashed currentColor; font-weight: 800;
}
.fill-in-small { font-size: .85rem; line-height: 1.3; padding: .2rem .5rem; }

/* Buttons: rounded, yellow with dark text, at least 48px tall so they're easy to tap */
.btn {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem .6rem;
  min-height: 48px; padding: .75rem 1.6rem;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-primary { background: var(--duck); color: var(--btn-text); box-shadow: 0 4px 0 var(--duck-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--duck-dark); }
.btn-dark { background: #2B2B2B; color: #FFFBEF; box-shadow: 0 4px 0 #000; }
.btn-dark:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.btn-big { min-height: 58px; padding-inline: 2.1rem; font-size: 1.3rem; }

/* ---------- 3. HEADER + MENU ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: .5rem; min-height: 72px; }
.brand { display: flex; align-items: center; margin-right: auto; min-height: 48px; border-radius: 12px; }
.brand-logo { height: 54px; width: auto; }

.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: flex; align-items: center; min-height: 48px; padding: 0 1rem;
  border-radius: 999px; text-decoration: none; font-weight: 800;
}
.nav-links .nav-cta { background: var(--duck); color: var(--btn-text); }

.menu-toggle, .theme-toggle {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: transparent; color: var(--text);
  border: 2px solid var(--line); cursor: pointer;
}
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* No JavaScript = no buttons (the device's own light/dark setting still works) */
html:not(.js) .theme-toggle, html:not(.js) .menu-toggle { display: none; }

/* The three-line "hamburger" icon, which turns into an X when open */
.menu-toggle { display: none; }
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 20px; height: 2.5px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after  { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* Phones: the menu folds away behind the button */
@media (max-width: 759px) {
  .brand-logo { height: 46px; }
  .js .menu-toggle { display: inline-grid; }
  .js .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: .75rem 1rem 1.25rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .js .nav-links.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-links a { justify-content: center; font-size: 1.15rem; }
  /* Without JavaScript, the links simply wrap under the logo */
  html:not(.js) .nav { flex-wrap: wrap; padding-bottom: .5rem; }
}

/* ---------- 4. HERO + POND ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) 0; overflow: hidden; }
.hero-grid { display: grid; gap: 1.5rem; align-items: end; }
.hero-text { text-align: center; }
.hero-text .lead { margin: 0 auto 1.75rem; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); color: var(--muted); }

/* The pond holds the five duck photos. Each duck is placed by percent,
   so the group scales together on every screen size. */
.pond {
  position: relative; z-index: 0;
  width: 100%; max-width: 660px; margin-inline: auto;
  aspect-ratio: 600 / 330;
}
.pond-duck { position: absolute; height: auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.12)); }
.d-grumpz  { left: 0;   bottom: 9%;  width: 24%; }
.d-smirkz  { right: 0;  bottom: 9%;  width: 24%; }
.d-snoozz  { left: 17%; bottom: 1%;  width: 25%; }
.d-frazzle { right: 17%; bottom: 1%; width: 25%; }
.d-beamz   { left: 33%; bottom: 3%;  width: 34%; }

/* The water strip: full width, laps over the bottoms of the ducks */
.waves {
  position: relative; z-index: 1;
  display: block; width: 100%;
  height: clamp(60px, 4rem + 3vw, 110px);
  margin-top: calc(-1 * clamp(40px, 2.6rem + 2vw, 74px));
  margin-bottom: -1px;   /* hides a hairline seam on some screens */
}
.wave-back  { fill: var(--pool-soft); }
.wave-front { fill: var(--pool); }

/* Big tablets and desktops: words on the left, ducks on the right */
@media (min-width: 900px) {
  h1 { font-size: clamp(3rem, 1.5rem + 3vw, 4.6rem); }
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 2.5rem; align-items: center; }
  .hero-text { text-align: left; padding-bottom: 6rem; }   /* keeps the button clear of the waves */
  .hero-text .lead { margin-inline: 0; }
  .pond { align-self: end; }
}

/* ---------- 5. MEET THE DUCKZ ---------- */
.duckz {
  background: var(--pool); color: var(--on-pool);
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 6rem);
}
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head p { margin-inline: auto; font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); font-weight: 700; }

/* 2 across on phones, 3 on tablets, 5 on desktops. The last card centers itself. */
.duck-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
}
.duck-card {
  /* --tint is each duck's own color, used for the soft circle behind the photo */
  --tint: #FFE58A;
  flex: 0 1 calc(50% - .5rem);
  min-width: 0;
  background: var(--surface); color: var(--text);
  border-radius: 28px;
  padding: 1rem 1rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.c-beamz   { --tint: #FFE27A; }
.c-grumpz  { --tint: #C9CED6; }
.c-snoozz  { --tint: #A9D8F5; }
.c-frazzle { --tint: #FFB3A3; }
.c-smirkz  { --tint: #BFE59B; }
.duck-card h3 { margin: .6rem 0 .35rem; }
.duck-card p  { margin: 0 auto; line-height: 1.45; color: var(--muted); }
@media (min-width: 640px)  { .duck-list { gap: 1.25rem; } .duck-card { flex-basis: calc(33.333% - .84rem); } }
@media (min-width: 1040px) { .duck-card { flex-basis: calc(20% - 1rem); } }
@media (max-width: 400px)  { .duck-card { padding-inline: .7rem; } .duck-card p { font-size: 1.05rem; } }

/* The squeeze button is the whole duck photo, sitting on a colored circle */
.squeeze {
  position: relative; display: block; width: 100%; max-width: 190px; margin: 0 auto;
  aspect-ratio: 1; padding: 8% 12% 4%;
  border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tint) 75%, var(--surface)) 0 62%, transparent 63%);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.squeeze img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 90%; }
.squeak {
  position: absolute; top: 0; right: -4%;
  padding: .2rem .65rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
  opacity: 0; transform: translateY(6px) scale(.8); pointer-events: none;
}
.squeeze-hint { text-align: center; margin: 2rem auto 0; font-weight: 700; }
html:not(.js) .squeeze-hint { display: none; }

/* ---------- 5b. OFF DUTY (pose drawings) ----------
   Phones: a row you swipe sideways. Tablets: 4 across. Desktops: 6 across. */
.offduty {
  background: var(--offduty-bg);
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.pose-list {
  list-style: none; margin: 0; padding: .5rem 0 1rem;
  display: grid; gap: 1rem;
  grid-auto-flow: column; grid-auto-columns: 54%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.pose {
  --tint: #FFE27A;
  scroll-snap-align: start;
  background: var(--surface); color: var(--text);
  border-radius: 24px; box-shadow: var(--shadow);
  padding: .9rem .9rem 1.1rem; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pose.c-grumpz  { --tint: #C9CED6; }
.pose.c-snoozz  { --tint: #A9D8F5; }
.pose.c-frazzle { --tint: #FFB3A3; }
.pose.c-smirkz  { --tint: #BFE59B; }
.pose img {
  display: block; width: 100%; aspect-ratio: 4 / 5; height: auto;
  object-fit: contain; object-position: 50% 100%;
  padding: 10% 8% 6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 75%, transparent), transparent) 50% 85% / 95% 70% no-repeat;
  border-radius: 18px;
}
.pose img[src*="smirkz-wall"] { padding: 4% 0 2%; }
.pose p { margin: .6rem 0 0; line-height: 1.35; font-size: 1.05rem; color: var(--muted); }
.pose b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; color: var(--text); }
.pose-hint { text-align: center; margin: .25rem 0 0; font-weight: 700; color: var(--muted); font-size: 1rem; }
@media (min-width: 640px) {
  .pose-list { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; gap: 1.25rem; }
  .pose-hint { display: none; }
}
@media (min-width: 1040px) { .pose-list { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (hover: hover) {
  .pose:hover { transform: translateY(-6px); box-shadow: var(--shadow), 0 18px 30px -18px rgba(0,0,0,.35); }
}
@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) { .pose:hover img { animation: wiggle .5s ease; } }
}

/* ---------- 6. OUR STORY ---------- */
.story { padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }
.story-grid { display: grid; gap: 1rem; }
.story-text p { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.4rem); }
@media (min-width: 900px) { .story-grid { grid-template-columns: 1fr 1.6fr; gap: 3rem; } }

/* ---------- 6b. THE CHIBI DUCKZ WORLD (collect + play) ---------- */
.world { padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.world-head p { max-width: 46ch; color: var(--muted); font-weight: 600; }
.world-grid { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .world-grid { grid-template-columns: 1fr 1.35fr; align-items: start; } }

.world-panel {
  background: var(--surface); border-radius: 32px; box-shadow: var(--shadow);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.world-panel h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.world-panel > p { color: var(--muted); }
.world-collect { border-top: 8px solid var(--duck); }
.world-play { border-top: 8px solid var(--pool); scroll-margin-top: 90px; }
.world-kicker {
  display: inline-block; margin-bottom: .75rem !important; padding: .15rem .8rem; border-radius: 999px;
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: #2B2B2B !important;
}
.world-collect .world-kicker { background: var(--duck); }
.world-play .world-kicker { background: #A8DBF6; }
.world-points { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.world-points li { position: relative; padding-left: 1.8rem; margin-bottom: .4rem; font-weight: 700; }
.world-points li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--duck) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232B2B2B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.app-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 600px) { .app-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app-card a {
  display: flex; gap: .9rem; align-items: flex-start; height: 100%;
  padding: .85rem; border-radius: 20px; text-decoration: none;
  border: 2px solid var(--line); background: var(--bg);
  transition: transform .2s ease, border-color .2s ease;
}
.app-card img { flex: 0 0 auto; width: 68px; height: 68px; border-radius: 22%; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
.app-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.app-info strong { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.app-info span { font-size: .98rem; line-height: 1.4; color: var(--muted); }
.app-info .app-soon { font-size: .85rem; font-weight: 800; color: var(--text); margin-top: .2rem; }
@media (hover: hover) {
  .app-card a:hover { transform: translateY(-3px); border-color: var(--pool); }
}

/* ---------- 7. STAY IN TOUCH (footer) ---------- */
.site-footer { padding-bottom: 1.5rem; }
.flock-box {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem;
  background: var(--duck); color: var(--btn-text);
  border-radius: 36px; padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
}
.flock-box h2 { margin-bottom: .3rem; }
.flock-box a { color: #2B2B2B; }
.flock-box .signup-msg { color: #2B2B2B; }
.flock-box p  { margin: 0; font-size: 1.2rem; }
@media (min-width: 760px) {
  .flock-box { flex-direction: row; justify-content: space-between; text-align: left; }
}

.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1rem 1.5rem; padding-top: 1.5rem; color: var(--muted); font-size: 1rem;
}
.small-print { margin: 0; }
.social { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--line); color: var(--text);
}
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social svg .dot { fill: currentColor; stroke: none; }
.social-handle { font-weight: 800; color: var(--text); }

/* ---------- 7b. SIGN-UP FORM (inside the yellow box) ---------- */
.flock-text { max-width: 30rem; }
.flock-email { margin-top: .75rem !important; font-size: 1rem !important; }
.flock-email a { font-weight: 800; }
.signup { width: 100%; max-width: 30rem; text-align: left; }
.signup label { display: block; font-weight: 800; margin-bottom: .4rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.signup input {
  flex: 1 1 14rem; min-width: 0; min-height: 52px; padding: .6rem 1rem;
  border: 2px solid #2B2B2B; border-radius: 999px; background: #FFFFFF; color: #2B2B2B;
  font: inherit; font-size: 1.1rem;
}
.signup input::placeholder { color: #707070; }
.signup .btn { flex: 0 0 auto; min-height: 52px; }
.signup-small { font-size: .95rem !important; margin-top: .6rem !important; }
.signup-small a { font-weight: 700; }
.signup-msg { font-weight: 800; margin-top: .5rem !important; }
.signup-msg:empty { display: none; }
.signup.is-done .signup-row { display: none; }

/* ---------- 9. SHOP ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
@media (min-width: 900px) { .hero .hero-actions { justify-content: flex-start; } }
.btn-ghost { border-color: currentColor; color: var(--text); }
.duckz-cta { text-align: center; margin: 1.5rem auto 0; max-width: none; }

.shop { padding-block: clamp(2rem, 1rem + 4vw, 4rem) clamp(3rem, 2rem + 4vw, 5rem); }
.shop-head { text-align: center; margin-bottom: 2.5rem; }
.shop-head .lead { margin-inline: auto; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); color: var(--muted); }
.shop-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.shop-perks li {
  padding: .35rem .9rem; border-radius: 999px; font-size: 1rem; font-weight: 700;
  background: color-mix(in srgb, var(--pool) 16%, var(--surface)); border: 1px solid var(--line);
}

/* 2 across on phones, 3 on tablets, 4 on desktops */
.product-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px)  { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1040px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }

.product {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow); scroll-margin-top: 90px;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* The photo tile: front view, and the side view fades in on hover */
.product-photo { position: relative; aspect-ratio: 1; background: #FFFFFF; }
.product-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-alt { opacity: 0; transition: opacity .25s ease; }
.product-info { display: flex; flex-direction: column; flex: 1; padding: .9rem 1rem 1.1rem; }
.product-info h2 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); margin: 0 0 .3rem; }
.product-info p { font-size: 1rem; line-height: 1.45; color: var(--muted); margin: 0 0 .6rem; }
.product-tag {
  align-self: flex-start; padding: .1rem .6rem; border-radius: 999px; margin-bottom: .5rem !important;
  background: var(--duck); color: #2B2B2B !important; font-family: var(--font-heading); font-weight: 600; font-size: .95rem !important;
}
.product-tag-new { background: color-mix(in srgb, var(--pool) 30%, var(--surface)); color: var(--text) !important; }
.product-price { margin-top: auto !important; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem !important; color: var(--text) !important; }
.product-add { width: 100%; min-height: 50px; font-size: 1.1rem; }
.product-add.is-added { background: #2E9E5B; color: #FFFFFF; box-shadow: 0 4px 0 #1F6E3F; }
@media (max-width: 420px) {
  .product-info { padding: .75rem .7rem .9rem; }
  .product-add { font-size: 1rem; padding-inline: .6rem; }
}

/* ---------- 10. BAG BUTTON + BAG DRAWER ---------- */
.bag-toggle {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: transparent; color: var(--text); border: 2px solid var(--line); cursor: pointer;
}
.bag-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bag-count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--duck); color: #2B2B2B; font-size: .8rem; font-weight: 800; line-height: 1;
  border: 2px solid var(--bg);
}
.bag-count[hidden] { display: none; }
html:not(.js) .bag-toggle, html:not(.js) [data-add-to-bag] { display: none; }

.bag {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(420px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  background: var(--bg); color: var(--text);
  box-shadow: -20px 0 40px -20px rgba(0,0,0,.45);
}
.bag::backdrop { background: rgba(10, 20, 30, .45); }
.bag-inner { display: flex; flex-direction: column; height: 100%; }
.bag-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.bag-head h2 { margin: 0; font-size: 1.7rem; }
.bag-close {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line);
  background: transparent; color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.bag-lines { list-style: none; margin: 0; padding: .5rem 1.25rem; flex: 1; overflow-y: auto; }
.bag-empty { padding: 2rem 0; text-align: center; color: var(--muted); }
.bag-empty a { font-weight: 800; color: var(--text); }
.bag-line { display: grid; grid-template-columns: 72px 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.bag-line img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: #FFFFFF; }
.bag-line-info { display: flex; flex-direction: column; gap: .15rem; font-size: 1rem; }
.bag-line-info strong { font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; }
.qty { display: inline-flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.qty button {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 1.2rem; font-weight: 800; cursor: pointer;
}
.qty span { min-width: 1.5ch; text-align: center; font-weight: 800; }
.bag-remove { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; }
.bag-foot { padding: 1rem 1.25rem 1.5rem; border-top: 1px solid var(--line); }
.bag-total { display: flex; justify-content: space-between; font-size: 1.2rem; margin: 0 0 .25rem; max-width: none; }
.bag-small { font-size: .95rem; color: var(--muted); margin: 0 0 1rem; }
.bag-checkout { width: 100%; }
.bag-checkout:disabled { opacity: .5; cursor: not-allowed; }
.bag-note { font-weight: 700; margin: .75rem 0 0; }
.bag-note:empty { display: none; }

/* ---------- 11. THANK-YOU PAGE ---------- */
.thanks { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.thanks-box { display: grid; gap: 2rem; align-items: center; justify-items: center; text-align: center; max-width: 900px; }
.thanks-box img { width: min(240px, 60vw); }
.thanks-box .lead { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); color: var(--muted); margin-inline: auto; }
@media (min-width: 760px) {
  .thanks-box { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .thanks-box .lead { margin-inline: 0; }
  .thanks-box .hero-actions { justify-content: flex-start; }
}

/* Privacy Policy and other text pages: one comfy reading column */
.legal { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem); }
.legal-wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); }
.legal h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin-top: 2.2rem; }
.legal ul { padding-left: 1.4rem; margin: 0 0 1em; }
.legal li { margin-bottom: .3em; }
.legal a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--pool); }
.legal-crumb { font-size: 1rem; color: var(--muted); margin-bottom: 1.5rem; }
.small-print a { color: inherit; }
.legal + .site-footer { border-top: 1px solid var(--line); }

/* ---------- 8. MOTION ----------
   Everything below is "extra". With motion turned off, the page looks the same, just still. */

/* Hover effects only on devices with a real mouse (not phones) */
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--duck-dark); }
  .btn-dark:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #000; }
  .nav-links a:not(.nav-cta):hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
  .menu-toggle:hover, .theme-toggle:hover, .bag-toggle:hover, .bag-close:hover, .social a:hover { border-color: var(--text); }
  .duck-card:hover, .product:hover { transform: translateY(-6px); box-shadow: var(--shadow), 0 18px 30px -18px rgba(0,0,0,.35); }
  .product:hover .product-alt { opacity: 1; }
  .btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
}

@media (prefers-reduced-motion: no-preference) {
  /* The hero ducks bob gently on the water, each at its own rhythm */
  .pond-duck {
    transform-origin: 50% 100%;
    animation: bob 3.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * -.7s);
  }
  .wave-back  { animation: drift 9s linear infinite; }
  .wave-front { animation: drift 6s linear infinite reverse; }

  @media (hover: hover) { .duck-card:hover .squeeze img { animation: wiggle .5s ease; } }

  /* Squeeze a duck (the class is added by script.js) */
  .squeeze.is-squeezed img { animation: squish .42s cubic-bezier(.3, 1.5, .5, 1); }
  .squeeze.is-squeezed .squeak { animation: pop .9s ease-out; }

  .theme-toggle svg { transition: transform .3s ease; }
  .theme-toggle:active svg { transform: rotate(-30deg) scale(.9); }
}

/* With reduced motion, the squeeze still shows feedback, just without movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .squeeze.is-squeezed .squeak { opacity: 1; transform: none; }
}

@keyframes bob    { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(5%) rotate(-2deg); } }
@keyframes drift  { from { transform: translateX(0); } to { transform: translateX(150px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 65% { transform: rotate(5deg); } }
@keyframes squish { 0% { transform: scale(1); } 35% { transform: scale(1.12, .82); } 70% { transform: scale(.95, 1.07); } 100% { transform: scale(1); } }
@keyframes pop    { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 20% { opacity: 1; transform: translateY(-4px) scale(1); } 80% { opacity: 1; transform: translateY(-8px); } 100% { opacity: 0; transform: translateY(-14px); } }

/* ---------- 9b. ONE-DUCK PAGES (/yellow-chibi-duck etc.) ---------- */
a.product-photo { display: block; }
.product-info h2 a { color: inherit; text-decoration: none; }
.product-info h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pdp { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
.crumbs { font-weight: 700; font-size: 1rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: inherit; }
.crumbs [aria-current] { color: var(--text); }

.pdp-grid { display: grid; gap: clamp(1.25rem, 1rem + 2vw, 3rem); align-items: start; }
@media (min-width: 820px) { .pdp-grid { grid-template-columns: 1.05fr 1fr; } }

.pdp-photo { aspect-ratio: 1; background: #FFFFFF; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.pdp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs { display: flex; gap: .75rem; margin-top: .75rem; }
.pdp-thumbs button {
  width: 84px; aspect-ratio: 1; padding: 0; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: #FFFFFF; border: 3px solid transparent; box-shadow: var(--shadow);
}
.pdp-thumbs button[aria-pressed="true"] { border-color: var(--duck); }
.pdp-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.pdp-info h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin: .5rem 0 .4rem; }
.pdp-info .product-tag { align-self: flex-start; display: inline-block; }
.pdp-line { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); font-weight: 700; color: var(--muted); margin: 0 0 1rem; }
.pdp-price { font-family: var(--font-heading); font-weight: 700; font-size: 2rem; margin: 0 0 1rem; }
.pdp-add { width: 100%; max-width: 380px; min-height: 56px; font-size: 1.2rem; }
.pdp-perks { justify-content: flex-start; margin: 1.1rem 0 1.25rem; }
.pdp-desc { color: var(--muted); max-width: 60ch; margin: 0; }

.pdp-meet { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); text-align: center; background: var(--offduty-bg); border-radius: 32px; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1rem, .5rem + 2vw, 2rem); }
.pdp-meet h2 { margin-bottom: .3rem; }
.pdp-meet-line { margin: 0 auto 1.5rem; font-weight: 700; max-width: 40ch; }
.pdp-poses { justify-content: center; }
@media (min-width: 640px) {
  .pdp-poses { display: flex; flex-wrap: wrap; }
  .pdp-poses .pose { flex: 0 1 calc(20% - 1rem); min-width: 150px; max-width: 200px; }
}
.pdp-poses .pose p { margin-top: .4rem; }

.pdp-more { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); text-align: center; }
.more-grid { text-align: left; }
@media (min-width: 720px) { .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.more-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.more-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; padding: .75rem 1rem 0; }
.more-price { color: var(--muted); font-weight: 700; padding: .1rem 1rem 1rem; }
.pdp-all { margin: 2rem 0 0; max-width: none; }

/* ---------- Order summary on the thank-you page ---------- */
.order-card {
  width: 100%; max-width: 460px; margin: 1.25rem 0 1.5rem; padding: 1.25rem 1.4rem;
  background: var(--surface); color: var(--text); border-radius: 22px; box-shadow: var(--shadow);
  border-top: 6px solid var(--duck); text-align: left;
}
.order-kicker { margin: 0; font-size: .9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.order-number { margin: .1rem 0 .9rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); letter-spacing: .02em; }
.order-lines { list-style: none; margin: 0 0 .75rem; padding: 0 0 .75rem; border-bottom: 1px solid var(--line); }
.order-lines li, .order-totals div { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.02rem; }
.order-lines li { padding: .2rem 0; font-weight: 700; }
.order-totals { margin: 0 0 1rem; }
.order-totals dt { color: var(--muted); }
.order-totals dd { margin: 0; }
.order-total { margin-top: .3rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem !important; }
.order-total dt { color: var(--text); }
.order-ship p:last-child { margin: .2rem 0 .8rem; white-space: pre-line; font-size: 1.02rem; }
.order-email { margin: 0; font-size: .98rem; color: var(--muted); }

/* Shipping insurance option in the bag */
.bag-insure { display: flex; gap: .65rem; align-items: flex-start; margin: 0 0 .9rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: .95rem; line-height: 1.4; color: var(--muted); }
.bag-insure[hidden] { display: none; }
.bag-insure input { width: 20px; height: 20px; margin-top: .1rem; flex: none; accent-color: #2B2B2B; }
.bag-insure strong { display: block; color: var(--text); font-size: 1rem; }
.bag-insure-line { display: flex; justify-content: space-between; margin: 0 0 .25rem; color: var(--muted); max-width: none; }
