/* ==========================================================
   Topupkuy – style.css
   Mobile-first, no dependencies, system font stack.
   ========================================================== */

:root {
  --bg: #0b1020;
  --bg-2: #101833;
  --surface: #151d3a;
  --surface-2: #1c2547;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1ff;
  --text-2: #aab3d6;
  --purple: #7c5cff;
  --purple-2: #6a48ff;
  --cyan: #22d3ee;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(3, 6, 20, 0.45);
  --focus: 0 0 0 3px var(--bg), 0 0 0 6px var(--cyan);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
  --gutter: 20px;
  --header-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
[data-placeholder] { color: var(--text-2); font-style: italic; }

.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: 12px; top: -60px;
  background: var(--cyan); color: #06111a; padding: 10px 14px;
  border-radius: 8px; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}
.container-narrow { max-width: 820px; }

/* ---------- Type scale ---------- */
h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.18; letter-spacing: -0.015em; font-weight: 750; }
h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 650; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-2); max-width: 36ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; line-height: 1;
  cursor: pointer; text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 100%);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #8b6fff, var(--purple)); }
.btn-secondary { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.btn-secondary:hover { background: #24305a; }
.btn-ghost { color: var(--text); background: transparent; border-color: rgba(255,255,255,0.22); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-light { color: #1a1240; background: var(--white); }
.btn-light:hover { background: #eef1ff; }
.btn-lg { min-height: 54px; padding-inline: 28px; font-size: 1.05rem; }
.btn-sm { min-height: 44px; padding-inline: 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: transparent; border: 0; border-radius: 10px; cursor: pointer;
  position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  position: absolute; left: 13px; transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle-bar { top: 23px; }
.nav-toggle-bar::before { top: -7px; left: 0; }
.nav-toggle-bar::after { top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; gap: 2px; }
.site-nav a:not(.btn) {
  display: block; padding: 12px 8px; color: var(--text); font-weight: 550; border-radius: 8px;
}
.site-nav a:not(.btn):hover { background: var(--surface); text-decoration: none; }
.nav-cta { margin-top: 8px; }
.nav-cta .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 40px 0 44px;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(124, 92, 255, 0.28), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, rgba(34, 211, 238, 0.14), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; gap: 28px; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: 0.95rem; }
.trust-row li { display: flex; align-items: center; gap: 8px; }
.trust-row li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); flex: none;
}

.quick-topup {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.quick-title { font-weight: 700; font-size: 1.1rem; }
.quick-topup label { font-size: 0.9rem; color: var(--text-2); }
.quick-topup select {
  width: 100%; min-height: 50px; padding: 0 44px 0 14px;
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23aab3d6' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.quick-note { font-size: 0.85rem; color: var(--text-2); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-2); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 62ch; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.section-note { margin-top: 20px; font-size: 0.85rem; color: var(--text-2); }

/* Game grid */
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.game-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 18px 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.game-card img { width: 72px; height: 72px; border-radius: 18px; }
.game-card h3 { font-size: 1rem; margin-top: 6px; }
.game-card p { color: var(--text-2); font-size: 0.9rem; }
.game-card .btn { margin-top: 8px; width: 100%; }
.game-card.is-highlight { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25); }

/* Benefits */
.benefit-grid { display: grid; gap: 12px; }
.benefit {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px;
  padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.benefit-icon {
  grid-row: 1 / 3; width: 44px; height: 44px; padding: 10px;
  border-radius: 12px; background: rgba(124, 92, 255, 0.18);
  fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.benefit p { color: var(--text-2); font-size: 0.95rem; }

/* Steps */
.steps { display: grid; gap: 12px; counter-reset: step; }
.step {
  position: relative; padding: 18px 18px 18px 70px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.step-num {
  position: absolute; left: 18px; top: 18px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; font-weight: 800; color: #0b1020;
  background: linear-gradient(135deg, var(--cyan), #7c5cff);
}
.step p { color: var(--text-2); font-size: 0.95rem; margin-top: 4px; }
.steps-cta { margin-top: 24px; display: flex; justify-content: center; }

/* Trust */
.trust-grid { display: grid; gap: 12px; }
.trust-card {
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 10px;
}
.trust-card p { color: var(--text-2); font-size: 0.95rem; }
.contact-list, .link-list { display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.link-list a { font-weight: 550; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li {
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem;
  background: var(--surface-2); border: 1px solid var(--line);
}
.testimonial-placeholder {
  margin-top: 16px; padding: 20px;
  border: 1px dashed rgba(255,255,255,0.25); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 8px;
}

/* FAQ (native details/summary – works without JS) */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1rem; font-weight: 600; }
.faq-item summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg); transition: transform 200ms ease;
}
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-item p { padding: 0 18px 18px; color: var(--text-2); }

/* Final CTA */
.final-cta {
  text-align: center;
  background: linear-gradient(135deg, #5b3dff 0%, #7c5cff 55%, #1fb6d0 100%);
}
.final-cta .container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final-cta p { color: rgba(255,255,255,0.88); max-width: 46ch; font-size: 1.05rem; }
.final-cta .btn { margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #070b18; border-top: 1px solid var(--line); padding: 44px 0 0; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p { color: var(--text-2); font-size: 0.95rem; max-width: 34ch; }
.footer-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; }
.site-footer nav ul { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--text-2); font-size: 0.95rem; }
.site-footer nav a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 36px; padding: 18px var(--gutter) calc(18px + 76px);
  border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.85rem;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transition: transform 200ms ease;
}
.sticky-cta.is-hidden { transform: translateY(110%); }

/* ==========================================================
   Breakpoints
   ========================================================== */
@media (min-width: 480px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .section { padding: 72px 0; }
  .hero { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 40px; }
  .game-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-bottom { padding-bottom: 18px; }
  .sticky-cta { display: none; }
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: block; background: transparent; border: 0; padding: 0;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: 4px; }
  .site-nav a:not(.btn) { padding: 8px 14px; }
  .nav-cta { margin: 0 0 0 10px; }
  .nav-cta .btn { width: auto; min-height: 42px; }
  .hero { padding: 88px 0; }
  .benefit-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 64px 18px 20px; }
  .step-num { left: 18px; top: 18px; }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1400px) {
  :root { --container: 1240px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
