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

:root {
  --bg: #080a0f;
  --bg2: #0e111a;
  --card: #111520;
  --border: rgba(255,255,255,0.07);
  --primary: #4f6ef7;
  --primary-dim: rgba(79,110,247,0.12);
  --muted: #6b7280;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --green: #22c55e;
  --blue-400: #60a5fa;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px;
  background: rgba(8,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.04em; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  font-family: 'Space Mono', monospace;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* Language switcher */
.lang-switcher {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 0.75rem; font-weight: 600;
  font-family: 'Space Mono', monospace; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.lang-active { background: rgba(255,255,255,0.1); color: var(--text); }

/* Image mode toggle */
.img-mode-toggle {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
}
.img-mode-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 0.75rem; font-weight: 600;
  font-family: 'Space Mono', monospace; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 5px;
  transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.img-mode-btn:hover { color: var(--text); }
.img-mode-btn.active { background: rgba(255,255,255,0.1); color: var(--text); }
.img-mode-btn svg { width: 12px; height: 12px; }

/* Switchable images */
img[data-img-light], img[data-img-dark] { transition: opacity 0.3s ease; }
img.img-swapping { opacity: 0; }

/* ─── HERO ────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 8rem 2rem 5rem;
  position: relative; overflow: hidden;
}

/* Layered glow orbs */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 65% 50%, rgba(79,110,247,0.18) 0, transparent 70%),
    radial-gradient(ellipse 30% 40% at 80% 30%, rgba(96,165,250,0.12) 0, transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(139,92,246,0.08) 0, transparent 60%);
  pointer-events: none;
  animation: hero-orb 8s ease-in-out infinite alternate;
}
@keyframes hero-orb {
  0%   { opacity: 0.7; transform: scale(1); }
  50%  { opacity: 1;   transform: scale(1.05) translateX(10px); }
  100% { opacity: 0.8; transform: scale(0.97) translateX(-5px); }
}

/* Floating particles */
.hero-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-particles span {
  position: absolute; width: 2px; height: 2px;
  background: rgba(79,110,247,0.6); border-radius: 50%;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-120vh) translateX(40px) scale(0.5); opacity: 0; }
}

.hero-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--primary-dim); border: 1px solid rgba(79,110,247,0.3);
  color: var(--primary); font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.875rem; border-radius: 999px; margin-bottom: 1.5rem;
  animation: badge-appear 0.6s ease both;
}
@keyframes badge-appear {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.badge-dot {
  width: 6px; height: 6px; background: var(--primary); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.4)} }

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 1.25rem;
  animation: hero-text-in 0.7s 0.1s ease both;
}
@keyframes hero-text-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue-400) 40%, #a78bfa 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradient-shift 4s linear infinite;
}
@keyframes gradient-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-sub {
  color: var(--text-dim); font-size: 1rem; max-width: 480px;
  margin-bottom: 2.5rem; font-family: 'Space Mono', monospace; line-height: 1.8;
  animation: hero-text-in 0.7s 0.2s ease both;
}
.appstore-btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  height: 56px; padding: 0 1.5rem;
  background: #fff; color: #000;
  border-radius: 14px; border: none; text-decoration: none;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: hero-text-in 0.7s 0.3s ease both;
}
.appstore-btn:hover { opacity: 0.92; transform: translateY(-2px); box-shadow: 0 10px 40px rgba(79,110,247,0.25); }
.appstore-btn svg { width: 28px; height: 28px; flex-shrink: 0; }
.appstore-btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.appstore-btn-text .small { font-size: 10px; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.7; }
.appstore-btn-text .big { font-size: 1.2rem; font-weight: 700; }

.hero-tags {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  padding-top: 1.5rem; border-top: 1px solid var(--border); margin-top: 2rem;
  animation: hero-text-in 0.7s 0.4s ease both;
}
.hero-tag {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-dim); font-family: 'Space Mono', monospace;
}
.tag-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2.5s ease-in-out infinite; }

/* ─── PHONE FRAME ─────────────────────────────── */
.phone-wrap { position: relative; display: flex; justify-content: center; }

/* Multi-layer glowing halo behind hero phone */
.phone-glow {
  position: absolute;
  width: 360px; height: 500px;
  border-radius: 3rem;
  background: transparent;
  filter: blur(0);
  pointer-events: none;
  z-index: 0;
}
.phone-glow::before {
  content: '';
  position: absolute; inset: -30px;
  background: linear-gradient(135deg, rgba(79,110,247,0.5) 0%, rgba(96,165,250,0.35) 50%, rgba(139,92,246,0.3) 100%);
  border-radius: inherit;
  filter: blur(50px);
  animation: glow-pulse 4s ease-in-out infinite alternate;
}
.phone-glow::after {
  content: '';
  position: absolute; inset: -10px;
  background: linear-gradient(135deg, rgba(79,110,247,0.2) 0%, transparent 60%);
  border-radius: inherit;
  filter: blur(20px);
  animation: glow-pulse 4s 1s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
  from { opacity: 0.5; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1.04); }
}

.phone {
  position: relative; z-index: 1;
  background: #0a0a0a;
  border-radius: 44px;
  border: 1.5px solid rgba(255,255,255,0.14);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 34px; background: #0a0a0a;
  border-radius: 0 0 24px 24px; z-index: 10;
}
.phone img { width: 100%; display: block; border-radius: 42px; }
.phone::before {
  content: '';
  position: absolute; left: -3px; top: 80px;
  width: 3px; height: 60px; background: rgba(255,255,255,0.12);
  border-radius: 2px 0 0 2px; box-shadow: 0 70px 0 rgba(255,255,255,0.12);
}
.phone::after {
  content: '';
  position: absolute; right: -3px; top: 100px;
  width: 3px; height: 80px; background: rgba(255,255,255,0.12);
  border-radius: 0 2px 2px 0;
}
.phone-lg { width: 280px; }
.phone-md { width: 240px; }
.phone-sm { width: 220px; }

/* Hero phone float + wobble */
.hero .phone-wrap > .phone {
  animation: hero-float 6s ease-in-out infinite;
}
@keyframes hero-float {
  0%   { transform: translateY(0)    rotate(-0.8deg); }
  25%  { transform: translateY(-8px) rotate(0.6deg); }
  50%  { transform: translateY(-4px) rotate(-0.5deg); }
  75%  { transform: translateY(-10px) rotate(0.7deg); }
  100% { transform: translateY(0)    rotate(-0.8deg); }
}

/* Feature-row and bento phones: lighter wobble */
.feature-row .phone, .bento-img img {
  animation: gentle-wobble 7s ease-in-out infinite;
}
.feature-row .phone:nth-of-type(even) {
  animation-delay: -3.5s;
}
@keyframes gentle-wobble {
  0%,100% { transform: translateY(0) rotate(-0.5deg); }
  33%     { transform: translateY(-5px) rotate(0.4deg); }
  66%     { transform: translateY(-2px) rotate(-0.3deg); }
}

/* ─── INLINE INTEGRATIONS STRIP ───────────────── */
.integrations {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  padding: 2rem;
  overflow: hidden;
}
.integrations-inner { max-width: 1200px; margin: 0 auto; }
.integrations-label {
  text-align: center; color: var(--text-dim);
  font-size: 0.7rem; font-family: 'Space Mono', monospace;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.chips { display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center; }
.chip {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.8rem; font-weight: 500;
  padding: 0.35rem 1rem; border-radius: 999px;
  font-family: 'Space Mono', monospace;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  cursor: default;
}
.chip:hover {
  border-color: rgba(79,110,247,0.5);
  color: var(--text);
  background: rgba(79,110,247,0.06);
}

/* ─── SECTIONS ────────────────────────────────── */
section { padding: 6rem 2rem; }
.section-divider { border-top: 1px solid var(--border); }
.section-alt { background: var(--bg2); }

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-dim); font-family: 'Space Mono', monospace;
  font-size: 0.9rem; line-height: 1.9; margin-bottom: 2rem; max-width: 480px;
}
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.feature-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.list-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.list-dot.blue { background: var(--blue-400); }
.feature-list strong { font-weight: 600; display: block; margin-bottom: 0.2rem; }
.feature-list p { color: var(--text-dim); font-size: 0.875rem; }

/* ─── FEATURE ROWS ────────────────────────────── */
.feature-row {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; margin-bottom: 6rem;
}
.feature-row:last-child { margin-bottom: 0; }

/* ─── BENTO GRID ──────────────────────────────── */
.bento-header { text-align: center; margin-bottom: 4rem; }
.bento-header p { color: var(--text-dim); font-family: 'Space Mono', monospace; font-size: 0.9rem; max-width: 480px; margin: 0.75rem auto 0; }
.bento-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.bento-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 2rem; overflow: hidden;
  display: flex; flex-direction: column; min-height: 380px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}
/* Animated shimmer border on hover */
.bento-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, transparent 40%, rgba(79,110,247,0.08) 60%, transparent 80%);
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.bento-card:hover::before { opacity: 1; background-position: 100% 100%; }
.bento-card:hover {
  border-color: rgba(79,110,247,0.35);
  box-shadow: 0 0 0 1px rgba(79,110,247,0.12), 0 20px 60px rgba(0,0,0,0.3);
}
.bento-card.wide { grid-column: span 2; }
.bento-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.bento-card > p { color: var(--text-dim); font-size: 0.875rem; }
.bento-img {
  margin-top: auto; padding-top: 1.5rem;
  display: flex; justify-content: center; align-items: flex-end; overflow: hidden;
}
.bento-img img {
  border-radius: 12px 12px 0 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
  transition: opacity 0.3s ease;
}
.bento-zero {
  justify-content: center; align-items: center; text-align: center;
  min-height: 160px;
  background: radial-gradient(ellipse at center, rgba(79,110,247,0.08) 0, transparent 70%);
}
.bento-zero h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.75rem; }
.bento-zero p { color: var(--text-dim); font-family: 'Space Mono', monospace; font-size: 0.85rem; max-width: 360px; }

/* ─── MODES SECTION ───────────────────────────── */
.modes-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.modes-inner h2 { margin-bottom: 0.75rem; }
.modes-sub { color: var(--text-dim); font-family: 'Space Mono', monospace; font-size: 0.9rem; max-width: 480px; margin: 0 auto 4rem; }
.modes-phones { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; align-items: flex-end; }
.modes-phone { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.mode-label { font-size: 0.75rem; color: var(--text-dim); font-family: 'Space Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── BOTTOM INTEGRATIONS (ticker) ────────────── */
.integrations-bottom {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 3.5rem 0;
  overflow: hidden;
}
.integrations-bottom-label {
  text-align: center;
  color: var(--text-dim); font-size: 0.7rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* Infinite scroll ticker */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-group { display: flex; gap: 0.75rem; padding-right: 0.75rem; }
.ticker-chip {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.8rem; font-weight: 500;
  padding: 0.5rem 1.25rem; border-radius: 999px;
  font-family: 'Space Mono', monospace; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: default;
}
.ticker-chip:hover {
  border-color: rgba(79,110,247,0.5);
  color: var(--text);
  background: rgba(79,110,247,0.07);
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Fade edges */
.ticker-wrap {
  position: relative; overflow: hidden;
}
.ticker-wrap::before, .ticker-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
  pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

/* ─── FOOTER ──────────────────────────────────── */
footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 3rem 2rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.04em; }
.footer-version {
  font-size: 0.7rem; color: var(--text-dim); font-family: 'Space Mono', monospace;
  background: var(--card); border: 1px solid var(--border);
  padding: 0.15rem 0.5rem; border-radius: 4px; margin-left: 0.5rem; vertical-align: middle;
}
.footer-copy { color: var(--text-dim); font-size: 0.8rem; font-family: 'Space Mono', monospace; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-dim); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ─── SCROLL REVEAL ───────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-tags { justify-content: center; }
  .phone-wrap { margin-top: 2rem; }
  .feature-row { grid-template-columns: 1fr; gap: 3rem; }
  .feature-row .phone-wrap { order: -1; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.wide { grid-column: span 1; }
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .modes-phones { gap: 1.5rem; }
}
