/* ==========================================================================
   components.css — atoms (and later molecules)
   Step 2.1: caption, divider, button.
   Atoms read only tokens from base.css, so they adapt to every data-scheme.
   `.is-hover` / `.is-focus` mirror the pseudo-classes so the styleguide can
   show each state side by side.
   ========================================================================== */

/* --------------------------------------------------------------------------
   caption — small uppercase label, also used for numbering (01, 02…)
   -------------------------------------------------------------------------- */
.caption {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
}

.caption--muted {
  color: var(--color-fg-muted);
}

.caption--num {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   divider — hairline rule (straight on purpose: structure stays straight)
   -------------------------------------------------------------------------- */
.divider {
  height: 0;
  border: 0;
  border-top: var(--border-hairline);
}

.divider--strong {
  border-top: var(--border-strong);
}

/* --------------------------------------------------------------------------
   button
   Variants: primary | secondary | ghost | link
   Sizes: --sm | (default) | --lg
   States: hover, focus-visible, disabled, loading (aria-busy="true")
   Markup: <button class="button button--primary"><span class="button__label">Add</span></button>
   -------------------------------------------------------------------------- */
.button {
  --button-bg: var(--color-fg);
  --button-fg: var(--color-bg);
  --button-border: var(--color-fg);
  --button-hover-bg: var(--palette-lime);
  --button-hover-fg: var(--palette-ink);
  --button-hover-border: var(--palette-ink);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: var(--target-min);
  padding: 0 var(--space-md);
  background-color: var(--button-bg);
  color: var(--button-fg);
  border: 1px solid var(--button-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.button:hover,
.button.is-hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-fg);
  border-color: var(--button-hover-border);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.button.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* On green / lime the default primary is ink; hover goes white instead of lime. */
[data-scheme='green'] .button,
[data-scheme='lime'] .button {
  --button-hover-bg: var(--palette-white);
  --button-hover-border: var(--palette-ink);
}

/* Variants */
.button--secondary {
  --button-bg: transparent;
  --button-fg: var(--color-fg);
  --button-border: var(--color-fg);
  --button-hover-bg: var(--color-fg);
  --button-hover-fg: var(--color-bg);
  --button-hover-border: var(--color-fg);
}

.button--ghost {
  --button-bg: transparent;
  --button-fg: var(--color-fg);
  --button-border: transparent;
  --button-hover-bg: color-mix(in srgb, var(--color-fg) 10%, transparent);
  --button-hover-fg: var(--color-fg);
  --button-hover-border: transparent;
}

.button--link {
  --button-bg: transparent;
  --button-fg: var(--color-fg);
  --button-border: transparent;
  --button-hover-bg: transparent;
  --button-hover-fg: var(--color-fg);
  --button-hover-border: transparent;

  min-height: var(--target-min);
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.button--link:hover,
.button--link.is-hover {
  text-decoration-thickness: 2px;
}

/* Sizes */
.button--sm {
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  font-size: var(--text-xs);
}

.button--lg {
  min-height: 3.5rem;
  padding: 0 var(--space-lg);
  font-size: var(--text-base);
}

.button--full {
  display: flex;
  width: 100%;
}

/* Icon (arrow, plus…) — decorative, so aria-hidden in markup */
.button__icon {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}

.button:hover .button__icon,
.button.is-hover .button__icon {
  transform: translateX(3px);
}

/* Disabled */
.button:disabled,
.button[aria-disabled='true'] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading — label hides, spinner shows; keeps the button width (no layout shift) */
.button[aria-busy='true'] {
  pointer-events: none;
}

.button[aria-busy='true'] .button__label,
.button[aria-busy='true'] .button__icon {
  opacity: 0;
}

.button[aria-busy='true']::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.125rem;
  height: 1.125rem;
  margin: -0.5625rem 0 0 -0.5625rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 700ms linear infinite;
}

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

/* --------------------------------------------------------------------------
   badge — pill label. Variants: (default) | new | custom
   Colors are fixed on purpose (merchant "custom" tag uses the lime variant).
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem; /* >= 24px target size */
  padding: 0 var(--space-xs);
  background-color: var(--palette-ink);
  color: var(--palette-white);
  border: 1px solid var(--palette-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--new {
  background-color: var(--palette-green);
  border-color: var(--palette-ink);
  color: var(--palette-ink);
}

.badge--custom {
  background-color: var(--palette-lime);
  border-color: var(--palette-ink);
  color: var(--palette-ink);
}

/* --------------------------------------------------------------------------
   link-arrow — text link + arrow
   -------------------------------------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--target-min);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.link-arrow__icon {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}

.link-arrow:hover,
.link-arrow.is-hover {
  text-decoration-thickness: 2px;
}

.link-arrow:hover .link-arrow__icon,
.link-arrow.is-hover .link-arrow__icon {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   arrow-button — round button with an arrow (nests in image-notch later)
   Needs a visually-hidden label for screen readers.
   Markup: <a class="arrow-button" href="…"><span class="visually-hidden">Shop living</span>
           <span class="arrow-button__icon" aria-hidden="true">→</span></a>
   -------------------------------------------------------------------------- */
.arrow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--color-fg);
  color: var(--color-bg);
  border: 1px solid var(--color-fg);
  border-radius: var(--radius-pill);
  font-size: var(--text-lg);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.arrow-button__icon {
  display: block;
  transition: transform var(--duration-base) var(--ease-out);
}

.arrow-button:hover,
.arrow-button.is-hover {
  background-color: var(--palette-lime);
  border-color: var(--palette-ink);
  color: var(--palette-ink);
}

.arrow-button:hover .arrow-button__icon,
.arrow-button.is-hover .arrow-button__icon {
  transform: rotate(-45deg);
}

.arrow-button:focus-visible,
.arrow-button.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.arrow-button:disabled,
.arrow-button[aria-disabled='true'] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.arrow-button--sm {
  width: 2.75rem;
  height: 2.75rem;
  font-size: var(--text-base);
}

.arrow-button--lg {
  width: 5rem;
  height: 5rem;
  font-size: var(--text-2xl);
}

.arrow-button--outline {
  background-color: transparent;
  color: var(--color-fg);
}

[data-scheme='green'] .arrow-button:hover,
[data-scheme='lime'] .arrow-button:hover {
  background-color: var(--palette-white);
}

/* --------------------------------------------------------------------------
   field + input — always a visible <label>.
   Markup:
   <div class="field">
     <label class="field__label" for="email">Email</label>
     <input class="input" id="email" type="email" aria-describedby="email-hint">
     <p class="field__hint" id="email-hint">We only send the issue.</p>
     <p class="field__error" id="email-error">Enter a valid email.</p>   (only when invalid)
   </div>
   Invalid state: aria-invalid="true" on the control.
   -------------------------------------------------------------------------- */
.field {
  display: grid;
  gap: var(--space-2xs);
}

.field__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
}

.field__hint {
  color: var(--color-fg-muted);
  font-size: var(--text-xs);
}

.field__error {
  display: flex;
  gap: var(--space-2xs);
  color: var(--color-error);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.field__error::before {
  content: '!';
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.6875rem;
  line-height: 1;
}

.input {
  width: 100%;
  min-height: var(--target-min);
  padding: var(--space-xs) var(--space-sm);
  background-color: transparent;
  color: var(--color-fg);
  border: 1px solid var(--color-fg);
  border-radius: var(--radius-sm);
  font-size: var(--text-base); /* 16px: prevents iOS zoom on focus */
  line-height: 1.3;
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--color-fg-muted);
  opacity: 1;
}

.input:hover,
.input.is-hover {
  box-shadow: inset 0 0 0 1px var(--color-fg);
}

.input:focus-visible,
.input.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 1px var(--color-fg);
}

.input[aria-invalid='true'] {
  border-color: var(--color-error);
  box-shadow: inset 0 0 0 1px var(--color-error);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.input {
  min-height: 8rem;
  resize: vertical;
}

/* select — native <select> with a drawn chevron */
.select {
  position: relative;
}

.select .input {
  appearance: none;
  padding-right: var(--space-xl);
  cursor: pointer;
}

.select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--space-sm);
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select .input option {
  background-color: var(--palette-white);
  color: var(--palette-ink);
}

/* --------------------------------------------------------------------------
   check — checkbox and radio (label wraps the control)
   Markup: <label class="check"><input class="check__input" type="checkbox"><span class="check__label">Oak</span></label>
   -------------------------------------------------------------------------- */
.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--target-min);
  cursor: pointer;
}

.check__input {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  background-color: transparent;
  border: 1px solid var(--color-fg);
  border-radius: var(--radius-sm);
  cursor: inherit;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.check__input[type='radio'] {
  border-radius: 50%;
}

.check__input::after {
  content: '';
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--color-bg);
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 20%, 86% 6%, 40% 70%);
  transform: scale(0);
  transition: transform var(--duration-fast) var(--ease-out);
}

.check__input[type='radio']::after {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  clip-path: none;
}

.check__input:checked {
  background-color: var(--color-fg);
}

.check__input:checked::after {
  transform: scale(1);
}

.check:hover .check__input,
.check__input.is-hover {
  box-shadow: inset 0 0 0 1px var(--color-fg);
}

.check__input:focus-visible,
.check__input.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.check__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.check__input:disabled ~ .check__label {
  opacity: 0.5;
}

.check__input[aria-invalid='true'] {
  border-color: var(--color-error);
}

/* --------------------------------------------------------------------------
   icon — inline SVG from the sprite block at the top of each page
   (in Liquid this becomes the `icon` snippet).
   Markup: <svg class="icon" aria-hidden="true"><use href="#icon-arrow-right"/></svg>
   Icon-only controls need a visually-hidden text label next to the icon.
   -------------------------------------------------------------------------- */
.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--lg {
  width: 1.75em;
  height: 1.75em;
}

/* --------------------------------------------------------------------------
   spinner — loading indicator
   Markup: <span class="spinner" role="status"><span class="visually-hidden">Loading</span></span>
   -------------------------------------------------------------------------- */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 700ms linear infinite;
}

.spinner--lg {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 3px;
}

/* --------------------------------------------------------------------------
   swatch — color / image option (radio under the hood)
   Markup:
   <label class="swatch" style="--swatch-color: #0b0b0c">
     <input class="swatch__input" type="radio" name="color" value="Black">
     <span class="swatch__chip"></span>
     <span class="visually-hidden">Black</span>
   </label>
   Image swatch: style="--swatch-image: url(...)". Unavailable: add .is-unavailable (stays selectable).
   -------------------------------------------------------------------------- */
.swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--target-min);
  height: var(--target-min);
  cursor: pointer;
}

.swatch__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.swatch__chip {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  background-color: var(--swatch-color, var(--palette-mist));
  background-image: var(--swatch-image, none);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--color-fg);
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.swatch:hover .swatch__chip,
.swatch.is-hover .swatch__chip {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 3px var(--color-fg);
}

.swatch__input:checked ~ .swatch__chip {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-fg);
}

.swatch__input:focus-visible ~ .swatch__chip,
.swatch.is-focus .swatch__chip {
  outline: 2px solid var(--color-focus);
  outline-offset: 5px;
}

/* Unavailable: diagonal strike, still selectable */
.swatch.is-unavailable .swatch__chip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    var(--color-fg) calc(50% - 1px),
    var(--color-fg) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.swatch.is-unavailable .swatch__chip {
  opacity: 0.55;
}

.swatch--square .swatch__chip {
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   image — wrapper with fixed aspect ratio, focal point, rounded corners.
   Any source ratio fits (object-fit: cover), so mixed ratios never break a grid.
   Markup:
   <div class="image image--portrait" style="--image-focal: 50% 30%">
     <img src="…" alt="…" width="800" height="1000" loading="lazy">
   </div>
   In Liquid: srcset/sizes via image_url; the first image on a page uses loading="eager".
   -------------------------------------------------------------------------- */
.image {
  position: relative;
  aspect-ratio: var(--image-ratio, 4 / 5);
  overflow: hidden;
  background-color: var(--palette-mist);
  border-radius: var(--radius-md);
}

.image > img,
.image > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-focal, 50% 50%);
}

.image--square {
  --image-ratio: 1 / 1;
}

.image--portrait {
  --image-ratio: 4 / 5;
}

.image--tall {
  --image-ratio: 2 / 3;
}

.image--landscape {
  --image-ratio: 3 / 2;
}

.image--wide {
  --image-ratio: 16 / 9;
}

.image--lg {
  border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   image-pill — fully rounded capsule image, inline inside headlines.
   Size follows the headline font-size (em), so it scales with the type.
   Markup: <h1>Rooms <span class="image-pill"><img src="…" alt=""></span> worth</h1>
   Decorative by default: empty alt.
   -------------------------------------------------------------------------- */
.image-pill {
  display: inline-block;
  width: 2.4em;
  height: 0.78em;
  margin-inline: 0.08em;
  overflow: hidden;
  vertical-align: -0.04em;
  background-color: var(--palette-mist);
  border-radius: var(--radius-pill);
}

.image-pill > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-focal, 50% 50%);
}

.image-pill--round {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
}

/* --------------------------------------------------------------------------
   round-badge — circle with slowly rotating text on a path
   Markup:
   <div class="round-badge" role="img" aria-label="Made to order in small batches">
     <svg class="round-badge__ring" viewBox="0 0 120 120" aria-hidden="true">
       <defs><path id="ring-1" d="M60 60m-46 0a46 46 0 1 1 92 0a46 46 0 1 1-92 0"/></defs>
       <text><textPath href="#ring-1" textLength="285" lengthAdjust="spacing">MADE TO ORDER · SMALL BATCHES · </textPath></text>
     </svg>
     <svg class="icon round-badge__icon" aria-hidden="true"><use href="#icon-arrow-up-right"/></svg>
   </div>
   Each badge on a page needs its own path id.
   -------------------------------------------------------------------------- */
.round-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--round-badge-size, 7.5rem);
  aspect-ratio: 1;
  background-color: var(--palette-lime);
  color: var(--palette-ink);
  border-radius: 50%;
}

.round-badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: round-badge-spin 24s linear infinite;
}

.round-badge__ring text {
  fill: currentColor;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
}

.round-badge__icon {
  width: 28%;
  height: 28%;
}

.round-badge--blue {
  background-color: var(--palette-blue);
  color: var(--palette-white);
}

.round-badge--green {
  background-color: var(--palette-green);
}

.round-badge--ink {
  background-color: var(--palette-ink);
  color: var(--palette-white);
}

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

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

/* --------------------------------------------------------------------------
   rte — rich text (merchant-authored HTML: product description, article, page)
   Markup: <div class="rte"> …any HTML… </div>
   Headings inside are smaller than page headings so a long description never
   competes with the product title.
   -------------------------------------------------------------------------- */
.rte {
  max-width: 68ch;
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.rte > * + * {
  margin-top: var(--space-sm);
}

.rte > h2,
.rte > h3,
.rte > h4 {
  margin-top: var(--space-lg);
}

.rte > h2 + *,
.rte > h3 + *,
.rte > h4 + * {
  margin-top: var(--space-xs);
}

.rte h2 {
  font-size: var(--text-2xl);
}

.rte h3 {
  font-size: var(--text-xl);
}

.rte h4,
.rte h5,
.rte h6 {
  font-size: var(--text-lg);
}

.rte a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.rte a:hover {
  text-decoration-thickness: 2px;
}

.rte ul,
.rte ol {
  padding-left: 1.4em;
}

.rte li + li {
  margin-top: var(--space-3xs);
}

.rte li::marker {
  color: var(--color-fg-muted);
}

.rte blockquote {
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-fg);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.rte blockquote cite {
  display: block;
  margin-top: var(--space-xs);
  color: var(--color-fg-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
}

.rte hr {
  height: 0;
  margin-block: var(--space-lg);
  border: 0;
  border-top: var(--border-hairline);
}

.rte img,
.rte video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.rte figcaption {
  margin-top: var(--space-2xs);
  color: var(--color-fg-muted);
  font-size: var(--text-xs);
}

.rte table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.rte th,
.rte td {
  padding: var(--space-xs) var(--space-xs) var(--space-xs) 0;
  border-bottom: var(--border-hairline);
  text-align: left;
  vertical-align: top;
}

.rte th {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
}

.rte code {
  padding: 0.1em 0.35em;
  background-color: color-mix(in srgb, var(--color-fg) 8%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* Tables wider than the screen scroll inside their wrapper, never the page */
.rte .rte__table {
  overflow-x: auto;
}

/* ==========================================================================
   MOLECULES
   ========================================================================== */

/* --------------------------------------------------------------------------
   product-card — variants: --gallery (default) | --index | --mini
   The whole card is clickable through the title link (::after stretches over the card);
   badges and swatches sit above it. Built only from atoms: image, badge, caption.
   Markup (gallery):
   <article class="product-card">
     <div class="product-card__media image image--portrait">
       <img class="product-card__img" src="…" alt="…">
       <img class="product-card__img product-card__img--alt" src="…" alt="" loading="lazy">   (optional hover swap)
       <div class="product-card__badges"><span class="badge badge--new">New 2026</span></div>
     </div>
     <div class="product-card__body">
       <p class="product-card__vendor caption caption--muted">Halden Studio</p>
       <h3 class="product-card__title"><a class="product-card__link" href="#">Arco lounge chair</a></h3>
       <p class="product-card__meta caption">HS-MN-01</p>
       <p class="product-card__meta caption caption--muted">3 finishes</p>
     </div>
   </article>
   -------------------------------------------------------------------------- */
.product-card {
  position: relative;
  display: grid;
  gap: var(--space-xs);
  align-content: start;
}

.product-card__media {
  --image-ratio: 4 / 5;
}

.product-card__media > .product-card__img {
  transition:
    transform var(--duration-slow) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

/* hover-swap: second image fades in */
.product-card__img--alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-card:hover .product-card__img--alt,
.product-card:focus-within .product-card__img--alt,
.product-card.is-hover .product-card__img--alt {
  opacity: 1;
}

.product-card:hover .product-card__img:not(.product-card__img--alt),
.product-card.is-hover .product-card__img:not(.product-card__img--alt) {
  transform: scale(1.03);
}

.product-card__badges {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: var(--z-base);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.product-card__body {
  display: grid;
  gap: var(--space-3xs);
}

.product-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.product-card__link {
  text-decoration: none;
}

.product-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.product-card__link:focus-visible {
  outline: none;
}

.product-card:has(.product-card__link:focus-visible) .product-card__media,
.product-card.is-focus .product-card__media {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.product-card__link:hover,
.product-card.is-hover .product-card__link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Sold out: image dims{
  opacity: 0.55;
}

/* --- index: one row of a list, number / title / vendor / material / price --- */
.product-card--index {
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-areas:
    'thumb title price'
    'thumb meta  meta';
  gap: var(--space-3xs) var(--space-sm);
  align-items: center;
  padding-block: var(--space-sm);
  border-top: var(--border-hairline);
}

.product-card--index .product-card__media {
  --image-ratio: 1 / 1;
  grid-area: thumb;
  border-radius: var(--radius-sm);
}

.product-card--index .product-card__title {
  grid-area: title;
  font-size: var(--text-lg);
}

.product-card--index .product-card__vendor,
.product-card--index .product-card__material {
  display: none;
}

.product-card--index .product-card__meta {
  grid-area: meta;
}

.product-card--index .product-card__num {
  display: none;
}

@media (min-width: 48em) {
  .product-card--index {
    grid-template-columns: 3rem minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 8rem;
    grid-template-areas: 'num title vendor material price';
    gap: var(--space-md);
    padding-block: var(--space-md);
    transition: background-color var(--duration-fast) var(--ease-out);
  }

  .product-card--index .product-card__num {
    display: block;
    grid-area: num;
  }

  .product-card--index .product-card__media {
    display: none; /* the image follows the cursor on desktop (JS, later) */
  }

  .product-card--index .product-card__vendor {
    display: block;
    grid-area: vendor;
  }

  .product-card--index .product-card__material {
    display: block;
    grid-area: material;
  }

  .product-card--index .product-card__meta {
    display: none;
  }

  .product-card--index .product-card__title {
    font-size: var(--text-xl);
  }

  .product-card--index:hover,
  .product-card--index.is-hover {
    background-color: var(--palette-lime);
    color: var(--palette-ink);
  }

  .product-card--index:hover .caption--muted,
  .product-card--index.is-hover .caption--muted{
    color: var(--palette-ink);
  }
}

/* --- mini: compact row for hotspots and cart upsells --- */
.product-card--mini {
  grid-template-columns: 4.5rem 1fr;
  gap: var(--space-sm);
  align-items: center;
}

.product-card--mini .product-card__media {
  --image-ratio: 1 / 1;
  border-radius: var(--radius-sm);
}

.product-card--mini .product-card__title {
  font-size: var(--text-sm);
}

.product-card--mini .product-card__vendor,
.product-card--mini .product-card__meta {
  display: none;
}

/* --------------------------------------------------------------------------
   project-card — image + number + title + count. No text over the photo.
   Markup:
   <article class="project-card">
     <div class="project-card__media image image--portrait"><img src="…" alt="…"></div>
     <div class="project-card__body">
       <p class="project-card__num caption caption--muted caption--num">01</p>
       <h3 class="project-card__title"><a class="project-card__link" href="#">Living</a></h3>
       <p class="project-card__meta caption caption--muted">24 products</p>
       <svg class="icon project-card__icon" aria-hidden="true"><use href="#icon-arrow-up-right"/></svg>
     </div>
   </article>
   -------------------------------------------------------------------------- */
.project-card {
  position: relative;
  display: grid;
  gap: var(--space-xs);
  align-content: start;
}

.project-card__media > img {
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card__media > img,
.project-card.is-hover .project-card__media > img {
  transform: scale(1.04);
}

.project-card__body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    'num title icon'
    'num count icon';
  column-gap: var(--space-sm);
  row-gap: var(--space-3xs);
  align-items: baseline;
  padding-top: var(--space-2xs);
  border-top: var(--border-hairline);
}

.project-card__num {
  grid-area: num;
}

.project-card__title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.project-card__meta {
  grid-area: count;
}

.project-card__icon {
  grid-area: icon;
  align-self: center;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--duration-base) var(--ease-out);
}

.project-card:hover .project-card__icon,
.project-card.is-hover .project-card__icon {
  transform: translate(3px, -3px);
}

.project-card__link {
  text-decoration: none;
}

.project-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-card__link:focus-visible {
  outline: none;
}

.project-card:has(.project-card__link:focus-visible) .project-card__media,
.project-card.is-focus .project-card__media {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   image-notch — the signature. The page background "bites" a rounded corner
   out of the image; the bite holds a heading and a round arrow button.
   How it works: the cut is a box painted with the surrounding background
   (--notch-bg, default = current scheme background). Its inner corner is
   rounded, and two small quarter-circle fillers round the image where the
   cut meets the image edges. Pure CSS, no extra images.
   Variants (corner): --br (default) | --bl | --tr | --tl
   Put the wrapper on a solid background (any data-scheme works).
   Markup:
   <div class="image-notch image-notch--br">
     <div class="image-notch__media image image--landscape image--lg"><img src="…" alt="…"></div>
     <div class="image-notch__cut">
       <h3 class="image-notch__title h3">Shop living</h3>
       <a class="arrow-button" href="#">…</a>
     </div>
   </div>
   -------------------------------------------------------------------------- */
.image-notch {
  --notch-r: var(--radius-lg);
  --notch-bg: var(--color-bg);

  position: relative;
}

.image-notch__cut {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  max-width: 85%;
  background-color: var(--notch-bg);
}

.image-notch__title {
  text-wrap: balance;
}

/* fillers: square r x r, filled with the background except a quarter circle */
.image-notch__cut::before,
.image-notch__cut::after {
  content: '';
  position: absolute;
  width: var(--notch-r);
  height: var(--notch-r);
  background: radial-gradient(
    circle at var(--notch-origin),
    transparent calc(var(--notch-r) - 0.5px),
    var(--notch-bg) var(--notch-r)
  );
  pointer-events: none;
}

/* bottom-right (default) */
.image-notch,
.image-notch--br {
  --notch-origin: 0 0;
}

.image-notch--br .image-notch__cut,
.image-notch:not([class*='image-notch--']) .image-notch__cut {
  right: 0;
  bottom: 0;
  padding: var(--space-sm) 0 0 var(--space-md);
  border-top-left-radius: var(--notch-r);
}

.image-notch--br .image-notch__cut::before,
.image-notch:not([class*='image-notch--']) .image-notch__cut::before {
  right: 0;
  bottom: 100%;
}

.image-notch--br .image-notch__cut::after,
.image-notch:not([class*='image-notch--']) .image-notch__cut::after {
  right: 100%;
  bottom: 0;
}

/* bottom-left */
.image-notch--bl {
  --notch-origin: 100% 0;
}

.image-notch--bl .image-notch__cut {
  left: 0;
  bottom: 0;
  padding: var(--space-sm) var(--space-md) 0 0;
  border-top-right-radius: var(--notch-r);
}

.image-notch--bl .image-notch__cut::before {
  left: 0;
  bottom: 100%;
}

.image-notch--bl .image-notch__cut::after {
  left: 100%;
  bottom: 0;
}

/* top-right */
.image-notch--tr {
  --notch-origin: 0 100%;
}

.image-notch--tr .image-notch__cut {
  right: 0;
  top: 0;
  align-items: flex-start;
  padding: 0 0 var(--space-sm) var(--space-md);
  border-bottom-left-radius: var(--notch-r);
}

.image-notch--tr .image-notch__cut::before {
  right: 0;
  top: 100%;
}

.image-notch--tr .image-notch__cut::after {
  right: 100%;
  top: 0;
}

/* top-left */
.image-notch--tl {
  --notch-origin: 100% 100%;
}

.image-notch--tl .image-notch__cut {
  left: 0;
  top: 0;
  align-items: flex-start;
  padding: 0 var(--space-md) var(--space-sm) 0;
  border-bottom-right-radius: var(--notch-r);
}

.image-notch--tl .image-notch__cut::before {
  left: 0;
  top: 100%;
}

.image-notch--tl .image-notch__cut::after {
  left: 100%;
  top: 0;
}

/* --------------------------------------------------------------------------
   hotspot — pin on a photo + a mini product card.
   Place inside a positioned container (position: relative) with
   style="--hotspot-x: 32%; --hotspot-y: 58%".
   Opens on hover, keyboard focus, or aria-expanded="true" (JS toggles it on tap).
   Markup:
   <div class="hotspot" style="--hotspot-x: 32%; --hotspot-y: 58%">
     <button class="hotspot__pin" type="button" aria-expanded="false" aria-controls="hs-1">
       <span class="visually-hidden">Arco lounge chair, $890</span>
       <svg class="icon" aria-hidden="true"><use href="#icon-plus"/></svg>
     </button>
     <div class="hotspot__card" id="hs-1" data-scheme="white"> …product-card--mini… </div>
   </div>
   Modifiers: --left (card opens to the left), --up (card opens above).
   -------------------------------------------------------------------------- */
.hotspot {
  position: absolute;
  left: var(--hotspot-x, 50%);
  top: var(--hotspot-y, 50%);
  z-index: var(--z-sticky);
  transform: translate(-50%, -50%);
}

.hotspot__pin {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--target-min);
  height: var(--target-min);
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--palette-ink);
}

.hotspot__pin::before {
  content: '';
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  background-color: var(--palette-lime);
  border: 1px solid var(--palette-ink);
  border-radius: 50%;
  transition: transform var(--duration-base) var(--ease-out);
}

.hotspot__pin::after {
  content: '';
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--palette-white);
  border-radius: 50%;
  animation: hotspot-pulse 2.4s var(--ease-out) infinite;
  pointer-events: none;
}

.hotspot__pin .icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration-base) var(--ease-out);
}

.hotspot:hover .hotspot__pin::before,
.hotspot__pin[aria-expanded='true']::before {
  transform: scale(1.15);
}

.hotspot__pin[aria-expanded='true'] .icon {
  transform: rotate(45deg);
}

.hotspot__pin:focus-visible {
  outline: 2px solid var(--palette-white);
  outline-offset: -4px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--palette-ink);
}

.hotspot__card {
  position: absolute;
  top: calc(100% + var(--space-3xs));
  left: 50%;
  width: 15rem;
  padding: var(--space-xs);
  background-color: var(--color-bg);
  color: var(--color-fg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition:
    opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out),
    visibility 0s linear var(--duration-base);
}

.hotspot:hover .hotspot__card,
html:not(.js) .hotspot:focus-within .hotspot__card,
.hotspot__pin[aria-expanded='true'] + .hotspot__card {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.hotspot--left .hotspot__card {
  left: auto;
  right: 50%;
  transform: translate(0, 6px);
}

.hotspot--left:hover .hotspot__card,
html:not(.js) .hotspot--left:focus-within .hotspot__card,
.hotspot--left .hotspot__pin[aria-expanded='true'] + .hotspot__card {
  transform: translate(0, 0);
}

.hotspot--up .hotspot__card {
  top: auto;
  bottom: calc(100% + var(--space-3xs));
}

@keyframes hotspot-pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot__pin::after {
    animation: none;
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   accordion — native <details>, works without JS.
   Markup:
   <div class="accordion">
     <details class="accordion__item">
       <summary class="accordion__summary">
         <span class="accordion__title">Care</span>
         <svg class="icon accordion__icon" aria-hidden="true"><use href="#icon-plus"/></svg>
       </summary>
       <div class="accordion__content rte">…</div>
     </details>
   </div>
   Add `open` to an item to start expanded.
   -------------------------------------------------------------------------- */
.accordion {
  border-bottom: var(--border-hairline);
}

.accordion__item {
  border-top: var(--border-hairline);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 3.5rem;
  padding-block: var(--space-xs);
  list-style: none;
  cursor: pointer;
}

.accordion__summary::-webkit-details-marker {
  display: none;
}

.accordion__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.accordion__icon {
  transition: transform var(--duration-base) var(--ease-out);
}

.accordion__summary:hover .accordion__title,
.accordion__item.is-hover .accordion__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.accordion__summary:focus-visible,
.accordion__item.is-focus .accordion__summary {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.accordion__item[open] .accordion__icon {
  transform: rotate(45deg);
}

.accordion__content {
  padding-bottom: var(--space-md);
}

.accordion__item[open] .accordion__content {
  animation: accordion-in var(--duration-base) var(--ease-out);
}

@keyframes accordion-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   drawer / modal — native <dialog> opened by <drawer-panel> (assets/js/drawer.js)
   Drawer variants: --right (default) | --left | --full (editorial menu)
   Structure: dialog > .drawer__inner > header / body (scrolls) / footer
   The dialog has no padding: a click on the dialog itself means a click on the backdrop.
   -------------------------------------------------------------------------- */
.drawer,
.modal {
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-fg);
  border: 0;
}

.drawer::backdrop,
.modal::backdrop {
  background-color: rgb(11 11 12 / 0.55);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.drawer.is-open::backdrop,
.modal.is-open::backdrop {
  opacity: 1;
}

.drawer[open],
.modal[open] {
  display: flex;
  flex-direction: column;
}

.drawer__inner,
.modal__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.drawer__header,
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--border-hairline);
}

.drawer__title,
.modal__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.drawer__body,
.modal__body {
  flex: 1;
  min-height: 0;
  padding: var(--space-md);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer__footer,
.modal__footer {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-top: var(--border-hairline);
}

/* Round close button (icon + hidden label) */
.drawer__close,
.modal__close {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--target-min);
  height: var(--target-min);
  padding: 0;
  background: transparent;
  color: inherit;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.drawer__close:hover,
.modal__close:hover {
  background-color: var(--palette-lime);
  border-color: var(--palette-ink);
  color: var(--palette-ink);
}

.drawer__close:focus-visible,
.modal__close:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Drawer: slides in from the side */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(100%, 28rem);
  height: 100dvh;
  transition: transform var(--duration-base) var(--ease-out);
}

/* Default = right. Overrides below keep specificity low so `.drawer.is-open` wins. */
.drawer {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

.drawer--left {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

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

@media (min-width: 30em) {
  .drawer {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }

  .drawer--left {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }
}

/* Full: covers the whole screen (editorial menu) */
.drawer--full {
  inset: 0;
  width: 100%;
  border-radius: 0;
  transform: translateY(-4%);
  opacity: 0;
  transition:
    transform var(--duration-slow) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

.drawer--full.is-open {
  opacity: 1;
}

/* Modal: centered, fades and scales slightly */
.modal {
  position: fixed;
  inset: 0;
  width: min(92vw, 34rem);
  max-height: 90dvh;
  margin: auto;
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.modal.is-open {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .modal,
  .drawer::backdrop,
  .modal::backdrop {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   newsletter-input — email + submit in one rounded row, with status message.
   States: default | focus (on the row) | error (aria-invalid) | success | loading (button aria-busy)
   The message sits in an aria-live region that exists in the DOM from the start.
   Markup:
   <form class="newsletter-input" novalidate>
     <label class="field__label" for="nl-email">Email</label>
     <div class="newsletter-input__row">
       <input class="newsletter-input__input" id="nl-email" type="email" autocomplete="email" placeholder="you@studio.com">
       <button class="button button--primary" type="submit"><span class="button__label">Subscribe</span></button>
     </div>
     <p class="newsletter-input__message" role="status" aria-live="polite"></p>
   </form>
   Success: add .is-success to the form and put the message text in the <p>.
   Error: set aria-invalid="true" on the input, add .is-error to the form, message in the <p>.
   -------------------------------------------------------------------------- */
.newsletter-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* lets the row shrink inside narrow cells */
  gap: var(--space-2xs);
  max-width: 32rem;
  min-width: 0;
}

.newsletter-input__row {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.25rem;
  border: 1px solid var(--color-fg);
  border-radius: var(--radius-sm);
}

.newsletter-input__row:focus-within {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.newsletter-input__input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0 var(--space-xs);
  background: transparent;
  color: var(--color-fg);
  border: 0;
  font-size: var(--text-base); /* 16px: prevents iOS zoom */
}

.newsletter-input__input::placeholder {
  color: var(--color-fg-muted);
  opacity: 1;
}

.newsletter-input__input:focus {
  outline: none;
}

.newsletter-input__row .button {
  flex: none;
  min-height: 2.5rem;
}

.newsletter-input__message {
  min-height: 1.25rem; /* reserves the line: no layout shift when a message appears */
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.newsletter-input.is-error .newsletter-input__row {
  border-color: var(--color-error);
  box-shadow: inset 0 0 0 1px var(--color-error);
}

.newsletter-input.is-error .newsletter-input__message {
  display: flex;
  gap: var(--space-2xs);
  color: var(--color-error);
}

.newsletter-input.is-error .newsletter-input__message::before {
  content: '!';
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.6875rem;
  line-height: 1;
}

.newsletter-input.is-success .newsletter-input__message {
  display: flex;
  gap: var(--space-2xs);
}

.newsletter-input.is-success .newsletter-input__message::before {
  content: '';
  flex: none;
  width: 1rem;
  height: 1rem;
  background-color: var(--palette-green);
  border: 1px solid var(--palette-ink);
  border-radius: 50%;
  /* check mark drawn with a gradient-free clip: simple dot ring keeps it robust on any scheme */
  box-shadow: inset 0 0 0 3px var(--palette-green), inset 0 0 0 5px var(--palette-ink);
}

/* --------------------------------------------------------------------------
   social-icons — row of round icon links, or rotated "stickers" for the footer.
   Variants: (default, round icons) | --stickers (text pills, scattered rotation)
   Markup:
   <ul class="social-icons" role="list">
     <li><a class="social-icons__link" href="#">
       <svg class="icon" aria-hidden="true"><use href="#icon-instagram"/></svg>
       <span class="social-icons__label">Instagram</span></a></li>
   </ul>
   In the default variant the label is visually hidden; in --stickers it is the content.
   -------------------------------------------------------------------------- */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  padding: 0;
}

.social-icons__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-width: var(--target-min);
  min-height: var(--target-min);
  color: inherit;
  text-decoration: none;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.social-icons:not(.social-icons--stickers) .social-icons__link {
  border: 1px solid var(--color-fg);
  border-radius: var(--radius-pill);
}

.social-icons:not(.social-icons--stickers) .social-icons__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.social-icons__link:hover,
.social-icons__link.is-hover {
  background-color: var(--palette-lime);
  color: var(--palette-ink);
  border-color: var(--palette-ink);
}

.social-icons__link:focus-visible,
.social-icons__link.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* stickers */
.social-icons--stickers {
  gap: var(--space-xs) var(--space-sm);
}

.social-icons--stickers .social-icons__link {
  --sticker-rotate: -5deg;

  padding: 0 var(--space-md);
  background-color: var(--palette-lime);
  color: var(--palette-ink);
  border: 1px solid var(--palette-ink);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transform: rotate(var(--sticker-rotate));
}

.social-icons--stickers li:nth-child(4n + 2) .social-icons__link {
  --sticker-rotate: 4deg;

  background-color: var(--palette-green);
}

.social-icons--stickers li:nth-child(4n + 3) .social-icons__link {
  --sticker-rotate: -2deg;

  background-color: var(--palette-blue);
  color: var(--palette-white);
}

.social-icons--stickers li:nth-child(4n + 4) .social-icons__link {
  --sticker-rotate: 6deg;

  background-color: var(--palette-white);
}

.social-icons--stickers .social-icons__link:hover,
.social-icons--stickers .social-icons__link.is-hover {
  background-color: var(--palette-ink);
  color: var(--palette-white);
  transform: rotate(0deg) scale(1.06);
}

/* --------------------------------------------------------------------------
   scroll-reveal — animation states for <scroll-reveal> (assets/js/reveal.js)
   Hidden only when: JS ran (<html class="js">) AND motion is allowed.
   Animates transform / opacity / clip-path only: no layout shift.
   -------------------------------------------------------------------------- */
scroll-reveal {
  display: block;
}

.split-line {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  /* fade */
  .js scroll-reveal:not([type]),
  .js scroll-reveal[type='fade'] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity var(--duration-slow) var(--ease-out) var(--reveal-delay, 0ms),
      transform var(--duration-slow) var(--ease-out) var(--reveal-delay, 0ms);
  }

  .js scroll-reveal:not([type]).is-visible,
  .js scroll-reveal[type='fade'].is-visible {
    opacity: 1;
    transform: none;
  }

  /* split: each line slides up out of a clipped box */
  .js scroll-reveal[type='split'] .split-line {
    overflow: hidden;
    /* room for descenders so the clip does not cut letters */
    margin-block: -0.08em;
    padding-block: 0.08em;
  }

  .js scroll-reveal[type='split'] .split-line__inner {
    display: block;
    transform: translateY(110%);
    transition: transform 900ms var(--ease-out)
      calc(var(--reveal-delay, 0ms) + var(--i, 0) * 110ms);
  }

  .js scroll-reveal[type='split'].is-visible .split-line__inner {
    transform: none;
  }

  /* clip: the first child opens from the top, image settles from a slight zoom */
  .js scroll-reveal[type='clip'] > * {
    clip-path: inset(0 0 100% 0 round var(--radius-lg));
    transition: clip-path 1100ms var(--ease-in-out) var(--reveal-delay, 0ms);
  }

  .js scroll-reveal[type='clip'] > * > img {
    transform: scale(1.12);
    transition: transform 1400ms var(--ease-out) var(--reveal-delay, 0ms);
  }

  .js scroll-reveal[type='clip'].is-visible > * {
    clip-path: inset(0 0 0 0 round var(--radius-lg));
  }

  .js scroll-reveal[type='clip'].is-visible > * > img {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   breadcrumbs — "Home / Shop / Living". The current page is not a link.
   Markup:
   <nav class="breadcrumbs" aria-label="Breadcrumb">
     <ol class="breadcrumbs__list" role="list">
       <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="index.html">Home</a></li>
       <li class="breadcrumbs__item"><span aria-current="page">Living</span></li>
     </ol>
   </nav>
   -------------------------------------------------------------------------- */
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-2xs);
  padding: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caption);
  text-transform: uppercase;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 1.5rem;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  color: var(--color-fg-muted);
}

.breadcrumbs__link {
  color: var(--color-fg-muted);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--color-fg);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.breadcrumbs__link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   chip — pill link for category navigation (All, Living, Dining…).
   Markup: <ul class="chip-list" role="list"><li><a class="chip" href="…"
   aria-current="page">Living<span class="chip__count">7</span></a></li>…</ul>
   The list scrolls sideways inside its own box on small screens (never the
   page). The current chip is filled. Hover is a bonus, never required.
   -------------------------------------------------------------------------- */
.chip-list {
  display: flex;
  gap: var(--space-2xs);
  margin: 0;
  padding: 3px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.chip-list::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.5rem;
  padding: 0 var(--space-sm);
  background-color: transparent;
  color: inherit;
  border: 1px solid currentcolor;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.chip:hover {
  background-color: var(--palette-lime);
  color: var(--palette-ink);
  border-color: var(--palette-ink);
}

.chip[aria-current='page'] {
  background-color: var(--color-fg);
  color: var(--color-bg);
  border-color: var(--color-fg);
}

.chip:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.chip__count {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
