/* ── Format Games Website — Format Games house style (holding-page aesthetic) ── */

:root {
  /* === Format Games house palette === */
  --fg-red:      #FF2E5C;
  --fg-red-hot:  #E81B49;
  --fg-yellow:   #FFD60A;
  --fg-cream:    #FFF6E5;
  --fg-ink:      #0D0D0D;

  /* semantic */
  --bg:     var(--fg-red);
  --panel:  var(--fg-cream);
  --accent: var(--fg-yellow);
  --text-on-red:   var(--fg-cream);
  --text-on-panel: var(--fg-ink);
  --muted-on-panel: rgba(13, 13, 13, 0.6);
  --hard-shadow: 0 8px 0 rgba(13, 13, 13, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100%;
  background: var(--fg-red);
  color: var(--text-on-red);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at top, rgba(255, 214, 10, 0.16), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(232, 27, 73, 0.40), transparent 70%);
  background-attachment: fixed;
  position: relative;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── ambient halftone dots overlay ──────────────────────────────────────────── */
.halftone {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 246, 229, 0.07) 1.4px, transparent 1.6px);
  background-size: 30px 30px;
  mix-blend-mode: screen;
}

/* keep real content above the halftone */
.site-header, .page-intro, main, .site-footer { position: relative; z-index: 2; }

/* confetti canvas sits above everything */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* ── SITE HEADER ─────────────────────────────────────────────────────────── */

.site-header {
  padding: 30px 36px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* big white logo centred, a fan of boxes either side */
.header-row {
  width: 100%;
  max-width: 1920px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.site-logo {
  justify-self: center;
  flex: 0 0 auto;
  padding: 0 14px;
}

.site-logo img {
  height: clamp(120px, 14vw, 190px);
  width: auto;
  filter: drop-shadow(0 8px 14px rgba(13, 13, 13, 0.30));
}

/* floating fans of box cut-outs framing the logo (holding-page style) */
.header-collage {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-collage.left  { justify-content: flex-end; }
.header-collage.right { justify-content: flex-start; }

.header-collage a {
  display: block;
  flex: 0 0 auto;
  position: relative;
  margin-left: -3.4vw;                 /* overlap tuned so all 16 fit on screen */
  transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.header-collage.right a:first-child { margin-left: 0; }

.header-collage img {
  height: clamp(99px, 8.8vw, 166px);
  width: auto;
  filter: drop-shadow(0 14px 18px rgba(13, 13, 13, 0.34));
  animation: collage-float var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--rot, 0deg));
  transform-origin: center bottom;
}

@keyframes collage-float {
  0%, 100% { transform: translateY(0)    rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-7px) rotate(calc(var(--rot, 0deg) + 1.5deg)); }
}

.header-collage a:hover {
  transform: translateY(-10px) scale(1.07);
  z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
  .header-collage img { animation: none; }
}

@media (max-width: 1040px) {
  .header-collage { display: none; }
  .header-row { grid-template-columns: auto; }
}

.site-nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.site-nav-links a {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-cream);
  background: var(--fg-yellow);
  color: var(--fg-ink);
  padding: 9px 16px 8px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 0 5px 0 rgba(13, 13, 13, 0.20);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-nav-links a:hover {
  transform: rotate(-2deg) translateY(-2px);
  box-shadow: 0 7px 0 rgba(13, 13, 13, 0.22);
}

/* ── HOMEPAGE INTRO ──────────────────────────────────────────────────────── */

.page-intro {
  padding: 48px 48px 8px;
  text-align: center;
}

.page-intro h1 {
  font-family: 'Bowlby One', 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg-cream);
  text-shadow:
    0 4px 0 rgba(13, 13, 13, 0.15),
    0 12px 26px rgba(13, 13, 13, 0.30);
  margin: 0 auto 18px;
  max-width: 14ch;
}

.page-intro h1 .pop { color: var(--fg-yellow); display: inline-block; }
.page-intro h1 .pop .d {
  display: inline-block;
  animation: dotBob 1.4s ease-in-out infinite;
}
.page-intro h1 .pop .d:nth-child(2) { animation-delay: 0.15s; }
.page-intro h1 .pop .d:nth-child(3) { animation-delay: 0.30s; }
@keyframes dotBob {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-0.16em); }
}

.page-intro .lede {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  color: var(--fg-cream);
  font-size: clamp(13px, 1.4vw, 17px);
  letter-spacing: 0.04em;
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.95;
}

/* ── RANGE SECTIONS (homepage) ───────────────────────────────────────────── */

main { padding: 0 48px 80px; max-width: 1400px; margin: 0 auto; }

.range-section { margin-top: 64px; }
.range-section:first-child { margin-top: 0; }

.range-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 4px solid var(--fg-yellow);
  padding: 18px 0 26px;
  margin-bottom: 26px;
}

.range-head h2 {
  font-family: 'Bowlby One', 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg-cream);
  text-shadow: 0 3px 0 rgba(13, 13, 13, 0.18);
}

.range-head p {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  color: var(--fg-yellow);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* "Most Popular" featured strip — a yellow top bar to set it apart */
.featured-section .range-head { border-top-color: var(--fg-cream); }
.featured-section .range-head h2 { color: var(--fg-yellow); }

/* About Us — cream panel at the foot of the homepage */
.about-section { margin-top: 64px; }
.about-section .range-head { border-top: 4px solid var(--fg-yellow); }
.about-body {
  background: var(--fg-cream);
  color: var(--fg-ink);
  border-radius: 18px;
  padding: 32px 36px;
  max-width: 900px;
  box-shadow: var(--hard-shadow), 0 18px 30px rgba(13, 13, 13, 0.18);
}
.about-body p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-ink);
}
.about-body p + p { margin-top: 14px; }
.about-body strong { font-weight: 700; }

/* Contact — centred cream box at the foot of the homepage, with playful
   game-themed flourishes (card suits, dice, a tilted badge) */
.contact-section { margin-top: 64px; }
.contact-section .range-head {
  border-top: 4px solid var(--fg-yellow);
  justify-content: center;
  text-align: center;
}
.contact-body {
  position: relative;
  background: var(--fg-cream);
  color: var(--fg-ink);
  border: 3px dashed rgba(13, 13, 13, 0.18);
  border-radius: 18px;
  padding: 48px 36px 52px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--hard-shadow), 0 18px 30px rgba(13, 13, 13, 0.18);
}
.contact-dice {
  font-size: 34px;
  line-height: 1;
  color: var(--fg-ink);
  margin-bottom: 14px;
  letter-spacing: 6px;
}
.contact-body p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-ink);
  margin-bottom: 18px;
}
.contact-email {
  display: inline-block;
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: clamp(22px, 4.5vw, 34px);
  color: var(--fg-red-hot);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.12s ease;
}
.contact-email:hover { text-decoration: underline; transform: scale(1.04) rotate(-1deg); }

/* decorative card-suit pips in the corners */
.contact-pip {
  position: absolute;
  font-size: 30px;
  line-height: 1;
  opacity: 0.5;
  pointer-events: none;
}
.pip-tl { top: 14px; left: 18px; color: var(--fg-ink); transform: rotate(-12deg); }
.pip-tr { top: 14px; right: 18px; color: var(--fg-red-hot); transform: rotate(10deg); }
.pip-bl { bottom: 14px; left: 18px; color: var(--fg-red-hot); transform: rotate(8deg); }
.pip-br { bottom: 14px; right: 18px; color: var(--fg-ink); transform: rotate(-10deg); }

/* tilted "say hello" sticker badge */
.contact-badge {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 18px;
  background: var(--fg-yellow);
  color: var(--fg-ink);
  font-family: 'Bowlby One', 'Archivo Black', sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  transform: rotate(-3deg);
  box-shadow: 0 4px 0 rgba(13, 13, 13, 0.2);
}

/* ── GAME GRID & CARDS ───────────────────────────────────────────────────── */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--fg-cream);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg-ink);
  box-shadow: var(--hard-shadow), 0 18px 30px rgba(13, 13, 13, 0.18);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 220ms ease;
}

.game-card-empty { visibility: hidden; }

.game-card:nth-child(3n+1) { --tilt: -1deg; }
.game-card:nth-child(3n+2) { --tilt:  0.6deg; }
.game-card:nth-child(3n)   { --tilt:  1.2deg; }

.game-card:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 14px 0 rgba(13, 13, 13, 0.20), 0 28px 44px rgba(13, 13, 13, 0.26);
}

.card-image {
  background: #fff;
  overflow: hidden;
  aspect-ratio: 1;
  border-bottom: 3px solid var(--fg-ink);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
  transition: transform 240ms ease;
  filter: drop-shadow(0 10px 14px rgba(13, 13, 13, 0.20));
}

.game-card:hover .card-image img { transform: scale(1.05) rotate(-1.5deg); }

.card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-range {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-red-hot);
  margin-bottom: 6px;
}

.card-title {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--fg-ink);
  margin-bottom: 10px;
}

.card-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pill {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: var(--fg-yellow);
  color: var(--fg-ink);
  padding: 4px 9px;
  border-radius: 20px;
  box-shadow: 0 2px 0 rgba(13, 13, 13, 0.15);
}

.card-price {
  font-family: 'Bowlby One', 'Archivo Black', sans-serif;
  font-size: 20px;
  color: var(--fg-red-hot);
  margin-bottom: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.card-cta {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  color: var(--fg-ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-cta .arrow { transition: transform 180ms ease; display: inline-block; }
.game-card:hover .arrow { transform: translateX(5px); }

/* ── PRODUCT PAGE ─────────────────────────────────────────────────────────── */

.product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 32px;
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-ink);
  background: var(--fg-yellow);
  padding: 9px 16px 8px;
  border-radius: 6px;
  box-shadow: 0 5px 0 rgba(13, 13, 13, 0.20);
  transition: transform 0.15s ease;
}

.back-link:hover { transform: translateY(-2px); }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ── PRODUCT GALLERY ──────────────────────────────────────────────────────── */

.product-gallery {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-main {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 4px solid var(--fg-ink);
  box-shadow: var(--hard-shadow), 0 20px 36px rgba(13, 13, 13, 0.24);
  aspect-ratio: 1;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
  filter: drop-shadow(0 16px 22px rgba(13, 13, 13, 0.22));
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  background: #fff;
  border: 3px solid rgba(13, 13, 13, 0.15);
  border-radius: 10px;
  padding: 5px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(13, 13, 13, 0.15);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.thumb:hover { transform: translateY(-2px); }
.thumb.active { border-color: var(--fg-yellow); }

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── PRODUCT INFO (cream panel for readability) ───────────────────────────── */

.product-info {
  background: var(--fg-cream);
  color: var(--fg-ink);
  border-radius: 18px;
  padding: 32px 34px;
  box-shadow: var(--hard-shadow), 0 20px 36px rgba(13, 13, 13, 0.24);
}

.product-range {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-red-hot);
  margin-bottom: 10px;
}

.product-title {
  font-family: 'Bowlby One', 'Archivo Black', system-ui, sans-serif;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg-ink);
  margin-bottom: 18px;
}

.product-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.product-pills .pill {
  font-size: 12px;
  padding: 5px 11px;
}

.product-price {
  font-family: 'Bowlby One', 'Archivo Black', sans-serif;
  font-size: 34px;
  color: var(--fg-red-hot);
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 3px dashed rgba(13, 13, 13, 0.18);
}

.product-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-ink);
  margin-bottom: 24px;
}

/* ── BULLETS ─────────────────────────────────────────────────────────────── */

.product-bullets {
  list-style: none;
  margin-bottom: 26px;
  padding-bottom: 26px;
  border-bottom: 3px dashed rgba(13, 13, 13, 0.18);
}

.product-bullets li {
  padding: 7px 0 7px 22px;
  position: relative;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-ink);
}

.product-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 9px;
  height: 9px;
  background: var(--fg-red);
  border-radius: 50%;
  box-shadow: 0 2px 0 rgba(13, 13, 13, 0.18);
}

.product-bullets strong { font-family: 'Archivo Black', 'Inter', sans-serif; font-weight: 400; }

/* ── CONTENTS ─────────────────────────────────────────────────────────────── */

.contents-section { margin-bottom: 30px; }

.contents-section h3 {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-red-hot);
  margin-bottom: 12px;
}

.contents-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contents-list li {
  font-size: 14px;
  color: var(--fg-ink);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}

.contents-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--fg-yellow);
  -webkit-text-stroke: 0.5px var(--fg-ink);
  font-size: 11px;
  top: 2px;
}

/* ── BUY BUTTON ──────────────────────────────────────────────────────────── */

.buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--fg-yellow);
  color: var(--fg-ink);
  padding: 18px 28px;
  border-radius: 10px;
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 7px 0 rgba(13, 13, 13, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.buy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 rgba(13, 13, 13, 0.24);
}
.buy-button:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(13, 13, 13, 0.22);
}

.no-amazon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 28px;
  border-radius: 10px;
  border: 3px dashed rgba(13, 13, 13, 0.30);
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-on-panel);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 4px solid var(--fg-yellow);
  margin-top: 40px;
  padding: 28px 48px;
  color: var(--fg-cream);
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand { color: var(--fg-yellow); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .product-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .product-gallery { position: static; }
}

@media (max-width: 640px) {
  .site-header, .page-intro, main, .product-page, .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .page-intro { padding-top: 32px; }
  .game-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-card { --tilt: 0deg !important; }
  .site-logo img { height: clamp(96px, 26vw, 130px); }
  .product-info { padding: 24px 22px; }
}

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .page-intro h1 .pop .d { animation: none; }
  .game-card, .card-image img { transition: none; }
  html { scroll-behavior: auto; }
}
