/* ============================================================
   REWND — Retro Console Gaming Club
   Neo-brutalist / retro pixel: hard offset shadows, era tags,
   pixel-staircase frames. All tokens live in :root.
   ============================================================ */

:root {
  /* palette */
  --bg-light: #fdf6e3;
  --bg-dark: #1d1a2b;
  --text-on-light: #1d1a2b;
  --text-on-dark: #fdf6e3;
  --accent-1: #ff5d73;
  --accent-2: #ffd23f;

  /* fonts */
  --font-display: "Silkscreen", "Courier New", monospace;
  --font-body: "Work Sans", system-ui, -apple-system, sans-serif;

  /* shape */
  --radius: 2px;
  --border: 2px solid currentColor;
  --shadow-hard: 4px 4px 0 var(--accent-2);
  --shadow-hard-1: 4px 4px 0 var(--accent-1);

  /* rhythm */
  --section-pad: 88px;
  --wrap: 1180px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg-light);
  color: var(--text-on-light);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.1; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- typography ---------- */
h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: 0.01em;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 36px);
  font-weight: 400;
}
h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
}
.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent-1);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

/* ---------- helpers ---------- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--accent-2); color: var(--text-on-light);
  padding: 10px 16px; border: var(--border); font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--accent-1);
  outline-offset: 2px;
}

/* ---------- sections ---------- */
.section { padding-block: var(--section-pad); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--light { background: var(--bg-light); color: var(--text-on-light); }

.section__head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section__head--left { text-align: left; margin-inline: 0; }
.section__sub { opacity: 0.85; margin-bottom: 0; }

/* ---------- era tags (motif) ---------- */
.era-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  background: var(--accent-2);
  color: var(--text-on-light);
  padding: 4px 10px;
  border: var(--border);
  transform: rotate(-3deg);
}
.era-tag--hero { color: var(--text-on-light); margin-bottom: 1rem; }
.reveal .era-tag { transform: rotate(-3deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  text-decoration: none;
  padding: 14px 22px;
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.btn--primary {
  background: var(--accent-1);
  color: var(--text-on-light);
  box-shadow: var(--shadow-hard);
}
.btn--ghost {
  background: transparent;
  color: inherit;
  box-shadow: 4px 4px 0 currentColor;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent-2); }
.btn--ghost:hover { box-shadow: 2px 2px 0 currentColor; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ============================================================
   NAV — nav-ticket-cta
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-bottom: 2px solid rgba(253, 246, 227, 0.25);
  transition: padding 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav__inner {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
  display: flex; align-items: center; gap: 20px;
  padding-block: 16px;
}
.nav.is-scrolled { box-shadow: 0 3px 0 rgba(255, 210, 63, 0.4); }
.nav.is-scrolled .nav__inner { padding-block: 9px; }
.nav__logo {
  font-family: var(--font-display);
  font-size: 20px;
  text-decoration: none;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-mark { flex: none; display: block; }
.nav__links {
  display: flex; gap: 20px; margin-left: auto;
  flex-wrap: wrap;
}
.nav__links a {
  text-decoration: none;
  font-weight: 500;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active { border-bottom-color: var(--accent-1); color: var(--accent-2); }

.nav__cta--ticket {
  position: relative;
  font-family: var(--font-display);
  font-size: 13px;
  text-decoration: none;
  background: var(--accent-2);
  color: var(--text-on-light);
  padding: 10px 16px 10px 22px;
  border: 2px solid var(--text-on-light);
  border-left: 2px dashed var(--text-on-light);
  clip-path: polygon(
    0 20%, 6% 20%, 6% 0, 100% 0, 100% 100%, 6% 100%, 6% 80%, 0 80%
  );
  transition: transform 0.12s var(--ease);
}
.nav__cta--ticket:hover { transform: translateY(-2px); }

/* ============================================================
   HERO — hero-stacked-devicemockup + Cartridge Shelf Pan
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-block: 96px 88px; }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__shelf {
  position: absolute; inset: -6%;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 93, 115, 0.10) 0 26px,
      rgba(255, 210, 63, 0.10) 26px 52px,
      rgba(253, 246, 227, 0.05) 52px 80px),
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.25) 0 78px,
      rgba(253, 246, 227, 0.06) 78px 84px);
  opacity: 0.5;
  transform-origin: center;
  animation: shelfPan 45s var(--ease) infinite alternate;
  will-change: transform;
}
@keyframes shelfPan {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.06) translate(-1.5%, -1%); }
}
.hero__dust { position: absolute; inset: 0; pointer-events: none; }
.hero__dust .pixel {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent-2);
  opacity: 0;
  bottom: -12px;
  animation: dustRise linear infinite;
  will-change: transform, opacity;
}
@keyframes dustRise {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { opacity: 0.7; }
  85%  { opacity: 0.4; }
  100% { transform: translateY(-90vh); opacity: 0; }
}

.hero__content {
  position: relative; z-index: 1;
  width: min(100% - 40px, 860px);
  margin-inline: auto;
  text-align: center;
}
.hero__title {
  min-height: 1.1em;
  text-shadow: 3px 3px 0 var(--accent-1);
}
.hero__title .caret {
  display: inline-block;
  width: 0.6em; height: 1em;
  background: var(--accent-2);
  margin-left: 4px;
  vertical-align: -0.12em;
  animation: caretBlink 0.5s steps(1) 0s 4 forwards;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.hero__slogan {
  font-family: var(--font-display);
  color: var(--accent-2);
  font-size: 15px;
  margin-bottom: 1.25rem;
}
.hero__lede { max-width: 620px; margin-inline: auto; opacity: 0.9; }
.hero__actions {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-block: 1.75rem 2.5rem;
}

/* device mockup with pixel-staircase frame (motif) */
.device-frame {
  position: relative;
  display: inline-block;
  padding: 12px;
  background: var(--bg-light);
  border: var(--border);
  color: var(--accent-1);
  border-radius: var(--radius);
  box-shadow:
    4px 4px 0 var(--accent-2),
    8px 8px 0 var(--accent-1),
    12px 12px 0 var(--bg-dark);
  max-width: 460px;
}
.hero__mockup { display: flex; justify-content: center; }
.device-frame__label {
  position: absolute; left: 12px; top: -16px;
  font-family: var(--font-display);
  font-size: 12px;
  background: var(--accent-1);
  color: var(--text-on-light);
  padding: 3px 9px;
  border: var(--border);
  transform: rotate(-2deg);
}
.device-frame--flat {
  box-shadow: 4px 4px 0 var(--accent-1);
  max-width: 100%;
}

/* ---------- CRT photo treatment ---------- */
.crt-photo {
  position: relative;
  filter: contrast(1.05);
  border: var(--border);
  border-radius: var(--radius);
  width: 100%; height: auto;
}
.card__photo, .device-frame, .split__media { position: relative; }
.crt-photo + .scan, .device-frame::after, .split__media::after, .card__photo::after {
  content: "";
  position: absolute; inset: 12px;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg, rgba(29, 26, 43, 0.04) 0 1px, transparent 1px 2px);
  opacity: 1;
  transition: opacity 0.2s var(--ease);
  border-radius: var(--radius);
}
.split__media::after, .card__photo::after { inset: 0; }
.device-frame:hover::after,
.card__photo:hover::after,
.split__media:hover::after { opacity: 1; background: repeating-linear-gradient(
    0deg, rgba(29, 26, 43, 0.08) 0 1px, transparent 1px 2px); }

/* ============================================================
   DIVIDERS — pixel staircase (motif), 12px tall
   ============================================================ */
.divider--stair {
  height: 12px;
  background-size: 12px 12px;
  background-repeat: repeat-x;
}
.divider--to-light {
  background-color: var(--bg-dark);
  background-image: linear-gradient(135deg, var(--bg-light) 25%, transparent 25%),
                    linear-gradient(-135deg, var(--bg-light) 25%, transparent 25%);
  background-position: 0 0;
}
.divider--to-dark {
  background-color: var(--bg-light);
  background-image: linear-gradient(135deg, var(--bg-dark) 25%, transparent 25%),
                    linear-gradient(-135deg, var(--bg-dark) 25%, transparent 25%);
}

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.grid { display: grid; gap: 24px; }
.grid--3up { grid-template-columns: repeat(3, 1fr); }
.grid--4up { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--bg-light);
  color: var(--text-on-light);
  border: var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  box-shadow: var(--shadow-hard);
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.section--dark .card { background: #262238; color: var(--text-on-dark); }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent-1); }

.card--era { padding-top: 34px; }
.card--era .era-tag { position: absolute; top: -14px; left: 18px; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  font-size: 22px;
  color: var(--accent-1);
  border: var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.card__photo { margin: 0 0 16px; display: block; }
.card__list { margin-top: 12px; }
.card__list li {
  padding-left: 18px; position: relative; margin-bottom: 6px; font-size: 0.95rem;
}
.card__list li::before {
  content: "▪"; position: absolute; left: 0; color: var(--accent-1);
}
.card--compact { padding: 22px 20px; }
.card--compact p { margin-bottom: 0; font-size: 0.95rem; }

/* ============================================================
   TIMELINE — game nights
   ============================================================ */
.timeline--horizontal {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.timeline__step {
  position: relative;
  background: #262238;
  border: var(--border);
  border-radius: var(--radius);
  padding: 30px 22px 24px;
  box-shadow: 4px 4px 0 var(--accent-1);
}
.timeline__num {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  width: 40px; height: 40px;
  background: var(--accent-2);
  color: var(--text-on-light);
  border: var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.timeline__step p { opacity: 0.9; }

/* lives bar — squares 8x8, fill on reveal */
.lives { display: flex; gap: 5px; margin-top: 14px; }
.lives .life {
  width: 8px; height: 8px;
  background: transparent;
  border: 2px solid var(--accent-2);
  opacity: 0.35;
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
}
.lives.is-filled .life { opacity: 1; background: var(--accent-2); }

/* ============================================================
   SPLIT (library zigzag)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split__text .rules { margin-top: 18px; }
.rules li {
  padding-left: 26px; position: relative; margin-bottom: 12px;
}
.rules li::before {
  content: "▚"; position: absolute; left: 0; top: 0;
  color: var(--accent-1); font-size: 14px;
}

/* ============================================================
   VISIT — hours
   ============================================================ */
.hours {
  margin-top: 3rem;
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: 4px 4px 0 var(--accent-2);
  background: #262238;
}
.hours__title { font-family: var(--font-display); font-size: 15px; margin-bottom: 16px; color: var(--accent-2); }
.hours__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.hours__list div { display: flex; flex-direction: column; gap: 2px; }
.hours__list dt { font-weight: 700; }
.hours__list dd { margin: 0; opacity: 0.9; }

/* ============================================================
   FORM — cta-form-card-floating
   ============================================================ */
.cta-form__card {
  background: var(--bg-light);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--accent-1);
  padding: clamp(24px, 4vw, 48px);
  max-width: 820px;
  margin-inline: auto;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-family: var(--font-display); font-size: 12px; }
.field input, .field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  background: #fff;
  color: var(--text-on-light);
  border: var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: var(--shadow-hard-1);
}
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__status { margin: 0; font-weight: 700; }
.form__status.success { color: #1a7a3c; }
.form__status.error { color: #b3261e; }
.section--dark .form__status.success { color: var(--accent-2); }
.section--dark .form__status.error { color: var(--accent-1); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   FOOTER — footer-newsletter-embed
   ============================================================ */
.footer { padding-block: 64px 28px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.8fr;
  gap: 40px;
}
.footer__logo { font-family: var(--font-display); font-size: 22px; color: var(--accent-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer__tag { font-family: var(--font-display); font-size: 12px; color: var(--accent-1); margin: 8px 0 18px; }
.footer__disclaimer {
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: inline-block;
  box-shadow: 4px 4px 0 var(--accent-2);
}
.footer__h { font-family: var(--font-display); font-size: 15px; margin-bottom: 12px; color: var(--accent-2); }
.footer__newsletter {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px;
}
.footer__newsletter input {
  flex: 1 1 200px;
  font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px;
  background: #fff; color: var(--text-on-light);
  border: var(--border); border-radius: var(--radius);
}
.footer__newsletter input:focus {
  outline: none; border-color: var(--accent-1); box-shadow: var(--shadow-hard-1);
}
.footer__nav { display: flex; flex-direction: column; gap: 8px; }
.footer__nav a { text-decoration: none; opacity: 0.9; width: max-content; border-bottom: 2px solid transparent; }
.footer__nav a:hover { border-bottom-color: var(--accent-1); color: var(--accent-2); }
.footer__bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 2px solid rgba(253, 246, 227, 0.2);
  font-size: 0.9rem; opacity: 0.85;
}

/* ============================================================
   RATES — pricing-3col-cards
   ============================================================ */
.pricing--3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.price-card { padding-top: 34px; }
.price-card .era-tag { position: absolute; top: -14px; left: 18px; }
.price-card__price {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  color: var(--accent-1);
  margin: 2px 0 14px;
}
.price-card__unit {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 6px;
}
.price-card--featured {
  box-shadow: 8px 8px 0 var(--accent-1);
  transform: translateY(-8px);
}
.price-card--featured:hover { transform: translate(-2px, -10px); box-shadow: 6px 6px 0 var(--accent-1); }

/* ---------- footer legal row ---------- */
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.footer__legal a { text-decoration: none; opacity: 0.9; border-bottom: 2px solid transparent; }
.footer__legal a:hover { border-bottom-color: var(--accent-1); color: var(--accent-2); }

/* ============================================================
   LEGAL PAGES — .legal
   ============================================================ */
.legal { padding-block: var(--section-pad); }
.legal .wrap { width: min(100% - 40px, 760px); }
.legal__head { margin-bottom: 2.5rem; }
.legal__updated { font-family: var(--font-display); font-size: 12px; color: var(--accent-1); }
.legal h2 {
  font-size: clamp(18px, 3vw, 26px);
  margin-top: 2.25rem;
}
.legal h3 { margin-top: 1.5rem; }
.legal p, .legal li { opacity: 0.95; }
.legal ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.legal ul li { padding-left: 20px; position: relative; margin-bottom: 8px; }
.legal ul li::before { content: "▪"; position: absolute; left: 0; color: var(--accent-1); }
.legal__back {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 13px;
  text-decoration: none;
  color: var(--accent-2);
  border-bottom: 2px solid var(--accent-1);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid--4up { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .nav__inner { flex-wrap: wrap; gap: 12px; }
  .nav__links { width: 100%; order: 3; margin-left: 0; justify-content: flex-start; gap: 16px; }
  .nav__cta--ticket { margin-left: auto; }
  .grid--3up, .timeline--horizontal, .pricing--3col { grid-template-columns: 1fr; }
  .price-card--featured { transform: none; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .hours__list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
}

/* ============================================================
   REDUCED MOTION — kill everything
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero__shelf { animation: none; transform: none; }
  .hero__dust { display: none; }
  .hero__title .caret { display: none; }
  .reveal { opacity: 1; transform: none; }
  .lives .life { opacity: 1; background: var(--accent-2); }
}
