/* Juicy Crush — landing styles
   Layout follows a familiar slot-review pattern: dark violet night, yellow pill CTAs,
   big bold headline, demo window inside the hero. Palette and typography are our own. */

:root {
  --bg: #0d0719;
  --bg-2: #1a0e2e;
  --panel: #231541;
  --panel-line: rgba(255, 255, 255, 0.10);
  --yellow: #ffe94a;
  --yellow-2: #ffd21f;
  --magenta: #ff5cd6;
  --text: #ffffff;
  --muted: #bfb4dc;
  --maxw: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(255, 92, 214, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(13, 7, 25, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-line);
}
.brand { flex: 0 0 auto; display: block; }
.brand img { height: 60px; width: auto; border-radius: 10px; box-shadow: 0 6px 18px -8px rgba(255,210,63,.4); }
.topnav { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.topnav a {
  color: #e6def7; text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.topnav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.topnav a.is-active { color: var(--magenta); background: rgba(255, 92, 214, .12); }
.topbar > .btn { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 13px 28px;
  border-radius: 999px; border: 0; cursor: pointer;
  font: 700 16px/1 var(--font); letter-spacing: .01em; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn::after {
  content: ""; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg);
  animation: shine 4s var(--ease) infinite;
}
.btn-primary {
  color: #1a1000;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-2));
  box-shadow: 0 10px 28px -10px rgba(255, 226, 40, .75);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(255, 226, 40, .9); color: #1a1000; }
.btn-ghost {
  color: var(--text); background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.22);
}
.btn-ghost:hover { background: rgba(255,255,255,.10); color: #fff; }
.btn-small { min-height: 40px; padding: 9px 20px; font-size: 14px; }

@keyframes shine { 0%, 65% { left: -75%; } 100% { left: 130%; } }

/* ---------- Hero: copy + demo ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(14px, 2.2vw, 28px) clamp(16px, 4vw, 40px) 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--panel-line);
}
h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.2vw, 62px); line-height: 1.06; font-weight: 800; letter-spacing: -.025em;
}
.lead { color: var(--text); font-size: 18px; margin: 0 0 14px; }
.hero-copy p { color: var(--muted); margin: 0 0 14px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.inline-cta { margin: 8px 0 28px; }

/* Demo window */
.demo-window {
  border-radius: 22px; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255, 92, 214, .08);
}
.demo-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(0,0,0,.28); border-bottom: 1px solid var(--panel-line);
  font-size: 14px; color: var(--muted);
}
.demo-badge {
  padding: 4px 10px; border-radius: 6px; background: var(--magenta); color: #1a0a18;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.demo-title { font-weight: 600; color: var(--text); flex: 1; }
.demo-fs {
  background: none; border: 1px solid rgba(255,255,255,.22); color: var(--text);
  border-radius: 8px; padding: 6px 12px; font: 600 12px var(--font); cursor: pointer;
}
/* The game never leaves this box */
.demo-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  overflow: hidden; background: #08040f; contain: layout paint;
}
.demo-stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.demo-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center;
  transition: opacity .35s var(--ease);
}
.poster-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
}
.poster-shade {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(13,7,25,.25), rgba(13,7,25,.75) 75%);
}
.play-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 14px 32px; border-radius: 999px; border: 0; cursor: pointer;
  color: #1a1000; font: 800 17px/1 var(--font);
  background: linear-gradient(180deg, var(--yellow), var(--yellow-2));
  box-shadow: 0 14px 40px -10px rgba(255, 226, 40, .8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  animation: pulse 2.6s var(--ease) infinite;
}
.play-btn:hover { transform: scale(1.04); }
.play-btn svg { flex: 0 0 auto; }
.poster-note { position: relative; z-index: 1; margin: 0; font-size: 13px; color: #e7e0f7; max-width: 340px; }
.demo-stage.is-playing .demo-poster { opacity: 0; pointer-events: none; }

@keyframes pulse {
  0%   { box-shadow: 0 14px 40px -10px rgba(255,226,40,.8), 0 0 0 0 rgba(255,233,74,.55); }
  70%  { box-shadow: 0 14px 40px -10px rgba(255,226,40,.8), 0 0 0 22px rgba(255,233,74,0); }
  100% { box-shadow: 0 14px 40px -10px rgba(255,226,40,.8), 0 0 0 0 rgba(255,233,74,0); }
}

/* ---------- Article ---------- */
.content {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 40px) 40px;
}
.content h2 {
  margin: 64px 0 18px; padding-top: 20px; position: relative;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.18; font-weight: 800; letter-spacing: -.015em;
}
.content h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 4px; border-radius: 4px;
  background: var(--yellow);
}
.content h3 {
  margin: 36px 0 12px; font-size: 20px; font-weight: 700; color: var(--yellow); letter-spacing: 0;
}
.content p { margin: 0 0 16px; color: #e6dff5; }

.content figure { margin: 28px 0 32px; }
.content figure img {
  width: 100%; border-radius: 16px; border: 1px solid var(--panel-line);
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.8);
}
.content figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Tables */
.table-wrap {
  margin: 22px 0 28px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 14px; border: 1px solid var(--panel-line); background: rgba(35, 21, 65, .6);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.07); }
th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--yellow);
  background: rgba(0,0,0,.25);
}
tr:last-child td { border-bottom: 0; }
td { color: #ece6f8; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }

/* Q&A */
.faq { margin-bottom: 18px; }
.faq strong { color: var(--yellow); font-weight: 700; }

/* Responsible gaming block */
.rg {
  margin: 44px 0 0; padding: 24px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,92,214,.12), rgba(255,233,74,.05));
  border: 1px solid rgba(255, 92, 214, .3);
}
.rg h3 { margin-top: 28px; }
.rg h3:first-child { margin-top: 0; }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 12px;
  border-radius: 50%; background: var(--magenta); color: #1a0a18; font-weight: 800; font-size: 18px;
}

/* ---------- Bottom CTA ---------- */
.final-cta {
  max-width: 820px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 64px; text-align: center;
}
.final-cta p { color: var(--muted); margin: 0 0 20px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--panel-line); padding: 28px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted); font-size: 13px; text-align: center;
}
footer p { margin: 6px 0; }
footer a { color: var(--muted); }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  opacity: 0; transform: translateY(150%); pointer-events: none;
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.mobile-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.mobile-cta .btn { width: 100%; box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); }
@media (min-width: 641px) { .mobile-cta { display: none; } }

/* ---------- Trust strip (before footer) ---------- */
.trust {
  max-width: var(--maxw); margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 28px;
}
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  margin: 0; padding: 18px 16px; border-radius: 18px;
  background: rgba(255,255,255,.03); border: 1px solid var(--panel-line);
}
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: #d9d0ee; letter-spacing: .01em;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s, color .2s;
}
.trust-item:hover { border-color: rgba(255, 233, 74, .45); color: #fff; }
.trust-ico { display: inline-flex; color: var(--magenta); }
.trust-18 {
  align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--magenta); color: #1a0a18; font-size: 11px; font-weight: 800;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .topbar > .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar { padding: 10px 14px; gap: 12px; }
  .brand img { height: 46px; }
  .topbar .btn-small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
  .lead { font-size: 16.5px; }
  .cta-row .btn { flex: 1 1 100%; }
  .demo-stage { aspect-ratio: 4 / 3; }
  .demo-fs { display: none; }
  .play-btn { min-height: 50px; padding: 12px 26px; font-size: 16px; }
  .content h2 { margin-top: 48px; }
  footer { padding-bottom: 96px; }
  .content { padding-bottom: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
