:root {
  --navy: #0b1f3a;
  --navy-light: #16305a;
  --red: #d21f3c;
  --red-dark: #a6172e;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #1c1f26;
  --muted: #6b7280;
  --border: #e3e5ea;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
}

.montage {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  padding-top: 1.75rem;
}

.tile {
  width: 142px;
  height: 190px;
  margin-left: -22px;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #fff;
  transition: transform 0.25s ease;
}

.tile:first-child {
  margin-left: 0;
}

.montage .tile:hover {
  transform: translateY(-14px) rotate(0deg) scale(1.06) !important;
  z-index: 5;
}

.tile-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tile-baseball { background: linear-gradient(160deg, #d62828, #6a040f); }
.tile-basketball { background: linear-gradient(160deg, #f77f00, #a63c06); }
.tile-football { background: linear-gradient(160deg, #6a9c1f, #294a0a); }
.tile-mma { background: linear-gradient(160deg, #343a40, #101214); }
.tile-soccer { background: linear-gradient(160deg, #0077b6, #023e8a); }
.tile-entertainment { background: linear-gradient(160deg, #9d4edd, #ff006e); }

.header-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 31, 58, 0.1) 0%,
    rgba(11, 31, 58, 0.55) 55%,
    rgba(11, 31, 58, 0.95) 100%
  );
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 2.25rem;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tagline {
  margin: 0;
  color: #e3e8f2;
  max-width: 640px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .site-header { min-height: 260px; }
  .tile { width: 92px; height: 128px; margin-left: -26px; border-radius: 10px; }
  .tile svg { width: 36px; height: 36px; }
  .tile-label { font-size: 0.6rem; }
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}

.controls label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.controls select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.95rem;
}

.status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fff3f3;
  color: var(--red-dark);
  margin-bottom: 1rem;
}

.date-group {
  margin: 2rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}

.releases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}

.date-group {
  grid-column: 1 / -1;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card-dim {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  filter: grayscale(0.9);
  opacity: 0.55;
}

.card.sold-out .signup-form select:disabled,
.card.sold-out .signup-form input:disabled,
.card.sold-out .signup-form button:disabled,
.card.sold-out .toggle-btn:disabled {
  cursor: not-allowed;
}

.sold-out-ribbon {
  position: absolute;
  top: 16px;
  left: -38px;
  width: 150px;
  padding: 4px 0;
  background: #1c1f26;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 3;
  pointer-events: none;
}

.product-image {
  margin: -1.1rem -1.1rem 0.2rem;
  height: 130px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.product-image::before {
  content: "TOPPS";
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
}

.product-image-format {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.sport-badge {
  background: #eef2ff;
  color: var(--navy);
}

.format-badge {
  background: #fdeceb;
  color: var(--red-dark);
}

.card-title {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.card-date {
  margin: 0;
  font-weight: 600;
  color: var(--red-dark);
  font-size: 0.9rem;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  flex-grow: 1;
}

.card-preorder-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.card-count {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.signup-form {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.form-field select {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.85rem;
}

.contact-toggle {
  display: flex;
  gap: 0.4rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.signup-row {
  display: flex;
  gap: 0.4rem;
}

.contact-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.contact-input:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.notify-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.notify-btn:hover {
  background: var(--red-dark);
}

.notify-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-message {
  margin: 0;
  font-size: 0.8rem;
  min-height: 1.1em;
}

.form-message.success { color: #1a7f37; }
.form-message.error { color: var(--red-dark); }

.site-footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.disclaimer {
  max-width: 640px;
  margin: 0.75rem auto 0;
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card-bg: #171a21;
    --text: #e7e9ee;
    --muted: #9aa1ad;
    --border: #2a2e37;
  }
  .controls select { background: #171a21; color: var(--text); }
  .toggle-btn { background: #171a21; color: var(--muted); }
  .contact-input { background: #101319; color: var(--text); }
  .form-field select { background: #101319; color: var(--text); }
  .sport-badge { background: #1b2440; color: #b9c6ff; }
  .format-badge { background: #3a1c22; color: #ffb3bb; }
}
