/* =========================================================
   Knit Happens — styles.css
   Palette is defined once, here. When Lisa's logo is supplied,
   replace the six brand values under "BRAND" with the colors
   sampled from the logo. Nothing else needs to change.
   ========================================================= */

:root {
  /* ---- BRAND (sampled from Lisa's logo) ---- */
  --color-primary:        #5E3B8B;  /* deep violet — the logo's line work */
  --color-primary-dark:   #452A69;  /* hover / pressed */
  --color-primary-soft:   #EDE6F5;  /* tinted fills */
  --color-secondary:      #2E2440;  /* plum ink — headings, footer */
  --color-accent:         #9A82BE;  /* mid lilac — the logo's badge fill */
  --color-accent-soft:    #E4DAF0;

  /* ---- NEUTRALS ---- */
  --color-background:     #FAF7FC;
  --color-surface:        #FFFFFF;
  --color-surface-alt:    #F1EAF8;
  --color-text:           #2E2440;
  --color-muted:          #63586F;
  --color-border:         #E2D8EE;

  /* ---- TYPE ---- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.92rem);
  --step-0:  clamp(1rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1:  clamp(1.18rem, 1.1rem + 0.38vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.72vw, 1.95rem);
  --step-3:  clamp(1.85rem, 1.55rem + 1.35vw, 2.7rem);
  --step-4:  clamp(2.3rem, 1.7rem + 2.7vw, 4rem);

  /* ---- SPACE / SHAPE ---- */
  --wrap: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(3.75rem, 8vw, 7rem);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --shadow-soft: 0 18px 40px -28px rgba(46, 36, 64, .45);
  --shadow-lift: 0 26px 50px -26px rgba(46, 36, 64, .5);
}

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

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--color-secondary);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-variation-settings: "SOFT" 40, "WONK" 1; }
h2 { font-size: var(--step-3); font-variation-settings: "SOFT" 30, "WONK" 1; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

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

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  background: var(--color-secondary);
  color: #fff;
  padding: .75rem 1.1rem;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- chain-stitch motif ---------- */
.stitch-rule {
  display: block;
  width: min(240px, 60%);
  height: 14px;
  color: var(--color-primary);
  opacity: .75;
  margin: 0 0 1.2rem;
}

.link-stitch {
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  text-decoration: none;
}
.link-stitch:hover { background-size: 100% 2px; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .8rem 1.7rem;
  border: 2.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease,
              transform .14s cubic-bezier(.34, 1.6, .6, 1), box-shadow .14s ease;
}
/* the button sits on a solid slab — press it and it sinks onto it */
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 5px 0 var(--color-primary-dark);
}
.btn-primary:hover {
  background: #6E469E;
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--color-primary-dark);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--color-primary-dark);
}

.btn-ghost {
  background: var(--color-surface);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  box-shadow: 0 5px 0 var(--color-secondary);
}
.btn-ghost:hover {
  background: var(--color-primary-soft);
  color: var(--color-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--color-secondary);
}
.btn-ghost:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--color-secondary);
}

.btn-sm { min-height: 44px; padding: .55rem 1.15rem; font-size: var(--step--1); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 252, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--color-border);
  box-shadow: 0 10px 30px -26px rgba(46, 36, 64, .6);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--color-secondary);
}
.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 6px 16px -8px rgba(46, 36, 64, .5);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.36rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--color-secondary);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--color-primary); color: var(--color-primary); }

.header-cta { flex: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .4rem .75rem;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-secondary);
  font: 500 var(--step--1)/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; }
.nav-toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(1.75rem, 3.5vw, 3rem) clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(120% 90% at 92% 0%, var(--color-primary-soft) 0%, transparent 58%),
    var(--color-background);
}
.hero-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}
.hero-kicker {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: .7rem;
}
.hero-lede {
  font-size: var(--step-1);
  color: var(--color-muted);
  max-width: 36ch;
  margin-bottom: 1.45rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-note {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--color-muted);
}

.hero-art { position: relative; }
.hero-figure { margin: 0; }
.hero-figure-main {
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-soft);
}
.hero-figure-main img {
  width: 100%;
  aspect-ratio: 6 / 7;
  object-fit: cover;
  object-position: 26% 45%;
}
.hero-figure-detail {
  position: absolute;
  left: -1.5rem;
  bottom: -1.75rem;
  width: clamp(110px, 26%, 180px);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 6px solid var(--color-background);
  box-shadow: var(--shadow-soft);
}
.hero-badge {
  position: absolute;
  right: -.5rem;
  top: 1.75rem;
  display: grid;
  gap: .1rem;
  margin: 0;
  padding: .8rem 1.1rem;
  background: var(--color-surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  max-width: 190px;
}
.hero-badge-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-secondary);
}
.hero-badge-text { font-size: var(--step--1); color: var(--color-muted); line-height: 1.4; }


/* ---------- the logo, given room to be seen ---------- */
.hero-logo {
  display: block;
  width: clamp(140px, 14vw, 196px);
  height: auto;
  margin-bottom: clamp(.85rem, 1.6vw, 1.15rem);
  border-radius: clamp(20px, 2.6vw, 34px);
  box-shadow: 0 18px 34px -18px rgba(46, 36, 64, .45);
}

.footer-mark {
  width: 104px;
  height: 104px;
  border-radius: 22px;
}

.about-art .about-logo {
  position: absolute;
  aspect-ratio: auto;
  border-radius: 20px;
  left: clamp(-.5rem, 1vw, .75rem);
  top: -1.75rem;
  width: clamp(84px, 11vw, 116px);
  height: auto;
  box-shadow: 0 14px 26px -12px rgba(46, 36, 64, .55);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: logoIn .8s cubic-bezier(.34, 1.42, .58, 1) both; }
  .brand:hover .brand-mark,
  .hero-logo:hover { animation: wiggle .7s ease-in-out; }
}
@keyframes logoIn {
  0%   { opacity: 0; transform: scale(.7) rotate(-8deg); }
  65%  { opacity: 1; transform: scale(1.05) rotate(3deg); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .hero-logo { width: 132px; }
  .about-art .about-logo { width: 78px; top: -1.25rem; }
  .footer-mark { width: 88px; height: 88px; }
}

/* ---------- the motto ---------- */
.hero-motto,
.section-motto,
.msg-motto {
  letter-spacing: -.01em;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  color: var(--color-primary);
  line-height: 1.15;
  margin: 0 0 .75rem;
}
.section-motto { font-size: var(--step-1); margin-bottom: .7rem; }
.msg-motto { margin-bottom: 1rem; }

.footer-motto {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  color: #fff;
  margin: 0 0 .35rem;
}

/* ---------- generic section ---------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 60ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-lede { font-size: var(--step-1); color: var(--color-muted); margin: 0; }
.section-foot { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.lead { font-size: var(--step-1); color: var(--color-muted); }
.fineprint { font-size: var(--step--1); color: var(--color-muted); }

/* ---------- creations ---------- */
.section-creations { background: var(--color-surface); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1.75rem;
}
.chip {
  min-height: 44px;
  padding: .5rem 1.15rem;
  background: var(--color-surface);
  border: 2.5px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font: 700 var(--step--1)/1.2 var(--font-body);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--color-border);
  transition: background-color .16s ease, color .16s ease, border-color .16s ease,
              transform .14s cubic-bezier(.34, 1.6, .6, 1), box-shadow .14s ease;
}
.chip:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--color-accent);
}
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--color-accent); }
.chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 0 var(--color-primary-dark);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.creation {
  display: flex;
  flex-direction: column;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.creation:hover { box-shadow: var(--shadow-lift); }
.creation-media {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt);
}
.creation-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.creation:hover .creation-media img { transform: scale(1.07) rotate(.8deg); }
.creation-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.creation-name { margin: 0; font-size: var(--step-1); }
.creation-desc { margin: 0; font-size: var(--step--1); color: var(--color-muted); }
.creation-flag {
  align-self: flex-start;
  padding: .25rem .7rem;
  background: var(--color-accent-soft);
  color: #46306B;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
}
.creation-ask {
  margin-top: auto;
  padding-top: .5rem;
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--color-primary);
  font: 500 var(--step--1)/1.4 var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.creation-ask:hover { color: var(--color-primary-dark); }
.gallery-empty { margin-top: 1.5rem; color: var(--color-muted); }
.gallery-more { margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; text-align: center; }
.gallery-more .btn[hidden] { display: none; }
.grid-count {
  flex: 1 0 100%;
  order: 3;
  margin: 0;
  font-size: var(--step--1);
  color: var(--color-muted);
}


/* ---------- showcase carousel ---------- */
.showcase {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.showcase-media { position: relative; }

.slides {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-soft);
}
.slides-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  margin: 0;
}
.slide-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.slide-bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(.85);
  opacity: .55;
}
.slide-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background-color .18s ease, transform .18s ease;
}
.slide-nav { box-shadow: 0 4px 0 var(--color-accent); }
.slide-nav:hover { background: #fff; transform: translateY(calc(-50% - 3px)) scale(1.06); box-shadow: 0 7px 0 var(--color-accent); }
.slide-nav:active { transform: translateY(calc(-50% + 2px)) scale(.98); box-shadow: 0 1px 0 var(--color-accent); }
.slide-prev { left: .6rem; }
.slide-next { right: .6rem; }
.slide-nav span {
  width: 11px;
  height: 11px;
  border-right: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
}
.slide-prev span { transform: rotate(135deg) translate(-2px, -2px); }
.slide-next span { transform: rotate(-45deg) translate(-2px, -2px); }

.dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.dot {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  cursor: pointer;
}
.dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background-color .18s ease, width .18s ease, border-radius .18s ease;
}
.dot:hover::before { background: var(--color-accent); }
.dot[aria-selected="true"]::before {
  width: 26px;
  border-radius: 999px;
  background: var(--color-primary);
}

.showcase-info { padding-inline: clamp(0rem, 1vw, 1rem); }
.showcase-count {
  font-size: var(--step--1);
  color: var(--color-muted);
  margin-bottom: .5rem;
}
.showcase-info h3 { font-size: var(--step-2); margin-bottom: .7rem; }
.showcase-blurb { color: var(--color-muted); max-width: 44ch; }
.showcase-colors {
  display: inline-block;
  margin-bottom: 1.4rem;
  padding: .4rem .9rem;
  background: var(--color-primary-soft);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--color-primary-dark);
}

.grid-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--color-border);
}
.grid-head h3 { margin: 0; font-size: var(--step-2); }
.grid-head .filters { margin-bottom: 0; }

/* the invitation tile that closes the grid */
.creation-invite {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .6rem;
  padding: 1.75rem 1.5rem;
  background: var(--color-primary-soft);
  border: 1px dashed var(--color-accent);
  border-radius: var(--r-lg);
  text-align: left;
}
.creation-invite h3 { margin: 0; font-size: var(--step-1); }
.creation-invite p { margin: 0; font-size: var(--step--1); color: var(--color-muted); }
.creation-invite .btn { align-self: flex-start; margin-top: .4rem; }

/* ---------- make it yours ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  list-style: none;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  padding: 0;
}
.step {
  transition: transform .22s cubic-bezier(.34, 1.5, .6, 1);
  padding: 1.4rem 1.3rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--r-md);
  border-top: 3px solid var(--color-primary-soft);
}

.step:hover { transform: translateY(-5px) rotate(.8deg); }
.step h3 { font-size: var(--step-1); margin-bottom: .45rem; }
.step p { font-size: var(--step--1); color: var(--color-muted); margin: 0; }

.picker {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--color-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}
.picker-preview {
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--color-surface-alt);
  border-radius: var(--r-md);
}
.plush { width: min(280px, 100%); height: auto; }
.plush-fill { fill: var(--yarn, #F3C4D2); transition: fill .25s ease; }
.plush-inner { fill: var(--yarn-inner, #F9DCE4); transition: fill .25s ease; }
.plush-eye { fill: var(--eye, #2E2440); transition: fill .25s ease; }
.plush-glint { fill: #fff; opacity: .9; }
.plush-face, .plush-ear, .plush-paw { fill: #FDF9F3; }
.plush-muzzle, .plush-ear-inner { fill: var(--yarn-inner, #EFE4F7); transition: fill .25s ease; }
.plush-blush { fill: var(--yarn, #C4B3DC); opacity: .45; transition: fill .25s ease; }
.plush-nose { fill: var(--color-secondary); opacity: .85; }
.plush-smile { fill: none; stroke: var(--color-secondary); stroke-width: 2.4; stroke-linecap: round; opacity: .7; }

.picker-group { border: 0; margin: 0 0 1.4rem; padding: 0; }
.picker-group legend {
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: .7rem;
}
.swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.swatch {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: var(--swatch, #fff);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.swatches-sm .swatch { width: 42px; height: 42px; }
.swatch { box-shadow: 0 3px 0 rgba(46, 36, 64, .16); }
.swatch:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 6px 0 rgba(46, 36, 64, .18); }
.swatch:active { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 rgba(46, 36, 64, .18); }
.swatch[aria-pressed="true"] {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px var(--color-background), 0 0 0 5px var(--color-secondary);
}
/* never rely on color alone: selected swatch also carries a check */
.swatch[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 13px;
  height: 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px);
  filter: drop-shadow(0 0 1.5px rgba(46,37,55,.85));
}
.swatch-light[aria-pressed="true"]::after {
  border-left-color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
  filter: none;
}
.swatch-custom {
  width: auto;
  min-width: 52px;
  height: 52px;
  padding-inline: 1rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-secondary);
  font: 500 var(--step--1)/1 var(--font-body);
}
.swatches-sm .swatch-light[aria-pressed="true"]::after {
  border-left-color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
  filter: none;
}
.swatch-custom { height: 42px; min-width: 42px; }
.swatch-custom[aria-pressed="true"]::after { display: none; }
.swatch-custom[aria-pressed="true"] { background: var(--color-secondary); color: #fff; }

.picker-readout { margin: .8rem 0 0; font-size: var(--step--1); color: var(--color-muted); }
.picker-readout strong { color: var(--color-secondary); }
.picker-note {
  margin: 0 0 1.4rem;
  padding: .85rem 1rem;
  background: var(--color-accent-soft);
  border-radius: var(--r-sm);
  font-size: var(--step--1);
  color: #46306B;
}

/* ---------- how it works ---------- */
.section-how { background: var(--color-secondary); }
.section-how h2, .section-how h3 { color: #fff; }
.section-how .section-lede { color: rgba(255, 255, 255, .74); }
.ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.ribbon li {
  padding-top: 1.5rem;
  border-top: 2px solid rgba(255, 255, 255, .24);
  position: relative;
}
.ribbon h3 { font-size: var(--step-0); margin-bottom: .4rem; }
.ribbon p { font-size: var(--step--1); color: rgba(255, 255, 255, .74); margin: 0; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-art { position: relative; }
.about-art figure {
  margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-soft);
}
.about-art figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
}
.about-stamp {
  position: absolute;
  right: clamp(-.5rem, 2vw, 1rem);
  bottom: -1.1rem;
  margin: 0;
  padding: .7rem 1.15rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.about-copy .lead { color: var(--color-secondary); font-style: italic; }

/* ---------- why cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  transition: transform .22s cubic-bezier(.34, 1.5, .6, 1), box-shadow .22s ease;
  padding: 1.5rem 1.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
}
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-soft); }
.card h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.card p { font-size: var(--step--1); color: var(--color-muted); margin: 0; }

/* ---------- gift ---------- */
.section-gift { background: var(--color-surface); }
.gift-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.tag-list li {
  transition: transform .2s cubic-bezier(.34, 1.6, .6, 1), background-color .2s ease;
  padding: .45rem 1rem;
  background: var(--color-primary-soft);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--color-primary-dark);
}
.tag-list li:hover { transform: translateY(-3px) rotate(-2deg) scale(1.05); }
.gift-copy .fineprint { margin-bottom: 1.5rem; }
.gift-art {
  margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-soft);
}

/* ---------- faq ---------- */
.faq-wrap { max-width: 820px; }
.faq-list { border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item summary:hover { color: var(--color-primary); }
.faq-item[open] .faq-body { animation: popIn .4s cubic-bezier(.34, 1.4, .6, 1) both; }
.faq-body { padding: 0 0 1.25rem; color: var(--color-muted); max-width: 62ch; }

/* ---------- contact ---------- */
.section-contact { background: var(--color-surface-alt); }
.contact-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-list {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li { display: grid; gap: .15rem; }
.contact-label { font-size: var(--step--1); color: var(--color-muted); }
.contact-value {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
  word-break: break-word;
}
a.contact-value:hover { color: var(--color-primary); }

.order-form {
  padding: clamp(1.35rem, 3.5vw, 2.25rem);
  background: var(--color-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}
.order-form fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; }
.order-form legend {
  padding: 0 0 .85rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--color-secondary);
}
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 1.1rem; }
.field label {
  display: block;
  margin-bottom: .4rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--color-secondary);
}
.req { color: var(--color-primary); }
.optional { color: var(--color-muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  background: var(--color-background);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  font: 400 var(--step-0)/1.5 var(--font-body);
  color: var(--color-text);
  transition: border-color .18s ease, background-color .18s ease;
}
.field textarea { min-height: 108px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8C7F9B; }
.field input:hover, .field textarea:hover { border-color: #CDBEE2; }
.field input:focus, .field textarea:focus {
  background: var(--color-surface);
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.field input[type="file"] { padding: .65rem .75rem; }
.field input[aria-invalid="true"] { border-color: #B3261E; background: #FDF4F3; }
.hint { margin: .4rem 0 0; font-size: var(--step--1); color: var(--color-muted); }
.error { margin: .4rem 0 0; font-size: var(--step--1); font-weight: 500; color: #B3261E; }
.form-alt { margin: 1rem 0 0; font-size: var(--step--1); color: var(--color-muted); text-align: center; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--color-secondary);
  color: rgba(255, 255, 255, .78);
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.site-footer h2 {
  color: #fff;
  font-size: var(--step-0);
  margin-bottom: .9rem;
}
.footer-name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  color: #fff;
  margin: .6rem 0 .4rem;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}
.footer-tag { max-width: 34ch; margin-bottom: .4rem; }
.footer-loc { font-size: var(--step--1); }
.footer-brand img { border-radius: 22px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding-block: 1.35rem;
  font-size: var(--step--1);
}
.footer-base p { margin: 0; }

/* ---------- sticky mobile CTA ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  gap: .6rem;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(250, 247, 252, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
}
.mobile-bar .btn {
  flex: 1;
  min-height: 48px;
  padding-inline: 1rem;
  font-size: var(--step--1);
  white-space: nowrap;
}
.mobile-bar .btn-icon { flex: 0 0 84px; }

/* ---------- floating characters ---------- */
.hero,
.section-custom,
.section-why,
.section-contact { position: relative; overflow: hidden; }

.hero > .wrap,
.section-custom > .wrap,
.section-why > .wrap,
.section-contact > .wrap { position: relative; z-index: 1; }

.floaters {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* soft yarn-ball blobs drifting behind everything */
.floaters::before,
.floaters::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .55;
}
.floaters::before {
  width: clamp(180px, 26vw, 340px);
  aspect-ratio: 1;
  left: -6%;
  top: 8%;
  background: var(--color-primary-soft);
}
.floaters::after {
  width: clamp(150px, 22vw, 300px);
  aspect-ratio: 1;
  right: -8%;
  bottom: 4%;
  background: var(--color-accent-soft);
}
.section-why .floaters::before { background: var(--color-accent-soft); }
.section-why .floaters::after { background: var(--color-primary-soft); }

@media (prefers-reduced-motion: no-preference) {
  .floaters::before { animation: blobDrift 26s ease-in-out infinite alternate; }
  .floaters::after { animation: blobDrift 32s -8s ease-in-out infinite alternate-reverse; }
}
@keyframes blobDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6%, -10%, 0) scale(1.12); }
}

/* a knit-stitch pattern that creeps slowly across the page background */
.hero::before,
.section-custom::before,
.section-contact::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%235E3B8B' stroke-opacity='.13' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M0 18q15-14 30 0 15 14 30 0 15-14 30 0 15 14 30 0'/%3E%3Cpath d='M0 48q15-14 30 0 15 14 30 0 15-14 30 0 15 14 30 0'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before,
  .section-custom::before,
  .section-contact::before { animation: stitchPan 70s linear infinite; }
}
@keyframes stitchPan {
  from { background-position: 0 0; }
  to   { background-position: 480px 120px; }
}
.floater {
  position: absolute;
  top: var(--t, auto);
  bottom: var(--b, auto);
  width: var(--size, 100px);
  height: auto;
  opacity: .6;
  filter: drop-shadow(0 16px 26px rgba(46, 36, 64, .22));
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
  will-change: transform;
}
.float-a { left: var(--x, 10px); }
.float-b { right: var(--x, 10px); }
.section-why .floater { opacity: .46; }

@media (prefers-reduced-motion: no-preference) {
  .floater {
    animation: bob var(--dur, 14s) var(--delay, 0s) ease-in-out infinite alternate;
  }
}
@keyframes bob {
  from { transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg)) scale(1); }
  to   { transform: translate3d(10px, calc(var(--py, 0px) - 22px), 0) rotate(calc(var(--rot, 0deg) * -1)) scale(1.04); }
}

/* gallery cards ease in when rendered or refiltered */
@media (prefers-reduced-motion: no-preference) {
  .cards-in > * {
    animation: rise .5s cubic-bezier(.22, 1, .36, 1) backwards;
    animation-delay: var(--d, 0ms);
  }
}


/* ---------- yarn balls drifting in the background ---------- */
.yarn-ball {
  position: absolute;
  display: block;
  width: var(--yb-size, 54px);
  height: var(--yb-size, 54px);
  opacity: .5;
  filter: drop-shadow(0 10px 16px rgba(46, 36, 64, .16));
}
.yarn-ball svg { width: 100%; height: 100%; overflow: visible; }
.yb-1 { left: 4%;  top: 14%;  --yb-size: 58px; color: var(--color-accent); }
.yb-2 { right: 6%; top: 62%;  --yb-size: 42px; color: var(--color-primary); }
.yb-3 { left: 12%; bottom: 8%; --yb-size: 34px; color: #E7A9C6; }
.section-why .yb-1 { color: #E7A9C6; }
.section-why .yb-2 { color: var(--color-accent); }

@media (prefers-reduced-motion: no-preference) {
  .yb-1 { animation: yarnRoll 22s linear infinite, blobDrift 19s ease-in-out infinite alternate; }
  .yb-2 { animation: yarnRoll 17s -6s linear infinite reverse, blobDrift 24s -4s ease-in-out infinite alternate-reverse; }
  .yb-3 { animation: yarnRoll 26s -11s linear infinite, blobDrift 21s -9s ease-in-out infinite alternate; }
}
@keyframes yarnRoll {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* ---------- the knitting row that stitches itself in ---------- */
.knit-divider {
  position: relative;
  width: 100%;
  height: clamp(34px, 5vw, 52px);
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}
.knit-row {
  display: block;
  width: 100%;
  height: 100%;
}
.knit-track,
.knit-yarn {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}
.knit-track { stroke: var(--color-border); opacity: .55; }
.knit-yarn { stroke: var(--color-primary); stroke-dasharray: var(--len, 2600); stroke-dashoffset: var(--len, 2600); }

.knit-worker {
  position: absolute;
  top: 50%;
  left: 0;
  width: clamp(22px, 3vw, 30px);
  height: clamp(22px, 3vw, 30px);
  margin-top: calc(clamp(22px, 3vw, 30px) / -2 - 4px);
  color: var(--color-primary);
  opacity: 0;
}
.knit-worker svg { width: 100%; height: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .knit-divider.is-knitting .knit-yarn { animation: knitRow 4.2s cubic-bezier(.5, 0, .5, 1) infinite; }
  .knit-divider.is-knitting .knit-worker { animation: knitWorker 4.2s cubic-bezier(.5, 0, .5, 1) infinite; }
}
@keyframes knitRow {
  0%        { stroke-dashoffset: var(--len, 2600); opacity: 1; }
  70%, 88%  { stroke-dashoffset: 0; opacity: 1; }
  97%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes knitWorker {
  0%   { left: 0; opacity: 0; rotate: 0deg; }
  5%   { opacity: 1; }
  70%  { left: calc(100% - 30px); opacity: 1; rotate: 700deg; }
  86%  { left: calc(100% - 30px); opacity: 1; rotate: 760deg; }
  97%, 100% { left: calc(100% - 30px); opacity: 0; rotate: 760deg; }
}

/* ---------- scroll progress, knitted ---------- */
.scroll-yarn {
  position: fixed;
  inset: 0 0 auto;
  height: 6px;
  z-index: 60;
  background: rgba(226, 216, 238, .5);
  pointer-events: none;
}
.scroll-yarn-fill {
  position: relative;
  height: 100%;
  width: var(--progress, 0%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6' viewBox='0 0 24 6'%3E%3Cpath d='M0 3q3-4 6 0 3 4 6 0 3-4 6 0 3 4 6 0' fill='none' stroke='%235E3B8B' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 24px 6px;
  background-repeat: repeat-x;
  transition: width .1s linear;
}
.scroll-yarn-ball {
  position: absolute;
  right: -11px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  color: var(--color-primary);
}
.scroll-yarn-ball svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-yarn-ball { transition: rotate .1s linear; }
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  background: var(--color-surface);
  border: 2.5px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 5px 0 var(--color-primary-dark);
  transition: transform .16s cubic-bezier(.34, 1.6, .6, 1), box-shadow .16s ease, opacity .2s ease;
}
.to-top[hidden] { display: none; }
.to-top-ball { display: block; width: 30px; height: 30px; }
.to-top-ball svg { width: 100%; height: 100%; }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--color-primary-dark); }
.to-top:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--color-primary-dark); }
@media (prefers-reduced-motion: no-preference) {
  .to-top:hover .to-top-ball { animation: yarnRoll 1.6s linear infinite; }
}

/* ---------- nav follows the section you're reading ---------- */
.site-nav a.is-current {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

@media (max-width: 900px) {
  .to-top { bottom: 88px; width: 48px; height: 48px; }
  .to-top-ball { width: 26px; height: 26px; }
}

/* ---------- section reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; }
  [data-reveal].is-in { animation: popIn .62s cubic-bezier(.34, 1.42, .58, 1) both; }

  [data-reveal-group] { opacity: 1; }
  [data-reveal-group] > * { opacity: 0; }
  [data-reveal-group].is-in > * {
    animation: popIn .58s cubic-bezier(.34, 1.48, .58, 1) both;
    animation-delay: var(--d, 0ms);
  }

  /* the stitch rule draws itself in */
  .stitch-rule { stroke-dasharray: 420; stroke-dashoffset: 420; }
  [data-reveal].is-in .stitch-rule,
  .hero .stitch-rule { animation: stitchDraw 1.1s .35s cubic-bezier(.6, 0, .2, 1) forwards; }
}

@keyframes popIn {
  0%   { opacity: 0; transform: translateY(20px) scale(.94); }
  60%  { opacity: 1; transform: translateY(-5px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}
@keyframes stitchDraw { to { stroke-dashoffset: 0; } }

/* ---------- pop interactions ---------- */
@keyframes jelly {
  0%   { transform: scale(1, 1); }
  25%  { transform: scale(1.12, .86); }
  45%  { transform: scale(.9, 1.1); }
  65%  { transform: scale(1.06, .95); }
  82%  { transform: scale(.98, 1.02); }
  100% { transform: scale(1, 1); }
}
@keyframes sparkleOut {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(0); opacity: 0; }
  25%  { opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--spin)) scale(var(--scale, 1));
    opacity: 0;
  }
}
@keyframes tapPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(.9); }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  30%      { transform: rotate(-7deg); }
  65%      { transform: rotate(6deg); }
}
@keyframes plushPop {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.09) rotate(-3deg); }
  70%  { transform: scale(.98) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes slidePop {
  0%   { transform: scale(.96); opacity: .4; }
  60%  { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.sparkle-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .8);
  font-size: var(--sz, 18px);
  line-height: 1;
  color: var(--tone, var(--color-primary));
  will-change: transform, opacity;
  animation: sparkleOut var(--life, .62s) cubic-bezier(.2, .7, .3, 1) forwards;
}

@media (prefers-reduced-motion: no-preference) {
  .is-tapped { animation: tapPop .34s cubic-bezier(.34, 1.6, .6, 1); }
  .btn.is-tapped,
  .chip.is-tapped { animation: jelly .45s cubic-bezier(.3, 1.4, .5, 1); }
  .creation:hover { animation: jelly .5s cubic-bezier(.3, 1.3, .5, 1); }
  .plush.is-popped { animation: plushPop .5s cubic-bezier(.34, 1.5, .6, 1); }
  .showcase-info.is-swapped > * { animation: popIn .45s cubic-bezier(.34, 1.5, .6, 1) both; }
  .showcase-info.is-swapped > :nth-child(2) { animation-delay: .05s; }
  .showcase-info.is-swapped > :nth-child(3) { animation-delay: .1s; }
  .showcase-info.is-swapped > :nth-child(4) { animation-delay: .14s; }
  .showcase-info.is-swapped > :nth-child(5) { animation-delay: .18s; }
  .slides.is-swapped { animation: slidePop .5s cubic-bezier(.34, 1.4, .6, 1); }
  .brand:hover .brand-mark { animation: wiggle .6s ease-in-out; }
  .floater:hover { animation: wiggle .7s ease-in-out; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 88px 0 auto;
    display: none;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 24px 40px -32px rgba(46, 36, 64, .8);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
  }
  .site-nav li { border-bottom: 1px solid var(--color-border); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a {
    display: block;
    padding: .95rem 0;
    font-size: var(--step-0);
    border-bottom: 0;
  }

  .mobile-bar { display: flex; }
  body { padding-bottom: 84px; }
}

@media (min-width: 700px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 820px) {
  .showcase { grid-template-columns: 1.35fr 1fr; }
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .picker { grid-template-columns: minmax(220px, .8fr) 1fr; }
  .about-grid { grid-template-columns: .85fr 1fr; }
  .gift-grid { grid-template-columns: 1fr .95fr; }
  .contact-grid { grid-template-columns: .8fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr .8fr 1fr; }
}

/* the characters need a real margin to stand in — below that they step off
   the page entirely rather than being sliced by the section edge */
@media (max-width: 1340px) {
  img.floater { display: none; }
}

/* on narrow screens the yarn balls move out to the very edges so they
   never sit behind a line of text */
@media (max-width: 900px) {
  .yarn-ball { opacity: .38; }
  .yb-1 { left: -5%; top: 5%; --yb-size: 50px; }
  .yb-2 { right: -4%; top: 58%; --yb-size: 38px; }
  .yb-3 { left: -3%; bottom: 4%; --yb-size: 32px; }
}



@media (max-width: 560px) {
  /* let the photo breathe on small screens */
  .hero-badge { display: none; }
}

@media (max-width: 480px) {
  .slide-nav { width: 42px; height: 42px; }
  .slide-prev { left: .35rem; }
  .slide-next { right: .35rem; }
  .hero-figure-detail { left: -.5rem; bottom: -1rem; }
  .hero-actions .btn { width: 100%; }
  .brand-name { font-size: 1.05rem; }
  .brand-mark { width: 54px; height: 54px; }
}


/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .6s cubic-bezier(.22, 1, .36, 1) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .hero-copy > :nth-child(6) { animation-delay: .3s; }
  .hero-art { animation: rise .7s .12s cubic-bezier(.22, 1, .36, 1) backwards; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .creation:hover, .swatch:hover { transform: none; }
  .slides-track { transition-duration: .001ms !important; }
  .slide-nav:hover { transform: translateY(-50%); }
  .floater, .yarn-ball { animation: none; }
  .floaters::before, .floaters::after { animation: none; }
  .knit-yarn { stroke-dashoffset: 0; }
  .knit-worker { display: none; }
  .hero::before, .section-custom::before, .section-contact::before { animation: none; }
  .stitch-rule { stroke-dasharray: none; stroke-dashoffset: 0; }
  .card:hover, .step:hover, .tag-list li:hover, .creation:hover { transform: none; }
  .chip:hover, .btn:hover, .swatch:hover { transform: none; }
  .sparkle-layer { display: none; }
}

@media print {
  .site-header, .mobile-bar, .filters, .picker, .slide-nav, .dots, .floaters,
  .knit-divider, .scroll-yarn, .to-top { display: none; }
}
