:root {
  --brand: hsl(217 91% 60%);
  --brand-dark: hsl(217 91% 45%);
  --bg: #ffffff;
  --fg: #0b1220;
  --muted: #6b7280;
  --muted-bg: #f5f7fa;
  --border: #e5e7eb;
  --card: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; position: relative; }
.container.narrow { max-width: 960px; }
.container.center { text-align: center; }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

/* Header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 30; }
.header-inner {
  max-width: 1152px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
@media (min-width: 640px) { .header-inner { padding: 20px 24px; } }
@media (min-width: 1024px) { .header-inner { padding: 24px 48px; } }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.logo span { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 640px) { .logo img { width: 36px; height: 36px; } .logo span { font-size: 18px; } }
.header-right { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  appearance: none; background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: 6px 28px 6px 12px; font-size: 12px; font-weight: 500;
  backdrop-filter: blur(8px); cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center;
}
.lang-switch option { color: #0b1220; background: #fff; }

/* Buttons */
.btn-pill-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--brand-dark);
  padding: 14px 28px; border-radius: 999px;
  font-weight: 600; font-size: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: background .2s;
}
.btn-pill-primary:hover { background: rgba(255,255,255,.9); }
.btn-pill-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1);
  color: #fff; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; backdrop-filter: blur(8px);
  transition: background .2s;
}
.btn-pill-ghost:hover { background: rgba(255,255,255,.2); }
@media (min-width: 640px) { .btn-pill-ghost { padding: 8px 16px; font-size: 14px; } }
.btn-pill-ghost-lg {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1);
  color: #fff; padding: 14px 28px; border-radius: 999px;
  font-weight: 500; font-size: 16px; backdrop-filter: blur(4px);
  transition: background .2s;
}
.btn-pill-ghost-lg:hover { background: rgba(255,255,255,.2); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand); color: #fff;
  padding: 96px 0 64px;
}
@media (min-width: 640px) { .hero { padding-top: 112px; } }
@media (min-width: 1024px) { .hero { padding: 128px 0 96px; } }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(255,255,255,.18), transparent 60%);
}
.hero-copy { max-width: 768px; margin: 0 auto; text-align: center; position: relative; }
.hero-copy h1 {
  font-size: clamp(36px, 6vw, 60px); font-weight: 700;
  line-height: 1.05;
}
.hero-copy > p {
  margin: 24px auto 0; max-width: 576px;
  font-size: clamp(18px, 2vw, 20px); color: rgba(255,255,255,.85);
}
.hero-ctas {
  margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
@media (min-width: 640px) { .hero-ctas { flex-direction: row; justify-content: center; } }
.hero-note { margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.7); text-align: center; }

/* Showcase */
.showcase { margin-top: 56px; }
.showcase + .showcase { margin-top: 80px; }
.showcase-head { display: flex; justify-content: center; margin-bottom: 24px; }
.showcase-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(8px);
}
.showcase-chip-light {
  background: rgba(255,255,255,.95); color: #0b1220;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.showcase-chip-dark {
  background: rgba(15, 23, 42, .85); color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* Slider */
.slider-wrap { position: relative; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  background: rgba(255,255,255,.9); color: var(--brand-dark);
  width: 40px; height: 40px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  transition: background .2s;
}
.slider-btn:hover { background: #fff; }
.slider-prev { left: 8px; }
.slider-next { right: 8px; }
@media (min-width: 640px) { .slider-btn { display: flex; } }
.slider-fade {
  position: absolute; top: 0; bottom: 0; z-index: 10; width: 40px;
  pointer-events: none;
}
@media (min-width: 640px) { .slider-fade { width: 64px; } }
.slider-fade-l { left: 0; background: linear-gradient(to right, var(--brand), transparent); }
.slider-fade-r { right: 0; background: linear-gradient(to left, var(--brand), transparent); }

.slider {
  list-style: none; margin: 0;
  /* Center first/last slide regardless of viewport using calc */
  padding: 16px calc(50% - 110px) 32px;
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.slider::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
  .slider { gap: 28px; padding: 16px calc(50% - 140px) 32px; }
}
@media (min-width: 1024px) {
  .slider { gap: 36px; padding: 16px calc(50% - 150px) 32px; }
}
.slider > li {
  flex: none; scroll-snap-align: center; cursor: pointer;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .55s ease, filter .55s ease;
  transform: scale(.85); opacity: .45; filter: blur(.4px);
}
.slider > li.active { transform: scale(1); opacity: 1; filter: none; }

.phone {
  width: 220px; padding: 4px; border-radius: 32px;
  position: relative;
}
@media (min-width: 640px) { .phone { width: 280px; padding: 5px; border-radius: 36px; } }
@media (min-width: 1024px) { .phone { width: 300px; } }

.phone img {
  width: 100%; display: block; border-radius: 28px;
  height: auto; object-fit: contain; background: transparent;
}
@media (min-width: 640px) { .phone img { border-radius: 32px; } }

/* Light bezel */
.phone-light {
  background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow:
    0 30px 60px -20px rgba(15, 23, 42, .35),
    0 0 0 1px rgba(255,255,255,.6) inset;
}

/* Dark bezel */
.phone-dark {
  background: linear-gradient(160deg, #1e293b 0%, #0b1220 100%);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.08) inset;
}

.dots {
  margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; padding: 0 16px;
}
.dots button {
  height: 6px; border-radius: 999px; transition: all .3s;
  width: 6px; background: rgba(255,255,255,.4); border: none; padding: 0; cursor: pointer;
}
.dots button:hover { background: rgba(255,255,255,.6); }
.dots button.active { width: 24px; background: #fff; }

/* Game demo */
.game-demo {
  padding: 80px 0; background: rgba(245,247,250,.5);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .game-demo { padding: 112px 0; } }
.section-head { max-width: 640px; margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 36px); font-weight: 700; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 16px; }
@media (min-width: 640px) { .section-head p { font-size: 18px; } }
.game-grid {
  margin-top: 56px; display: grid; grid-template-columns: 1fr; gap: 48px;
  place-items: center;
}
@media (min-width: 640px) { .game-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.game-card { display: flex; flex-direction: column; align-items: center; }
.game-card .phone { width: 280px; }
@media (min-width: 640px) { .game-card .phone { width: 300px; } }
@media (min-width: 1024px) { .game-card .phone { width: 320px; } }
.game-card p { margin-top: 24px; font-size: 14px; font-weight: 500; }

/* Game showcases (Flap & Tower) */
.game-showcases {
  margin-top: 56px;
  display: flex; flex-direction: column; gap: 80px;
}
.game-showcase {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  align-items: center;
  padding: 32px 20px;
  border-radius: 28px;
  position: relative; overflow: hidden;
}
.game-showcase-flap {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 60%, #ffffff 100%);
  border: 1px solid rgba(59,130,246,.18);
  box-shadow: 0 30px 60px -30px rgba(59,130,246,.35);
}
.game-showcase-tower {
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 60%, #ffffff 100%);
  border: 1px solid rgba(139,92,246,.18);
  box-shadow: 0 30px 60px -30px rgba(139,92,246,.35);
}
@media (min-width: 900px) {
  .game-showcase { grid-template-columns: 1fr 1.2fr; gap: 24px; padding: 48px; }
  .game-showcase-tower { grid-template-columns: 1.2fr 1fr; }
}
.game-showcase-info { padding: 8px 4px; }
.game-tag {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(59,130,246,.12); color: var(--brand-dark);
  margin-bottom: 16px;
}
.game-tag-purple {
  background: rgba(139,92,246,.14); color: #6d28d9;
}
.game-showcase-info h3 {
  font-size: clamp(22px, 2.6vw, 30px); font-weight: 700;
  color: var(--fg); margin-bottom: 12px;
}
.game-showcase-info p {
  color: var(--muted); font-size: 15px; line-height: 1.6;
  max-width: 420px;
}
@media (min-width: 900px) {
  .game-showcase-info p { font-size: 16px; }
}

/* Phone fan: 3 phones, center forward, side phones tilted */
.phone-fan {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 380px;
  perspective: 1200px;
}
.phone-fan .phone {
  width: 150px; padding: 3px; border-radius: 22px;
  position: absolute;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.phone-fan .phone img {
  border-radius: 20px; height: auto; object-fit: contain;
}
/* Black bezel for game phones */
.phone-fan .phone {
  background: #000 !important;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.phone-fan .fan-center {
  z-index: 3;
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 30px 60px -20px rgba(15,23,42,.4);
}
.phone-fan .fan-left {
  z-index: 2;
  transform: translate(-90px, 12px) rotate(-12deg) scale(.92);
  filter: brightness(.96);
}
.phone-fan .fan-right {
  z-index: 2;
  transform: translate(90px, 12px) rotate(12deg) scale(.92);
  filter: brightness(.96);
}
.game-showcase:hover .phone-fan .fan-left {
  transform: translate(-110px, 8px) rotate(-15deg) scale(.94);
}
.game-showcase:hover .phone-fan .fan-right {
  transform: translate(110px, 8px) rotate(15deg) scale(.94);
}
.game-showcase:hover .phone-fan .fan-center {
  transform: translateY(-16px) scale(1.07);
}
@media (min-width: 640px) {
  .phone-fan { min-height: 460px; }
  .phone-fan .phone { width: 180px; }
  .phone-fan .fan-left  { transform: translate(-110px, 14px) rotate(-12deg) scale(.92); }
  .phone-fan .fan-right { transform: translate(110px, 14px) rotate(12deg) scale(.92); }
}
@media (min-width: 900px) {
  .phone-fan { min-height: 500px; }
  .phone-fan .phone { width: 200px; }
  .phone-fan .fan-left  { transform: translate(-130px, 16px) rotate(-12deg) scale(.92); }
  .phone-fan .fan-right { transform: translate(130px, 16px) rotate(12deg) scale(.92); }
}

/* Features */
.features { padding: 80px 0; }
@media (min-width: 1024px) { .features { padding: 112px 0; } }
.features h2 {
  max-width: 640px; margin: 0 auto; text-align: center;
  font-size: clamp(28px, 3.5vw, 36px); font-weight: 700;
}
.features-grid {
  margin-top: 56px; display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: 1fr 1fr; } }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(59,130,246,.1); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-card h3 { margin-top: 20px; font-size: 18px; font-weight: 600; }
.feature-card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Final CTA */
.final-cta {
  position: relative; overflow: hidden;
  background: var(--brand); color: #fff;
  padding: 128px 0 96px; text-align: center;
}
@media (min-width: 1024px) { .final-cta { padding: 160px 0 128px; } }
.final-cta h2 { font-size: clamp(28px, 3.5vw, 36px); font-weight: 700; }
.final-cta p { margin: 16px auto 0; max-width: 480px; color: rgba(255,255,255,.85); }
.final-cta a { margin-top: 32px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0; text-align: center;
  font-size: 12px; color: var(--muted);
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}
.footer-contact { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); transition: color .15s;
}
.footer-link:hover { color: var(--brand-dark); }

/* Contact dropdown in header */
.contact-menu { position: relative; }
.contact-toggle { cursor: pointer; }
.contact-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  padding: 6px; z-index: 50;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.contact-dropdown[hidden] { display: none; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 13px; color: var(--fg);
  transition: background .15s;
}
.contact-item:hover { background: var(--muted-bg); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp .5s ease forwards;
}
.fade-up.in-view {
  animation: fadeUp .5s ease forwards;
}
/* For sections that should animate on scroll, start hidden until JS adds .in-view */
.feature-card.fade-up,
.game-card.fade-up { animation: none; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.feature-card.fade-up.in-view,
.game-card.fade-up.in-view { opacity: 1; transform: none; }