:root {
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --navy: #0b1f3a;
  --navy-2: #123056;
  --white: #ffffff;
  --bg: #f5f7fa;
  --ok: #067647;
  --warn: #b54708;
  --danger: #b42318;
  --font: "Figtree", system-ui, sans-serif;
  --display: "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

body.modal-open {
  overflow: hidden;
}

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

.page-width {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  justify-self: start;
  flex-shrink: 0;
  min-width: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #facc15 0 35%, transparent 36%),
    linear-gradient(135deg, #1d4ed8, #0ea5e9);
  box-shadow: inset 0 0 0 2px #fff;
}

.logo-text {
  font-size: 1.05rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  justify-self: center;
  grid-column: 2;
}

.topnav a:hover {
  color: #1d4ed8;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

body.nav-open .nav-toggle-bars {
  background: transparent;
}

body.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* —— Home hero (Express-style) —— */
.page-home {
  background: #000;
}

.page-home .site-footer {
  color: #d1d5db;
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-full {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(11, 31, 58, 0.35), rgba(0, 0, 0, 0.25)),
    url("https://images.unsplash.com/photo-1573164713714-d95e436ab8d6?auto=format&fit=crop&w=1800&q=80")
      center / cover no-repeat;
  transform: scale(1.02);
  animation: kenburns 18s ease-in-out infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2rem));
  padding: 2.5rem 0 3.5rem;
}

.hero-brand {
  margin: 0 0 1.5rem;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  animation: rise 700ms ease both;
}

.provider-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  animation: rise 850ms ease both;
}

.provider-card {
  background: #fff;
  border-radius: 6px;
  min-height: 420px;
  padding: 2.75rem 1.75rem 2.25rem;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 200ms ease;
}

.provider-card:hover {
  transform: translateY(-4px);
}

.provider-card h2 {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}

.provider-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 16ch;
  flex: 1;
  display: flex;
  align-items: center;
}

.provider-logo {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
}

.provider-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-mtn {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #ffcc00;
  padding: 8px;
}

.logo-at {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

.logo-telecel {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: transparent;
}

.btn-buy-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-width: 160px;
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  border: 1.5px solid #111;
  background: #fff;
  color: #111;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.btn-buy-outline:hover {
  background: #111;
  color: #fff;
}

/* —— Network packages —— */
.network-page {
  padding: 2rem 0 3rem;
}

.network-title {
  margin: 0.5rem 0 1.5rem;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
}

.network-note {
  max-width: 40rem;
  margin: -0.75rem auto 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.category-title {
  margin: 1.75rem 0 0.85rem;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.package-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 220px;
  padding: 2rem 1.25rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.package-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.pkg-size {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pkg-price {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
}

.btn-buy,
.btn-pay {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-buy {
  width: 100%;
  margin-top: auto;
  padding: 0.95rem;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  transition: background 180ms ease;
}

.btn-buy:hover {
  background: var(--navy-2);
}

/* —— Checkout modal —— */
.modal-root[hidden] {
  display: none !important;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: rise 220ms ease both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.checkout-form {
  display: grid;
  gap: 0.9rem;
}

.checkout-summary {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.checkout-row strong {
  color: var(--ink);
  font-weight: 700;
}

.checkout-total {
  margin-top: 0.2rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-weight: 700;
}

.checkout-fee-note {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--warn);
  line-height: 1.4;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span,
.check-field {
  font-weight: 600;
  font-size: 0.95rem;
}

.field-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.8rem 0.85rem;
  font: inherit;
}

.field-input:focus {
  outline: 2px solid rgba(18, 48, 86, 0.25);
  border-color: var(--navy);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 500;
}

.btn-pay {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
}

.btn-pay:hover {
  background: var(--navy-2);
}

.verify-block {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
  margin-top: 0.15rem;
}

.verify-block.is-priority {
  padding: 0.85rem;
  border: 1px solid #fec84b;
  border-radius: 8px;
  background: #fffaeb;
  border-top: 1px solid #fec84b;
}

.modal-alert {
  padding: 0.85rem 0.95rem;
  border-radius: 8px;
  background: #fee4e2;
  border: 1px solid #fecdca;
  color: #b42318;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
}

.modal-alert p {
  margin: 0;
}

.modal-alert.is-hidden,
.modal-alert[hidden] {
  display: none !important;
}

.verify-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.btn-verify {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  border: 1.5px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.btn-verify:hover {
  background: var(--navy);
  color: #fff;
}

/* —— Success —— */
.success-page {
  padding: 3rem 0;
  display: grid;
  place-items: center;
}

.success-panel {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
}

.success-panel h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.help {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.detail-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.5rem;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.status {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eef2f7;
}

.status-completed,
.status-pending,
.status-processing {
  background: #dcfae6;
  color: var(--ok);
}

.status-failed,
.status-cancelled {
  background: #fee4e2;
  color: var(--danger);
}

.status-awaiting_payment {
  background: #fef0c7;
  color: var(--warn);
}

.flash-stack {
  padding-top: 0.75rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #e8f0fe;
  margin-bottom: 0.5rem;
}

.flash-success {
  background: #dcfae6;
}

.flash-error {
  background: #fee4e2;
}

.flash-warning {
  background: #fef0c7;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes kenburns {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .provider-cards,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .provider-card {
    min-height: 360px;
  }

  .package-card {
    min-height: 200px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.7rem 1rem;
  }

  .logo {
    justify-self: start;
    grid-column: 1;
    grid-row: 1;
  }

  .logo-text {
    font-size: 0.98rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topnav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    justify-self: stretch;
    padding: 0.35rem 0 0.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
  }

  body.nav-open .topnav {
    display: flex;
  }

  .topnav a {
    white-space: normal;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .topnav a:last-child {
    border-bottom: 0;
  }

  .hero-full {
    min-height: auto;
    padding: 2rem 0;
  }
}
