/* v4 — Brutalist Museum Catalog */

:root {
  --black: #000000;
  --white: #ffffff;
  --accent: #ff4d00;
  --line: 2px solid var(--black);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  line-height: 1.4;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Ticker ── */

.ticker {
  border-bottom: var(--line);
  background: var(--white);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 18s linear infinite;
}

.ticker-text {
  flex-shrink: 0;
  padding: 10px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Header ── */

.hdr {
  border-bottom: var(--line);
}

.hdr-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 20px;
  border-bottom: var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hdr-back {
  justify-self: start;
  transition: color 0.15s;
}

.hdr-back:hover {
  color: var(--accent);
}

.hdr-logo {
  justify-self: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.hdr-meta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.hdr-nav {
  display: flex;
}

.hdr-nav a {
  flex: 1;
  padding: 16px 20px;
  border-right: var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.12s, color 0.12s;
}

.hdr-nav a:last-child {
  border-right: none;
}

.hdr-nav a:hover {
  background: var(--black);
  color: var(--white);
}

/* ── Hero (stacked) ── */

.hero {
  display: flex;
  flex-direction: column;
  border-bottom: var(--line);
}

.hero-top { padding: 28px 24px 0; }

.hero-idx {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.hero-title {
  padding: 12px 0 16px;
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 14ch;
}

.hero-sub {
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 48ch;
  margin-bottom: 16px;
  line-height: 1.5;
}

.hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.hero-chips span {
  padding: 8px 12px;
  border: var(--line);
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
}

.hero-cta {
  display: inline-block;
  margin-bottom: 28px;
  padding: 18px 36px;
  background: var(--black);
  color: var(--white);
  border: var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.2s;
}

.hero-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--black);
}

.hero-figure {
  width: 100%;
  border-top: var(--line);
  overflow: hidden;
}

.hero-figure img {
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: cover;
  filter: grayscale(0.3);
  transition: transform 0.6s ease, filter 0.5s;
  will-change: transform;
}

.hero-figure:hover img { filter: grayscale(0); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--line);
}
.hero-stats div {
  padding: 20px 16px;
  text-align: center;
  border-right: var(--line);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js .hero-stats.stagger-group > *:not(.vis) {
  opacity: 0;
  transform: translateY(12px);
}
.hero-stats div.vis { opacity: 1; transform: none; }
.hero-stats div:last-child { border-right: none; }
.hero-stats strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stats span {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
}

/* ── Categories (vertical list) ── */

.cats-label {
  padding: 16px 24px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  border-bottom: var(--line);
  background: var(--black); color: var(--white);
}

.cats {
  border-bottom: var(--line);
}

.cat-row {
  display: grid;
  grid-template-columns: clamp(3rem, 10vw, 6rem) 80px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: var(--line);
  transition: background 0.15s, color 0.15s, opacity 0.45s, transform 0.45s;
}
html.js .cat-row.reveal:not(.vis) {
  opacity: 0;
  transform: translateX(-16px);
}
.cat-row.vis { opacity: 1; transform: none; }

.cat-row:last-child {
  border-bottom: none;
}

.cat-row:hover {
  background: var(--black);
  color: var(--white);
}

.cat-row:hover .cat-num {
  color: var(--accent);
}

.cat-num {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  transition: color 0.12s;
}

.cat-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: var(--line);
  flex-shrink: 0;
}

.cat-title {
  display: block;
  font-size: clamp(14px, 2.5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}
.cat-info { display: flex; flex-direction: column; gap: 4px; }
.cat-sub {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.7;
}
.cat-row:hover .cat-sub { opacity: 1; }

.cat-arrow {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}

/* ── Product strip ── */

.strip-wrap {
  border-bottom: var(--line);
}

.strip-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 24px;
  border-bottom: var(--line);
}

.strip-idx {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.strip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.strip {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--black) var(--white);
}

.strip::-webkit-scrollbar {
  height: 6px;
}

.strip::-webkit-scrollbar-thumb {
  background: var(--black);
}

.strip-item {
  position: relative;
  flex: 0 0 clamp(260px, 42vw, 420px);
  scroll-snap-align: start;
  border-right: var(--line);
  overflow: hidden;
}

.strip-item:last-child {
  border-right: none;
}

.strip-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 6px 10px;
  background: var(--white);
  border: var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.strip-item img {
  width: 100%;
  height: clamp(320px, 55vw, 560px);
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.35s ease, transform 0.5s ease;
}

.strip-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: var(--black); color: var(--white);
  border-top: var(--line);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.strip-item figcaption strong {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.strip-item figcaption em {
  font-size: 10px; font-style: normal; letter-spacing: 0.08em;
  opacity: 0.75; text-transform: uppercase;
}
.strip-item:hover figcaption,
.strip-item:focus-within figcaption { transform: translateY(0); }

.strip.is-dragging { cursor: grabbing; user-select: none; }
.strip.is-dragging .strip-item img { pointer-events: none; }

.strip-item:hover img,
.strip-item:focus-within img {
  filter: grayscale(0);
}

/* ── Blog (table rows) ── */

.blog {
  border-bottom: var(--line);
}

.blog-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 32px 24px 20px;
  border-bottom: var(--line);
}

.blog-idx {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.blog-head h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.blog-table {
  display: flex;
  flex-direction: column;
}

.blog-row {
  display: grid;
  grid-template-columns: 64px 120px 120px 1fr 140px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.12s, color 0.12s;
}
.blog-thumb {
  width: 64px; height: 64px; overflow: hidden; border: var(--line);
  display: block;
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.3s; }
.blog-row:not(.blog-row--head):hover .blog-thumb img { filter: grayscale(0); }

.blog-row:last-child {
  border-bottom: none;
}

.blog-row--head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--black);
  color: var(--white);
}

.blog-row:not(.blog-row--head):hover {
  background: var(--accent);
  color: var(--white);
}

.blog-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
}

.blog-more {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: right;
}

/* ── Footer ── */

.foot {
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 24px;
  padding: 32px 24px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.foot-brand strong { display: block; font-size: 14px; letter-spacing: 0.18em; margin-bottom: 8px; }
.foot-brand p { font-size: 11px; opacity: 0.65; text-transform: none; letter-spacing: 0.04em; line-height: 1.5; max-width: 24ch; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
}
.foot-legal { display: flex; gap: 20px; }
.foot-legal a:hover { color: var(--accent); }

/* ── Back FAB ── */

.back-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  border: var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s;
}

.back-fab:hover {
  background: var(--black);
  color: var(--white);
}

/* ── Staggered entrance (visible without JS) ── */

.reveal { transition: opacity 0.55s ease, transform 0.55s ease; }
html.js .reveal:not(.vis) {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.vis { opacity: 1; transform: translateY(0); }

.anim-item { transition: opacity 0.5s ease, transform 0.5s ease; }
html.js .anim-item:not(.vis) {
  opacity: 0;
  transform: translateY(16px);
}
.anim-item.vis { opacity: 1; transform: none; }

.stagger-group > * { transition: opacity 0.45s ease, transform 0.45s ease; }
html.js .stagger-group > *:not(.vis) {
  opacity: 0;
  transform: translateY(12px);
}
.stagger-group > *.vis { opacity: 1; transform: none; }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* ── Spec manifest ── */
.manifest {
  border-bottom: var(--line);
  background: var(--black);
  color: var(--white);
}
.manifest-inner { padding: 32px 24px; }
.manifest-idx { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.manifest h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.03em;
  text-transform: uppercase; margin: 8px 0 24px;
}
.manifest-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 2px solid var(--white);
}
.manifest-list li {
  padding: 20px 16px;
  border-right: 2px solid var(--white);
  transition: opacity 0.4s, transform 0.4s, background 0.15s;
}
html.js .manifest-list.stagger-group > li:not(.vis) {
  opacity: 0;
  transform: translateY(10px);
}
.manifest-list li.vis { opacity: 1; transform: none; }
.manifest-list li:last-child { border-right: none; }
.manifest-list li:hover { background: var(--accent); color: var(--black); }
.manifest-list li span {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; opacity: 0.6; margin-bottom: 8px;
}
.manifest-list li strong {
  display: block; font-size: 13px; font-weight: 700;
  text-transform: uppercase; margin-bottom: 4px;
}
.manifest-list li em { font-size: 11px; font-style: normal; opacity: 0.75; }

.rv { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.rv.vis { opacity: 1; transform: translateY(0); }

/* ── Mobile ── */

@media (max-width: 768px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { border-right: none; border-bottom: var(--line); }
  .hero-stats div:last-child { border-bottom: none; }
  .manifest-list { grid-template-columns: 1fr 1fr; }
  .manifest-list li:nth-child(2) { border-right: none; }
  .manifest-list li { border-bottom: 2px solid var(--white); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hdr-bar {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .hdr-back {
    grid-column: 1;
  }

  .hdr-logo {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .hdr-meta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .hdr-nav {
    flex-wrap: wrap;
  }

  .hdr-nav a {
    flex: 1 1 50%;
    border-bottom: var(--line);
  }

  .hdr-nav a:nth-child(2n) {
    border-right: none;
  }

  .cat-row {
    grid-template-columns: clamp(2.5rem, 12vw, 4rem) 64px 1fr auto;
    gap: 14px;
    padding: 16px;
  }

  .cat-thumb {
    width: 64px;
    height: 64px;
  }

  .blog-row,
  .blog-row--head {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .blog-thumb { width: 100%; height: 120px; }

  .blog-row--head span:not(:first-child) {
    display: none;
  }

  .blog-row--head span:first-child::after {
    content: ' — CATEGORY — TITLE — ACTION';
  }

  .blog-more {
    text-align: left;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html.js .reveal:not(.vis),
  html.js .anim-item:not(.vis),
  html.js .stagger-group > *:not(.vis),
  html.js .cat-row.reveal:not(.vis),
  html.js .manifest-list > li:not(.vis) {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}
