/* STILLE — tokens + shared primitives */

:root {
  --bg: #f2eee8;
  --surface: #e9e3da;
  --ink: #141414;
  --muted: #8a847c;
  --rule: rgb(20 20 20 / 0.15);

  --font-display: 'Anton', 'Oswald', Impact, 'Arial Narrow', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(16px, 2.8vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* ---- type roles ---- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: 0.005em;
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

/* ---- shared ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.button:hover {
  background: #000;
}

/* Effect 1 of 2: subtle image scale on hover */
.media {
  overflow: hidden;
  background: var(--surface);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}

@media (hover: hover) {
  .media:hover img,
  a:hover > .media img {
    transform: scale(1.03);
  }
}

/* ---- header + menu ---- */

.site-header,
.menu-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.site-header--overlay {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  border-bottom: 0;
}

.wordmark {
  font-size: 28px;
  line-height: 1;
}

.menu-toggle,
.header-shop {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.menu-toggle {
  justify-self: start;
}

.header-shop {
  justify-self: end;
}

.header-links {
  justify-self: end;
  display: flex;
  gap: 24px;
}

.header-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

/* Phones: Shop lives in the menu; the header keeps just the cart */
@media (max-width: 600px) {
  .header-links a:first-child {
    display: none;
  }
}

.menu-toggle:hover,
.header-shop:hover,
.header-links a:hover {
  color: var(--muted);
}

.menu-icon {
  position: relative;
  width: 22px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.menu-icon.is-close {
  border: 0;
}

.menu-icon.is-close::before,
.menu-icon.is-close::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid currentColor;
  rotate: 45deg;
}

.menu-icon.is-close::after {
  rotate: -45deg;
}

.menu-open {
  overflow: hidden;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  overflow-y: auto;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(32px, 6vw, 80px) var(--gutter);
}

.menu-col {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 0 clamp(16px, 2.4vw, 40px);
  border-left: 1px solid var(--rule);
}

.menu-col:first-child {
  border-left: 0;
  padding-left: 0;
}

.menu-col-head {
  color: var(--muted);
}

.menu-col ul {
  display: grid;
  gap: 6px;
}

.menu-col li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.menu-col li .display {
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: 0.95;
}

.menu-col li .display:hover {
  color: var(--muted);
}

@media (max-width: 860px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .menu-col {
    padding: 0;
    border-left: 0;
  }

  .menu-col li .display {
    font-size: 40px;
  }
}

/* ---- chips (filters, sizes) ---- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.chip .count {
  opacity: 0.5;
}

/* ---- product cards (shop grid, related) ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 12px;
}

.card a {
  display: grid;
  gap: 12px;
}

.card .media {
  aspect-ratio: 4 / 5;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card .sub {
  margin-top: -8px;
}

/* stagger reveals across each row */
.cards .card:nth-child(4n + 2) {
  transition-delay: 80ms;
}

.cards .card:nth-child(4n + 3) {
  transition-delay: 160ms;
}

.cards .card:nth-child(4n + 4) {
  transition-delay: 240ms;
}

@media (max-width: 1080px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 8px;
  }

  .card .meta {
    flex-direction: column;
    gap: 2px;
  }

  .card .sub {
    margin-top: 0;
  }
}

/* ---- motion: only under html.motion (set in <head> when reduced motion is off) ---- */

.motion [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 700ms var(--ease-out),
    translate 900ms var(--ease-out);
}

.motion [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

/* Focus-dim: hovering one item quiets its siblings */
.piece > *,
.card > a {
  transition: opacity 500ms var(--ease-out);
}

@media (hover: hover) {
  .pieces:has(.piece:hover) .piece:not(:hover) > *,
  .cards:has(.card:hover) .card:not(:hover) > a {
    opacity: 0.35;
  }
}

/* Menu: panel wipes down, links rise in sequence */
.motion .menu {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 600ms var(--ease-out);
}

.motion .menu.is-open {
  clip-path: inset(0);
}

.motion .menu li {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 500ms ease-out,
    translate 700ms var(--ease-out);
}

.motion .menu.is-open li {
  opacity: 1;
  translate: 0 0;
  transition-delay: calc(180ms + var(--i) * 35ms);
}

/* Content swaps (filters, lookbook tabs) fade through */
[data-swap] {
  transition: opacity 260ms ease-out;
}

[data-swap].is-swapping {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }

  .media:hover img,
  a:hover > .media img {
    transform: none;
  }
}
