/*
Theme Name: Surface Pattern Studio
Theme URI: https://github.com/T4shby/AshbyDB
Author: Ashby Studios
Description: Public customer catalog for DesignDB-published patterns. CPT and taxonomies come from the DesignDB Bridge plugin - this theme is presentation only.
Version: 4.9.22
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: surface-pattern-studio
License: GNU General Public License v2 or later
*/

:root {
  --ink: #3f3f42;
  --paper: #f7f7f5;
  --paper-2: #efeeeb;
  --muted: #747477;
  --line: #dedddd;
  --accent: #b97782;
  --accent-dark: #8c5560;
  --accent-soft: #f0dfe2;
  --black: #202023;
  --white: #fff;
  --wood: #5c3a22;
  --wood-dark: #2e1c10;
  --font: "Barlow", "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --max: 1180px;
  --radius: 2px;
  --shadow: 0 18px 40px rgb(42 42 45 / 12%);
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* October–November sale strip for signed-in catalog visitors. */
body.has-sale-banner { --header-h: 118px; }
.sale-banner {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 0.4rem 1rem 0.45rem;
  background:
    radial-gradient(circle at 8px 50%, rgb(185 119 130 / 18%) 1.5px, transparent 1.6px) 0 0 / 16px 100%,
    linear-gradient(180deg, #f8f1ea 0%, #f3e6dc 100%);
  color: var(--wood);
  border-bottom: 1px dashed #c9b3a2;
  text-align: center;
}
.sale-banner p {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
}
.sale-banner__offer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}
.sale-banner__off {
  color: var(--accent-dark);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.sale-banner__season {
  font-size: 0.82rem;
  font-weight: 500;
}
.sale-banner__limit {
  width: 100%;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.85;
}
.sale-banner__ornament {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0;
}
body.has-sale-banner .site-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 56px;
  padding: 0.45rem 1.5rem;
}
@media (max-width: 640px) {
  body.has-sale-banner { --header-h: 136px; }
  .sale-banner__off { font-size: 1.02rem; }
  .sale-banner__season { font-size: 0.72rem; letter-spacing: 0.12em; }
  .sale-banner__limit { font-size: 0.62rem; }
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 1.5rem;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 160;
}
/* WP admin-bar already adds html { margin-top: 32/46px }; keep header flush under it. */
html.admin-bar .site-header { top: 32px !important; }
@media screen and (max-width: 782px) {
  html.admin-bar .site-header { top: 46px !important; }
}
.brand {
  display: flex;
  align-items: center;
}
.brand img {
  display: block;
  width: clamp(130px, 14vw, 180px);
  height: auto;
  max-height: 36px;
  object-fit: contain;
}
.site-nav__list, .footer-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a, .footer-nav a, .site-nav__parent {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav .current-menu-item > a:not(.ashby-desk-selection-link) {
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.12rem;
}
.site-nav .ashby-desk-selection-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.site-nav .ashby-desk-selection-link.is-current .ashby-desk-selection-label {
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.12rem;
}
.site-login {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.12rem;
}
.site-login.is-current {
  border-bottom-color: currentColor;
}
.site-login--quiet {
  border-bottom-color: transparent;
  color: var(--muted);
}
.site-nav__item { position: relative; }
.site-nav__parent {
  background: none;
  border: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
.site-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0;
  min-width: 220px;
}
.site-nav__item--has-children .site-nav__sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
}
.site-nav__item--has-children.is-open .site-nav__sub { display: block; }
.site-nav__sub a {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--ink);
}
.site-nav__sub a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.site-nav__sub-all { border-top: 1px solid var(--line); margin-top: 0.35rem; padding-top: 0.35rem; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.container-custom { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.site-main { padding: var(--header-h) 0 0; width: 100%; max-width: none; }
body.home .site-main { padding-top: 0; }

/* Buttons */
.btn, .btn-primary, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 2px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover, .btn-primary:hover { background: var(--accent-dark); color: white; transform: none; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn-secondary { background: var(--ink); color: white; }
.btn-secondary:hover { background: #2a2724; color: white; }
.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgb(255 255 255 / 35%);
}
.btn-ghost:hover { background: rgb(255 255 255 / 10%); color: white; }

/* =========================================================
   ASHBY TREND BOARD HERO — v4.3.0
   Layer 1: permanent art-directed board
   Layer 2: monthly designs; composition via cutting-table.js
   ========================================================= */

body.home {
  background: #fff;
  color: var(--ink);
}
body.home .site-header {
  background: #fff;
  border-bottom: 1px solid #c9c2b8;
  color: var(--ink);
}
body.home .brand img { filter: none; }
body.home .site-header a:hover { color: var(--accent-dark); }
body.home .nav-toggle__bar { background: var(--ink); }
body.home .site-footer {
  background: #fff;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
body.home .footer-brand img { filter: none; }
body.home .footer-copy { border-top-color: var(--line); }
@media (max-width: 768px) {
  body.home .site-nav {
    background: #fff;
    border-bottom-color: rgb(63 63 66 / 8%);
  }
}

/* Hero shell */
.tb-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #d9cbb6;
}

/* Quiet paper. Real printed samples sit on top. */
.tb-board {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.tb-board__paper {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 3px, rgb(90 70 50 / 2.5%) 3px 4px),
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(90 70 50 / 2%) 3px 4px),
    radial-gradient(ellipse at 12% 78%, rgb(210 170 150 / 22%), transparent 38%),
    radial-gradient(ellipse at 78% 18%, rgb(190 175 155 / 16%), transparent 34%),
    radial-gradient(ellipse at 55% 55%, rgb(200 185 165 / 10%), transparent 42%),
    linear-gradient(180deg, #e8dcc8 0%, #deceb6 48%, #d4c2a8 100%);
}
.tb-board__paper::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tb-paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.tb-c { position: absolute; z-index: 3; }
.tb-c--chips {
  left: 1%;
  bottom: 8%;
  width: 200px;
  height: 120px;
}
.tb-chip {
  position: absolute;
  width: 40px;
  height: 58px;
  box-shadow: 0 4px 10px rgb(40 30 20 / 18%);
  border: 1px solid rgb(63 63 66 / 14%);
}
.tb-chip--a { left: 4px; top: 16px; background: #d4a5ad; transform: rotate(-11deg); }
.tb-chip--b { left: 28px; top: 4px; background: #a8b59a; transform: rotate(4deg); }
.tb-chip--c { left: 54px; top: 14px; background: #3f3f42; transform: rotate(-2deg); }
.tb-chip--d { left: 80px; top: 2px; background: #c4a484; transform: rotate(9deg); }
.tb-chip--e { left: 106px; top: 12px; background: #8fa6b8; transform: rotate(-6deg); }
.tb-c--cloth {
  right: -1%;
  bottom: 10%;
  width: 240px;
  height: 200px;
}
.tb-cloth {
  position: absolute;
  box-shadow: 0 10px 22px rgb(40 30 20 / 16%);
}
.tb-cloth--linen {
  right: 36px;
  top: 10px;
  width: 160px;
  height: 112px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(90 70 50 / 7%) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 3px, rgb(90 70 50 / 5%) 3px 4px),
    #e4dacb;
  transform: rotate(-11deg);
}
.tb-cloth--pinked {
  right: 8px;
  bottom: 6px;
  width: 140px;
  height: 82px;
  background: repeating-linear-gradient(90deg, #cfc4b4 0 5px, #e8dfd2 5px 10px);
  transform: rotate(8deg);
  clip-path: polygon(0 0,100% 0,100% 88%,96% 100%,92% 88%,88% 100%,84% 88%,80% 100%,76% 88%,72% 100%,68% 88%,64% 100%,60% 88%,56% 100%,52% 88%,48% 100%,44% 88%,40% 100%,36% 88%,32% 100%,28% 88%,24% 100%,20% 88%,16% 100%,12% 88%,8% 100%,4% 88%,0 100%);
}
.tb-c--wp {
  right: 0;
  top: 18%;
  width: 80px;
  height: 230px;
}
.tb-wp {
  position: absolute;
  right: 0;
  top: 0;
  width: 52px;
  height: 200px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 6%), transparent 18%),
    repeating-linear-gradient(#efe6d6 0 16px, #e0d4c2 16px 18px);
  box-shadow: 0 8px 18px rgb(40 30 20 / 14%);
  transform: rotate(3deg);
}
.tb-tape {
  position: absolute;
  height: 18px;
  background: rgb(232 214 150 / 72%);
  box-shadow: 0 1px 3px rgb(40 24 10 / 14%);
}
.tb-tape--a { left: 36px; top: 0; width: 72px; transform: rotate(-14deg); }
.tb-tape--b { right: 48px; top: 2px; width: 64px; transform: rotate(8deg); }
.tb-tape--c { right: 8px; top: 8px; width: 48px; transform: rotate(-6deg); background: rgb(255 255 255 / 42%); }
.tb-pin {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #bbb 45%, #444 78%);
  box-shadow: 0 2px 4px rgb(0 0 0 / 35%);
}
.tb-pin--a { left: 70px; top: 4px; }
.tb-pin--b { right: 70px; top: 6px; background: radial-gradient(circle at 32% 28%, #fff, #c47a82 55%, #6a3a42); }

@media (max-width: 768px) {
  .tb-hero {
    justify-content: flex-start;
    padding-top: var(--header-h);
  }
  .tb-c--wp { display: none; }
  .tb-c--cloth { transform: scale(0.72); transform-origin: bottom right; }
  .tb-c--chips { transform: scale(0.9); transform-origin: left bottom; }
}

.tb-hero--board-only .tb-stage { display: none !important; }

/* ---------- Samples stage ---------- */
.tb-stage {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
}
.tb-hero.is-ready .tb-stage {
  opacity: 1;
  transition: opacity 0.18s ease;
}

.tb-sample {
  position: absolute;
  display: block;
  pointer-events: auto;
  cursor: grab;
  will-change: transform;
  transform-origin: center center;
  box-shadow:
    0 1px 0 rgb(0 0 0 / 5%),
    0 4px 14px rgb(0 0 0 / 10%),
    0 12px 28px rgb(0 0 0 / 7%);
  background: #fff;
  padding: 5px;
  touch-action: none;
}
.tb-sample:active,
.tb-sample.is-dragging { cursor: grabbing; }
.tb-sample.is-offboard { display: none !important; }

.tb-sample__pin {
  position: absolute;
  top: -5px;
  left: 50%;
  z-index: 4;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 32% 28%, #fff 0 22%, #cfd0d2 38%, #7a7c80 68%, #2e2e30 100%);
  box-shadow:
    0 1px 1px rgb(255 255 255 / 70%) inset,
    0 2px 3px rgb(0 0 0 / 45%),
    1px 6px 8px rgb(40 30 20 / 28%);
}
.tb-sample:nth-child(3n) .tb-sample__pin {
  background: radial-gradient(circle at 32% 28%, #fff 0 22%, #d4a5ad 40%, #8c5560 70%, #4a2a30 100%);
}
.tb-sample:nth-child(3n+1) .tb-sample__pin {
  left: 42%;
}
.tb-sample:nth-child(3n+2) .tb-sample__pin {
  left: 58%;
}

.tb-sample__hit {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.tb-sample__art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e8e4de;
  position: relative;
}
.tb-sample__art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(255 255 255 / 10%), transparent 20%);
  opacity: 0.5;
}
.tb-sample__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-sample__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e2da, #d4cec6);
}

.tb-sample__label {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  padding: 5px 9px 4px;
  background: #fff;
  border: 1px solid rgb(63 63 66 / 16%);
  font-size: 0.68rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: min(220px, 90vw);
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 2px 6px rgb(0 0 0 / 6%);
}
.tb-sample__label-name {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
.tb-sample:hover,
.tb-sample:focus-within,
.tb-sample.is-focused {
  z-index: 70 !important;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 8%),
    0 12px 28px rgb(0 0 0 / 12%);
}
.tb-sample:hover .tb-sample__label,
.tb-sample:focus-within .tb-sample__label,
.tb-sample.is-focused .tb-sample__label {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .tb-sample { transition: box-shadow 0.15s ease; }
}

/* ---------- Headline ---------- */
.tb-headline {
  position: relative;
  z-index: 50;
  pointer-events: none;
  padding: 1.4rem 1.5rem 1.35rem;
  margin-left: clamp(1.25rem, 8vw, 16%);
  max-width: min(520px, 48%);
  background: #fff;
  border: 1px solid rgb(63 63 66 / 10%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 6%);
}
.tb-headline::before,
.tb-headline::after { display: none; }
.ct-brand-kicker {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
}
.ct-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 5.25rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.ct-mantra {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Archive CTA ---------- */
.tb-archive {
  position: absolute;
  bottom: 1.75rem;
  left: clamp(1.25rem, 8vw, 16%);
  z-index: 50;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  pointer-events: auto;
  padding: 0.7rem 1rem;
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(63 63 66 / 12%);
  box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
}
.tb-archive__counts {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.tb-archive__link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.1rem;
}
.tb-archive__link:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

@media (max-width: 768px) {
  .tb-hero { min-height: 100svh; }
  .tb-headline {
    max-width: calc(100% - 2rem);
    margin: 1.25rem 1rem 0;
    padding: 1rem 1.1rem;
  }
  .ct-title { font-size: clamp(2.1rem, 10vw, 3.4rem); }
  .tb-archive {
    bottom: 1.1rem;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}
@media (max-width: 480px) {
  .tb-headline { max-width: 94%; padding-left: 1rem; }
}

/* Legacy .workshop-intro kept for any non-home templates that still use it */
.workshop-intro {
  width: min(1400px, calc(100% - 3rem));
  margin: 0 auto 2rem;
  color: var(--ink);
}
.workshop-intro p {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.workshop-intro h1 {
  margin: 0 0 0.8rem;
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 600;
  line-height: 0.95;
  text-transform: uppercase;
}
.workshop-intro div {
  max-width: 42rem;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.5;
  color: var(--muted);
}
.mixing-palette {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem;
  filter: drop-shadow(0 28px 28px rgb(45 45 48 / 18%));
}
.mixing-palette__surface {
  position: relative;
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  border: 1px solid #d6d2cc;
  border-radius: 48% 52% 46% 54% / 54% 46% 54% 46%;
  background:
    radial-gradient(circle at 24% 28%, rgb(185 119 130 / 5%), transparent 18%),
    radial-gradient(circle at 72% 70%, rgb(90 145 165 / 4%), transparent 20%),
    #fff;
  box-shadow:
    inset 0 0 45px rgb(63 63 66 / 5%),
    inset 0 -10px 0 #ebe8e2;
}
.mixing-palette__thumb-hole {
  position: absolute;
  right: 5.5%;
  top: 6%;
  z-index: 30;
  width: 12%;
  aspect-ratio: 1;
  border: 8px solid #e8e5df;
  border-radius: 50%;
  background: #f8f8f6;
  box-shadow:
    inset 0 4px 10px rgb(63 63 66 / 12%),
    0 1px 0 #fff;
}
.scrap {
  position: absolute;
  display: block;
  pointer-events: none;
  aspect-ratio: 1;
  height: auto;
}
.scrap__face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #2a2420 center/cover no-repeat;
  border-radius: 46% 54% 48% 52% / 50% 42% 58% 50%;
  box-shadow:
    0 9px 16px rgb(63 63 66 / 20%),
    inset 0 0 0 1px rgb(255 255 255 / 14%);
  overflow: hidden;
}
.scrap__face::after {
  content: "";
  position: absolute;
  inset: 5% 12% 48% 18%;
  border-radius: 50%;
  background: linear-gradient(150deg, rgb(255 255 255 / 24%), transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.7;
}
.scrap--round .scrap__face { border-radius: 50%; }
.scrap--soft .scrap__face {
  border-radius: 57% 43% 46% 54% / 42% 58% 42% 58%;
}
.scrap--wide .scrap__face {
  border-radius: 40% 60% 56% 44% / 58% 40% 60% 42%;
}
.scrap--0 { left: 10%; top: 10%; width: 23%; }
.scrap--1 { left: 35%; top: 8%; width: 22%; }
.scrap--2 { left: 58%; top: 11%; width: 24%; }
.scrap--3 { left: 12%; top: 39%; width: 22%; }
.scrap--4 { left: 37%; top: 34%; width: 25%; }
.scrap--5 { left: 64%; top: 39%; width: 22%; }
.scrap--6 { left: 14%; top: 67%; width: 21%; }
.scrap--7 { left: 38%; top: 65%; width: 22%; }
.scrap--8 { left: 63%; top: 65%; width: 23%; }
.mixing-palette__surface.is-physics .scrap {
  transform-origin: center;
  will-change: transform;
}

.workshop-scroll {
  width: calc(100% - 2rem);
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.workbench {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 24px 55px rgb(63 63 66 / 10%);
}
[data-workshop-motion] {
  --motion-y: 0px;
  --base-rotate: 0deg;
  transform: translate3d(0, var(--motion-y), 0) rotate(var(--base-rotate));
  will-change: transform;
}
.workbench--cutting {
  background:
    linear-gradient(90deg, rgb(63 63 66 / 2%) 1px, transparent 1px),
    linear-gradient(rgb(63 63 66 / 2%) 1px, transparent 1px),
    #f7f5f0;
  background-size: 24px 24px;
}
.cutting-mat {
  position: absolute;
  inset: 9% 8% 10% 7%;
  --base-rotate: -1.5deg;
  border: 1px solid #657b77;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 18%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 18%) 1px, transparent 1px),
    linear-gradient(135deg, #829c96, #667f7a);
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 16px 32px rgb(63 63 66 / 20%);
}
.cutting-mat::before,
.cutting-mat::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgb(255 255 255 / 30%);
  pointer-events: none;
}
.cutting-mat::after { inset: 18%; }
.cutting-mat__measure {
  position: absolute;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgb(255 255 255 / 50%) 13px 14px);
}
.cutting-mat__measure--top { left: 4%; right: 4%; top: 3%; height: 8px; }
.cutting-mat__measure--side {
  top: 4%;
  bottom: 4%;
  left: 3%;
  width: 8px;
  transform: rotate(90deg);
}
.sketch-sheet {
  position: absolute;
  width: 31%;
  height: 48%;
  background: #fff;
  box-shadow: 0 12px 24px rgb(63 63 66 / 20%);
}
.sketch-sheet::before,
.sketch-sheet::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 18px;
  background: rgb(221 202 152 / 58%);
}
.sketch-sheet::before { top: -7px; left: 18%; transform: rotate(-8deg); }
.sketch-sheet::after { right: 12%; bottom: -7px; transform: rotate(5deg); }
.sketch-sheet--one { left: 17%; top: 15%; --base-rotate: -7deg; }
.sketch-sheet--two { left: 48%; top: 28%; --base-rotate: 5deg; width: 35%; height: 38%; }
.sketch-sheet__flower {
  position: absolute;
  inset: 15%;
  border-radius: 52% 48% 50% 50%;
  background:
    radial-gradient(ellipse at 50% 25%, transparent 0 13%, #a66070 14% 17%, transparent 18%),
    radial-gradient(ellipse at 30% 45%, transparent 0 12%, #bf7d89 13% 16%, transparent 17%),
    radial-gradient(ellipse at 70% 48%, transparent 0 12%, #bf7d89 13% 16%, transparent 17%),
    radial-gradient(ellipse at 48% 72%, transparent 0 14%, #8b5660 15% 18%, transparent 19%);
  filter: blur(0.35px);
  opacity: 0.75;
}
.sketch-sheet__stripe {
  position: absolute;
  inset: 16%;
  background: repeating-linear-gradient(115deg, transparent 0 14px, #555 15px 17px, transparent 18px 31px);
  opacity: 0.42;
}
.masking-tape {
  position: absolute;
  left: 6%;
  bottom: 5%;
  width: 108px;
  aspect-ratio: 1;
  border: 20px solid #d8c48d;
  border-radius: 50%;
  background: #f4efe5;
  box-shadow: 0 12px 20px rgb(63 63 66 / 24%);
}
.masking-tape::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px dashed rgb(80 70 45 / 25%);
  border-radius: 50%;
}
.craft-knife {
  position: absolute;
  right: 6%;
  top: 10%;
  width: 34px;
  height: 310px;
  --base-rotate: 24deg;
  border-radius: 5px;
  background: linear-gradient(90deg, #a85b4e, #d98776 45%, #863f36);
  box-shadow: 7px 10px 14px rgb(63 63 66 / 22%);
}
.craft-knife::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 30px;
  width: 20px;
  height: 5px;
  background: #393a3d;
  box-shadow: 0 22px 0 #393a3d, 0 44px 0 #393a3d, 0 66px 0 #393a3d;
}
.craft-knife__blade {
  position: absolute;
  left: 6px;
  bottom: -64px;
  width: 22px;
  height: 70px;
  background: linear-gradient(90deg, #aeb0b2, #f4f4f2 60%, #85878a);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}
.stencil {
  position: absolute;
  left: 30%;
  bottom: 5%;
  width: 38%;
  height: 24%;
  --base-rotate: -4deg;
  border: 2px solid rgb(120 145 155 / 45%);
  background:
    radial-gradient(circle, transparent 0 10px, rgb(185 205 211 / 52%) 11px 18px, transparent 19px)
    0 0 / 54px 54px,
    rgb(213 229 233 / 48%);
  box-shadow: 0 10px 18px rgb(63 63 66 / 18%);
}
.steel-rule {
  position: absolute;
  right: 7%;
  bottom: 9%;
  width: 36%;
  height: 36px;
  --base-rotate: -11deg;
  border: 1px solid #929598;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, #696c70 9px 10px),
    linear-gradient(#e1e2e2, #afb1b3);
  box-shadow: 0 8px 15px rgb(63 63 66 / 18%);
}
.process-stamp {
  position: absolute;
  left: 7%;
  top: 7%;
  z-index: 5;
  color: rgb(255 255 255 / 72%);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  transform: rotate(-3deg);
}
.workbench--colour {
  background:
    radial-gradient(circle at 20% 20%, rgb(185 119 130 / 8%), transparent 25%),
    radial-gradient(circle at 75% 70%, rgb(83 139 166 / 7%), transparent 27%),
    #f1ece4;
}
.colour-card {
  position: absolute;
  left: 12%;
  width: 48%;
  height: 16%;
  border-radius: 58% 42% 55% 45% / 50% 58% 42% 50%;
  opacity: 0.88;
  filter: drop-shadow(0 8px 8px rgb(63 63 66 / 12%));
}
.colour-card--rose { top: 17%; --base-rotate: -5deg; background: #c98d99; }
.colour-card--blue { top: 37%; left: 18%; --base-rotate: 3deg; background: #729fb7; }
.colour-card--ink { top: 57%; left: 9%; --base-rotate: -2deg; background: #44464a; }
.brush-pot {
  position: absolute;
  right: 11%;
  bottom: 10%;
  width: 170px;
  height: 210px;
  --base-rotate: 2deg;
  border-radius: 12px 12px 45px 45px;
  background: linear-gradient(90deg, #d5d0c9, #f6f4ef 45%, #bdb8b0);
  box-shadow: 0 18px 26px rgb(63 63 66 / 22%);
}
.paint-brush {
  position: absolute;
  bottom: 175px;
  width: 14px;
  height: 260px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(90deg, #74451f, #c08a4d 50%, #65401e);
  transform-origin: bottom;
}
.paint-brush::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -42px;
  width: 24px;
  height: 54px;
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(90deg, #3a2e28, #857166, #2f2723);
}
.paint-brush::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 8px;
  width: 18px;
  height: 38px;
  background: linear-gradient(90deg, #888, #ddd 48%, #777);
}
.paint-brush--one { left: 28px; transform: rotate(-12deg); }
.paint-brush--two { left: 65px; height: 300px; transform: rotate(-2deg); }
.paint-brush--three { left: 98px; height: 275px; transform: rotate(9deg); }
.paint-brush--four { left: 128px; height: 235px; transform: rotate(17deg); }
.paint-tube {
  position: absolute;
  width: 190px;
  height: 54px;
  border-radius: 4px 24px 24px 4px;
  background: linear-gradient(#f4f1ec, #c9c5bf);
  box-shadow: 0 10px 16px rgb(63 63 66 / 20%);
}
.paint-tube::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 48px;
  top: 10px;
  bottom: 10px;
  border-radius: 2px;
}
.paint-tube::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 8px;
  width: 24px;
  height: 38px;
  background: #55585b;
  border-radius: 0 4px 4px 0;
}
.paint-tube--rose { left: 10%; bottom: 9%; --base-rotate: 8deg; }
.paint-tube--rose::before { background: #b97782; }
.paint-tube--blue { left: 31%; bottom: 13%; --base-rotate: -7deg; }
.paint-tube--blue::before { background: #5d8fa8; }
.thread-spool {
  position: absolute;
  right: 35%;
  top: 15%;
  width: 105px;
  height: 150px;
  --base-rotate: -5deg;
  border-radius: 12px;
  border-top: 13px solid #ded9d1;
  border-bottom: 13px solid #ded9d1;
  background: repeating-linear-gradient(0deg, #b2727f 0 5px, #c98d99 5px 9px);
  box-shadow: 0 12px 20px rgb(63 63 66 / 18%);
}
.process-note {
  position: absolute;
  left: 12%;
  top: 8%;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
  transform: rotate(-3deg);
}
@media (prefers-reduced-motion: reduce) {
  [data-workshop-motion] { transform: rotate(var(--base-rotate)); }
}

/* Hero leftovers used on inner pages */
.hero {
  min-height: min(72vh, 720px);
  min-height: min(72dvh, 720px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgb(196 92 122 / 18%), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgb(246 243 238 / 6%), transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 46rem; }
.hero-eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  line-height: 1.08;
  margin: 0 0 1.25rem;
  font-weight: 700;
}
.hero-lede { color: #c8c0b6; font-size: clamp(1.05rem, 2vw, 1.2rem); margin: 0 0 2rem; max-width: 38rem; margin-inline: auto; }
.hero-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c8c0b6;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* Reveal animation - landing sections only; catalog disables this class */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Stats band */
.stats-band {
  margin-top: -3rem;
  position: relative;
  z-index: 2;
  padding: 0 1rem 2rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--white);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.stat-card {
  text-align: center;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--line);
}
.stat-card:last-child { border-right: 0; }
.stat-card--accent { background: var(--accent-soft); border-radius: var(--radius); border-right: 0; }
.stat-value {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.stat-value--text { font-size: 1.15rem; }
.stat-label { display: block; margin-top: 0.35rem; font-size: 0.82rem; color: var(--muted); }

/* Sections */
.section { padding: 4.5rem 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin: 0 0 0.65rem; }
.section-head p { margin: 0; color: var(--muted); }
.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  max-width: none;
  margin-bottom: 2rem;
}
.section--preview { background: var(--paper-2); }
.section--categories { padding-top: 2rem; }

/* Category pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.category-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgb(196 92 122 / 12%);
  transform: translateY(-2px);
  color: var(--ink);
}
.category-pill__count {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--paper);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

/* Mosaic grid */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}
.pattern-card { margin: 0; }
.pattern-card__link { display: block; height: 100%; }
.pattern-card__media {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: #222;
  box-shadow: var(--shadow);
  height: 100%;
  min-height: 200px;
}
.pattern-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.45s ease;
}
.pattern-card__placeholder {
  display: block;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #333, #111);
}
.pattern-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 78%));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
}
.pattern-card__identity { display: grid; }
.pattern-card__code { font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; }
.pattern-card__cat { font-size: 0.78rem; opacity: 0.85; }
.pattern-card__badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  padding: 0.22rem 0.55rem;
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #5a4a3a;
}
.pattern-card__badge--loan,
.pattern-card__badge--on-loan { background: #6b5a2e; }
.pattern-card__badge--sold { background: #6b3030; }
.pattern-card__badge--reserved { background: #3d4f6b; }
.pattern-card:hover .pattern-card__img { transform: scale(1.04); }
.pattern-card--default { grid-column: span 3; }
.pattern-card--wide { grid-column: span 6; }
.pattern-card--wide .pattern-card__img { aspect-ratio: 16 / 9; }
.pattern-card--tall { grid-column: span 3; }
.pattern-card--tall .pattern-card__img { aspect-ratio: 3 / 4; }

/* Empty catalog */
.empty-catalog {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}
.empty-catalog h3 { margin: 0 0 0.75rem; font-size: 1.5rem; }
.empty-catalog p { max-width: 32rem; margin: 0 auto; color: var(--muted); }
.empty-catalog__icon {
  width: 64px; height: 64px; margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--paper));
  border: 2px solid var(--line);
}
.empty-catalog__admin { margin-top: 1rem; font-size: 0.9rem; }

/* About */
.about-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.about-body { color: var(--muted); }
.about-features {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}
.about-features li {
  padding-left: 1.35rem;
  position: relative;
  font-weight: 500;
}
.about-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.about-visual {
  position: relative;
  min-height: 320px;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
}
.about-visual__tile {
  position: absolute;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
}
.about-visual__tile--1 {
  inset: 0 30% 20% 0;
  background: linear-gradient(145deg, #c45c7a, #7a3550);
}
.about-visual__tile--2 {
  inset: 25% 0 0 45%;
  background: linear-gradient(145deg, #2a2724, #121110);
}
.about-visual__tile--3 {
  inset: auto 15% 8% 20%;
  height: 35%;
  background: linear-gradient(145deg, #f4f0ea, #ddd5ca);
  box-shadow: var(--shadow);
}

/* CTA */
.cta-band {
  background: var(--paper-2);
  color: var(--ink);
  text-align: center;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--line);
}
.cta-band__inner { max-width: 38rem; margin: 0 auto; }
.cta-band h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0 0 1rem; }
.cta-band p { color: #b8b0a6; margin: 0 0 2rem; }
.cta-band .btn-ghost { border-color: rgb(255 255 255 / 25%); }

.pattern-card--catalog { grid-column: auto; }
.pattern-card--catalog .pattern-card__media { min-height: 0; }
.pattern-card--catalog .pattern-card__img { aspect-ratio: 1; }

/* Guest portal (front page) */
.portal-hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
  background: var(--paper-2);
  text-align: center;
}
.portal-hero--compact {
  min-height: 0;
  padding: 2.75rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
}
.portal-hero__inner { max-width: 36rem; }
.portal-hero--compact .portal-hero__inner { max-width: 42rem; }
.portal-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin: 0 0 1rem;
  line-height: 1.12;
}
.portal-hero__lede { color: var(--muted); margin: 0 0 1.75rem; font-size: 1.08rem; }
.portal-hero__stat { margin-top: 2rem; color: var(--muted); font-size: 0.95rem; }

.landing-hero--compact {
  min-height: min(52vh, 520px);
  min-height: min(52dvh, 520px);
  padding: 3rem 1.5rem 2rem;
}

/* Public weekly mosaic leftovers */
.public-mosaic {
  padding-top: 0.5rem;
  padding-bottom: 3.5rem;
}
.public-mosaic__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.public-mosaic__head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.public-mosaic__grid {
  margin-bottom: 1.25rem;
}
.public-mosaic__note {
  margin: 0;
  font-size: 0.92rem;
  text-align: center;
}
.pattern-card__link { position: relative; }

/* Landing sections (ashbystudios.com structure, modernised) */
.section { padding: 4rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 0.75rem; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.section-lede { margin: 0; color: var(--muted); }
.category-showcase {
  background: transparent;
  padding-top: 0;
  margin-top: 0;
}
.category-showcase__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}
.category-tile { margin: 0; }
.category-tile__link { display: block; height: 100%; }
.category-tile__media {
  position: relative;
  display: block;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #222 center/cover no-repeat;
  box-shadow: var(--shadow);
  transition: transform 0.45s ease;
}
.category-tile:hover .category-tile__media { transform: scale(1.02); }
.category-tile__placeholder {
  display: block;
  min-height: 220px;
  background: linear-gradient(135deg, #3a3530, #121110);
}
.category-tile__overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 78%));
  color: white;
}
.category-tile__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
}
.category-tile__count {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
  border: 1px solid rgb(255 255 255 / 35%);
  padding: 0.15rem 0.5rem;
}
.category-tile--a { grid-column: span 4; }
.category-tile--b { grid-column: span 4; }
.category-tile--c { grid-column: span 4; }
.category-tile--d { grid-column: span 6; }
.category-tile--e { grid-column: span 6; }
.category-tile--f { grid-column: span 3; }
.category-tile--g { grid-column: span 3; }
.category-tile--h { grid-column: span 6; }
.category-tile--d .category-tile__media,
.category-tile--e .category-tile__media,
.category-tile--h .category-tile__media { min-height: 280px; }
.about-section { background: var(--paper-2); }
.about-copy h2 { margin: 0 0 1.25rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.about-body { color: var(--ink); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.45; }
.about-body p { margin: 0 0 1rem; }
.about-visual__tile--photo {
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Catalog (prototype gallery) */
.catalog-toolbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0 1.25rem;
}
.catalog-toolbar__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.catalog-toolbar__head h1 { margin: 0.25rem 0 0; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.catalog-stats strong { color: var(--ink); }
.catalog-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.catalog-search__input { flex: 1 1 220px; }
.catalog-search__sort { flex: 0 1 160px; }
.catalog-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 10px;
}
.catalog-active-filters__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.catalog-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
}
.catalog-active-filters__clear {
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-dark);
}
.catalog-filter-tip {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}
.catalog-section-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.catalog-looks {
  margin-top: 0.35rem;
}
.catalog-looks__head,
.catalog-refine__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-bottom: 0.7rem;
}
.catalog-looks__hint,
.catalog-refine__hint {
  margin: 0;
  font-size: 0.88rem;
}
.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.catalog-chips--looks {
  gap: 0.5rem;
}
.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ink) 6%, transparent);
}
.catalog-chip--look {
  min-height: 2.15rem;
  padding: 0.5rem 0.95rem;
  background:
    linear-gradient(180deg, #fbfaf8 0%, var(--paper) 100%);
  border-color: color-mix(in srgb, var(--ink) 14%, var(--line));
}
.catalog-chip.is-active,
.catalog-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.catalog-chip--look.is-active {
  box-shadow: inset 0 -2px 0 var(--accent);
}
.catalog-chip__count {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.catalog-refine {
  margin-top: 1.35rem;
  padding: 1rem 1.1rem 1.05rem;
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      color-mix(in srgb, var(--ink) 3.5%, transparent) 11px,
      color-mix(in srgb, var(--ink) 3.5%, transparent) 12px
    ),
    color-mix(in srgb, var(--paper-2) 88%, var(--white));
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--line));
}
.catalog-refine__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.55rem 1rem;
  align-items: start;
  padding: 0.65rem 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.catalog-refine__row:first-of-type {
  border-top: 0;
  padding-top: 0.15rem;
}
.catalog-refine__label {
  padding-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.catalog-refine__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  align-items: center;
}
.catalog-refine__option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.catalog-refine__option:hover {
  color: var(--accent-dark);
  border-bottom-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.catalog-refine__option.is-active {
  font-weight: 700;
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.catalog-refine__count {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .catalog-refine__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .catalog-refine__label {
    padding-top: 0;
  }
}
.catalog-section {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  background: #fff;
}
.catalog-section .container-custom {
  width: min(1400px, calc(100% - 2rem));
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}
.catalog-grid .pattern-card__img { aspect-ratio: 1; }
@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* Archive (legacy) */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.home-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.home-card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.home-card h3 { margin: 0; padding: 0.85rem 1rem 1.1rem; font-size: 1rem; }

.archive-hero {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  padding: 3.5rem 0 2rem;
  text-align: center;
}
.archive-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.75rem; }
.archive-hero p { color: var(--muted); max-width: 40rem; margin: 0 auto; }
.archive-count { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.archive-count strong { color: var(--ink); font-size: 1.1rem; }

.pattern-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.pattern-archive-card--wide { grid-column: span 2; }
.pattern-archive-card__link { display: block; position: relative; color: white; border-radius: var(--radius); overflow: hidden; }
.pattern-archive-card__img, .pattern-archive-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #222;
  transition: transform 0.4s ease;
}
.pattern-archive-card__link:hover .pattern-archive-card__img { transform: scale(1.03); }
.pattern-archive-card--wide .pattern-archive-card__img { aspect-ratio: 8 / 5; }
.pattern-archive-card__meta {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 72%));
  font-weight: 600;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.filter-bar label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--muted); }

.form-select, .form-input, select, input[type="search"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: white;
}

.page-contact { max-width: 40rem; }
.contact-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-form { margin-top: 1.25rem; }
.contact-form__field { margin: 0 0 1rem; }
.contact-form__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.contact-form__field .req { color: var(--accent, #c45c6a); }
.contact-form__message { width: 100%; min-height: 9rem; resize: vertical; }
.contact-form__actions { margin: 1.25rem 0 0.75rem; }
.contact-form__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.contact-form__hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.contact-form__notice {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.contact-form__notice--ok {
  background: #eef6f0;
  border: 1px solid #b7d4c0;
  color: #1e4d2b;
}
.contact-form__notice--err {
  background: #faf0f0;
  border: 1px solid #e0b4b4;
  color: #6b1f1f;
}
.access-explain__list {
  margin: 1rem 0 1.25rem;
  padding-left: 1.2rem;
  line-height: 1.5;
}
.access-explain__list li {
  margin: 0.4rem 0;
}
.page-generic { padding-top: 2rem; padding-bottom: 3rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--white);
  margin-top: 0;
}
.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand img {
  display: block;
  width: min(250px, 100%);
  height: auto;
  margin-bottom: 0.75rem;
}
.footer-links h3 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-nav--stack { flex-direction: column; gap: 0.45rem; }
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.footer-social a { font-weight: 600; color: var(--accent-dark); }
.footer-copy { grid-column: 1 / -1; margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Single pattern: sticky header in normal flow — no padding spacer, no dead gap. */
body.single-pattern .site-header {
  position: sticky;
  top: 0;
  width: 100%;
}
html.admin-bar body.single-pattern .site-header {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  html.admin-bar body.single-pattern .site-header {
    top: 46px !important;
  }
}
body.single-pattern .site-main,
html.admin-bar body.single-pattern .site-main {
  padding-top: 0 !important;
}

/* Single pattern
   WP admin-bar already offsets the document with html { margin-top }. */
.pattern-single {
  background: #fff;
}
.pattern-single-shell {
  width: min(1400px, calc(100% - 2rem));
  margin-inline: auto;
}
.pattern-single-wrap {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: 0;
}
.pattern-image-panel-artistic {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-height: 0;
}
.pattern-info-sidebar {
  padding: 0.75rem 1rem 1rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #f4f2ef 0%, #faf9f7 48%, #fff 100%);
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100dvh - var(--header-h));
  overflow: auto;
}
html.admin-bar .pattern-info-sidebar {
  top: calc(var(--header-h) + 32px);
  max-height: calc(100dvh - var(--header-h) - 32px);
}
@media screen and (max-width: 782px) {
  html.admin-bar .pattern-info-sidebar {
    top: calc(var(--header-h) + 46px);
    max-height: calc(100dvh - var(--header-h) - 46px);
  }
}
.design-ticket {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgb(42 42 45 / 6%);
}
.design-ticket__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.design-ticket__code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 2.85rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--black);
}
.design-ticket__split {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0.85rem;
  font-size: 0.84rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.design-ticket__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.version-switch {
  margin: 0 0 0.9rem;
}
.version-switch__label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.version-switch__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.version-switch__option {
  display: grid;
  gap: 0.1rem;
  min-width: 7.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--black);
  text-decoration: none;
}
.version-switch__option.is-current {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
}
.version-switch__name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.version-switch__code {
  font-size: 0.84rem;
  color: var(--muted);
}
.version-switch__note {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.pattern-card__rework {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0dfe2;
}
.design-ticket__status {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.design-ticket__status--loan,
.design-ticket__status--reserved {
  background: #efe7d6;
  color: #6b5a2e;
}
.design-ticket__status--sold {
  background: #f0dede;
  color: #6b3030;
}
.design-ticket__status--available {
  background: #e7f0e8;
  color: #2f5d3a;
}
.pattern-meta-block {
  margin: 0 0 1rem;
}
.pattern-meta-block__label {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font);
}
.category-tag-artistic {
  display: inline-block;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  background: #fff;
}
.category-tag-artistic--quiet {
  background: transparent;
  color: var(--muted);
}
.pattern-description-artistic {
  color: var(--muted);
  margin: 0.75rem 0 1rem;
  line-height: 1.55;
  font-size: 0.95rem;
}
.pattern-info-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.pattern-back-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pattern-back-link:hover {
  color: var(--accent-dark);
}
.pattern-image-main-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.55rem;
  background: #f3f2ef;
  min-width: 0;
  min-height: 0;
}
.pattern-image-zoom-wrapper-artistic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
}
.pattern-image-large {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* ~20% larger than previous 48dvh / 520px cap */
  max-height: min(58dvh, 624px);
  margin: 0 auto;
  object-fit: contain;
  background: #f3f2ef;
}
html.admin-bar .pattern-image-large {
  max-height: min(53dvh, 576px);
}
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgb(32 32 35 / 88%);
  color: #fff;
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.85rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgb(0 0 0 / 22%);
}
.gallery-nav-btn span {
  display: block;
  margin-top: -0.12em;
}
.gallery-nav-btn:hover {
  background: var(--black);
}
.gallery-nav-btn-left { left: 0.85rem; }
.gallery-nav-btn-right { right: 0.85rem; }
.thumbnail-strip-artistic {
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
}
.thumbnail-strip-inner {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}
.thumbnail-item-artistic {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  width: 72px;
  text-align: center;
}
.thumbnail-item-artistic img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.thumbnail-item-artistic__label {
  display: block;
  padding: 0.22rem 0.15rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fff;
}
.thumbnail-item-artistic.active {
  border-color: var(--accent);
}
.thumbnail-item-artistic.active .thumbnail-item-artistic__label {
  color: var(--accent-dark);
  font-weight: 700;
}

.related-patterns {
  background: #fff;
  padding: 1.15rem 1rem 1.35rem;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.related-patterns__title {
  color: var(--ink);
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0;
  width: 100%;
  text-align: left;
}
.related-patterns__links {
  margin: 0.95rem 0 0;
  text-align: left;
}
.related-patterns__link {
  display: inline-block;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.15rem;
}
.related-patterns__link:hover { color: var(--accent-dark); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
}
.related-grid > a {
  display: block;
  min-width: 0;
  width: auto;
}
.related-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 2px;
  display: block;
}
.related-grid__code {
  display: block;
  color: var(--muted);
  text-align: center;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}
@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nav-links, .page-numbers { display: flex; gap: 0.5rem; justify-content: center; list-style: none; padding: 2rem 0; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: 0; }
  .stat-card { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
  .stat-card:nth-last-child(-n+2) { border-bottom: 0; }
  .mosaic-grid { grid-template-columns: repeat(6, 1fr); }
  .pattern-card--default, .pattern-card--tall { grid-column: span 3; }
  .pattern-card--wide { grid-column: span 6; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__list { flex-direction: column; gap: 0.85rem; }
  .site-nav__item--has-children .site-nav__sub {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 0.35rem 0 0 0.75rem;
    min-width: 0;
  }
  .site-nav__item--has-children.is-open .site-nav__sub { display: block; }
  .category-showcase__grid { grid-template-columns: 1fr 1fr; }
  .category-tile--a,
  .category-tile--b,
  .category-tile--c,
  .category-tile--d,
  .category-tile--e,
  .category-tile--f,
  .category-tile--g,
  .category-tile--h { grid-column: span 1; }
  .header-actions { margin-left: auto; }
  .section-head--split { flex-direction: column; align-items: flex-start; }
  .about-split { grid-template-columns: 1fr; }
  .workshop { padding-top: 5.25rem; }
  .workshop-intro { margin-bottom: 1.25rem; }
  .workshop-intro h1 { font-size: clamp(2.2rem, 13vw, 3.5rem); }
  .workshop--home {
    grid-template-columns: 1fr;
    padding: 2.25rem 1rem 1.5rem;
    gap: 1.5rem;
  }
  .home-workshop-aside { order: 2; }
  .category-showcase--3x3 .category-showcase__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-showcase--3x3 .category-tile__media,
  .category-showcase--3x3 .category-tile__placeholder {
    min-height: 130px;
  }
  .mixing-palette { padding: 0.25rem 0; }
  .mixing-palette__surface { aspect-ratio: 1 / 1.15; }
  .mixing-palette__thumb-hole { width: 14%; right: 5%; top: 4%; border-width: 5px; }
  .workshop-scroll {
    width: calc(100% - 1rem);
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
    gap: 3rem;
  }
  .workbench { min-height: 560px; }
  .sketch-sheet { width: 42%; height: 42%; }
  .sketch-sheet--one { left: 12%; }
  .sketch-sheet--two { left: 44%; width: 45%; }
  .craft-knife { right: 3%; height: 250px; }
  .stencil { left: 24%; width: 52%; }
  .steel-rule { width: 48%; }
  .process-stamp { font-size: 0.82rem; }
  .colour-card { width: 60%; }
  .brush-pot { right: 5%; width: 125px; height: 170px; }
  .paint-brush { bottom: 140px; }
  .paint-tube { width: 145px; }
  .thread-spool { right: 27%; width: 84px; height: 120px; }
  .mosaic-grid { grid-template-columns: repeat(2, 1fr); }
  .pattern-card--default, .pattern-card--wide, .pattern-card--tall { grid-column: span 1; }
  .pattern-archive-grid { grid-template-columns: 1fr 1fr; }
  .pattern-archive-card--wide { grid-column: span 1; }
  .pattern-image-panel-artistic {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .pattern-info-sidebar {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .pattern-image-main-container {
    padding: 0.75rem;
    min-height: 0;
  }
  .pattern-image-large { max-width: 100%; max-height: min(50dvh, 500px); }
  .gallery-nav-btn { width: 40px; height: 40px; font-size: 1.6rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .catalog-chip { font-size: 0.82rem; padding: 0.4rem 0.7rem; }
  html.admin-bar .site-nav { inset: calc(var(--header-h) + 46px) 0 auto; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
}
