:root {
  --paper: #EAE7E0;
  --ink: #1B1B18;
  --caption: #6B6862;
  --pitch: #3F5233;
  --hairline: #C9C3B8;
}

* { box-sizing: border-box; }

/* ============================================================
   PRINT TRANSITION
   Archive photograph → paper/print material → collection title
   ============================================================ */

.print-transition-section {
  position: relative;
  height: 300vh;
  background: var(--paper);
}

.print-transition-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.print-photo {
  position: absolute;
  width: 320px;
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 10px 10px 26px 10px;
  box-shadow: 0 24px 50px rgba(27, 27, 24, 0.18);
  will-change: transform, opacity;
}

.print-photo img {
  width: 100%;
  display: block;
  filter: grayscale(35%) contrast(1.05);
}

.print-photo .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--caption);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
}

.print-photo .tag .no { color: var(--pitch); font-weight: 500; }

/* Paper grain — CSS-generated via SVG turbulence filter, no external
   texture image asset required. */
.paper-grain-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.print-type {
  position: absolute;
  text-align: center;
  opacity: 0;
  will-change: opacity, transform;
}

.print-type .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--pitch);
  margin-bottom: 10px;
}

.print-type .collection-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--caption);
  margin-bottom: 28px;
}

.print-type .headline {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.03em;
  color: var(--ink);
}

.print-type .number-cue {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--hairline);
  margin-top: 20px;
}

/* ============================================================
   COLLECTION STAGE
   ============================================================ */

.matchday-section {
  position: relative;
  background: var(--paper);
  padding: 6vw 6vw 10vw 6vw;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink);
}

/* Extremely faint per-product environmental rhythm. Opacity intentionally
   left conservative and easy to tune by eye once seen against real
   background/artwork — not a fixed design rule. */
.matchday-rhythm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  transition: opacity 0.6s ease;
  background-repeat: repeat;
  z-index: 0;
}

.rhythm-kickoff {
  background-image: repeating-linear-gradient(
    to bottom, var(--ink) 0px, var(--ink) 2px, transparent 2px, transparent 40px
  );
}
.rhythm-traveler {
  background-image: repeating-radial-gradient(
    circle at 20% 30%, var(--ink) 0px, transparent 60px
  );
}
.rhythm-live-wire {
  background-image: repeating-linear-gradient(
    115deg, var(--ink) 0px, var(--ink) 1px, transparent 1px, transparent 14px
  );
}
.rhythm-second-half {
  background-image: repeating-linear-gradient(
    to right, var(--ink) 0px, var(--ink) 1px, transparent 1px, transparent 60px
  );
}
.rhythm-extra-time {
  background: radial-gradient(circle at 70% 50%, transparent 0%, var(--ink) 140%);
  opacity: 0.05;
}

.matchday-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.matchday-nav button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--hairline);
  cursor: pointer;
  padding: 0.4rem 0.1rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.matchday-nav button:hover,
.matchday-nav button:focus-visible {
  color: var(--caption);
}

.matchday-nav button.active {
  color: var(--ink);
  border-color: var(--pitch);
}

.matchday-nav button:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 4px;
}

.matchday-stage {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6vw);
  align-items: center;
}

.matchday-object-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #ddd;
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.matchday-static-img,
.matchday-iframe-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.matchday-static-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.matchday-static-img img.loaded { opacity: 1; }

.matchday-static-img .img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: var(--paper);
  color: var(--caption);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 2rem;
}

.matchday-iframe-wrap {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background: var(--paper);
}

.matchday-iframe-wrap.active {
  opacity: 1;
  pointer-events: auto;
}

.matchday-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.explore-3d-btn,
.close-3d-btn {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 10px 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, background 0.3s ease;
}

.matchday-object-frame:hover .explore-3d-btn,
.explore-3d-btn:focus-visible {
  opacity: 1;
}

/* Always at least faintly discoverable without hover, for touch/keyboard
   users who can't "hover to approach." */
.explore-3d-btn.visible-by-default {
  opacity: 0.85;
}

.explore-3d-btn:hover,
.explore-3d-btn:focus-visible {
  background: var(--pitch);
  outline: none;
}

.drag-to-rotate-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(27, 27, 24, 0.85);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.drag-to-rotate-label.visible { opacity: 1; }

.close-3d-btn {
  bottom: auto;
  top: 16px;
  right: 16px;
  left: auto;
  transform: none;
  opacity: 0;
  pointer-events: none;
  padding: 8px 16px;
}

.close-3d-btn.visible {
  opacity: 0.85;
  pointer-events: auto;
}

.matchday-info .eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--pitch);
  margin-bottom: 10px;
}

.matchday-info h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  margin-bottom: 20px;
  color: var(--ink);
}

.matchday-info .roast-origin {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--caption);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
  margin-bottom: 16px;
}

.matchday-info .tasting-notes {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 28px;
}

.matchday-info a.discover-link {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.matchday-info a.discover-link:hover {
  color: var(--pitch);
  border-color: var(--pitch);
}

.matchday-buy-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 12px 15px 11px;
  border: 1px solid var(--ink);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.matchday-buy-link span {
  color: #c9c3b8;
}

.matchday-buy-link b {
  font-weight: 400;
  transition: transform 0.25s ease;
}

.matchday-buy-link:hover,
.matchday-buy-link:focus-visible {
  background: var(--pitch);
  border-color: var(--pitch);
  color: var(--paper);
  transform: translateY(-1px);
}

.matchday-buy-link:hover b,
.matchday-buy-link:focus-visible b {
  transform: translateX(3px);
}

.discover-link--pending {
  display: inline-block;
  color: var(--caption);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-bottom: 1px dashed var(--hairline);
  padding-bottom: 4px;
  cursor: default;
}

.matchday-info,
.matchday-object-frame {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.matchday-fade-out { opacity: 0 !important; }

.matchday-collection-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.matchday-collection-footer .eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--pitch);
  margin-bottom: 8px;
}

.matchday-collection-footer h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin-bottom: 20px;
}

.matchday-collection-footer a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

@media (max-width: 780px) {
  .print-photo { width: 220px; }
  .matchday-stage {
    grid-template-columns: 1fr;
  }
  .explore-3d-btn.visible-by-default { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .print-photo,
  .print-type,
  .matchday-info,
  .matchday-object-frame,
  .explore-3d-btn,
  .close-3d-btn,
  .drag-to-rotate-label,
  .matchday-static-img img {
    transition: none !important;
  }
}
