/* ============================================
   Flash Invoice — Landing Page
   Refined Industrial: Satoshi + General Sans
   ============================================ */

/* ---- Fonts (Fontshare) ---- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,700&f[]=general-sans@400,500,600&display=swap');

:root {
  --bg-deep: #050A12;
  --bg-surface: #0A1020;
  --brand: #0070E0;
  --brand-light: #3D9AFF;
  --accent-warm: #FF6B35;
  --text-primary: #F0F2F5;
  --text-secondary: #8A95A8;
  --text-muted: #4A5568;
  --surface: #0D1525;
  --surface-hover: #111D30;
  --border: #1A2438;
  --border-light: #243044;
  --max: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Satoshi", system-ui, sans-serif;
  --font-body: "General Sans", system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Dot grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #ffffff08 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

/* ---- Navigation ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 300ms ease, border-color 300ms ease;
}

.site-header.scrolled {
  background: rgba(5, 10, 18, 0.95);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand-bolt {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 200ms ease;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ---- Hero ---- */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text {
  animation: heroFadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero-sub {
  max-width: 440px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.app-store-badge {
  height: 52px;
  transition: transform 200ms ease;
}

.app-store-badge:hover {
  transform: scale(1.04);
}

.hero-proof {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---- Device Showcase (hero right) ---- */
.showcase {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 0;
  margin-right: -60px;
  animation: heroFadeUp 800ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}

/* Radial glow behind phones */
.showcase::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 112, 224, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.showcase__device {
  flex-shrink: 0;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.5));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

.showcase__device img {
  display: block;
  width: 100%;
}

.showcase__device--main {
  width: 200px;
  z-index: 3;
}

.showcase__device--side {
  width: 175px;
  z-index: 2;
}

/* Left phone: tilt clockwise, stagger down */
.showcase__device--side:first-child {
  margin-right: -35px;
  transform: rotate(-5deg) translateY(24px);
}

/* Right phone: tilt counter-clockwise, stagger down more */
.showcase__device--side:last-child {
  margin-left: -35px;
  transform: rotate(5deg) translateY(40px);
}

/* ---- Features — Horizontal Panels ---- */
.features-section {
  padding: 100px 0;
}

.features-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 48px;
  max-width: 480px;
}

.features-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.features-strip::-webkit-scrollbar {
  display: none;
}

.feature-panel {
  flex: 0 0 260px;
  min-height: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: border-color 250ms ease, background 250ms ease;
}

.feature-panel:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
}

.feature-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--border);
  margin-bottom: 24px;
  letter-spacing: -0.04em;
}

.feature-panel h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-panel p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: auto;
}

/* Desktop: panels fill the row */
@media (min-width: 769px) {
  .feature-panel {
    flex: 1 1 0;
    min-width: 0;
  }

  .features-strip {
    overflow-x: visible;
  }
}

/* ---- Stats Row ---- */
.stats-row {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---- Final CTA ---- */
.cta-section {
  padding: 100px 0 120px;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 32px;
}

.cta-section h2 .cta-accent {
  color: var(--accent-warm);
}

.cta-section .app-store-badge {
  margin: 0 auto;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 200ms ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ---- Animations ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal — vertical (default) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

/* Scroll reveal — horizontal (feature panels) */
[data-reveal-x] {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-x].revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Legal Pages ---- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}

.legal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal-card p,
.legal-card li {
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 20px;
}

.legal-card a {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-card a:hover {
  color: var(--text-primary);
}

.legal-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-footer span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legal-footer .footer-links a {
  font-size: 0.82rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    gap: 18px;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    align-items: center;
  }

  .showcase {
    margin-right: 0;
    justify-content: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 0 calc(50% - 95px);
    scrollbar-width: none;
  }

  .showcase::-webkit-scrollbar {
    display: none;
  }

  .showcase__device--side,
  .showcase__device--main {
    width: 190px;
    scroll-snap-align: center;
  }

  .showcase__device--side:first-child,
  .showcase__device--side:last-child {
    margin: 0;
    transform: none;
  }

  .showcase::after {
    display: none;
  }

  .features-section {
    padding: 72px 0;
  }

  .features-heading {
    max-width: 100%;
  }

  .feature-panel {
    flex: 0 0 240px;
    min-height: 280px;
  }

  .stats-inner {
    flex-direction: column;
    gap: 24px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .cta-section {
    padding: 72px 0 80px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 110px 0 40px;
  }

  .showcase {
    padding: 0 calc(50% - 80px);
  }

  .showcase__device--side,
  .showcase__device--main {
    width: 160px;
  }

  .legal-card {
    padding: 28px 20px;
  }
}
