/* ===== Design tokens ===== */
:root {
  --bg: #0a0a14;
  --bg-elev: #11111f;
  --bg-card: #14142a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-1: #a855f7;
  --accent-2: #6366f1;
  --accent-3: #06b6d4;
  --accent-glow: rgba(168, 85, 247, 0.35);

  --grad-primary: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%);
  --grad-text: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #22d3ee 100%);
  --grad-soft: linear-gradient(180deg, rgba(168, 85, 247, 0.12), rgba(6, 182, 212, 0.04));

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-glow: 0 0 60px -20px var(--accent-glow);
  --shadow-card: 0 12px 40px -12px rgba(0, 0, 0, 0.5);

  --container: 1200px;
  --gutter: 24px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ===== Background atmosphere ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(168, 85, 247, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(6, 182, 212, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 30% at 10% 70%, rgba(99, 102, 241, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Layout ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

section { padding: 96px 0; position: relative; z-index: 1; }
@media (max-width: 768px) { section { padding: 64px 0; } }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
h3 { font-size: 1.4rem; margin-bottom: 8px; }
p { color: var(--text-muted); }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 640px; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.section-header { text-align: center; margin-bottom: 64px; }
.section-header .lead { margin: 16px auto 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 80px -10px var(--accent-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(10, 10, 20, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand svg { width: 32px; height: 32px; }
.brand .akal { color: var(--text); }
.brand .core { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); position: relative; transition: 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--text); transition: 0.2s; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(10, 10, 20, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px var(--gutter);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
  }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links.open { transform: translateY(0); }
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0 96px;
  text-align: center;
  position: relative;
}
.hero h1 { margin: 24px 0 24px; }
.hero .lead { margin: 0 auto 40px; font-size: 1.25rem; }
.hero-ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero-stats {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.stat { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.05em; text-transform: uppercase; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-3);
}
.card-icon svg { width: 22px; height: 22px; }

/* ===== Products grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .products-grid { grid-template-columns: 1fr; } }

.product-featured {
  background:
    radial-gradient(ellipse at top right, rgba(168, 85, 247, 0.18), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.product-featured .badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c084fc;
  margin-bottom: 16px;
}
.product-featured h3 { font-size: 2rem; margin-bottom: 12px; }
.product-featured .features {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0;
}
.product-featured .features span {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-coming {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 360px;
}
.product-coming h3 { color: var(--text-muted); font-weight: 500; }
.product-coming .icon { font-size: 2rem; margin-bottom: 12px; }

/* ===== Services grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-visual {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, rgba(168, 85, 247, 0.2), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.about-visual svg { width: 60%; height: auto; opacity: 0.95; }

/* ===== Contact ===== */
.contact-card {
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
}
.contact-card h2 { margin-bottom: 12px; }
.contact-card .email {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.contact-card .email:hover { border-color: var(--accent-2); background: rgba(99, 102, 241, 0.08); }

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-inner p { font-size: 0.85rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ===== Product (WaySpend) page ===== */
.product-hero {
  padding: 120px 0 64px;
}
.product-hero .lead { font-size: 1.2rem; }
.product-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .product-hero-grid { grid-template-columns: 1fr; } }

.mock-app {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.mock-row:last-child { border-bottom: none; }
.mock-label { color: var(--text-muted); font-size: 0.9rem; }
.mock-value { font-weight: 600; font-family: var(--font-mono); }
.mock-value.up { color: #34d399; }
.mock-value.down { color: #f87171; }
.mock-bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.mock-bar > span { display: block; height: 100%; background: var(--grad-primary); border-radius: 999px; }
.mock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mock-header strong { font-size: 0.95rem; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.1); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; }
.back-link:hover { color: var(--text); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
