/* ============================================
   ussdbet.africa — Global Styles
   Light foundation. Retro-terminal accents.
   90s protocol wrapped in 2026 design.
   ============================================ */

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

:root {
  --phosphor: #00A855;
  --phosphor-light: #E8F8F0;
  --phosphor-glow: rgba(0, 168, 85, 0.08);
  --amber: #E5940C;
  --amber-light: #FFF8EB;
  --terminal-bg: #0A0F0A;
  --terminal-text: #00D26A;
  --bg: #FAFAFA;
  --bg-alt: #F2F4F3;
  --surface: #FFFFFF;
  --border: #E2E5E3;
  --border-dark: #CBD0CC;
  --text: #1A1F1C;
  --text-muted: #5A6560;
  --text-dim: #8A938D;
  --red: #D93025;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--phosphor); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--amber); }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
.eyebrow { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phosphor); margin-bottom: 0.5rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header .logo { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--text); }
.site-header .logo span { color: var(--phosphor); }
.site-header .logo .tld { color: var(--text-dim); font-weight: 400; }
.site-header nav { display: flex; align-items: center; gap: 1.75rem; }
.site-header nav a { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
.site-header nav a:hover { color: var(--phosphor); }
.nav-cta { font-size: 0.78rem !important; font-weight: 600 !important; color: #fff !important; background: var(--phosphor); padding: 0.5rem 1.15rem; border-radius: var(--radius-sm); transition: background 0.15s, transform 0.1s; }
.nav-cta:hover { background: var(--amber); color: #fff !important; transform: translateY(-1px); }

/* Hero */
.hero { padding: 5rem 0 4rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 .highlight { color: var(--phosphor); }
.hero .subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; margin-bottom: 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.hero-stat { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; text-align: center; }
.hero-stat .val { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--phosphor); display: block; }
.hero-stat .lbl { font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.15rem; display: block; }

/* USSD Phone Mockup */
.ussd-phone { background: var(--terminal-bg); border: 3px solid #2A2F2A; border-radius: 16px; padding: 1.5rem 1.25rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; color: var(--terminal-text); box-shadow: 0 0 40px rgba(0,168,85,0.06), var(--shadow-lg); position: relative; overflow: hidden; }
.ussd-phone::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,210,106,0.02) 2px, rgba(0,210,106,0.02) 4px); pointer-events: none; }
.ussd-phone .screen-top { display: flex; justify-content: space-between; font-size: 0.6rem; color: #4A6A4A; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #1A251A; }
.ussd-phone .menu-item { padding: 0.1rem 0; position: relative; z-index: 1; }
.ussd-phone .prompt { color: #FFB800; margin-top: 0.5rem; position: relative; z-index: 1; }
.ussd-phone .cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0.4rem 0 0.75rem; }
.section-head p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* Content */
.content-block { max-width: 780px; margin-bottom: 2rem; }
.content-block h3 { margin: 2rem 0 0.5rem; }
.content-block h4 { margin: 1.5rem 0 0.4rem; color: var(--phosphor); font-family: var(--mono); font-size: 0.88rem; }
.content-block p, .content-block li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }
.content-block ul, .content-block ol { padding-left: 1.2rem; margin: 0.5rem 0; }
.content-block li { margin-bottom: 0.35rem; }
.content-block strong { color: var(--text); }
.content-block a { color: var(--phosphor); text-decoration: underline; }
.content-block code { font-family: var(--mono); font-size: 0.78rem; background: var(--terminal-bg); color: var(--terminal-text); padding: 0.2rem 0.5rem; border-radius: 4px; }

/* Tables */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
thead { background: var(--terminal-bg); }
th { padding: 0.7rem 0.85rem; text-align: left; font-family: var(--mono); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terminal-text); white-space: nowrap; }
td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-muted); line-height: 1.5; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--bg-alt); }
tbody tr:hover { background: var(--phosphor-light); }
td strong { color: var(--text); }

/* Callouts */
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--phosphor); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
.callout.warning { border-left-color: var(--red); }
.callout.amber { border-left-color: var(--amber); background: var(--amber-light); }
.callout p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.callout strong { color: var(--text); }
.callout .callout-label { font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.35rem; color: var(--phosphor); }
.callout.warning .callout-label { color: var(--red); }
.callout.amber .callout-label { color: var(--amber); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; padding: 0.7rem 1.5rem; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.btn-primary { background: var(--phosphor); color: #fff; }
.btn-primary:hover { background: #008A47; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,168,85,0.25); }
.btn-outline { background: transparent; color: var(--phosphor); border: 1.5px solid var(--phosphor); }
.btn-outline:hover { background: var(--phosphor-light); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.card:hover { border-color: var(--phosphor); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .card-eyebrow { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phosphor); margin-bottom: 0.5rem; }
.card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.article-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s; }
.article-card:hover { border-color: var(--phosphor); transform: translateY(-2px); box-shadow: var(--shadow); }
.article-card .card-eyebrow { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phosphor); margin-bottom: 0.5rem; }
.article-card h3 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--text); }
.article-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.75rem; }
.article-card .read-more { font-family: var(--mono); font-size: 0.72rem; color: var(--phosphor); font-weight: 600; }

/* CTA Block */
.cta-block { background: var(--terminal-bg); border-radius: var(--radius); padding: 3rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-block::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,210,106,0.015) 2px, rgba(0,210,106,0.015) 4px); pointer-events: none; }
.cta-block h3 { color: var(--terminal-text); font-family: var(--mono); font-size: 1.15rem; margin-bottom: 0.4rem; position: relative; z-index: 1; }
.cta-block p { color: #8A9A8A; font-size: 0.88rem; margin: 0; max-width: 520px; position: relative; z-index: 1; }
.cta-block .btn { position: relative; z-index: 1; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-info h2 { margin: 0.4rem 0 0.75rem; }
.contact-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 0.75rem; font-size: 0.85rem; }
.contact-list .label { display: block; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.15rem; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.contact-form label { display: flex; flex-direction: column; font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; gap: 0.3rem; }
.contact-form input, .contact-form textarea, .contact-form select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.85rem; font-size: 0.85rem; font-family: var(--sans); background: var(--bg); color: var(--text); transition: border-color 0.15s; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: var(--phosphor); box-shadow: 0 0 0 3px var(--phosphor-glow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-feedback { font-size: 0.82rem; color: var(--phosphor); margin-top: 0.5rem; }

/* Footer */
.site-footer { background: var(--terminal-bg); padding: 3rem 0; text-align: center; color: #6A7A6A; }
.site-footer .footer-logo { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--terminal-text); margin-bottom: 0.5rem; }
.site-footer .footer-logo .tld { color: #4A5A4A; font-weight: 400; }
.site-footer p { font-size: 0.75rem; max-width: 500px; margin: 0 auto; }
.site-footer a { color: #8A9A8A; text-decoration: underline; }
.site-footer a:hover { color: var(--terminal-text); }

/* ─── USSD Simulator Phone (Android-authentic style) ─── */
.phone-frame {
  width: 280px;
  background: #222;
  border-radius: 32px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
  animation: phone-float 3s ease-in-out infinite;
}
.phone-frame:hover { animation: none; }
@keyframes phone-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Status bar — Android style */
.phone-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 6px;
  font-size: 0.58rem;
  color: #fff;
  font-family: var(--sans);
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
  border-radius: 24px 24px 0 0;
}
.phone-signal { letter-spacing: -1px; font-size: 0.55rem; }
.phone-carrier { font-weight: 600; font-size: 0.6rem; }
.phone-battery { width: 18px; height: 9px; border: 1.5px solid rgba(255,255,255,0.7); border-radius: 2px; padding: 1px; position: relative; }
.phone-battery::after { content: ''; position: absolute; right: -3px; top: 2px; width: 2px; height: 3px; background: rgba(255,255,255,0.7); border-radius: 0 1px 1px 0; }
.phone-battery-inner { width: 70%; height: 100%; background: var(--phosphor); border-radius: 1px; }

/* Wallpaper area — simulates Android homescreen behind dialog */
.phone-screen {
  background: linear-gradient(160deg, #1a3a5c 0%, #0d2240 40%, #1a2a3a 100%);
  border-radius: 24px;
  overflow: hidden;
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* USSD Dialog — the white Android system popup */
.phone-ussd-dialog {
  background: #fff;
  border-radius: 14px;
  margin: auto 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
}

/* Dialog header */
.phone-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--phosphor);
  color: #fff;
}
.phone-code { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: #fff; }
.phone-lang-switch { display: flex; gap: 3px; }
.lang-btn {
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 8px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn.active { background: #fff; color: var(--phosphor); border-color: #fff; }
.lang-btn:hover { border-color: #fff; }

/* Dialog body — USSD content */
.phone-screen-body {
  padding: 12px 14px;
  min-height: 160px;
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #333;
}
.phone-screen-body::-webkit-scrollbar { width: 3px; }
.phone-screen-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.ussd-sim-title { font-weight: 700; margin-bottom: 6px; color: #111; font-size: 0.82rem; }
.ussd-sim-line { color: #444; padding: 1px 0; }
.ussd-sim-options { margin-top: 8px; }
.ussd-sim-option {
  padding: 5px 8px;
  margin: 2px 0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.1s;
  color: #333;
  font-weight: 500;
}
.ussd-sim-option:hover { background: var(--phosphor-light); color: var(--phosphor); }
.ussd-sim-cta-option {
  color: var(--phosphor);
  font-weight: 600;
  border-top: 1px solid #eee;
  margin-top: 6px;
  padding-top: 8px;
}
.ussd-sim-nav { margin-top: 6px; padding-top: 6px; border-top: 1px solid #eee; }
.ussd-sim-back { color: #999; cursor: pointer; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; }
.ussd-sim-back:hover { color: var(--phosphor); background: var(--phosphor-light); }
.ussd-sim-loading span { animation: blink 1s step-end infinite; color: var(--phosphor); font-size: 1.2rem; }
.ussd-sim-loading span:nth-child(2) { animation-delay: 0.3s; }
.ussd-sim-loading span:nth-child(3) { animation-delay: 0.6s; }

/* Input area at bottom of dialog */
.phone-input-area {
  padding: 10px 14px 12px;
  border-top: 1px solid #eee;
  background: #f8f8f8;
}
.phone-prompt { display: block; font-family: var(--sans); font-size: 0.65rem; color: var(--phosphor); margin-bottom: 5px; font-weight: 600; }
.phone-input-row { display: flex; gap: 6px; }
.phone-input {
  flex: 1;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: #333;
  outline: none;
}
.phone-input:focus { border-color: var(--phosphor); box-shadow: 0 0 0 3px var(--phosphor-glow); }
.phone-send {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 7px 14px;
  background: var(--phosphor);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.phone-send:hover { background: #008A47; }

/* Android nav dots at bottom */
.phone-nav-dots {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 0 6px;
}
.phone-nav-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
}
.phone-nav-dot.square { border-radius: 2px; }
.phone-nav-dot.triangle {
  width: 0; height: 0;
  border: none;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid rgba(255,255,255,0.4);
}

.phone-chin { height: 6px; }

/* Try overlay */
.phone-try-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.3s;
}
.phone-try-overlay.hidden { opacity: 0; pointer-events: none; }
.phone-try-finger {
  font-size: 2.2rem;
  animation: tap-bounce 1.2s ease-in-out infinite;
  margin-bottom: 8px;
}
@keyframes tap-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.1); }
}
.phone-try-text {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--phosphor);
  padding: 6px 18px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  animation: try-pulse 2s ease-in-out infinite;
}
@keyframes try-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,168,85,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0,168,85,0); }
}
.phone-sim-label {
  text-align: center;
  margin-top: 12px;
  font-size: 0.65rem;
  color: var(--text-dim);
}
.phone-sim-label span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--phosphor-light);
  color: var(--phosphor);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.6rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ussd-phone { max-width: 280px; }
  .phone-frame { width: 260px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero .subtitle { font-size: 0.92rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cta-block { flex-direction: column; text-align: center; padding: 2rem 1.25rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-form { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .section-head { margin-bottom: 1.75rem; }
  .data-table-wrap { font-size: 0.75rem; }
  td, th { padding: 0.5rem 0.6rem; }
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: 0.75rem; }
  .nav-cta { padding: 0.4rem 0.85rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .site-header .container { flex-wrap: wrap; gap: 0.5rem; }
  .site-header nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
  .site-header nav a { font-size: 0.7rem; }
  .nav-cta { font-size: 0.7rem !important; padding: 0.35rem 0.75rem; }
  .cta-block { padding: 1.5rem 1rem; }
  .cta-block h3 { font-size: 0.95rem; }
  .ussd-phone { max-width: 100%; font-size: 0.72rem; padding: 1.25rem 1rem; }
  h2 { font-size: 1.3rem; }
}
