/* ==========================================================================
   Kit — a quiet catalog. Light, monochrome, Inter, mobile-first.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --bg: #f2f2f2;          /* page */
  --card: #ffffff;        /* cards, pills */
  --card-hover: #fafafa;
  --fg: #141414;
  --muted: #6b6b6b;       /* 4.7:1 on --bg, 5.3:1 on --card */
  --line: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(242, 242, 242, 0.8);
  --plate: #ffffff;       /* behind product photos */

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --nav-h: 64px;
  --max: 1280px;
  --gutter: 16px;
  --radius: 20px;
  --space: clamp(88px, 11vw, 136px);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
h1, h2, h3, p { text-wrap: balance; font-weight: inherit; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 8px;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
}
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--bg); }
}

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav__mark {
  justify-self: start;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.nav__links {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
}
.nav__links a {
  display: block;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav__links a:hover { color: var(--fg); }
.nav__links a.is-active {
  background: var(--bg);
  color: var(--fg);
}

@media (min-width: 480px) {
  .nav__links a { padding: 7px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(96px, 14vw, 168px) var(--gutter) clamp(24px, 4vw, 40px);
  text-align: center;
}

.hero__title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.hero__tagline {
  max-width: 48ch;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 560px;
  margin-top: 32px;
}
.hero__chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px 0 4px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.hero__chips a:hover { color: var(--fg); }
.hero__chips img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--plate);
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space) var(--gutter) 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section__head h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.section__head h2:focus { outline: none; }
.section__head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.section__more {
  flex: none;
  padding: 6px 0;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.section__more:hover { color: var(--fg); }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--featured { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  transition: background-color 0.3s ease;
}

/* Product photos sit on a white plate. On white cards it melts in; on the
   black featured cards it reads as an inset photo. */
.card__media {
  overflow: hidden;
  margin: 8px 8px 0;
  border-radius: calc(var(--radius) - 8px);
  background: var(--plate);
}
.card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}
.card__body { padding-top: 10px; }

.card__body {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 0 18px 18px;
}

.card__meta {
  grid-column: 1;
  font-size: 12px;
  color: var(--muted);
}
.card__year {
  grid-row: 1;
  grid-column: 2;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card__name {
  grid-column: 1;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.card--lg .card__name { font-size: 18px; }
.card__price {
  grid-row: 2;
  grid-column: 2;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.card--lg .card__price { font-size: 18px; }
.card__note {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* Whole card clickable via the name link */
.card__name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card__name a:focus-visible { outline: none; }
.card__name a:focus-visible::after {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

.card__arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--ease);
}

/* ---------- Collection card ---------- */
.ccard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}
.ccard__media {
  display: flex;
  gap: 6px;
  aspect-ratio: 3 / 1;
  padding: 8px 8px 0;
  overflow: hidden;   /* keeps the 3:1 strip fixed, even with one image */
}
.ccard__media img {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-width: 50%;     /* a lone image doesn't stretch across the card */
  margin: 0 auto;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: var(--plate);
  transition: transform 0.6s var(--ease);
}
.ccard__body {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 6px 18px 18px;
}
.ccard__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.ccard__count {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
}
.ccard__tagline {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Filter chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.chip {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 13px;
  color: var(--muted);
}
.status__clear {
  padding: 6px 2px;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.status__clear[hidden] { display: none; }

.empty {
  grid-column: 1 / -1;
  display: grid;
  place-content: center;
  gap: 4px;
  min-height: 320px;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}
.empty__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}
[hidden] { display: none !important; }

/* ---------- Stats ---------- */
#index { padding-bottom: var(--space); }

.stats-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px clamp(48px, 8vw, 96px);
}
.stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats dt {
  font-size: 13px;
  color: var(--muted);
}
.stats dd {
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.noscript {
  padding: 48px var(--gutter);
  text-align: center;
  color: var(--muted);
}

/* ---------- Product page ---------- */
.nav__back {
  justify-self: start;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  color: var(--fg);
  transition: transform 0.3s var(--ease);
}

.product {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) var(--space);
}

.product__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.product__pricing {
  flex: none;
  padding-bottom: 4px;
  text-align: right;
}
.product__pricenote {
  max-width: 26ch;
  margin: 6px 0 0 auto;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.product__price {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.product__meta {
  font-size: 13px;
  color: var(--muted);
}
.product__title {
  margin-top: 6px;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* One photo on a white stage. Prev / next floats over the bottom edge. */
.stage {
  position: relative;
  overflow: hidden;
  /* Title + photo fit on one screen where there's room. */
  height: max(400px, min(clamp(400px, 56vw + 160px, 760px), calc(100vh - 220px)));
  height: max(400px, min(clamp(400px, 56vw + 160px, 760px), calc(100svh - 220px)));
  padding: 24px 24px 96px;
  border-radius: 24px;
  background: var(--plate);
}
/* The photo has generous white margins; scale up so the product fills the stage. */
.stage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.2);
}

.pager {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: flex;
  width: min(calc(100% - 32px), 440px);
  transform: translateX(-50%);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(0, 0, 0, 0.08);
}
.pager a {
  display: grid;
  flex: 1 1 0;
  gap: 2px;
  min-width: 0;
  padding: 12px 16px;
  transition: background-color 0.2s ease;
}
.pager a:first-child { border-radius: 16px 0 0 16px; }
.pager a:last-child {
  border-left: 1px solid var(--line);
  border-radius: 0 16px 16px 0;
  text-align: right;
}
.pager__label {
  font-size: 12px;
  color: var(--muted);
}
.pager__name {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.details {
  display: grid;
  gap: 40px;
  margin-top: clamp(40px, 6vw, 72px);
}
@media (min-width: 800px) {
  .details {
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 64px;
  }
}
.details__copy {
  display: grid;
  gap: 20px;
  align-content: start;
}
.details__note {
  max-width: 30ch;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.015em;
}
.details__about {
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-wrap: pretty;
}
.specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.specs div:first-child { border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd {
  max-width: 62%;
  text-align: right;
}

.product__empty {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: clamp(40px, 8vw, 96px) 0;
  color: var(--muted);
}
.product__empty .product__title { color: var(--fg); }
.product__back {
  margin-top: 16px;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Hover (pointer devices only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__media img { transform: scale(1.04); }
  .card:hover .card__arrow {
    background: var(--fg);
    color: var(--card);
    transform: rotate(45deg);
  }
  .ccard:hover .ccard__media img { transform: scale(1.06); }
  .nav__back:hover { transform: translateX(-2px); }
  .pager a:hover { background: var(--card-hover); }
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.card--in { animation: fade-in 0.4s var(--ease) both; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card--in { animation: none; }
  .card__media img,
  .ccard__media img,
  .card__arrow { transition: none; transform: none !important; }
}
