/* Fahim landing + signup — "Sudanese commerce, warm & modern".
   Loaded AFTER main.css (tokens + self-hosted fonts come from there). CSS-only motion. */

:root { --maxw: 1080px; }

html { scroll-behavior: smooth; }
body { line-height: 1.65; -webkit-font-smoothing: antialiased; }
.brand { font-family: var(--display); font-weight: 700; line-height: 1.2; }
a { text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-gold { background: var(--gold); color: var(--nile-deep); box-shadow: 0 10px 26px -10px rgba(217, 154, 43, 0.8); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(217, 154, 43, 0.9); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-nile { background: var(--nile); color: #fff; }
.btn-nile:hover { transform: translateY(-2px); background: var(--nile-deep); }

/* ---------- Header / top menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
  /* Near-opaque paper so the dark-green hero never bleeds through behind the
     menu text (no green-on-green). */
  background: rgba(250, 245, 236, 0.96);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; padding-bottom: 13px; position: relative; }
.brand { font-size: 1.5rem; color: var(--nile); display: inline-flex; align-items: center; gap: 9px; }
.brand .brand-logo { height: 34px; width: auto; display: block; }

.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; } /* CSS-only toggle, no JS */
.nav-burger { display: none; }
.nav { display: flex; align-items: center; gap: 6px; }
/* Dark ink text on the light header — high contrast, never green-on-green.
   Teal/gold appear only as hover + accent. */
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink); font-weight: 700; font-size: 0.98rem;
  padding: 9px 13px; border-radius: 11px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a svg { width: 19px; height: 19px; color: var(--gold); transition: color 0.15s ease, transform 0.15s ease; }
.nav a:hover { color: var(--nile); background: rgba(12, 92, 79, 0.07); }
.nav a:hover svg { color: var(--nile); transform: translateY(-1px) rotate(-4deg); }
.nav .nav-login { border: 1.5px solid var(--line); }
.nav .btn-sm { font-size: 0.95rem; padding: 9px 16px; color: var(--nile-deep); }
.nav .btn-sm svg { color: var(--nile-deep); }
.nav .btn-sm:hover { color: var(--nile-deep); background: var(--gold); }
.nav .btn-sm:hover svg { color: var(--nile-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(217, 154, 43, 0.35), transparent 55%),
    radial-gradient(90% 90% at 0% 110%, rgba(244, 205, 114, 0.12), transparent 50%),
    linear-gradient(155deg, var(--nile) 0%, var(--nile-deep) 100%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; padding-top: 70px; padding-bottom: 96px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.2px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
/* White on the dark-green hero — overrides main.css `h1{color:var(--nile)}`
   which would otherwise render green text on the green hero. */
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); color: #fff; }
.hero h1 .accent { color: var(--gold-soft); }
.hero p.lead { font-size: 1.18rem; color: rgba(255, 255, 255, 0.9); margin: 18px 0 30px; max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.75); }

/* Wave divider under the hero */
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 54px;
  background: var(--paper);
  clip-path: polygon(0 55%, 12% 60%, 28% 48%, 45% 58%, 62% 44%, 80% 56%, 100% 46%, 100% 100%, 0 100%);
}

/* Chat mockup */
.chat {
  background: rgba(255, 255, 255, 0.97); color: var(--ink);
  border-radius: 22px; padding: 16px; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Flex column so the bubbles' auto-margins AND the dialect tags align on the same cross-axis
     rule — in block flow a display:table tag and a block bubble resolve auto-margins to opposite
     sides (code-review). In flex, both are flex items and margin-inline-start:auto agrees. */
  display: flex; flex-direction: column;
}
.chat-top { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--nile); color: #fff; display: grid; place-items: center; font-family: var(--display); }
.chat-name { font-weight: 700; }
.chat-status { font-size: 0.78rem; color: var(--nile); }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 16px; margin-bottom: 10px; font-size: 0.97rem; position: relative; }
.bubble small { display: block; font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.b-cust { background: var(--paper-2); margin-inline-start: auto; border-top-right-radius: 5px; }
.b-bot { background: #dcf3e4; margin-inline-end: auto; border-top-left-radius: 5px; }
.b-bot .tick { color: var(--nile); font-weight: 700; }

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 38ch; margin: 0 auto 44px; }
/* Base eyebrow — used by every section head AND the wedge/safety bands (was scoped to .section-head). */
.kicker { color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 0.85rem; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-top: 8px; }
.section-head p { color: var(--muted); margin-top: 10px; }

/* Why cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ico { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(217, 154, 43, 0.18), rgba(12, 92, 79, 0.12)); margin-bottom: 16px; }
.feature .ico svg { width: 27px; height: 27px; color: var(--nile); }
.feature h3 { font-size: 1.25rem; color: var(--nile); }
.feature p { color: var(--muted); margin-top: 8px; }

/* How-it-works steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--paper-2); border-radius: var(--radius); padding: 30px 24px 26px; }
.step .num { font-family: var(--display); font-size: 2.4rem; color: var(--gold); line-height: 1; }
.step h3 { font-size: 1.15rem; margin: 8px 0 6px; color: var(--nile); }
.step p { color: var(--muted); font-size: 0.97rem; }

/* Pricing */
.pricing { background: var(--paper-2); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; position: relative;
}
.plan.featured { border-color: var(--gold); box-shadow: var(--shadow); }
.plan .ribbon { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--gold); color: var(--nile-deep); font-family: var(--display); font-weight: 700; font-size: 0.82rem; padding: 5px 13px; border-radius: 999px; }
.plan h3 { font-size: 1.4rem; color: var(--nile); }
.plan .price { font-family: var(--display); font-size: 2.6rem; color: var(--ink); margin: 6px 0 2px; }
.plan .price span { font-size: 1rem; color: var(--muted); font-family: var(--body); }
.plan ul { list-style: none; margin: 18px 0 24px; display: grid; gap: 10px; }
.plan li { padding-inline-start: 26px; position: relative; color: var(--ink); }
.plan li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--nile); font-weight: 700; }
.plan .btn { width: 100%; justify-content: center; margin-top: auto; }
.trial-pill { text-align: center; margin: 0 auto 30px; display: inline-flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 700; color: var(--nile); }
.pricing .center { text-align: center; }

/* Final CTA */
.cta-band { background: linear-gradient(155deg, var(--nile), var(--nile-deep)); color: #fff; text-align: center; border-radius: 26px; padding: 56px 26px; }
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: #fff; } /* white on dark band */
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 12px 0 26px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--nile); font-weight: 700; }

/* ---------- Signup page ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px 18px;
  background: radial-gradient(100% 80% at 100% 0%, rgba(217,154,43,0.16), transparent 60%), var(--paper); }
.auth-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px; }
.auth-card h1 { font-size: 1.7rem; color: var(--nile); }
.auth-card .sub { color: var(--muted); margin: 6px 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }
.field input[type='text'], .field input[type='tel'] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--paper);
}
.field input:focus { outline: 2px solid var(--gold); border-color: var(--gold); background: #fff; }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--paper-2); padding: 12px 14px; border-radius: 12px; margin-bottom: 20px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--nile); }
.consent label { font-size: 0.9rem; color: var(--ink); }
.auth-card .btn { width: 100%; justify-content: center; }
.form-error { background: #fdecec; color: #a3261f; border: 1px solid #f3c2bd; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 0.92rem; }

/* Signup success */
.success-badge { width: 64px; height: 64px; border-radius: 50%; background: #dcf3e4; color: var(--nile); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 16px; }
.steps-next { list-style: none; counter-reset: s; margin: 18px 0 8px; text-align: start; display: grid; gap: 12px; }
.steps-next li { counter-increment: s; padding-inline-start: 40px; position: relative; }
.steps-next li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--nile); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 0.9rem; }

/* ---------- Legal pages (terms / privacy) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 22px 64px; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.legal h2 { font-size: 1.2rem; color: var(--nile); margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { margin: 8px 0 8px; padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--nile); font-weight: 700; }
.legal-meta { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.legal-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-links { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--nile); font-weight: 700; }

/* Live status dot (replaces the 🟢 emoji in the eyebrow + chat status) */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.25); display: inline-block; flex: none; }
.chat-status { display: inline-flex; align-items: center; gap: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Chat: dialect tags + handoff note. The tag follows its customer bubble's side — the bubble uses
   the logical `margin-inline-start:auto`, so the tag must too (a physical margin wouldn't flip in RTL). */
.dtag { display: table; margin-inline-start: auto; margin-block: -6px 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2px; background: var(--gold-soft); color: #5a3d05; padding: 2px 9px; border-radius: 999px; }
.chat-handoff { margin-top: 8px; text-align: center; font-size: 0.8rem; color: var(--muted); background: var(--paper-2); border: 1px dashed var(--line); border-radius: 12px; padding: 9px 12px; }

/* ---------- Comprehension wedge (the differentiator) ---------- */
#wedge-sec { padding-top: 64px; padding-bottom: 8px; }
/* Shared glow-host: any section hosting an absolute `.wedge-glow`. Clips the glow to the rounded
   card (overflow) AND keeps the section's own content painted ABOVE the glow. Used by .wedge and
   .cta-band — one place so a new glow section can't forget the layering rule (it was forgotten
   during review). */
.glow-host { position: relative; overflow: hidden; }
.glow-host > *:not(.wedge-glow) { position: relative; }
.wedge {
  background: linear-gradient(150deg, var(--nile), var(--nile-deep));
  color: #fff; border-radius: 26px; padding: clamp(28px, 4vw, 46px); box-shadow: var(--shadow);
}
.wedge .kicker.gold-soft { color: var(--gold-soft); }
.wedge h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-top: 8px; }
.wedge > p { color: rgba(255, 255, 255, 0.88); margin-top: 12px; max-width: 52ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.26); color: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; }
.wedge-arrow { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-family: var(--display); font-weight: 700; color: var(--gold-soft); }
.wedge-arrow svg { width: 22px; height: 22px; }
/* Higher specificity than `.wedge > p` (which also matches this element) so the emphasis wins. */
.wedge .wedge-out { margin-top: 8px; font-family: var(--display); font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #fff; max-width: none; }
.wedge-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 205, 114, 0.28), transparent 70%); inset-block-start: -130px; inset-inline-start: -90px; pointer-events: none; }

/* ---------- Safety / trust band ---------- */
#safety .safety { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 4vw, 44px); box-shadow: var(--shadow); }
#safety .safety > h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-top: 8px; }
.safe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 26px; }
.safe-item { display: flex; gap: 14px; align-items: flex-start; }
.safe-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; background: rgba(31, 157, 87, 0.13); display: grid; place-items: center; }
.safe-ic svg { width: 24px; height: 24px; color: #1f9d57; }
.safe-item h3 { font-size: 1.08rem; color: var(--nile); }
.safe-item p { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }

/* Final CTA uses the shared .glow-host; only the glow's corner placement differs from the wedge. */
.cta-band .wedge-glow { inset-block-start: auto; inset-block-end: -180px; inset-inline-start: auto; inset-inline-end: -110px; }

/* ---------- Motion (staggered reveal) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.06s; } .d2 { animation-delay: 0.14s; } .d3 { animation-delay: 0.22s; } .d4 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .btn:hover, .feature:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; padding-bottom: 80px; }
  .chat { order: -1; }
  .cards, .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}

/* Phones, incl. landscape: headline and CTA first, the demo below (D15). */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .chat { order: 0; }
}

/* Mobile top menu: a hidden checkbox + burger label reveals a dropdown panel — no JS. */
@media (max-width: 760px) {
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    color: var(--nile); border: 1.5px solid var(--line); background: #fff;
  }
  .nav-burger svg { width: 22px; height: 22px; }
  .nav-toggle:checked ~ .nav-burger { background: var(--nile); color: #fff; }
  .nav {
    display: none;
    position: absolute; top: calc(100% + 10px); inset-inline-start: 0; inset-inline-end: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
    padding: 12px; box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a { font-size: 1.05rem; padding: 12px 14px; }
  .nav .btn-sm { justify-content: center; margin-top: 6px; }
}
