/* ==========================================================================
   The Vat & Nozzle — site styles
   Brand: teal #A6DBD6 · purple #6C53A2 · charcoal #333333 · white
   Type:  Barlow Condensed (display, stands in for Vinyl OT) · Work Sans
   ========================================================================== */

:root {
  --teal: #a6dbd6;
  --teal-bright: #b9f0ea;
  --teal-soft: #e8f6f4;
  --purple: #6c53a2;
  --purple-deep: #4c3880;
  --purple-ink: #2e2252;
  --purple-soft: #efebf7;
  --charcoal: #333333;
  /* text that sits on a fixed light surface (printer card, photo tags) */
  --ink-on-light: #333333;

  /* Dark theme (default): same brand, deep purple-charcoal surfaces */
  color-scheme: dark;
  --ink: #ece9f4;
  --ink-2: #b9b4c9;
  --ink-3: #8e889f;
  --paper: #16121f;
  --paper-2: #1e1929;
  --line: #352e48;
  --purple-soft: #2c2344;
  --teal-soft: #163230;
  /* purple for text/links, lifted so it reads on dark surfaces */
  --accent: #b7a5ea;
  --accent-strong: #d3c8f5;
  --surface-invert: #0d0a14;
  --header-bg: rgb(22 18 31 / 0.84);
  --nav-bg: rgb(22 18 31 / 0.97);
  --error-bg: #3a1825;
  --error-fg: #ff9dbb;
  --teal-ink: #8fd6cd;
  --line-strong: #4d4466;
}

/* Light theme, kept for opt-in: <html data-theme="light"> */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #333333;
  --ink-2: #5b5b66;
  --ink-3: #8a8a96;
  --paper: #ffffff;
  --paper-2: #f7f6fb;
  --line: #e4e1ee;
  --purple-soft: #efebf7;
  --teal-soft: #e8f6f4;
  --accent: var(--purple);
  --accent-strong: var(--purple-deep);
  --surface-invert: var(--charcoal);
  --header-bg: rgb(255 255 255 / 0.82);
  --nav-bg: rgb(255 255 255 / 0.97);
  --error-bg: #fbeaf0;
  --error-fg: #b0305a;
  --teal-ink: #2f6e68;
  --line-strong: #cfc8e2;
}

:root {

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(46 34 82 / 0.06), 0 2px 8px rgb(46 34 82 / 0.05);
  --shadow: 0 2px 6px rgb(46 34 82 / 0.06), 0 12px 32px rgb(46 34 82 / 0.1);
  --shadow-lg: 0 8px 24px rgb(46 34 82 / 0.12), 0 32px 80px rgb(46 34 82 / 0.18);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

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

a:hover {
  color: var(--accent-strong);
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.8rem, 2rem + 4.2vw, 5.6rem);
}

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

h3,
.h3 {
  font-size: clamp(1.45rem, 1.3rem + 0.6vw, 1.8rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

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

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(72px, 9vw, 132px);
  position: relative;
}

.section--tint {
  background: var(--paper-2);
}

.section--dark {
  background: var(--purple-ink);
  color: #e9e6f3;
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section--dark .eyebrow {
  color: var(--teal);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* single-column text block kept to a readable line length */
.measure {
  max-width: 820px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ink-2);
  line-height: 1.6;
}

.section--dark .lede {
  color: #c9c3dd;
}

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

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

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

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

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

.text-teal {
  color: var(--teal);
}

.text-purple {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--purple);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 0.98rem/1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out), background 0.3s;
  box-shadow: 0 6px 20px rgb(108 83 162 / 0.28);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(140px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgb(108 83 162 / 0.36);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--teal {
  --btn-bg: var(--teal);
  --btn-fg: var(--purple-ink);
  box-shadow: 0 6px 20px rgb(166 219 214 / 0.4);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}

.btn--ghost:hover {
  box-shadow: inset 0 0 0 2px var(--purple);
}

.btn--ghost-light {
  --btn-bg: rgb(255 255 255 / 0.08);
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.5);
  backdrop-filter: blur(6px);
}

.btn--ghost-light:hover {
  box-shadow: inset 0 0 0 1.5px #fff;
}

.btn--sm {
  padding: 11px 20px;
  font-size: 0.9rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.3s var(--ease-out);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.4s, box-shadow 0.4s, height 0.4s var(--ease-out);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header.is-scrolled {
  --header-h: 64px;
  background: var(--header-bg);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: block;
  flex-shrink: 0;
  position: relative;
}

.brand img {
  height: 50px;
  width: auto;
  transition: height 0.4s var(--ease-out), opacity 0.3s;
}

.site-header.is-scrolled .brand img {
  height: 38px;
}

/* light logo on transparent header over a dark hero; dark logo once scrolled */
.brand .logo-light {
  position: absolute;
  inset: 0;
}

.site-header--over-dark:not(.is-scrolled):not(.nav-open) .brand .logo-dark,
.site-header:not(.site-header--over-dark) .brand .logo-light,
.site-header.is-scrolled .brand .logo-light,
.site-header.nav-open .brand .logo-light {
  opacity: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  position: relative;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav .btn {
  margin-left: 10px;
  color: #fff;
}

.site-header--over-dark:not(.is-scrolled) .nav a:not(.btn) {
  color: #fff;
}

.site-header--over-dark:not(.is-scrolled) .nav a:not(.btn)::after {
  background: var(--teal);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out), opacity 0.2s, background 0.3s;
}

.nav-toggle span:nth-child(1) {
  top: 16px;
}

.nav-toggle span:nth-child(2) {
  top: 22px;
}

.nav-toggle span:nth-child(3) {
  top: 28px;
}

.site-header--over-dark:not(.is-scrolled):not(.nav-open) .nav-toggle span {
  background: #fff;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
    z-index: 2;
  }

  .brand {
    z-index: 2;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 96px 24px 40px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    clip-path: circle(0 at calc(100% - 44px) 38px);
    transition: clip-path 0.6s var(--ease-out);
    visibility: hidden;
  }

  .nav-open .nav {
    clip-path: circle(150% at calc(100% - 44px) 38px);
    visibility: visible;
  }

  .nav a {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s, transform 0.5s var(--ease-out);
  }

  .site-header .nav a:not(.btn) {
    color: var(--ink);
  }

  .nav-open .nav a {
    opacity: 1;
    transform: none;
  }

  .nav-open .nav a:nth-child(2) { transition-delay: 0.04s; }
  .nav-open .nav a:nth-child(3) { transition-delay: 0.08s; }
  .nav-open .nav a:nth-child(4) { transition-delay: 0.12s; }
  .nav-open .nav a:nth-child(5) { transition-delay: 0.16s; }
  .nav-open .nav a:nth-child(6) { transition-delay: 0.2s; }
  .nav-open .nav a:nth-child(7) { transition-delay: 0.24s; }

  .nav .btn {
    margin: 18px 0 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    text-transform: none;
  }

  .site-header.nav-open {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: var(--purple-deep);
}

.hero__bg {
  position: absolute;
  inset: -6%;
  z-index: -2;
  background:
    linear-gradient(100deg, rgb(46 34 82 / 0.5), rgb(46 34 82 / 0.12) 62%),
    url("../assets/img/gradient.webp") center / cover no-repeat;
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.04);
  transition: transform 1.2s var(--ease-out);
}

.hero__glow {
  position: absolute;
  z-index: -1;
  width: 60vmax;
  height: 60vmax;
  left: var(--gx, 70%);
  top: var(--gy, 30%);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(185 240 234 / 0.35), transparent 60%);
  filter: blur(20px);
  transition: left 1.4s var(--ease-out), top 1.4s var(--ease-out);
  pointer-events: none;
}

.hero::after {
  /* soft fade into page */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  z-index: -1;
  background: linear-gradient(to bottom, transparent, rgb(46 34 82 / 0.35));
}

.hero h1 {
  color: #fff;
  max-width: 11ch;
  text-shadow: 0 2px 30px rgb(46 34 82 / 0.25);
}

.hero h1 .accent {
  display: inline-block;
  color: var(--teal-bright);
}

.hero .lede {
  color: rgb(255 255 255 / 0.88);
  max-width: 34rem;
  margin-bottom: 34px;
}

.hero .eyebrow {
  color: #fff;
}

.hero .eyebrow::before {
  background: var(--teal-bright);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

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

.hero--page {
  min-height: auto;
  padding: calc(var(--header-h) + clamp(64px, 9vw, 120px)) 0 clamp(72px, 9vw, 120px);
}

.hero--page h1 {
  max-width: 16ch;
}

/* ---------- Printer stage (hero illustration) ---------- */
.printer-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
}

.printer-stage .spool-peek {
  position: absolute;
  top: 0;
  left: 50%;
  width: 46%;
  translate: -50% -76%;
  z-index: 3;
  --peek-cut: 24%;
}

.printer {
  position: relative;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.94);
  color: var(--ink-on-light);
  padding: 16px 16px 14px;
  overflow: hidden;
}

.printer svg {
  width: 100%;
  height: auto;
}

.printer__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.printer__label small {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

@media (max-width: 520px) {
  .printer {
    padding: 10px 10px 10px;
  }

  .printer__label {
    font-size: 1.05rem;
  }

  .printer__label small {
    display: none;
  }
}

.printer__progress {
  height: 4px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}

.printer__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--purple);
}

.printer--fdm .printer__progress span {
  background: linear-gradient(90deg, var(--teal), #6cc4bb);
}

/* ---------- Spool the mascot ---------- */
/* The button is a window clipped along the edge Spool hides behind (--peek-cut = how much of
   him sits below that edge). The image moves inside it, so he rises from behind the edge
   instead of sliding across it. */
.spool-peek {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  padding: 0;
  background: none;
  clip-path: inset(-60% -25% var(--peek-cut, 0%) -25%);
}

.spool-peek img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  transform-origin: 50% calc(100% - var(--peek-cut, 0%));
  transition: transform 0.45s var(--ease-spring);
  animation: spool-idle 9s var(--ease-out) 3s infinite;
}

.spool-peek:hover img,
.spool-peek:focus-visible img {
  animation-play-state: paused;
  transform: translateY(-7%) rotate(-3deg);
}

.spool-peek.is-pranking img {
  animation: spool-wiggle 0.8s var(--ease-out);
}

/* every so often he pops up for a look around */
@keyframes spool-idle {
  0%,
  86%,
  100% { transform: none; }
  89% { transform: translateY(-9%) rotate(-4deg); }
  92% { transform: translateY(-9%) rotate(4deg); }
  95% { transform: translateY(-4%) rotate(-1deg); }
}

@keyframes spool-wiggle {
  0%,
  100% { transform: none; }
  15% { transform: translateY(-8%) rotate(-9deg); }
  30% { transform: translateY(-12%) rotate(8deg); }
  45% { transform: translateY(-6%) rotate(-6deg); }
  60% { transform: translateY(-2%) rotate(4deg); }
  80% { transform: rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spool-peek img {
    animation: none;
  }
}

.spool-bubble {
  position: fixed;
  z-index: 150;
  max-width: 260px;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface-invert);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transform-origin: 0 100%;
  transition: opacity 0.25s, transform 0.4s var(--ease-spring);
}

.spool-bubble.is-visible {
  opacity: 1;
  transform: none;
}

.spool-bubble strong {
  color: var(--teal);
  font-weight: 600;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.3s;
  transform-style: preserve-3d;
  overflow: hidden;
}

.card::before {
  /* cursor spotlight */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgb(166 219 214 / 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: rgb(108 83 162 / 0.25);
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
}

.card p:last-child {
  margin-bottom: 0;
}

.card h3,
.card .h3 {
  margin-bottom: 0.4em;
  overflow-wrap: break-word;
}

.card--link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card--link:hover {
  color: inherit;
}

.card--link p {
  color: var(--ink-2);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: var(--purple-soft);
  color: var(--accent);
  transition: transform 0.5s var(--ease-spring), background 0.3s, color 0.3s;
}

.card__icon svg {
  width: 28px;
  height: 28px;
}

.card:hover .card__icon {
  transform: rotate(-6deg) scale(1.08);
  background: var(--purple);
  color: #fff;
}

.card--teal .card__icon {
  background: var(--teal-soft);
  color: var(--teal-ink);
}

.card--teal:hover .card__icon {
  background: var(--teal);
  color: var(--purple-ink);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.tag--resin {
  background: var(--purple-soft);
  border-color: rgb(108 83 162 / 0.2);
  color: var(--accent-strong);
}

.tag--fdm {
  background: var(--teal-soft);
  border-color: rgb(63 143 135 / 0.25);
  color: var(--teal-ink);
}

.tag--resin::before,
.tag--fdm::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
}

.tag--fdm::before {
  background: #4fb0a6;
}

/* ---------- Duo (Vat vs Nozzle split on home) ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.duo__side {
  position: relative;
  padding: clamp(32px, 5vw, 56px);
  overflow: hidden;
  isolation: isolate;
}

.duo__side--vat {
  background: var(--purple);
  color: #ece8f6;
}

.duo__side--nozzle {
  background: var(--teal);
  color: var(--purple-ink);
}

.duo__side h3 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  color: inherit;
}

.duo__side--vat h3 {
  color: #fff;
}

.duo__side ul {
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.duo__side li {
  position: relative;
  padding: 8px 0 8px 30px;
  border-top: 1px solid rgb(255 255 255 / 0.18);
}

.duo__side--nozzle li {
  border-color: rgb(46 34 82 / 0.14);
}

.duo__side--nozzle .eyebrow {
  color: var(--purple-deep);
}

.duo__side li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 14px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.duo__big {
  position: absolute;
  right: -0.08em;
  bottom: -0.22em;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 16vw, 13rem);
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.1;
  pointer-events: none;
  transition: transform 1.2s var(--ease-out);
}

.duo__side:hover .duo__big {
  transform: translateX(-12px);
}

.duo__side .btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--purple-deep);
  box-shadow: none;
}

.duo__side--nozzle .btn {
  --btn-bg: var(--purple-ink);
  --btn-fg: #fff;
  box-shadow: none;
}

/* ---------- Steps / process ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 30px 26px 28px;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.12);
  transition: background 0.4s, transform 0.5s var(--ease-out);
}

.step:hover {
  background: rgb(255 255 255 / 0.09);
  transform: translateY(-4px);
}

.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--teal);
}

.step h3 {
  font-size: 1.5rem;
}

.step p {
  margin: 0;
  color: #c9c3dd;
  font-size: 0.97rem;
}

.section:not(.section--dark) .step {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.section:not(.section--dark) .step p {
  color: var(--ink-2);
}

.section:not(.section--dark) .step::before {
  -webkit-text-stroke-color: var(--accent);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 22px;
  background: var(--surface-invert);
  color: #fff;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.marquee span::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.marquee span:nth-child(even)::after {
  background: var(--purple);
  box-shadow: 0 0 0 2px var(--teal);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 7vw, 88px) clamp(28px, 6vw, 80px);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(100deg, rgb(46 34 82 / 0.45), rgb(46 34 82 / 0.08) 65%),
    var(--purple-deep) url("../assets/img/gradient.webp") center / cover;
  box-shadow: var(--shadow-lg);
}

.cta-band .eyebrow {
  color: #fff !important;
}

.cta-band .eyebrow::before {
  background: var(--teal-bright);
}

.cta-band h2 {
  color: #fff;
  max-width: 14ch;
}

.cta-band p {
  max-width: 36rem;
  color: rgb(255 255 255 / 0.88);
  font-size: 1.12rem;
}

.cta-band .spool-peek {
  position: absolute;
  right: clamp(24px, 6vw, 80px);
  bottom: 0;
  width: clamp(170px, 22vw, 280px);
  translate: 0 26%;
}

@media (max-width: 700px) {
  .cta-band {
    padding-bottom: 104px;
  }

  .cta-band .spool-peek {
    right: 20px;
    width: 150px;
  }
}

/* ---------- Comparison table ---------- */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--paper);
}

.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.compare th,
.compare td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--paper-2);
}

.compare thead th:nth-child(2) {
  color: var(--accent);
}

.compare thead th:nth-child(3) {
  color: var(--teal-ink);
}

.compare tbody th {
  width: 22%;
  font-weight: 600;
  color: var(--ink);
}

.compare tbody tr {
  transition: background 0.25s;
}

.compare tbody tr:hover {
  background: var(--paper-2);
}

.compare tbody tr:last-child > * {
  border-bottom: 0;
}

.compare .win {
  position: relative;
}

.compare .win::after {
  content: "Edge";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 2px;
  background: var(--purple-soft);
  color: var(--accent);
}

.compare td:nth-child(3).win::after {
  background: var(--teal-soft);
  color: var(--teal-ink);
}

/* ---------- Chooser quiz ---------- */
.chooser {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

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

.chooser__questions {
  display: grid;
  gap: 18px;
}

.q {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.q:focus-within,
.q.is-answered {
  border-color: rgb(108 83 162 / 0.35);
  box-shadow: var(--shadow-sm);
}

.q legend {
  float: left;
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.q legend span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--accent);
  font-size: 0.8rem;
  vertical-align: 1px;
}

.q.is-answered legend span {
  background: var(--purple);
  color: #fff;
}

.q__opts {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.q__opts label {
  position: relative;
  cursor: pointer;
}

.q__opts input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.q__opts label span {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 0.93rem;
  font-weight: 500;
  transition: all 0.25s var(--ease-out);
}

.q__opts label:hover span {
  border-color: var(--accent);
  color: var(--accent);
}

.q__opts input:checked + span {
  background: var(--purple);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.03);
}

.q__opts input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.verdict {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--purple-ink);
  color: #e9e6f3;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

.verdict::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/img/gradient.webp") center / cover;
  opacity: 0.35;
}

.verdict .eyebrow {
  color: var(--teal);
}

.verdict h3 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.2em;
}

.verdict__meter {
  position: relative;
  height: 14px;
  margin: 22px 0 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple) 0%, #8f7cc4 35%, #c8d8e6 50%, #8fd0c8 65%, var(--teal) 100%);
}

.verdict__needle {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  width: 24px;
  height: 24px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--purple-ink);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.3);
  transition: left 0.8s var(--ease-spring);
}

.verdict__scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bdb5d6;
}

.verdict__text {
  margin: 20px 0 22px;
  min-height: 5.5em;
  font-size: 0.98rem;
  color: #ddd8ec;
}

.verdict__count {
  font-size: 0.8rem;
  color: #bdb5d6;
  margin-bottom: 14px;
}

.verdict .btn {
  width: 100%;
}

.verdict__reset {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: none;
  color: #bdb5d6;
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Feature list w/ check ---------- */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.checklist li {
  position: relative;
  padding-left: 34px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C53A2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.checklist--teal li::before {
  background-color: var(--teal-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6e68' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ---------- Example "which process" rows ---------- */
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.example {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.example:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.example h4 {
  margin: 0;
  font-size: 1.4rem;
}

.example p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.example .tag {
  align-self: flex-start;
}

/* ---------- Materials ---------- */
.materials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}

.material {
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
}

.material--resin {
  border-top-color: var(--purple);
}

.material h4 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

.material p {
  margin: 0 0 14px;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.bars {
  display: grid;
  gap: 7px;
  margin: 0;
}

.bar {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.bar dd {
  margin: 0;
  height: 6px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.bar dd span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #4fb0a6;
  transition: width 1.2s var(--ease-out);
}

.material--resin .bar dd span {
  background: var(--purple);
}

.is-in .bar dd span {
  width: calc(var(--v) * 20%);
}

/* ---------- Tabs (materials) ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tabs button {
  position: relative;
  z-index: 1;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 600 0.95rem/1 var(--font-body);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.3s;
}

.tabs button[aria-selected="true"] {
  color: #fff;
}

.tabs__pill {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  border-radius: 999px;
  background: var(--purple);
  transition: left 0.45s var(--ease-out), width 0.45s var(--ease-out), background 0.3s;
}

.tabs[data-active="fdm"] .tabs__pill {
  background: #3f8f87;
}

[role="tabpanel"][hidden] {
  display: none;
}

/* ---------- About ---------- */
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--purple-deep) url("../assets/img/gradient.webp") center / cover;
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
}

.portrait__placeholder {
  text-align: center;
  color: rgb(255 255 255 / 0.9);
  padding: 24px;
}

.portrait__placeholder img {
  width: 70%;
  margin: 0 auto 18px;
}

.portrait__placeholder p {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portrait__tag {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.92);
  color: var(--ink-on-light);
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.portrait__tag small {
  display: block;
  font-weight: 400;
  color: var(--ink-2);
}

.pullquote {
  margin: 32px 0;
  padding: 4px 0 4px 26px;
  border-left: 4px solid var(--teal);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  font-weight: 500;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.dossier {
  position: relative;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
  transition: transform 0.6s var(--ease-spring);
}

.dossier:hover {
  transform: rotate(0deg) scale(1.01);
}

.dossier img {
  width: 62%;
  margin-bottom: 18px;
}

.dossier h3 {
  margin-bottom: 18px;
}

.dossier dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 0;
}

.dossier dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 3px;
}

.dossier dd {
  margin: 0;
  font-size: 0.97rem;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--purple), var(--teal));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  padding: 0 0 36px 56px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--purple);
  transition: transform 0.4s var(--ease-spring), background 0.3s;
}

.timeline li:hover::before {
  transform: scale(1.25);
  background: var(--teal);
}

.timeline h4 {
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.timeline p {
  margin: 0;
  color: var(--ink-2);
}

.timeline small {
  display: block;
  margin-bottom: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.alabama-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.alabama-badge svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.alabama-badge small {
  display: block;
  font-weight: 400;
  color: var(--ink-2);
  font-size: 0.85rem;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.faq details[open] {
  border-color: rgb(108 83 162 / 0.3);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  position: relative;
  padding: 20px 60px 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 22px;
  height: 22px;
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C53A2' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 12px no-repeat;
  transition: transform 0.4s var(--ease-spring), background-color 0.3s;
}

.faq details[open] summary::after {
  transform: rotate(135deg);
  background-color: var(--teal);
}

.faq__body {
  padding: 0 24px 22px;
  color: var(--ink-2);
}

.faq__body p:last-child {
  margin-bottom: 0;
}

.faq-group + .faq-group {
  margin-top: 56px;
}

.faq-group h2 {
  font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
}

.faq-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.faq-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 4px;
}

.faq-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.25s, color 0.25s;
}

.faq-nav a:hover,
.faq-nav a.is-active {
  background: var(--purple-soft);
  color: var(--accent);
}

@media (max-width: 820px) {
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }
}

/* ---------- Forms ---------- */
.form-card {
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

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

.form-step {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.form-step:first-child {
  margin-top: 0;
}

.form-step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.field label,
.field .label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.92rem;
}

.field .hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.field .req {
  color: var(--accent);
}

.input,
.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C53A2' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgb(108 83 162 / 0.14);
}

.field.has-error input:not([type="radio"]):not([type="checkbox"]),
.field.has-error select,
.field.has-error textarea {
  border-color: #c2416b;
}

.field .error-msg {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--error-fg);
}

.field.has-error .error-msg {
  display: block;
}

/* file upload field (quote form) */
.field input[type="file"] {
  padding: 12px;
  cursor: pointer;
}

.field input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s;
}

.field input[type="file"]:hover::file-selector-button {
  background: var(--purple-deep);
}

/* single checkbox with its statement (quote form rights confirmation) */
.field .check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.field .check input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--purple);
  cursor: pointer;
}

.field--check.has-error .check input {
  outline: 2px solid var(--error-fg);
  outline-offset: 2px;
}

.choice-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .choice-cards {
    grid-template-columns: 1fr;
  }
}

.choice-card {
  position: relative;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
}

.choice-card > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--paper-2);
  transition: all 0.25s var(--ease-out);
}

.choice-card strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
}

.choice-card small {
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.4;
}

.choice-card:hover > span {
  border-color: var(--line-strong);
}

.choice-card input:checked + span {
  border-color: var(--accent);
  background: var(--purple-soft);
  box-shadow: 0 0 0 4px rgb(108 83 162 / 0.12);
}

.choice-card input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-foot p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-3);
  max-width: 28rem;
}

.form-status {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  font-weight: 500;
}

.form-status.is-success {
  display: block;
  background: var(--teal-soft);
  color: var(--teal-ink);
}

.form-status.is-error {
  display: block;
  background: var(--error-bg);
  color: var(--error-fg);
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.aside-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.aside-card + .aside-card {
  margin-top: 18px;
}

.aside-card h3 {
  font-size: 1.5rem;
}

.quote-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.quote-layout aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

@media (max-width: 960px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-layout aside {
    position: static;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(80px, 10vw, 140px);
  padding: 80px 0 32px;
  background: var(--surface-invert);
  color: #c8c8d0;
}

.site-footer .spool-peek {
  position: absolute;
  top: 0;
  right: var(--gutter);
  width: clamp(130px, 14vw, 170px);
  translate: 0 -72%;
  --peek-cut: 28%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}

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

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

.footer-brand img {
  width: 240px;
  height: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 22rem;
  font-size: 0.95rem;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--teal);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: #e6e6ec;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.85rem;
  color: #9a9aa6;
}

.footer-bottom .made {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom .made svg {
  width: 16px;
  height: 16px;
  color: var(--teal);
}

/* ---------- Misc ---------- */
.notice {
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--teal-soft);
  border: 1px solid rgb(63 143 135 / 0.25);
  color: var(--teal-ink);
}

.notice strong {
  color: #1d4945;
}

.center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 32px; }
.mt-3 { margin-top: 56px; }

.big-404 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 20vw, 14rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px var(--teal-bright);
}

/* Spool peeks up from the bottom edge of the 404 hero (the hero clips him) */
.hero--404 .spool-peek {
  position: absolute;
  right: clamp(24px, 8vw, 120px);
  bottom: 0;
  width: clamp(190px, 28vw, 360px);
  translate: 0 26%;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
  }
}

/* ---------- Spec list (services "at a glance") ---------- */
.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 22px;
  margin: 18px 0 0;
}

.specs dt {
  font-weight: 600;
}

.specs dd {
  margin: 0;
  color: var(--ink-2);
}

.specs .tag {
  margin: 0 4px 4px 0;
}

@media (max-width: 480px) {
  .specs {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .specs dd {
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   Shop
   ========================================================================== */

/* ---------- Header cart button ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.3s var(--ease-spring);
}

.cart-btn:hover {
  background: var(--purple-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.cart-btn svg {
  width: 23px;
  height: 23px;
}

.site-header--over-dark:not(.is-scrolled):not(.nav-open) .cart-btn {
  color: #fff;
}

.site-header--over-dark:not(.is-scrolled):not(.nav-open) .cart-btn:hover {
  background: rgb(255 255 255 / 0.14);
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--purple-ink);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  animation: pop 0.4s var(--ease-spring);
}

@keyframes pop {
  from { transform: scale(0.4); }
  to { transform: scale(1); }
}

@media (max-width: 960px) {
  .cart-btn {
    z-index: 2;
  }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s, transform 0.3s var(--ease-spring);
}

.icon-btn:hover {
  background: var(--purple-soft);
  transform: rotate(90deg);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgb(46 34 82 / 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s;
}

.cart-overlay.is-open {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translateX(104%);
  transition: transform 0.45s var(--ease-out);
}

.cart-drawer.is-open {
  transform: none;
}

.cart-drawer.is-busy {
  cursor: progress;
}

.cart-drawer.is-busy .cart-drawer__body {
  opacity: 0.55;
  pointer-events: none;
}

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer__head h2 {
  margin: 0;
  font-size: 1.9rem;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
  transition: opacity 0.2s;
}

.cart-drawer__foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

.cart-drawer__note {
  margin: 4px 0 16px;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.cart-drawer__custom {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line__media {
  display: block;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}

.cart-line__media .product-media__ph svg {
  width: 34px;
  height: 34px;
}

.cart-line__media .product-media__ph span {
  display: none;
}

.cart-line__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-line__title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}

.cart-line__variant {
  font-size: 0.84rem;
  color: var(--ink-2);
}

.cart-line__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-line__remove {
  align-self: flex-start;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}

.cart-line__remove:hover {
  color: var(--error-fg);
}

.cart-empty,
.shop-empty {
  grid-column: 1 / -1;
  padding: 48px 12px;
  text-align: center;
  color: var(--ink-2);
}

.cart-empty img,
.shop-empty img {
  width: 150px;
  margin: 0 auto 18px;
  opacity: 0.85;
}

/* ---------- Quantity stepper ---------- */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.qty button {
  width: 44px;
  height: 48px;
  border: 0;
  background: none;
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.qty button:hover {
  color: var(--accent);
  background: var(--purple-soft);
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

.qty--sm button {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  max-width: min(92vw, 460px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--surface-invert);
  color: #fff;
  font-size: 0.93rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.45s var(--ease-spring);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast a {
  color: var(--teal);
}

/* ---------- Shop page ---------- */
/* "Coming soon" hero (shop isn't live in v1.0) */
.hero--soon {
  padding-bottom: clamp(140px, 14vw, 190px);
}

.hero .soon-title {
  max-width: none;
  margin-bottom: 24px;
  font-size: clamp(4.2rem, 2.4rem + 9vw, 11rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: 0;
}

.soon-tape {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: clamp(36px, 5vw, 56px);
  padding: 12px 0;
  overflow: hidden;
  background: var(--teal);
  color: var(--purple-ink);
  border-block: 6px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--purple-ink) 0 10px, var(--teal) 10px 20px) 6;
  box-shadow: 0 10px 30px rgb(13 10 20 / 0.35);
  transform: rotate(-2deg);
}

.soon-tape__track {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: soon-tape 40s linear infinite;
}

/* spacing on each item (not flex gap) so the two halves match exactly and the loop is seamless */
.soon-tape__track span {
  padding-right: 28px;
}

.soon-tape__track span[aria-hidden] {
  color: var(--purple);
}

@keyframes soon-tape {
  to {
    transform: translateX(-50%);
  }
}

/* "Preview" ribbon on the sample products in the shop grid */
#shop-grid .product-card__media::after {
  content: "Preview";
  position: absolute;
  top: 22px;
  right: -44px;
  width: 170px;
  padding: 7px 0;
  background: var(--purple-ink);
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  transform: rotate(45deg);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .soon-tape__track {
    animation: none;
  }
}

/* Work-in-progress banner (shop isn't live in v1.0). Fixed dark colors so it reads the same in both themes. */
.wip-banner {
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  background: var(--purple-ink);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.wip-banner__tape {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--teal) 0 14px, var(--purple-ink) 14px 28px);
  background-size: 39.6px 39.6px;
  animation: wip-tape 1.6s linear infinite;
}

@keyframes wip-tape {
  to {
    background-position: 39.6px 0;
  }
}

.wip-banner__body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(24px, 3.5vw, 40px);
}

.wip-banner__spool {
  width: clamp(96px, 11vw, 140px);
  transform: rotate(-6deg);
}

.wip-banner__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wip-banner__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 0 rgb(185 240 234 / 0.6);
  animation: wip-pulse 1.8s ease-out infinite;
}

@keyframes wip-pulse {
  to {
    box-shadow: 0 0 0 10px rgb(185 240 234 / 0);
  }
}

.wip-banner h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
}

.wip-banner__text p:last-child {
  margin: 0;
  max-width: 62ch;
  color: rgb(255 255 255 / 0.82);
}

@media (max-width: 860px) {
  .wip-banner__body {
    grid-template-columns: 1fr;
  }

  .wip-banner__cta {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wip-banner__tape,
  .wip-banner__dot {
    animation: none;
  }
}

.shop-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.shop-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.shop-toolbar__row--split {
  justify-content: space-between;
}

.shop-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
}

.shop-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  translate: 0 -50%;
  color: var(--ink-3);
  pointer-events: none;
}

.shop-search input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.shop-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgb(108 83 162 / 0.14);
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.shop-sort select {
  padding: 11px 40px 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C53A2' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  font: inherit;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: 500 0.9rem/1 var(--font-body);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.is-active {
  background: var(--purple);
  border-color: var(--accent);
  color: #fff;
}

.chip[data-value="fdm"].is-active {
  background: #3f8f87;
  border-color: #3f8f87;
}

.chips__label {
  margin-right: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.shop-count {
  font-size: 0.9rem;
  color: var(--ink-3);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgb(108 83 162 / 0.25);
}

.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card__media > * {
  transition: transform 0.8s var(--ease-out);
}

.product-card:hover .product-card__media > :first-child {
  transform: scale(1.06);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-invert);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.product-card__badge--hot {
  background: #fff;
  color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 18px 20px 20px;
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.product-card h3 a:hover {
  color: var(--accent);
}

.product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.product-card__price {
  font-weight: 600;
  font-size: 1.05rem;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* placeholder product art */
.product-media__img,
.product-media__ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-media__ph {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 25% 20%, rgb(185 240 234 / 0.55), transparent 50%),
    radial-gradient(circle at 80% 85%, rgb(185 240 234 / 0.35), transparent 45%),
    linear-gradient(135deg, var(--purple), var(--purple-deep));
}

.product-media__ph.ph--fdm {
  color: var(--purple-ink);
  background:
    radial-gradient(circle at 75% 20%, rgb(255 255 255 / 0.7), transparent 50%),
    radial-gradient(circle at 20% 85%, rgb(108 83 162 / 0.35), transparent 50%),
    linear-gradient(135deg, var(--teal-bright), #86c9c1);
}

.product-media__ph::after {
  /* faint layer lines */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.07) 0 2px, transparent 2px 7px);
  pointer-events: none;
}

.product-media__ph svg {
  width: 38%;
  height: auto;
  max-width: 120px;
  opacity: 0.9;
}

.product-media__ph span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- Product page ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
}

.product {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

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

.product__gallery {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

@media (max-width: 860px) {
  .product__gallery {
    position: static;
  }
}

.product__main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product__main .product-media__ph svg {
  max-width: 180px;
}

.product__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.product__thumbs button {
  width: 72px;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: none;
}

.product__thumbs button.is-active {
  border-color: var(--accent);
}

.product__info h1 {
  margin: 14px 0 10px;
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.8rem);
}

.product__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.product__price s {
  margin-left: 8px;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink-3);
}

.product__desc {
  color: var(--ink-2);
  font-size: 1.05rem;
}

.product__form {
  display: grid;
  gap: 22px;
  margin: 28px 0 32px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.option {
  margin: 0;
  padding: 0;
  border: 0;
}

.option legend {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.option legend span {
  font-weight: 400;
  color: var(--ink-2);
}

.option__values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option__values label {
  position: relative;
  cursor: pointer;
}

.option__values input {
  position: absolute;
  opacity: 0;
}

.option__values span {
  display: inline-block;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  transition: all 0.25s var(--ease-out);
}

.option__values label:hover span {
  border-color: var(--accent);
}

.option__values input:checked + span {
  border-color: var(--accent);
  background: var(--purple-soft);
  color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgb(108 83 162 / 0.12);
}

.option__values input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.option__values .is-unavailable span {
  color: var(--ink-3);
  text-decoration: line-through;
}

.product__buy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product__buy .btn {
  flex: 1 1 220px;
}

.product__details summary {
  font-size: 1rem;
}

.related {
  margin-top: clamp(64px, 8vw, 110px);
}

.related h2 {
  font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
}

/* ==========================================================================
   Mailing list
   ========================================================================== */
.newsletter-band {
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  gap: 28px 48px;
  align-items: center;
  margin-bottom: 56px;
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, rgb(46 34 82 / 0.55), rgb(46 34 82 / 0.15)),
    var(--purple-deep) url("../assets/img/gradient.webp") center / cover;
  color: #fff;
}

@media (max-width: 820px) {
  .newsletter-band {
    grid-template-columns: 1fr;
  }
}

.newsletter-band h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}

.newsletter-band p {
  margin: 0;
  color: rgb(255 255 255 / 0.85);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-on-light);
  font: inherit;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(166 219 214 / 0.55);
}

.newsletter-band .btn {
  --btn-bg: var(--teal);
  --btn-fg: var(--purple-ink);
}

.newsletter-msg {
  flex-basis: 100%;
  min-height: 1.2em;
  margin: 0;
  font-size: 0.86rem;
}

.newsletter-msg.is-error {
  color: #ffd0de;
}

.nl-dialog .newsletter-msg.is-error {
  color: var(--error-fg);
}

.newsletter-fine {
  flex-basis: 100%;
  font-size: 0.78rem !important;
  color: rgb(255 255 255 / 0.7) !important;
}

.newsletter-done {
  margin: 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font-weight: 500;
}

/* ---------- One-time invite dialog ---------- */
.nl-dialog {
  width: min(92vw, 760px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  animation: nl-in 0.5s var(--ease-spring);
}

.nl-dialog:not([open]) {
  display: none;
}

.nl-dialog::backdrop {
  background: rgb(46 34 82 / 0.5);
  backdrop-filter: blur(4px);
  animation: fade-in 0.4s;
}

.nl-dialog.is-closing {
  animation: nl-out 0.26s forwards;
}

@keyframes nl-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
}

@keyframes nl-out {
  to { opacity: 0; transform: translateY(12px) scale(0.97); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@media (max-width: 640px) {
  .nl-dialog {
    grid-template-columns: 1fr;
  }

  .nl-dialog__art {
    min-height: 120px;
  }
}

.nl-dialog__art {
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--purple-deep) url("../assets/img/gradient.webp") center / cover;
}

.nl-dialog__art img {
  width: 100%;
  max-width: 220px;
  animation: spool-wiggle 1.2s 0.4s var(--ease-out);
}

.nl-dialog__content {
  padding: clamp(28px, 4vw, 44px);
}

.nl-dialog__content h2 {
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem);
}

.nl-dialog__content > p:not(.eyebrow) {
  color: var(--ink-2);
}

.nl-dialog__spool {
  width: 160px;
  margin-bottom: 18px;
}

.nl-dialog__x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.newsletter-form--stack input[type="email"] {
  flex-basis: 100%;
  background: var(--paper-2);
  border-color: var(--line);
}

.newsletter-form--stack .btn {
  flex-basis: 100%;
}

.nl-dialog__later {
  display: block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.nl-dialog__later:hover {
  color: var(--accent);
}

.cart-drawer[hidden],
.cart-overlay[hidden] {
  display: none;
}

.product-card__media,
.cart-line__media {
  text-decoration: none;
}

.product-card__foot {
  flex-wrap: wrap;
}

.product-card__foot .btn {
  white-space: nowrap;
}

/* ---------- Dark theme assets ---------- */
/* Header always shows the white logo on dark surfaces */
:root:not([data-theme="light"]) .site-header .brand .logo-dark {
  opacity: 0;
}

:root:not([data-theme="light"]) .site-header .brand .logo-light {
  opacity: 1;
}

/* Spool line art ships black; flip it to white on dark backgrounds */
:root:not([data-theme="light"]) img[src$="spool-dark.webp"] {
  filter: invert(1);
}

/* Inline SVG icons baked with brand purple: use the lifted accent */
:root:not([data-theme="light"]) .checklist li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7A5EA' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

:root:not([data-theme="light"]) .faq details:not([open]) summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7A5EA' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
}

:root:not([data-theme="light"]) .shop-sort select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7A5EA' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Deeper shadows read better than purple-tinted ones on dark */
:root:not([data-theme="light"]) {
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 2px 8px rgb(0 0 0 / 0.25);
  --shadow: 0 2px 6px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 8px 24px rgb(0 0 0 / 0.4), 0 32px 80px rgb(0 0 0 / 0.5);
}
