/* =========================================================
   TopUpZone — Shared Stylesheet
   Reset, design tokens, layout primitives, header/footer,
   buttons and utilities shared across every page.
   ========================================================= */

/* ---------- Self-hosted type ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/inter-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/sora-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/sora-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/sora-800.woff2') format('woff2');
}

:root {
  /* Colors */
  --navy-950: #070c17;
  --navy-900: #0b1220;
  --navy-800: #101a2e;
  --navy-700: #16223b;
  --navy-600: #223255;

  --blue-500: #2f6fed;
  --blue-400: #4f8bff;
  --cyan-400: #22d3ee;

  --gold-500: #f5a623;
  --gold-400: #ffbf4d;

  --ink-900: #101728;
  --ink-700: #33405a;
  --ink-500: #5b6a86;
  --ink-300: #97a3ba;

  --surface-0: #ffffff;
  --surface-50: #f6f8fc;
  --surface-100: #eef1f8;
  --border-100: #e2e7f0;

  --success-500: #1fa970;

  /* Typography */
  --font-base: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;

  /* Layout */
  --container-max: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(16, 23, 40, 0.06);
  --shadow-md: 0 12px 30px rgba(16, 23, 40, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, 0.18);
  --shadow-glow: 0 16px 40px rgba(47, 111, 237, 0.22);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --header-h: 104px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-base);
  color: var(--ink-900);
  background: var(--surface-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.015em;
}

:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(47, 111, 237, 0.22);
  color: var(--navy-950);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 999;
  background: var(--surface-0);
  color: var(--navy-900);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-400));
  transition: width 0.08s linear;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 80px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: rgba(47, 111, 237, 0.09);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  color: var(--navy-900);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--ink-500);
  font-size: 16px;
  max-width: 480px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center p {
  margin-inline: auto;
}

.text-accent {
  color: var(--blue-500);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  will-change: transform;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.28);
}

.btn-primary:hover {
  background: var(--gold-400);
  box-shadow: 0 14px 30px rgba(245, 166, 35, 0.36);
}

.btn-outline {
  background: transparent;
  color: var(--surface-0);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.btn-dark {
  background: var(--navy-900);
  color: var(--surface-0);
}

.btn-dark:hover {
  background: var(--navy-700);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13.5px;
}

/* =========================================================
   Top utility bar (Nav 1)
   ========================================================= */
.topbar {
  background: var(--navy-950);
  color: var(--ink-300);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.topbar-info {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success-500);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(31, 169, 112, 0.18);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(31, 169, 112, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(31, 169, 112, 0.1); }
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-links a {
  color: var(--ink-300);
  transition: color 0.15s ease;
}

.topbar-links a:hover {
  color: var(--surface-0);
}

/* =========================================================
   Main navigation (Nav 2)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(3, 7, 18, 0.35);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-menu a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--surface-0);
}

.nav-menu a:hover::after,
.nav-menu a.is-active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--surface-0);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   Back to top
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--surface-0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.15s ease;
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--blue-500);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   Toast notification
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  background: var(--navy-950);
  color: var(--surface-0);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success-500);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy-950);
  color: var(--ink-300);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand img {
  height: 28px;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--ink-300);
  max-width: 300px;
  margin-bottom: 18px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.footer-social img {
  width: 16px;
  height: 16px;
}

.footer-col h4 {
  font-family: var(--font-display);
  color: var(--surface-0);
  font-size: 14.5px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--ink-300);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--surface-0);
}

.footer-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-300);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-copy-btn:hover {
  color: var(--surface-0);
  border-color: rgba(255, 255, 255, 0.4);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
  font-size: 13px;
  color: var(--ink-300);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-payments {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-payments img {
  height: 20px;
}

/* =========================================================
   Scroll reveal (shared)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 36px;
  }
}

@media (max-width: 860px) {
  .topbar-links span:nth-child(3) {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 18px;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    padding: 12px 10px;
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-actions .btn-outline {
    display: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: 56px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
