/**
 * Seedtape Advance — Appily-Ninetyfour PDP (restructured desk + richer color)
 * Perforated seed-tape gallery · punch-die sizes · ink-roller origins
 */

.page-seedtape {
  --st-press: #14181E;
  --st-tape: #F3EBDC;
  --st-plate: #FFFEF9;
  --st-punch: #1F8AB5;
  --st-ink: #E04A24;
  --st-gold: #E8A317;
  --st-leaf: #0F7A6E;
  --st-mute: #4A534C;
  --st-display: "Libre Franklin", system-ui, sans-serif;
  --st-body: "Newsreader", Georgia, serif;
  --st-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background:
    radial-gradient(ellipse 50% 38% at 0% 0%, rgba(224, 74, 36, 0.14), transparent 55%),
    radial-gradient(ellipse 48% 34% at 100% 8%, rgba(31, 138, 181, 0.14), transparent 50%),
    radial-gradient(ellipse 40% 28% at 50% 100%, rgba(15, 122, 110, 0.1), transparent 50%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 11px,
      rgba(20, 24, 30, 0.03) 11px,
      rgba(20, 24, 30, 0.03) 12px
    ),
    linear-gradient(180deg, #F7F0E2 0%, var(--st-tape) 55%, #E4DAC8 100%) !important;
  color: var(--st-press);
  font-family: var(--st-body);
  min-height: 100vh;
}

.page-seedtape::after { display: none !important; }

.page-seedtape .st-press,
.page-seedtape .st-miss {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.st-miss {
  text-align: center;
  padding-top: 3rem !important;
}
.st-miss h1 {
  font-family: var(--st-display);
  font-weight: 800;
}

/* Two-column desk: tape | identity+buy */
.st-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.st-kicker {
  margin: 0 0 0.45rem;
  font-family: var(--st-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--st-leaf);
}

.st-mast h1 {
  margin: 0;
  font-family: var(--st-display);
  font-size: clamp(1.75rem, 3.8vw, 2.45rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--st-press);
}

.st-price {
  margin: 0.65rem 0 0;
  font-family: var(--st-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.st-price s {
  margin-right: 0.45rem;
  color: var(--st-mute);
  font-weight: 500;
  font-size: 1rem;
}
.st-price strong { color: var(--st-ink); }

.st-stock {
  margin: 0.35rem 0 0;
  font-family: var(--st-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-punch);
}
.st-stock.is-out { color: var(--st-ink); }

.st-lede {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--st-mute);
}

/* Colored fact chips */
.st-chiprail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 1.1rem 0 1rem;
}
.st-chip {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--st-press);
  background: var(--st-plate);
}
.st-chip dt {
  margin: 0;
  font-family: var(--st-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--st-mute);
}
.st-chip dd {
  margin: 0.15rem 0 0;
  font-family: var(--st-display);
  font-size: 0.88rem;
  font-weight: 700;
}
.st-chip--punch { box-shadow: 3px 3px 0 var(--st-punch); }
.st-chip--ink { box-shadow: 3px 3px 0 var(--st-ink); }
.st-chip--leaf { box-shadow: 3px 3px 0 var(--st-leaf); }

/* Gallery */
.st-gallery { margin: 0; }

.st-sprockets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.st-sprocket {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.8rem;
  border: 2px solid rgba(20, 24, 30, 0.2);
  background: var(--st-plate);
  font-family: var(--st-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-mute);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.st-sprocket-hole {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
}
.st-sprocket.is-active {
  background: var(--st-press);
  border-color: var(--st-press);
  color: var(--st-plate);
}
.st-sprocket.is-active .st-sprocket-hole {
  background: var(--st-gold);
  border-color: var(--st-gold);
}
.st-sprocket:focus-visible {
  outline: 2px solid var(--st-punch);
  outline-offset: 2px;
}

.st-tape-bed {
  --st-advance: 0px;
  position: relative;
  background: var(--st-press);
  padding: 0.65rem 0;
  overflow: hidden;
  transform: translateX(var(--st-advance));
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 8px 8px 0 rgba(224, 74, 36, 0.35);
}
.st-tape-bed.is-stutter { animation: st-stutter 0.45s ease; }
@keyframes st-stutter {
  0% { filter: brightness(1); }
  20% { filter: brightness(1.25); }
  40% { transform: translateX(calc(var(--st-advance) - 4px)); }
  70% { transform: translateX(calc(var(--st-advance) + 2px)); }
  100% { transform: translateX(var(--st-advance)); filter: brightness(1); }
}

.st-perf {
  height: 14px;
  background:
    radial-gradient(circle, var(--st-tape) 3.5px, transparent 4px) 8px 50% / 16px 14px,
    linear-gradient(90deg, #2a2d35, #14181E);
}
.st-frame {
  position: relative;
  margin: 0;
  background: var(--st-tape);
  border-block: 1px solid rgba(244, 241, 232, 0.2);
}
.st-tape-window {
  overflow: hidden;
  aspect-ratio: 16 / 12;
  background: #ddd8cc;
}
.st-tape-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--st-pos, 50% 40%);
  transform: scale(var(--st-scale, 1));
  transform-origin: var(--st-pos, 50% 40%);
  transition: object-position 0.55s ease, transform 0.55s ease;
}
.st-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  background: var(--st-ink);
  color: #fff;
  font-family: var(--st-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--st-gold);
}
.st-tape-edge {
  margin: 0;
  padding: 0.45rem 0.85rem;
  font-family: var(--st-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--st-ink);
  background: linear-gradient(90deg, rgba(224, 74, 36, 0.16), transparent 55%);
  border-top: 1px dashed rgba(224, 74, 36, 0.4);
  transition: background 0.4s ease, letter-spacing 0.4s ease;
}
.st-tape-edge.is-wet {
  background: linear-gradient(90deg, rgba(224, 74, 36, 0.32), transparent 70%);
  letter-spacing: 0.22em;
  animation: st-smear 0.5s ease;
}
@keyframes st-smear {
  from { filter: blur(1.5px); opacity: 0.6; }
  to { filter: none; opacity: 1; }
}

.st-flash {
  position: absolute;
  inset: 0;
  background: rgba(244, 241, 232, 0.55);
  opacity: 0;
  pointer-events: none;
}
.st-flash.is-on { animation: st-flash 0.35s ease; }
@keyframes st-flash {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* Buy bay */
.st-buy-bay {
  padding: 1.15rem;
  background: var(--st-plate);
  border: 2px solid var(--st-press);
  box-shadow: 5px 5px 0 var(--st-leaf);
}

.st-alert {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  background: rgba(224, 74, 36, 0.1);
  border: 1px solid rgba(224, 74, 36, 0.35);
  color: var(--st-ink);
  font-size: 0.9rem;
}

.st-group-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--st-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--st-punch);
}

.st-dies,
.st-rollers { margin-bottom: 1.1rem; }

.st-die-row,
.st-roller-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.st-die {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 5.25rem;
  padding: 0.75rem 0.65rem 0.55rem;
  border: 2px solid rgba(20, 24, 30, 0.2);
  background: var(--st-tape);
  font-family: var(--st-display);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.st-die-aperture {
  width: calc(var(--st-ap, 12px) + 14px);
  height: calc(var(--st-ap, 12px) + 14px);
  border-radius: 50%;
  border: 3px solid var(--st-press);
  background:
    radial-gradient(circle at 50% 50%, transparent calc(var(--st-ap, 12px) / 2 - 1px), var(--st-press) calc(var(--st-ap, 12px) / 2));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
.st-die-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--st-press);
}
.st-die.is-pressed {
  border-color: var(--st-punch);
  background: rgba(31, 138, 181, 0.12);
  box-shadow: 3px 3px 0 var(--st-punch);
}
.st-die.is-pressed .st-die-aperture {
  border-color: var(--st-punch);
  background:
    radial-gradient(circle at 50% 50%, transparent calc(var(--st-ap, 12px) / 2 - 1px), var(--st-punch) calc(var(--st-ap, 12px) / 2));
}
.st-die.is-strike { animation: st-press 0.4s ease; }
@keyframes st-press {
  0% { transform: translateY(0); }
  35% { transform: translateY(4px) scale(0.97); }
  100% { transform: translateY(0); }
}

.st-roller {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border: 2px solid rgba(20, 24, 30, 0.16);
  background: var(--st-tape);
  font-family: var(--st-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--st-press);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.st-roller-drum {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, #3a3e48, #14181E 40%, #E04A24 55%, #14181E 70%, #3a3e48);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.st-roller.is-inking {
  border-color: var(--st-ink);
  background: rgba(224, 74, 36, 0.1);
  color: var(--st-ink);
  box-shadow: 3px 3px 0 rgba(224, 74, 36, 0.35);
}
.st-roller.is-spin .st-roller-drum { animation: st-roll 0.5s ease; }
@keyframes st-roll {
  to { transform: rotate(300deg); }
}

.st-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--st-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-mute);
}
.st-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid rgba(20, 24, 30, 0.2);
  background: var(--st-tape);
}
.st-stepper button {
  width: 2.4rem;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--st-press);
  cursor: pointer;
}
.st-stepper button:hover { background: rgba(15, 122, 110, 0.12); }
.st-stepper input {
  width: 2.8rem;
  border: 0;
  border-inline: 1px solid rgba(20, 24, 30, 0.12);
  background: var(--st-plate);
  font-family: var(--st-display);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--st-press);
  -moz-appearance: textfield;
  appearance: textfield;
}
.st-stepper input::-webkit-outer-spin-button,
.st-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1.2rem;
  border: 2px solid var(--st-press);
  background: var(--st-press);
  color: var(--st-plate);
  font-family: var(--st-display);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.st-btn:hover {
  background: #2a2d35;
  transform: translateY(-2px);
}
.st-btn--ink {
  background: var(--st-ink);
  border-color: var(--st-press);
  box-shadow: 3px 3px 0 var(--st-gold);
}
.st-btn--ink:hover {
  background: #c43d1c;
  box-shadow: 4px 4px 0 var(--st-gold);
}
.st-btn--primary {
  background: var(--st-punch);
  border-color: var(--st-press);
}
.st-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Related strips */
.st-related {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 2px solid rgba(20, 24, 30, 0.12);
}
.st-related h2 {
  margin: 0 0 1rem;
  font-family: var(--st-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.st-related-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.st-related-strip {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem;
  background: var(--st-plate);
  border: 2px solid var(--st-press);
  transition: transform 0.2s var(--st-ease), box-shadow 0.2s ease;
}
.st-related-strip:nth-child(odd) { box-shadow: 3px 3px 0 var(--st-punch); }
.st-related-strip:nth-child(even) { box-shadow: 3px 3px 0 var(--st-ink); }
.st-related-strip:hover,
.st-related-strip:focus-visible {
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 var(--st-gold);
  outline: none;
}
.st-related-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 30, 0.12);
  background: #E8E2D4;
}
.st-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st-related-meta strong {
  display: block;
  font-family: var(--st-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.st-related-meta em {
  font-style: normal;
  font-family: var(--st-display);
  font-weight: 700;
  color: var(--st-ink);
}

@media (max-width: 900px) {
  .st-desk { grid-template-columns: 1fr; }
  .st-chiprail { grid-template-columns: 1fr; }
  .st-related-rail { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .page-seedtape .st-press,
  .page-seedtape .st-miss {
    width: min(100% - 1.25rem, 1080px);
  }
  .st-actions { flex-direction: column; }
  .st-btn { width: 100%; }
  .st-die {
    flex: 1 1 calc(33% - 0.55rem);
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-tape-bed,
  .st-tape-window img,
  .st-tape-bed.is-stutter,
  .st-flash.is-on,
  .st-die.is-strike,
  .st-roller.is-spin .st-roller-drum,
  .st-tape-edge.is-wet,
  .st-related-strip,
  .st-btn {
    animation: none !important;
    transition: none !important;
  }
}
