/* ============================================================
   HemsTopUp — Design System
   Concept: "Signal" — everyday connectivity, visualised as
   pulses / bars, echoing what the brand actually moves:
   data, airtime, power, subscriptions.
   ============================================================ */

:root{
  /* Blues sampled from the HemsTopUp flyers/logo: deep navy panels,
     a vivid royal-blue "live" accent, and the logo's cyan highlight. */
  --primary:        #1B4CF0;
  --primary-dark:   #1339C4;
  --primary-tint:   #EAF0FF;
  --ink:            #0A0F2B;
  --ink-soft:       #333A5C;
  --muted:          #666E8C;
  --bg:             #FFFFFF;
  --surface:        #F4F6FE;
  --surface-2:      #E9EEFC;
  --border:         #E2E6F5;
  --accent:         #21C7E8;
  --accent-tint:    #E6FAFE;
  --navy-2:         #121A45;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow-1: 0 1px 2px rgba(10,16,34,.04), 0 8px 24px -12px rgba(10,16,34,.12);
  --shadow-2: 0 20px 60px -20px rgba(27,76,240,.32);
  --max: 1180px;
  --ease: cubic-bezier(.22,.9,.32,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  line-height:1.6;
}

h1,h2,h3,h4{
  font-family:'Poppins',system-ui,-apple-system,sans-serif;
  color:var(--ink);
  line-height:1.12;
  margin:0;
  letter-spacing:-.01em;
}

p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 24px; }
@media (max-width:640px){ .wrap{ padding:0 20px; } }

section{ padding:88px 0; }
@media (max-width:768px){ section{ padding:64px 0; } }

.muted{ color:var(--muted); }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  color:var(--primary);
  letter-spacing:.02em;
  margin-bottom:14px;
}
.eyebrow::before{
  content:'';
  width:16px; height:3px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  display:inline-block;
}

.h-xl{ font-size:clamp(34px,5.4vw,58px); font-weight:800; }
.h-lg{ font-size:clamp(28px,3.6vw,40px); font-weight:800; }
.h-md{ font-size:clamp(20px,2.4vw,26px); font-weight:700; }
.lede{ font-size:clamp(16px,1.6vw,18.5px); color:var(--ink-soft); max-width:56ch; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 26px;
  border-radius:999px;
  font-weight:700;
  font-size:15px;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{
  background:var(--primary);
  color:#fff;
  box-shadow:0 12px 28px -10px rgba(42,76,255,.55);
}
.btn-primary:hover{ background:var(--primary-dark); box-shadow:0 16px 34px -10px rgba(42,76,255,.65); }
.btn-ghost{
  background:transparent;
  color:var(--ink);
  border-color:var(--border);
}
.btn-ghost:hover{ border-color:var(--primary); color:var(--primary); }
.btn-sm{ padding:10px 18px; font-size:14px; }
.btn:focus-visible, a:focus-visible, button:focus-visible{
  outline:2.5px solid var(--primary);
  outline-offset:3px;
}

/* ---------------- Nav ---------------- */
.nav{
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(14px);
  border-bottom:1px solid transparent;
  transition:padding .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-scrolled{ border-color:var(--border); box-shadow:0 2px 20px -12px rgba(10,16,34,.15); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding:18px 0; transition:padding .25s var(--ease); }
.nav.is-scrolled .nav-inner{ padding:12px 0; }

.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; font-family:'Poppins',sans-serif; }
.brand img{ width:34px; height:34px; border-radius:9px; object-fit:cover; background:#fff; }
.brand .brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand .brand-tag{ font-family:'Inter',sans-serif; font-weight:600; font-size:10px; color:var(--muted); letter-spacing:.01em; }

.nav-links{ display:flex; align-items:center; gap:34px; }
.nav-links a{ font-size:14.5px; font-weight:600; color:var(--ink-soft); transition:color .2s; }
.nav-links a:hover{ color:var(--primary); }
.nav-cta{ display:flex; align-items:center; gap:14px; }

.hamburger{ display:none; background:none; border:none; padding:6px; cursor:pointer; }
.hamburger span{ display:block; width:22px; height:2px; background:var(--ink); margin:5px 0; border-radius:2px; transition:transform .25s var(--ease), opacity .25s var(--ease); }

.mobile-drawer{
  position:fixed; inset:0 0 0 auto; width:min(82vw,340px);
  background:#fff; z-index:200; transform:translateX(100%);
  transition:transform .32s var(--ease);
  box-shadow:-20px 0 50px -20px rgba(10,16,34,.35);
  padding:26px 24px; display:flex; flex-direction:column; gap:6px;
}
.mobile-drawer.open{ transform:translateX(0); }
.mobile-drawer a{ padding:14px 4px; font-weight:600; font-size:16.5px; border-bottom:1px solid var(--border); }
.scrim{ position:fixed; inset:0; background:rgba(10,16,34,.4); z-index:199; opacity:0; pointer-events:none; transition:opacity .3s; }
.scrim.open{ opacity:1; pointer-events:auto; }

@media (max-width:860px){
  .nav-links, .nav-cta .btn-ghost{ display:none; }
  .hamburger{ display:block; }
}

/* ---------------- Brand motifs (from flyers) ---------------- */
/* Dotted grid — the small dot lattice used around the logo mark and in
   the marketplace flyer's top corners. */
.dot-grid{
  background-image:radial-gradient(var(--border) 1.4px, transparent 1.4px);
  background-size:16px 16px;
}
.dot-grid.on-dark{ background-image:radial-gradient(rgba(255,255,255,.16) 1.4px, transparent 1.4px); }

/* Glow blob — the soft radial circle used behind the phone mockups. */
.glow-blob{
  position:absolute; border-radius:50%; filter:blur(2px);
  background:radial-gradient(circle at 35% 35%, rgba(33,199,232,.35), rgba(27,76,240,.18) 55%, transparent 75%);
  pointer-events:none;
}

/* ---------------- Hero ---------------- */
.hero{ padding:74px 0 40px; overflow:hidden; position:relative; }
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
@media (max-width:960px){ .hero-grid{ grid-template-columns:1fr; gap:44px; } }

.hero-copy .h-xl{ margin:6px 0 20px; }
.hero-actions{ display:flex; gap:14px; margin-top:30px; flex-wrap:wrap; }
.hero-tags{ display:flex; gap:22px; margin-top:38px; flex-wrap:wrap; }
.hero-tag{ display:flex; align-items:center; gap:9px; font-size:14px; font-weight:600; color:var(--ink-soft); }
.hero-tag .dot{ width:8px; height:8px; border-radius:50%; background:var(--accent); }

/* Hero visual — signal panel */
.signal-panel{
  position:relative;
  background:linear-gradient(155deg,var(--ink) 0%,#141c3d 60%,#1a2350 100%);
  border-radius:28px;
  padding:34px;
  color:#fff;
  box-shadow:var(--shadow-2);
  min-height:420px;
  display:flex; flex-direction:column; justify-content:space-between;
  animation:panelIn .8s var(--ease) both;
}
@keyframes panelIn{ from{ opacity:0; transform:translateY(18px) scale(.98);} to{ opacity:1; transform:none; } }

.signal-head{ display:flex; align-items:center; justify-content:space-between; }
.signal-brand{ display:flex; align-items:center; gap:9px; font-family:'Poppins',sans-serif; font-weight:700; font-size:14.5px; }
.signal-brand img{ width:24px; height:24px; border-radius:6px; }
.signal-live{ display:flex; align-items:center; gap:6px; font-size:12px; color:#9fe8e2; font-weight:600; }
.signal-live .blip{ width:7px; height:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 0 rgba(23,201,194,.6); animation:blip 2s infinite; }
@keyframes blip{ 0%{box-shadow:0 0 0 0 rgba(23,201,194,.55);} 70%{box-shadow:0 0 0 9px rgba(23,201,194,0);} 100%{box-shadow:0 0 0 0 rgba(23,201,194,0);} }

.signal-bars{ display:flex; align-items:flex-end; gap:7px; height:96px; margin:26px 0 8px; }
.signal-bars i{
  flex:1; background:linear-gradient(180deg,var(--accent),var(--primary));
  border-radius:6px 6px 2px 2px; opacity:.85;
  animation:bar 2.6s ease-in-out infinite;
}
.signal-bars i:nth-child(1){ height:38%; animation-delay:.1s; }
.signal-bars i:nth-child(2){ height:64%; animation-delay:.3s; }
.signal-bars i:nth-child(3){ height:92%; animation-delay:.5s; }
.signal-bars i:nth-child(4){ height:52%; animation-delay:.7s; }
.signal-bars i:nth-child(5){ height:78%; animation-delay:.9s; }
.signal-bars i:nth-child(6){ height:44%; animation-delay:1.1s; }
.signal-bars i:nth-child(7){ height:70%; animation-delay:1.3s; }
@keyframes bar{ 0%,100%{ transform:scaleY(1); } 50%{ transform:scaleY(1.12); } }

.signal-chips{ display:flex; flex-wrap:wrap; gap:9px; }
.chip{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:9px 14px;
  font-size:13px; font-weight:600;
  display:flex; align-items:center; gap:7px;
  backdrop-filter:blur(6px);
}
.chip .sw{ width:7px; height:7px; border-radius:50%; }

.signal-foot{ display:flex; justify-content:space-between; align-items:flex-end; margin-top:22px; padding-top:18px; border-top:1px solid rgba(255,255,255,.12); font-size:12.5px; color:#B7C0E8; }

/* ---------------- Trust / intro ---------------- */
.intro{ background:var(--surface); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.intro-grid{ display:grid; grid-template-columns:.85fr 1.15fr; gap:60px; align-items:start; }
@media (max-width:860px){ .intro-grid{ grid-template-columns:1fr; gap:26px; } }

/* ---------------- Services ---------------- */
.services-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:42px; }
@media (max-width:860px){ .services-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .services-grid{ grid-template-columns:1fr; } }

.service-card{
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:26px 24px;
  background:#fff;
  transition:transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.service-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-1); border-color:#d8ddf3; }
.service-icon{
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:var(--primary-tint); color:var(--primary); margin-bottom:16px;
}
.service-icon.alt{ background:var(--accent-tint); color:#0e948d; }
.service-card h3{ font-size:17px; margin-bottom:6px; }
.service-card p{ font-size:14.5px; color:var(--muted); margin-bottom:16px; }
.service-link{ font-size:14px; font-weight:700; color:var(--primary); display:inline-flex; align-items:center; gap:5px; }
.service-link svg{ transition:transform .2s; }
.service-card:hover .service-link svg{ transform:translateX(3px); }

/* ---------------- How it works ---------------- */
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; margin-top:44px; counter-reset:step; }
@media (max-width:860px){ .steps{ grid-template-columns:1fr; gap:20px; } }
.step{ position:relative; padding-left:0; }
.step-num{ font-family:'Poppins',sans-serif; font-size:15px; font-weight:800; color:var(--primary); background:var(--primary-tint); width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-bottom:18px; }
.step h3{ font-size:18px; margin-bottom:8px; }
.step p{ color:var(--muted); font-size:14.5px; }
.step-line{ display:none; }
@media (min-width:861px){
  .steps{ position:relative; }
  .steps::before{ content:''; position:absolute; top:19px; left:calc(100%/6); right:calc(100%/6); height:1px; background:var(--border); z-index:0; }
}

/* ---------------- Why ---------------- */
.why-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-top:42px; }
@media (max-width:960px){ .why-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .why-grid{ grid-template-columns:1fr; } }
.why-card{ padding:24px; border-radius:var(--radius-md); background:var(--surface); border:1px solid var(--border); }
.why-card h3{ font-size:16px; margin-bottom:8px; }
.why-card p{ font-size:14px; color:var(--muted); }

/* ---------------- Marketplace ---------------- */
.market{ background:linear-gradient(180deg,var(--ink) 0%,#141c3d 100%); color:#fff; border-radius:var(--radius-lg); margin:0 24px; padding:64px 44px; }
@media (max-width:960px){ .market{ margin:0 16px; padding:46px 26px; } }
.market-inner{ max-width:var(--max); margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center; }
@media (max-width:860px){ .market-inner{ grid-template-columns:1fr; gap:32px; } }
.market h2{ color:#fff; }
.market p.lede{ color:#C4CBEE; }
.market-list{ display:flex; flex-direction:column; gap:14px; margin:26px 0 30px; }
.market-list li{ display:flex; gap:12px; align-items:flex-start; font-size:14.5px; color:#DCE1F7; }
.market-list svg{ flex-shrink:0; margin-top:2px; color:var(--accent); }

.market-visual{ background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.14); border-radius:20px; padding:22px; }
.market-cats{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.market-cat{ background:rgba(255,255,255,.07); border-radius:12px; padding:14px 8px; text-align:center; font-size:12px; font-weight:600; color:#C4CBEE; }
.market-cat .ic{ width:30px; height:30px; margin:0 auto 8px; border-radius:9px; background:rgba(23,201,194,.18); display:flex; align-items:center; justify-content:center; color:var(--accent); }
.market-card{ background:rgba(255,255,255,.08); border-radius:14px; padding:14px; display:flex; gap:12px; align-items:center; }
.market-card .thumb{ width:52px; height:52px; border-radius:10px; background:linear-gradient(135deg,var(--primary),var(--accent)); flex-shrink:0; }
.market-card b{ display:block; font-size:13.5px; color:#fff; margin-bottom:3px; }
.market-card span{ font-size:12px; color:#AEB6E0; }

.market-strip{
  display:grid; grid-template-columns:repeat(4,1fr); gap:14px;
  margin-top:38px; padding-top:32px; border-top:1px solid rgba(255,255,255,.12);
}
@media (max-width:700px){ .market-strip{ grid-template-columns:repeat(2,1fr); } }
.market-strip-item{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.market-strip-item .ic{
  width:38px; height:38px; border-radius:50%; background:rgba(33,199,232,.16);
  display:flex; align-items:center; justify-content:center; color:var(--accent);
}
.market-strip-item b{ font-size:13.5px; color:#fff; }
.market-strip-item span{ font-size:12px; color:#AEB6E0; }

/* ---------------- Founder ---------------- */
.founder-grid{ display:grid; grid-template-columns:.62fr 1.38fr; gap:52px; align-items:center; }
@media (max-width:860px){ .founder-grid{ grid-template-columns:1fr; gap:32px; } }
.founder-portrait{
  aspect-ratio:1/1.05; border-radius:24px;
  background:var(--ink);
  border:1px solid var(--border);
  position:relative; overflow:hidden;
  box-shadow:var(--shadow-1);
}
.founder-portrait img{ width:100%; height:100%; object-fit:cover; object-position:center 18%; display:block; }
.founder-portrait::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(10,15,43,.35) 0%, transparent 32%);
}
.founder-portrait .placeholder-mark{ font-family:'Poppins',sans-serif; font-weight:800; font-size:64px; color:var(--primary); opacity:.5; }
.founder-name{ font-size:22px; font-weight:800; margin-bottom:2px; }
.founder-role{ color:var(--primary); font-weight:700; font-size:14px; margin-bottom:16px; }
.founder-bio{ color:var(--ink-soft); font-size:15.5px; max-width:60ch; margin-bottom:22px; }
.founder-note{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px 18px; font-size:13.5px; color:var(--muted); margin-bottom:24px; }
.founder-socials{ display:flex; flex-wrap:wrap; gap:10px; }
.social-btn{
  width:40px; height:40px; border-radius:10px; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color:var(--ink-soft);
  transition:.2s;
}
.social-btn:hover{ border-color:var(--primary); color:var(--primary); transform:translateY(-2px); }

/* ---------------- FAQ ---------------- */
.faq-list{ max-width:760px; margin:40px auto 0; }
.faq-item{ border-bottom:1px solid var(--border); }
.faq-q{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:none; border:none; text-align:left; padding:22px 4px; cursor:pointer;
  font-family:'Poppins',sans-serif; font-weight:700; font-size:16px; color:var(--ink);
}
.faq-q svg{ flex-shrink:0; transition:transform .25s var(--ease); color:var(--primary); }
.faq-item.open .faq-q svg{ transform:rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .3s var(--ease); }
.faq-a p{ padding:0 4px 22px; color:var(--muted); font-size:14.5px; max-width:65ch; }
.faq-a a{ color:var(--primary); font-weight:700; }

/* ---------------- Final CTA ---------------- */
.final-cta{
  background:radial-gradient(120% 140% at 20% 0%,#3358FF 0%,#1B2C7A 55%,#0A1022 100%);
  border-radius:var(--radius-lg); margin:0 24px; padding:70px 40px; text-align:center; color:#fff; position:relative; overflow:hidden;
}
@media (max-width:960px){ .final-cta{ margin:0 16px; padding:50px 26px; } }
.final-cta h2{ color:#fff; }
.final-cta p{ color:#C4CBEE; margin:14px auto 30px; }
.final-cta .btn-primary{ background:#fff; color:var(--primary); box-shadow:0 16px 40px -14px rgba(0,0,0,.4); }
.final-cta .btn-primary:hover{ background:#eef1ff; }

/* ---------------- Footer ---------------- */
footer{ background:var(--ink); color:#B7C0E8; padding:60px 0 26px; }
.footer-grid{ display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr; gap:36px; margin-bottom:44px; }
@media (max-width:860px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:520px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-brand{ display:flex; align-items:center; gap:10px; font-weight:800; color:#fff; font-family:'Poppins',sans-serif; margin-bottom:12px; }
.footer-brand img{ width:30px; height:30px; border-radius:8px; }
footer h4{ color:#fff; font-size:13px; letter-spacing:.02em; margin-bottom:16px; }
footer li{ margin-bottom:11px; font-size:14px; }
footer a:hover{ color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.1); padding-top:22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:13px; color:#828BB8; }

/* ---------------- Utility: reveal on scroll ----------------
   Opt-in only once the 'js' class lands on <html> (see inline head
   script). Without JS — or before it runs — content is fully
   visible, so crawlers and no-JS users never see blank sections. */
.js .reveal{ opacity:0; transform:translateY(16px); transition:opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in{ opacity:1; transform:none; }

/* ---------------- Simple pages (about / ai) ---------------- */
.page-hero{ padding:64px 0 20px; }
.prose{ max-width:760px; }
.prose h2{ margin:44px 0 14px; font-size:24px; }
.prose h2:first-child{ margin-top:0; }
.prose p{ color:var(--ink-soft); font-size:15.5px; margin-bottom:14px; }
.prose ul{ margin:0 0 14px; }
.prose li{ color:var(--ink-soft); font-size:15.5px; padding-left:20px; position:relative; margin-bottom:8px; }
.prose li::before{ content:''; position:absolute; left:0; top:9px; width:6px; height:6px; border-radius:50%; background:var(--primary); }
