/* ── Peleya Design System ── */
:root {
  --onyx:     #1E1E20;
  --fire:     #FD6F49;
  --silver:   #EEEEEF;
  --frost:    #B8D6EE;
  --mulberry: #351B58;
  --true-blue:#003BFF;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--silver);
  background: var(--onyx);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--silver); text-decoration: none; }

/* ── Backgrounds ── */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 40%, transparent 75%);
  pointer-events: none;
}

.depth {
  position: fixed; pointer-events: none; z-index: 0;
  opacity: 0.06; width: clamp(320px, 42vw, 640px); height: auto;
}
.depth.tl {
  top: -8vw; left: -8vw; transform: rotate(-12deg);
  animation: depthDrift1 12s ease-in-out infinite;
}
.depth.br {
  bottom: -10vw; right: -10vw; transform: rotate(8deg); opacity: 0.05;
  animation: depthDrift2 15s ease-in-out infinite;
}
.depth.mr {
  top: 18vh; right: -14vw; width: clamp(260px, 30vw, 440px); transform: rotate(14deg); opacity: 0.04;
  animation: depthDrift3 18s ease-in-out infinite;
}
@keyframes depthDrift1 {
  0%, 100% { opacity: 0.06; transform: rotate(-12deg) scale(1) translate(0, 0); }
  50%      { opacity: 0.10; transform: rotate(-10deg) scale(1.03) translate(8px, 6px); }
}
@keyframes depthDrift2 {
  0%, 100% { opacity: 0.05; transform: rotate(8deg) scale(1) translate(0, 0); }
  50%      { opacity: 0.08; transform: rotate(6deg) scale(1.04) translate(-6px, -8px); }
}
@keyframes depthDrift3 {
  0%, 100% { opacity: 0.04; transform: rotate(14deg) scale(1) translate(0, 0); }
  50%      { opacity: 0.07; transform: rotate(12deg) scale(1.03) translate(-5px, 5px); }
}
@media (max-width: 720px) { .depth { display: none; } }

/* ── Layout ── */
.page {
  position: relative; z-index: 1;
  min-height: 100%; display: flex; flex-direction: column;
  padding: 32px clamp(20px, 5vw, 64px);
}

/* ── Header / Nav ── */
header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(238,238,239,0.65);
}
header .brand-mini {
  font-weight: 700; font-size: 14px; color: var(--silver);
  text-decoration: none; display: flex; align-items: center;
}
.nav-logo {
  height: 14px; width: auto; display: block;
}
header nav { display: flex; gap: 24px; }
header nav a {
  color: rgba(238,238,239,0.65); text-decoration: none;
  transition: color .2s;
}
header nav a:hover, header nav a.active { color: var(--fire); }

.status { display: inline-flex; align-items: center; gap: 8px; }
.status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fire);
  box-shadow: 0 0 0 0 rgba(253,111,73,0.6);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(253,111,73,0.55); }
  50%     { box-shadow: 0 0 0 8px rgba(253,111,73,0); }
}

@media (max-width: 600px) {
  header { flex-wrap: wrap; }
  .status { order: -1; width: 100%; justify-content: flex-end; font-size: 11px; }
}

/* ── Typography ── */
.eyebrow {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fire); margin: 0 0 20px;
}
h1 {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15;
  color: var(--silver); margin: 0 0 24px; max-width: 18ch;
}
/* Typewriter cursor */
h1.typewriter::after {
  content: '';
  display: inline-block;
  width: 3px; height: 1.05em;
  background: var(--fire);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.85s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
h2 {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(22px, 3vw, 32px); line-height: 1.2;
  color: var(--silver); margin: 0 0 20px;
}
h3 {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(16px, 2vw, 20px); line-height: 1.25;
  color: var(--silver); margin: 0 0 8px;
}
p.lede {
  font-size: clamp(16px, 1.6vw, 18px); line-height: 1.65;
  color: rgba(238,238,239,0.75); margin: 0 0 40px; max-width: 58ch;
}

/* ── Home main ── */
.home-main {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; max-width: 780px;
  margin: 0 auto; width: 100%; padding: 64px 0;
}
.wordmark {
  display: block; width: clamp(260px, 62vw, 640px);
  height: auto; margin: 0 0 44px;
}

/* ── Signup form ── */
form.signup {
  display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px;
}
form.signup label { position: absolute; left: -9999px; }
form.signup input[type="email"] {
  flex: 1 1 260px; min-width: 0; padding: 16px 18px;
  background: rgba(238,238,239,0.04);
  border: 1px solid rgba(238,238,239,0.18); border-radius: 6px;
  color: var(--silver); font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.02em;
  transition: border-color .2s ease, background .2s ease;
}
form.signup input[type="email"]::placeholder { color: rgba(238,238,239,0.4); }
form.signup input[type="email"]:focus {
  outline: none; border-color: var(--fire); background: rgba(253,111,73,0.06);
}
form.signup button {
  padding: 16px 24px; background: var(--fire); color: var(--onyx);
  border: 0; border-radius: 6px; font-family: var(--mono);
  font-weight: 700; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
form.signup button:hover { background: #FE8A68; transform: translateY(-1px); }
form.signup button:active { transform: translateY(0); }
.form-note {
  margin-top: 14px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; color: rgba(238,238,239,0.45);
}
.thanks {
  display: none; margin-top: 24px; padding: 18px 20px;
  border: 1px solid rgba(253,111,73,0.45); border-radius: 6px;
  background: rgba(253,111,73,0.08); font-family: var(--mono);
  font-size: 13px; color: var(--silver); max-width: 520px;
}
.thanks.show { display: block; }

/* ── Game cards (home) ── */
.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-top: 56px;
}
.game-card {
  --accent: var(--fire);
  display: flex; flex-direction: column;
  padding: 28px 24px; border-radius: 10px;
  background: rgba(238,238,239,0.03);
  border: 1px solid rgba(238,238,239,0.08);
  text-decoration: none; color: var(--silver);
  transition: border-color .25s, background .25s, transform .2s;
  position: relative;
}
.game-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 10px 10px 0 0;
  background: var(--accent); opacity: 0.6;
  transition: opacity .25s;
}
.game-card:hover {
  border-color: var(--accent);
  background: rgba(238,238,239,0.05);
  transform: translateY(-3px);
}
.game-card:hover::before { opacity: 1; }
.game-card-number {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--accent); opacity: 0.7; margin-bottom: 14px;
  letter-spacing: 0.06em;
}
.game-card h3 {
  font-size: 17px; margin: 0 0 8px;
  font-family: var(--mono); font-weight: 600;
}
.game-card p {
  font-size: 13px; color: rgba(238,238,239,0.55); margin: 0;
  flex: 1; line-height: 1.55;
}
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px;
}
.card-arrow {
  font-size: 18px; color: var(--accent); opacity: 0;
  transition: opacity .25s, transform .25s;
}
.game-card:hover .card-arrow { opacity: 1; transform: translateX(4px); }
.card-tag {
  display: inline-block; padding: 4px 10px; border-radius: 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; width: fit-content;
}
.card-tag.available {
  background: rgba(253,111,73,0.15); color: var(--fire);
}
.card-tag.soon {
  background: rgba(184,214,238,0.1); color: var(--frost);
}
.coming-soon-card {
  border-style: dashed; opacity: 0.6;
}
.coming-soon-card::before { opacity: 0.25; }

/* ── Dot strip (animated glow) ── */
.dot-strip {
  margin-top: 72px; padding-top: 36px;
  border-top: 1px solid rgba(238,238,239,0.1);
  display: flex; gap: clamp(18px, 4vw, 48px);
  align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.dot-strip img {
  display: block; height: clamp(56px, 7vw, 84px); width: auto;
  opacity: 0.35;
  filter: drop-shadow(0 0 0px rgba(253,111,73,0));
  transition: opacity .4s ease, transform .4s ease, filter .4s ease;
  animation: dotGlow 4s ease-in-out infinite;
}
/* Stagger glow across icons */
.dot-strip img:nth-child(1) { animation-delay: 0s; }
.dot-strip img:nth-child(2) { animation-delay: 0.5s; }
.dot-strip img:nth-child(3) { animation-delay: 1.0s; }
.dot-strip img:nth-child(4) { animation-delay: 1.5s; }
.dot-strip img:nth-child(5) { animation-delay: 2.0s; }
.dot-strip img:nth-child(6) { animation-delay: 2.5s; }
.dot-strip img:nth-child(7) { animation-delay: 3.0s; }
.dot-strip img:nth-child(8) { animation-delay: 3.5s; }

@keyframes dotGlow {
  0%, 100% {
    opacity: 0.25;
    filter: drop-shadow(0 0 0px rgba(253,111,73,0));
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 14px rgba(253,111,73,0.55)) drop-shadow(0 0 40px rgba(253,111,73,0.2));
    transform: scale(1.06);
  }
}
.dot-strip img:hover {
  opacity: 1 !important;
  filter: drop-shadow(0 0 18px rgba(253,111,73,0.7)) drop-shadow(0 0 50px rgba(253,111,73,0.3)) !important;
  transform: scale(1.12) translateY(-4px) !important;
}

/* ── Footer ── */
footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 32px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(238,238,239,0.65);
}
footer a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(238,238,239,0.25); }
footer a:hover { color: var(--fire); border-color: var(--fire); }
.footer-links { display: flex; gap: 20px; }

@media (max-width: 560px) {
  footer { flex-direction: column; align-items: flex-start; }
}

/* ── Interior page layout ── */
.interior-main {
  flex: 1; max-width: 780px; margin: 0 auto;
  width: 100%; padding: 80px 0 64px;
}
.interior-main p {
  font-size: clamp(15px, 1.5vw, 17px); line-height: 1.7;
  color: rgba(238,238,239,0.72); margin: 0 0 24px; max-width: 60ch;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(238,238,239,0.45); margin-bottom: 32px;
}
.breadcrumb a { color: rgba(238,238,239,0.55); border-bottom: 1px solid rgba(238,238,239,0.15); }
.breadcrumb a:hover { color: var(--fire); border-color: var(--fire); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ── Games grid page ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin-top: 40px;
}
.games-grid .game-card { padding: 32px; }
.games-grid .game-card-icon { width: 72px; height: 72px; margin-bottom: 20px; }
.games-grid .game-card h3 { font-size: 18px; }
.games-grid .game-card p { font-size: 14px; }

/* ── Rules page ── */
.rules-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; margin-bottom: 56px;
}
.rules-hero-text h1 { max-width: none; }
.rules-hero-image {
  position: relative; border-radius: 12px; overflow: hidden;
  background: rgba(238,238,239,0.03);
  border: 1px solid rgba(238,238,239,0.08);
  max-width: 240px;
}
.rules-hero-image img {
  width: 100%; height: auto; object-fit: contain;
}
@media (max-width: 700px) {
  .rules-hero { grid-template-columns: 1fr; }
  .rules-hero-image { max-width: 360px; }
}

.rules-section { margin-bottom: 48px; }
.rules-section h2 { margin-bottom: 16px; }

/* Point values grid */
.points-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin: 24px 0;
}
.point-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px; border-radius: 10px;
  background: rgba(238,238,239,0.03);
  border: 1px solid rgba(238,238,239,0.08);
  text-align: center;
}
.point-value {
  font-family: var(--mono); font-weight: 700;
  font-size: 36px; color: var(--fire); line-height: 1;
}
.point-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(238,238,239,0.5); margin-top: 8px;
}

/* Hole colour indicators */
.hole-color {
  width: 28px; height: 28px; border-radius: 50%;
  margin-bottom: 10px; border: 2px solid rgba(255,255,255,0.15);
}

.rules-list {
  list-style: none; padding: 0; margin: 0; counter-reset: step;
}
.rules-list li {
  counter-increment: step; position: relative;
  padding: 16px 0 16px 52px; border-bottom: 1px solid rgba(238,238,239,0.06);
  font-size: 15px; line-height: 1.65; color: rgba(238,238,239,0.72);
}
.rules-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 16px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--fire);
}

/* Tip/note callout */
.callout {
  padding: 20px 24px; border-radius: 8px; margin: 24px 0;
  background: rgba(253,111,73,0.06);
  border-left: 3px solid var(--fire);
  font-size: 14px; line-height: 1.6; color: rgba(238,238,239,0.75);
}
.callout strong { color: var(--fire); }

/* About page */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  margin-top: 40px;
}
.about-value {
  padding: 24px; border-radius: 10px;
  background: rgba(238,238,239,0.03);
  border: 1px solid rgba(238,238,239,0.08);
}
.about-value h3 { color: var(--fire); margin-bottom: 10px; }
.about-value p { font-size: 14px; color: rgba(238,238,239,0.65); margin: 0; }
@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ── Contact form ── */
.contact-form {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 560px;
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(238,238,239,0.5);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 14px 16px;
  background: rgba(238,238,239,0.04);
  border: 1px solid rgba(238,238,239,0.18); border-radius: 6px;
  color: var(--silver); font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.02em;
  transition: border-color .2s, background .2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(238,238,239,0.35); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--fire); background: rgba(253,111,73,0.06);
}
.contact-form textarea { resize: vertical; min-height: 120px; font-family: var(--sans); }
.contact-form button {
  align-self: flex-start;
  padding: 16px 28px; background: var(--fire); color: var(--onyx);
  border: 0; border-radius: 6px; font-family: var(--mono);
  font-weight: 700; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
  transition: transform .15s, background .2s;
}
.contact-form button:hover { background: #FE8A68; transform: translateY(-1px); }
.contact-form button:active { transform: translateY(0); }
.contact-thanks {
  display: none; margin-top: 24px; padding: 18px 20px;
  border: 1px solid rgba(253,111,73,0.45); border-radius: 6px;
  background: rgba(253,111,73,0.08); font-family: var(--mono);
  font-size: 13px; color: var(--silver); max-width: 560px;
}
.contact-thanks.show { display: block; }

/* ── QR code section ── */
.qr-section {
  margin-top: 48px; padding: 32px; border-radius: 12px;
  background: rgba(238,238,239,0.03);
  border: 1px solid rgba(238,238,239,0.08);
  text-align: center;
}
.qr-section img {
  width: 180px; height: 180px; margin: 16px auto;
  border-radius: 8px;
}
.qr-section p {
  margin: 12px auto 0; max-width: 40ch; text-align: center;
}
