/* Toumai Pay — Premium African FinTech Landing */

:root {
  --navy: #0B1220;
  --navy-2: #111827;
  --gold: #D4AF37;
  --gold-soft: #E6C768;
  --white: #FFFFFF;
  --muted: #B8BDC7;
  --dim: #6B7280;
  --earth: #8B6914;
  --glass: rgba(17, 24, 39, 0.65);
  --border: rgba(212, 175, 55, 0.14);
  --border-soft: rgba(255, 255, 255, 0.07);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --header: 70px;
  --ease: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--white);
  background: var(--navy);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold-soft); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 200;
  padding: 0.6rem 1rem; border-radius: 8px;
  background: var(--gold); color: var(--navy); font-weight: 600;
  transition: top var(--ease);
}
.skip-link:focus { top: 0.75rem; color: var(--navy); }

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 150;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  transition: width 0.1s linear;
}

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Background */
.bg-gradient {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse 70% 45% at 80% 0%, rgba(212, 175, 55, 0.07), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(139, 105, 20, 0.05), transparent 50%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 45%, var(--navy) 100%);
}

.bg-pattern {
  position: fixed; inset: 0; z-index: -2; opacity: 0.35; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 0l4 8 8 4-8 4-4 8-4-8-8-4 8-4z' fill='none' stroke='%23D4AF37' stroke-opacity='0.06' stroke-width='0.75'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header);
  transition: background var(--ease), border-color var(--ease);
}

.header.scrolled {
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header);
}

.nav__logo-img { height: 40px; width: auto; object-fit: contain; }

.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.nav__links a:hover { color: var(--white); }

.nav__cta {
  padding: 0.55rem 1.1rem !important;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy) !important;
  border-radius: 100px;
  font-weight: 600 !important;
}

/* Language switcher */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 100px;
}

.lang-btn {
  min-width: 34px;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted);
  border-radius: 100px;
  line-height: 1;
  transition: background var(--ease), color var(--ease);
}

.lang-btn:hover { color: var(--white); }

.lang-btn.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy);
}

.lang-btn[data-lang="ar"] { font-size: 0.95rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--white);
  border-radius: 2px; transition: var(--ease);
}

/* Hero */
.hero {
  padding: calc(var(--header) + 2.5rem) 0 4rem;
  min-height: min(100vh, 900px);
  display: flex; align-items: center;
}

.hero__grid {
  display: grid; gap: 2.5rem; align-items: center;
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1fr 1.05fr; gap: 3rem; }
}

.hero__region {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold-soft);
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.hero__region-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 600; line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero__title em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--gold-soft);
}

.hero__subtitle {
  font-size: 1.05rem; color: var(--muted);
  max-width: 28rem; margin-bottom: 1.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__trust {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.75rem;
}

.hero__trust li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--muted);
}

.hero__trust svg {
  width: 18px; height: 18px; color: var(--gold);
  flex-shrink: 0;
}

.hero__visual { position: relative; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero__visual-glow {
  position: absolute; inset: 10% 5%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 65%);
  pointer-events: none;
}

.hero__img {
  width: 100%;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

/* 3D tilt (set by JS via custom props) */
.tilt {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.2s ease;
}
.tilt.tilting { animation: none; transition: transform 0.08s ease; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem; font-weight: 600;
  border-radius: 100px;
  transition: transform var(--ease), box-shadow var(--ease);
}

.btn--primary {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.2);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.28);
}

.btn--coming { cursor: default; padding: 0.95rem 2rem; }

.btn__shine {
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  55%, 100% { left: 130%; }
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

/* Sections */
.section { padding: 4.5rem 0; }

.section-head {
  text-align: center; max-width: 34rem;
  margin: 0 auto 2.5rem;
}

.section-head--left {
  text-align: left; margin-left: 0; margin-right: 0; max-width: 26rem;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 0.65rem;
}

.section-title em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--gold-soft);
}

.section-desc { color: var(--muted); font-size: 1rem; }

/* Features */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.feature {
  position: relative;
  padding: 1.35rem;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 175, 55, 0.12);
}

.feature:hover .feature__icon {
  background: rgba(212, 175, 55, 0.18);
  transform: scale(1.05);
}

.feature__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--gold);
  transition: background var(--ease), transform var(--ease);
}

.feature__icon svg { width: 22px; height: 22px; }

.feature h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem;
}

.feature p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

/* Stats */
.stats-section { padding: 1.5rem 0 1rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1.75rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat { text-align: center; }

.stat__num {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat__label {
  display: block; margin-top: 0.5rem;
  font-size: 0.8rem; color: var(--muted);
  letter-spacing: 0.02em;
}

/* How it works */
.how__steps {
  display: grid; gap: 1.25rem;
  counter-reset: step;
}

@media (min-width: 760px) {
  .how__steps { grid-template-columns: repeat(3, 1fr); }
}

.how__step {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: transform var(--ease), border-color var(--ease);
}

.how__step:hover { transform: translateY(-3px); border-color: var(--border); }

.how__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 1rem;
  font-size: 1.05rem; font-weight: 700;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
}

.how__step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.how__step p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* FAQ */
.faq__inner { max-width: 760px; }

.faq__list { display: grid; gap: 0.75rem; }

.faq__item {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color var(--ease);
}

.faq__item[open] { border-color: var(--border); }

.faq__item summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 1.35rem;
  font-size: 1rem; font-weight: 600; color: var(--white);
  cursor: pointer; list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: ""; flex-shrink: 0;
  width: 11px; height: 11px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform var(--ease);
}

.faq__item[open] summary::after { transform: rotate(225deg); }

.faq__item p {
  padding: 0 1.35rem 1.2rem;
  font-size: 0.92rem; color: var(--muted); line-height: 1.65;
}

/* Showcase (card images) */
.showcase { padding: 3.5rem 0; }

.showcase--alt {
  background: rgba(17, 24, 39, 0.35);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.showcase__inner {
  display: grid; gap: 2rem; align-items: center;
}

@media (min-width: 860px) {
  .showcase__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
  }
  .showcase__inner--reverse { direction: rtl; }
  .showcase__inner--reverse > * { direction: ltr; }
}

.showcase__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* App */
.app-section__inner { text-align: center; }

.app-section__media {
  margin-top: 0.5rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.app-section__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

/* About */
.about__card {
  display: grid; gap: 2rem; align-items: center;
  padding: 2.5rem;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

@media (min-width: 700px) {
  .about__card { grid-template-columns: 1fr auto; padding: 3rem; }
}

.about__text {
  font-size: 1.05rem; line-height: 1.75;
  margin: 0.75rem 0 1rem;
  color: var(--muted);
}

.about__holding {
  font-size: 0.95rem;
  color: var(--gold-soft);
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.about__holding strong { color: var(--white); }

.about__logo img {
  width: 120px; height: auto; opacity: 0.95;
  filter: drop-shadow(0 8px 24px rgba(212, 175, 55, 0.15));
}

/* Waitlist */
.waitlist__box {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.06), rgba(17, 24, 39, 0.8));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.waitlist__box .section-desc { margin-bottom: 1.5rem; }

.waitlist__row {
  display: flex; flex-direction: column; gap: 0.65rem;
}

@media (min-width: 520px) {
  .waitlist__row {
    flex-direction: row;
    padding: 5px;
    background: rgba(11, 18, 32, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: 100px;
  }
}

.waitlist__input {
  flex: 1;
  padding: 0.95rem 1.25rem;
  font: inherit; font-size: 1rem;
  color: var(--white);
  background: rgba(11, 18, 32, 0.5);
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  outline: none;
}

@media (min-width: 520px) {
  .waitlist__input { background: transparent; border: none; }
}

.waitlist__input:focus {
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.waitlist__input::placeholder { color: var(--dim); }

.waitlist__row .btn { white-space: nowrap; }

.waitlist__msg {
  margin-top: 0.75rem; font-size: 0.88rem; min-height: 1.3em;
}

.waitlist__msg.success { color: #4ade80; }
.waitlist__msg.error { color: #f87171; }

/* Footer */
.footer {
  padding: 3rem 0 0;
  border-top: 1px solid var(--border-soft);
}

.footer__grid {
  display: grid; gap: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr auto;
    align-items: start;
  }
}

.footer__logo { height: 36px; width: auto; margin-bottom: 0.6rem; }

.footer__soon {
  font-size: 0.9rem; color: var(--gold-soft);
  margin-bottom: 0.35rem;
}

.footer__holding { font-size: 0.85rem; color: var(--muted); }

.footer__col h4 {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.75rem;
}

.footer__col li { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.4rem; }

.footer__company { line-height: 1.6; }
.footer__company strong { color: var(--white); font-weight: 600; }
.footer__company span {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--gold-soft);
}

.footer__social { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--muted);
}

.footer__social a:hover {
  color: var(--gold);
  border-color: var(--border);
}

.footer__social svg { width: 17px; height: 17px; }

.footer__bar {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-soft);
}

.footer__bar p {
  font-size: 0.78rem; color: var(--dim); text-align: center;
}

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* Mobile nav */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed; top: var(--header); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.75rem;
    background: rgba(11, 18, 32, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-120%);
    opacity: 0; visibility: hidden;
    transition: transform var(--ease), opacity var(--ease), visibility var(--ease);
  }

  .nav__links.open {
    transform: translateY(0); opacity: 1; visibility: visible;
  }

  .nav__links a { display: block; padding: 0.9rem; border-bottom: 1px solid var(--border-soft); }
  .nav__cta { text-align: center; margin-top: 0.5rem; }

  .hero { min-height: auto; padding-bottom: 3rem; }
  .section { padding: 3.5rem 0; }
}

/* ---------------------------------------------------------------------
 * Arabic / RTL support
 * ------------------------------------------------------------------- */
html[lang="ar"] body { font-family: "Cairo", "DM Sans", system-ui, sans-serif; }

/* Instrument Serif has no Arabic glyphs — swap emphasis font for Arabic */
html[lang="ar"] .hero__title em,
html[lang="ar"] .section-title em {
  font-family: "Cairo", system-ui, sans-serif;
  font-style: normal;
  font-weight: 700;
  color: var(--gold-soft);
}

/* Letter-spacing harms Arabic legibility */
[dir="rtl"] .section-label,
[dir="rtl"] .hero__region,
[dir="rtl"] .footer__col h4,
[dir="rtl"] .section-title,
[dir="rtl"] .hero__title { letter-spacing: 0; }

[dir="rtl"] .scroll-progress { left: auto; right: 0; }

[dir="rtl"] .skip-link { left: auto; right: 1rem; }

[dir="rtl"] .section-head--left { text-align: right; }

/* Preserve the alternating image/text layout in RTL */
@media (min-width: 860px) {
  [dir="rtl"] .showcase__inner--reverse { direction: ltr; }
  [dir="rtl"] .showcase__inner--reverse > * { direction: rtl; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
