/* ═══════════════════════════════════════════════
   Subify Landing — Premium Product Showcase
   ═══════════════════════════════════════════════ */

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

/* ── CSS Custom Properties ───────────────────── */
:root {
  --bg: #f8f9fb;
  --bg-2: #ffffff;
  --bg-3: #f1f5f9;
  --fg: #0f172a;
  --fg-2: #475569;
  --fg-3: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99,102,241,.08);
  --accent-glow: rgba(99,102,241,.15);
  --purple: #a855f7;
  --border: #e2e8f0;
  --glass-bg: rgba(255,255,255,.6);
  --glass-border: rgba(255,255,255,.4);
  --shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.03);
  --shadow-lg: 0 4px 24px rgba(15,23,42,.06), 0 12px 48px rgba(15,23,42,.04);
  --radius: 16px;
  --grain-opacity: .03;
}

html.dark {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-3: #162032;
  --fg: #f1f5f9;
  --fg-2: #94a3b8;
  --fg-3: #64748b;
  --accent-soft: rgba(99,102,241,.15);
  --accent-glow: rgba(99,102,241,.25);
  --border: #1e293b;
  --glass-bg: rgba(30,41,59,.55);
  --glass-border: rgba(99,102,241,.12);
  --shadow: 0 1px 3px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.15);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.3), 0 12px 48px rgba(0,0,0,.2);
  --grain-opacity: .015;
}

/* ── Base ─────────────────────────────────────── */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.text-center { text-align: center; }
.container { max-width: 1120px; margin: 0 auto; }

/* ── SVG defs (hidden) ────────────────────────── */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── Grain overlay ────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  filter: url(#grain);
  width: 100%;
  height: 100%;
}

/* ── Scroll progress bar ──────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  z-index: 200;
  transition: width .05s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Nav ──────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 20px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(248,249,251,.75);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}
html.dark .nav { background: rgba(15,23,42,.8); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--fg);
  text-decoration: none;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--fg-2);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
@media(min-width:900px) { .nav-links { display: flex; } }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--fg-2);
  transition: all .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: all .2s;
  font-family: inherit;
}
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ── Language dropdown ────────────────────────── */
.lang-dd { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--fg-2);
  transition: all .2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn .chevron { transition: transform .2s; }
.lang-dd.open .chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 160px;
  max-height: calc(100dvh - 62px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s;
}
.lang-dd.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-menu a,
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  color: var(--fg);
  text-decoration: none;
  transition: background .15s;
}
.lang-menu a:hover,
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu a.active,
.lang-menu button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lang-menu .fi { width: 1.25em; height: .9em; flex-shrink: 0; border-radius: 2px; }

/* ── Sections ─────────────────────────────────── */
.section { padding: 80px 20px; position: relative; }
.section-alt { padding: 80px 20px; background: var(--bg-3); position: relative; }

.section-label {
  text-align: center;
  margin-bottom: 12px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  position: relative;
  display: inline-block;
  width: 100%;
}
.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin: 8px auto 0;
  border-radius: 1px;
  animation: labelLine 2s ease-in-out infinite;
}
@keyframes labelLine {
  0%, 100% { width: 24px; opacity: .6; }
  50% { width: 40px; opacity: 1; }
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.section-desc {
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: .95rem;
  color: var(--fg-2);
  line-height: 1.65;
  text-align: center;
}

/* ── Wave dividers ────────────────────────────── */
.wave-divider {
  line-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-top: -1px;
  margin-bottom: -1px;
}
.wave-divider svg {
  width: 100%;
  height: 40px;
  display: block;
}
@media(min-width:768px) {
  .wave-divider svg { height: 60px; }
}

/* Waves between section->alt have bg as parent */
.wave-1, .wave-3, .wave-5, .wave-7, .wave-9 { background: var(--bg); }
.wave-2, .wave-4, .wave-6, .wave-8 { background: var(--bg); }

/* ── Hero ─────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px 20px 40px;
  position: relative;
  overflow: hidden;
}

/* Animated gradient mesh background */
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.gradient-mesh {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(99,102,241,.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(168,85,247,.15) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(56,189,248,.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 60%, rgba(99,102,241,.1) 0%, transparent 50%);
  animation: meshMove 20s ease-in-out infinite;
}
html.dark .gradient-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(99,102,241,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(168,85,247,.1) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(56,189,248,.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 60%, rgba(99,102,241,.06) 0%, transparent 50%);
}
@keyframes meshMove {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, -3%) rotate(1deg); }
  50% { transform: translate(-1%, 2%) rotate(-1deg); }
  75% { transform: translate(3%, 1%) rotate(0.5deg); }
}

/* Dot grid pattern */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--fg-3) .5px, transparent .5px);
  background-size: 32px 32px;
  opacity: .12;
}
html.dark .dot-grid { opacity: .06; }

/* Floating shapes */
.hero-float-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .15;
  will-change: transform;
}
html.dark .hero-float-shape { opacity: .08; }

.shape-1 {
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent);
  top: 15%;
  right: 10%;
  animation: floatShape1 14s ease-in-out infinite;
}
.shape-2 {
  width: 60px;
  height: 60px;
  background: rgba(168,85,247,.2);
  bottom: 20%;
  left: 5%;
  animation: floatShape2 18s ease-in-out infinite;
}
.shape-3 {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(56,189,248,.3);
  border-radius: 8px;
  top: 60%;
  right: 20%;
  animation: floatShape3 12s ease-in-out infinite;
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(15px, -20px) rotate(120deg); }
  66% { transform: translate(-10px, 15px) rotate(240deg); }
}
@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.2); }
}
@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-15px, 20px) rotate(180deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media(min-width:768px) {
  .hero-content { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.hero-text { max-width: 520px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid var(--accent-glow);
  backdrop-filter: blur(8px);
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
h1 em {
  font-style: normal;
  position: relative;
  background: linear-gradient(135deg, #6366f1, #a855f7, #6366f1);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 6s ease-in-out infinite;
}
/* Animated underline on gradient text */
h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 2px;
  animation: underlineSlide 3s ease-in-out infinite;
  transform-origin: left;
}
@keyframes underlineSlide {
  0%, 100% { transform: scaleX(0); opacity: 0; }
  50% { transform: scaleX(1); opacity: 1; }
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--fg-2);
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99,102,241,.4);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* Pulsing glow on CTA buttons */
.btn-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  z-index: -1;
  opacity: 0;
  animation: btnPulse 3s ease-in-out infinite;
  filter: blur(12px);
}
@keyframes btnPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.05); }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--glass-bg);
  color: var(--fg);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all .25s;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-note {
  margin-top: 16px;
  font-size: .78rem;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-note .iconify { color: #22c55e; }

/* ── Treemap mockup ───────────────────────────── */
.treemap-mockup {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1.3fr 1fr .7fr;
  animation: mockFloat 6s ease-in-out infinite;
  backdrop-filter: blur(12px);
  position: relative;
}
@media(min-width:768px) { .treemap-mockup { padding: 16px; gap: 8px; } }
@keyframes mockFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Glow behind treemap */
.tm-glow {
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.15), transparent 70%);
  z-index: -1;
  animation: tmGlow 4s ease-in-out infinite;
}
html.dark .tm-glow {
  background: radial-gradient(ellipse at center, rgba(99,102,241,.2), transparent 70%);
}
@keyframes tmGlow {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.tm-cell {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  will-change: transform;
}
.tm-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 2;
}
.tm-cell span { font-weight: 700; font-size: .7rem; opacity: .85; }
.tm-cell small { font-size: .6rem; opacity: .6; }
@media(min-width:768px) { .tm-cell span { font-size: .8rem; } .tm-cell small { font-size: .65rem; } }

/* Shimmer animation on cells */
.tm-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
  animation: cellShimmer 4s ease-in-out infinite;
}
.tm-cell:nth-child(3)::after { animation-delay: .5s; }
.tm-cell:nth-child(4)::after { animation-delay: 1s; }
.tm-cell:nth-child(5)::after { animation-delay: 1.5s; }
.tm-cell:nth-child(6)::after { animation-delay: 2s; }
@keyframes cellShimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.tm-cell.c1 { background: linear-gradient(135deg, #fecdd3, #fda4af); color: #881337; grid-row: 1/3; }
.tm-cell.c2 { background: linear-gradient(135deg, #c7d2fe, #a5b4fc); color: #312e81; }
.tm-cell.c3 { background: linear-gradient(135deg, #bbf7d0, #86efac); color: #14532d; }
.tm-cell.c4 { background: linear-gradient(135deg, #fef08a, #fde047); color: #713f12; grid-column: 1/2; }
.tm-cell.c5 { background: linear-gradient(135deg, #a5f3fc, #67e8f9); color: #155e75; }

html.dark .tm-cell.c1 { background: linear-gradient(135deg, #4c0519, #881337); color: #fecdd3; }
html.dark .tm-cell.c2 { background: linear-gradient(135deg, #1e1b4b, #312e81); color: #c7d2fe; }
html.dark .tm-cell.c3 { background: linear-gradient(135deg, #052e16, #14532d); color: #bbf7d0; }
html.dark .tm-cell.c4 { background: linear-gradient(135deg, #451a03, #713f12); color: #fef08a; }
html.dark .tm-cell.c5 { background: linear-gradient(135deg, #083344, #155e75); color: #a5f3fc; }
html.dark .tm-cell::after {
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%);
}

/* ── Stats Section ────────────────────────────── */
.stats-section {
  padding: 48px 20px;
  position: relative;
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 28px;
  flex: 1;
  min-width: 120px;
}

.stat-number {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-3);
}

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

@media(max-width:640px) {
  .stats-bar { gap: 8px; padding: 24px 16px; }
  .stat-item { padding: 8px 12px; min-width: 0; flex-basis: 40%; }
  .stat-divider { display: none; }
}

/* ── Glassmorphism cards ──────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: all .4s cubic-bezier(.4, 0, .2, 1);
}

/* Mouse-following glow layer */
.glass-card .card-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0;
}
.glass-card:hover .card-glow { opacity: 1; }
.glass-card > *:not(.card-glow) { position: relative; z-index: 1; }

/* Animated gradient border on hover */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--card-angle, 0deg),
    transparent 0%,
    var(--accent) 10%,
    var(--purple) 20%,
    transparent 30%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
  z-index: 1;
  pointer-events: none;
}
.glass-card:hover::before { opacity: 1; }

@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderSpin {
  to { --card-angle: 360deg; }
}
.glass-card:hover::before {
  animation: borderSpin 3s linear infinite;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(99,102,241,.12), var(--shadow-lg);
}
html.dark .glass-card:hover {
  box-shadow: 0 8px 32px rgba(99,102,241,.2), var(--shadow-lg);
}

/* ── Input grid ───────────────────────────────── */
.input-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media(min-width:480px) {
  .input-grid { grid-template-columns: repeat(2, 1fr); }
  .input-grid .input-card:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; }
}
@media(min-width:768px) {
  .input-grid { grid-template-columns: repeat(6, 1fr); }
  .input-grid .input-card:nth-child(1) { grid-column: span 3; }
  .input-grid .input-card:nth-child(2) { grid-column: span 3; }
  .input-grid .input-card:nth-child(3) { grid-column: span 2; }
  .input-grid .input-card:nth-child(4) { grid-column: span 2; }
  .input-grid .input-card:nth-child(5) { grid-column: span 2; }
  .input-grid .input-card:last-child { max-width: none; justify-self: stretch; }
}

.input-card {
  padding: 28px;
  border-radius: var(--radius);
}
.input-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.input-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.input-card p { font-size: .83rem; color: var(--fg-2); line-height: 1.55; }

/* AI cards special */
.ai-card {
  border-color: var(--accent-glow);
}
.ai-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: .65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  letter-spacing: .05em;
  z-index: 2;
  animation: aiBadgePulse 3s ease-in-out infinite;
}
@keyframes aiBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50% { box-shadow: 0 0 12px 4px rgba(168,85,247,.2); }
}

.ai-icon { background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(168,85,247,.1)); }

/* ── Viz grid ─────────────────────────────────── */
.viz-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media(min-width:480px) { .viz-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:768px) { .viz-grid { grid-template-columns: 1fr 1fr 1fr; gap: 20px; } }

.viz-card {
  padding: 24px;
  border-radius: var(--radius);
}
.viz-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.viz-card p { font-size: .83rem; color: var(--fg-2); line-height: 1.55; }

/* Mini viz illustrations — now animated */
.mini-viz {
  height: 72px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--bg-3);
  padding: 10px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
html.dark .mini-viz { background: rgba(15,23,42,.4); }

/* Treemap mini — cells pulse */
.mini-treemap {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  align-items: stretch;
}
.mini-treemap > div { border-radius: 4px; min-height: 0; transition: transform .3s; }
.mini-treemap > div:nth-child(1) { background: #fda4af; grid-row: 1/3; animation: miniPulse 4s ease-in-out infinite; }
.mini-treemap > div:nth-child(2) { background: #a5b4fc; animation: miniPulse 4s ease-in-out infinite .3s; }
.mini-treemap > div:nth-child(3) { background: #86efac; animation: miniPulse 4s ease-in-out infinite .6s; }
.mini-treemap > div:nth-child(4) { background: #fde047; animation: miniPulse 4s ease-in-out infinite .9s; }
.mini-treemap > div:nth-child(5) { background: #67e8f9; animation: miniPulse 4s ease-in-out infinite 1.2s; }
@keyframes miniPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.95); }
}

/* Beeswarm — dots float */
.mini-beeswarm { gap: 0; justify-content: center; position: relative; }
.mini-beeswarm > div { border-radius: 50%; position: absolute; }
.mini-beeswarm > div:nth-child(1) { width: 20px; height: 20px; background: #fda4af; left: 15%; top: 30%; animation: beeFloat 5s ease-in-out infinite; }
.mini-beeswarm > div:nth-child(2) { width: 14px; height: 14px; background: #a5b4fc; left: 28%; top: 50%; animation: beeFloat 5s ease-in-out infinite .4s; }
.mini-beeswarm > div:nth-child(3) { width: 24px; height: 24px; background: #86efac; left: 42%; top: 20%; animation: beeFloat 5s ease-in-out infinite .8s; }
.mini-beeswarm > div:nth-child(4) { width: 10px; height: 10px; background: #fde047; left: 58%; top: 55%; animation: beeFloat 5s ease-in-out infinite 1.2s; }
.mini-beeswarm > div:nth-child(5) { width: 18px; height: 18px; background: #67e8f9; left: 68%; top: 30%; animation: beeFloat 5s ease-in-out infinite 1.6s; }
.mini-beeswarm > div:nth-child(6) { width: 12px; height: 12px; background: #c084fc; left: 80%; top: 45%; animation: beeFloat 5s ease-in-out infinite 2s; }
@keyframes beeFloat {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(3px, -4px); }
  50% { transform: translate(-2px, 3px); }
  75% { transform: translate(4px, -2px); }
}

/* Circle pack — breathes */
.mini-circlepack { justify-content: center; }
.cp-big {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 4px;
  animation: breathe 4s ease-in-out infinite;
}
.cp-big > div { border-radius: 50%; }
.cp-big > div:nth-child(1) { width: 14px; height: 14px; background: #fda4af; }
.cp-big > div:nth-child(2) { width: 10px; height: 10px; background: #86efac; }
.cp-big > div:nth-child(3) { width: 8px; height: 8px; background: #fde047; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Trends — bars grow on hover */
.mini-trends { flex-direction: column; gap: 5px; justify-content: center; }
.mini-trends > div {
  height: 7px;
  border-radius: 4px;
  transition: width .6s ease;
}
.mini-trends > div:nth-child(1) { width: 85%; background: #fda4af; }
.mini-trends > div:nth-child(2) { width: 62%; background: #a5b4fc; }
.mini-trends > div:nth-child(3) { width: 45%; background: #86efac; }
.mini-trends > div:nth-child(4) { width: 30%; background: #fde047; }

.viz-card:hover .mini-trends > div:nth-child(1) { width: 92%; }
.viz-card:hover .mini-trends > div:nth-child(2) { width: 70%; }
.viz-card:hover .mini-trends > div:nth-child(3) { width: 55%; }
.viz-card:hover .mini-trends > div:nth-child(4) { width: 40%; }

/* Donut — rotates slowly */
.mini-cats { justify-content: center; }
.donut {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#fda4af 0 35%, #a5b4fc 35% 58%, #86efac 58% 78%, #fde047 78% 100%);
  display: grid;
  place-items: center;
  animation: donutSpin 20s linear infinite;
}
.donut > div { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-3); }
html.dark .donut > div { background: rgba(15,23,42,.4); }
@keyframes donutSpin { to { transform: rotate(360deg); } }

/* Table — bars fill on scroll */
.mini-table { flex-direction: column; gap: 5px; justify-content: center; }
.mini-table > div {
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.mini-table > div::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  width: 0;
  transition: width 1s ease;
}
.viz-card.visible .mini-table > div:nth-child(1)::before { width: 40%; }
.viz-card.visible .mini-table > div:nth-child(2)::before { width: 65%; }
.viz-card.visible .mini-table > div:nth-child(3)::before { width: 25%; }
.viz-card.visible .mini-table > div:nth-child(4)::before { width: 50%; }

/* Dark mode mini viz colors */
html.dark .mini-treemap > div:nth-child(1) { background: #881337; }
html.dark .mini-treemap > div:nth-child(2) { background: #312e81; }
html.dark .mini-treemap > div:nth-child(3) { background: #14532d; }
html.dark .mini-treemap > div:nth-child(4) { background: #713f12; }
html.dark .mini-treemap > div:nth-child(5) { background: #155e75; }
html.dark .mini-beeswarm > div:nth-child(1) { background: #881337; }
html.dark .mini-beeswarm > div:nth-child(2) { background: #312e81; }
html.dark .mini-beeswarm > div:nth-child(3) { background: #14532d; }
html.dark .mini-beeswarm > div:nth-child(4) { background: #713f12; }
html.dark .mini-beeswarm > div:nth-child(5) { background: #155e75; }
html.dark .mini-beeswarm > div:nth-child(6) { background: #581c87; }
html.dark .cp-big { border-color: #312e81; }
html.dark .cp-big > div:nth-child(1) { background: #881337; }
html.dark .cp-big > div:nth-child(2) { background: #14532d; }
html.dark .cp-big > div:nth-child(3) { background: #713f12; }
html.dark .mini-trends > div:nth-child(1) { background: #881337; }
html.dark .mini-trends > div:nth-child(2) { background: #312e81; }
html.dark .mini-trends > div:nth-child(3) { background: #14532d; }
html.dark .mini-trends > div:nth-child(4) { background: #713f12; }

/* ── Comparison table ─────────────────────────── */
.cmp-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px;
}
.cmp-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.cmp-table th,
.cmp-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.cmp-table th {
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-3);
  background: var(--bg-3);
}
.cmp-table td { color: var(--fg-2); }
.cmp-table tr:last-child td { border-bottom: none; }

/* Row hover highlight */
.cmp-table tbody tr {
  transition: background .2s;
}
.cmp-table tbody tr:hover {
  background: var(--accent-soft);
}

/* Subify column — gradient highlight */
.cmp-hl {
  background: linear-gradient(180deg, rgba(99,102,241,.06), rgba(99,102,241,.12)) !important;
  color: var(--accent) !important;
  font-weight: 600;
}
html.dark .cmp-hl {
  background: linear-gradient(180deg, rgba(99,102,241,.1), rgba(99,102,241,.18)) !important;
}
.cmp-table th.cmp-hl { color: var(--accent) !important; }

/* ── Advantages ───────────────────────────────── */
.adv-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
}
@media(min-width:600px) { .adv-grid { grid-template-columns: 1fr 1fr; } }

.adv-card { padding: 28px; border-radius: var(--radius); }
.adv-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(99,102,241,.25);
}
.adv-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.adv-card p { font-size: .83rem; color: var(--fg-2); line-height: 1.55; }

/* ── Trio (currency/sharing/reminders) ────────── */
.features-trio {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media(min-width:768px) { .features-trio { grid-template-columns: 1fr 1fr 1fr; } }

.trio-card { padding: 28px; border-radius: var(--radius); }
.trio-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(168,85,247,.06));
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--accent-glow);
}
.trio-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.trio-card p { font-size: .85rem; color: var(--fg-2); line-height: 1.6; }

/* ── Privacy ──────────────────────────────────── */
.privacy-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 32px;
  border-radius: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.privacy-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(99,102,241,.04));
  border: 1px solid var(--accent-glow);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  color: var(--accent);
}
.privacy-inner h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.privacy-inner p {
  font-size: .95rem;
  color: var(--fg-2);
  line-height: 1.65;
}
.privacy-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 600;
  color: var(--fg-2);
  transition: border-color .3s;
}
.privacy-badge:hover { border-color: var(--accent-glow); }
.privacy-badge .iconify { color: var(--accent); }

/* ── Language pills ───────────────────────────── */
.lang-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg-2);
  transition: all .3s;
}
.lang-pill .fi { width: 1.25em; height: .9em; flex-shrink: 0; border-radius: 2px; }
.lang-pill:hover {
  border-color: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ── CTA Section ──────────────────────────────── */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 100px 20px;
}

.cta-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cta-mesh {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(99,102,241,.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 70% 40%, rgba(168,85,247,.12) 0%, transparent 60%);
  animation: ctaMeshMove 16s ease-in-out infinite;
}
html.dark .cta-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(99,102,241,.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 70% 40%, rgba(168,85,247,.08) 0%, transparent 60%);
}
@keyframes ctaMeshMove {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3%, 2%); }
}

/* Floating decorative elements */
.cta-float {
  position: absolute;
  border-radius: 12px;
  opacity: .12;
  will-change: transform;
}
html.dark .cta-float { opacity: .06; }

.cta-float-1 {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fda4af, #fecdd3);
  top: 20%;
  left: 15%;
  animation: ctaFloat1 10s ease-in-out infinite;
}
.cta-float-2 {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a5b4fc, #c7d2fe);
  bottom: 25%;
  right: 12%;
  animation: ctaFloat2 14s ease-in-out infinite;
}
.cta-float-3 {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #86efac, #bbf7d0);
  top: 60%;
  left: 8%;
  animation: ctaFloat3 12s ease-in-out infinite;
}
@keyframes ctaFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(20px, -15px) rotate(45deg); }
}
@keyframes ctaFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-15px, 10px); }
}
@keyframes ctaFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(10px, -20px) rotate(-30deg); }
}

.cta-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  position: relative;
}
.cta-section p {
  font-size: .95rem;
  color: var(--fg-2);
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ── Footer ───────────────────────────────────── */
footer { border-top: 1px solid var(--border); }
footer a { color: var(--fg-2); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }

.footer-top {
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media(min-width:600px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; } }

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
}
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-about p { font-size: .82rem; color: var(--fg-3); line-height: 1.6; max-width: 280px; }

.footer-col h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { font-size: .84rem; color: var(--fg-2); }
.footer-col li a:hover { color: var(--accent); }

.footer-bottom {
  padding: 20px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: .78rem;
  color: var(--fg-3);
}

/* Footer language switcher */
.footer-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.footer-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--fg-2);
  transition: all .2s;
}
.footer-lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.footer-lang-btn .fi { width: 1.25em; height: .9em; border-radius: 2px; }
.footer-lang-btn .chevron { transition: transform .2s; }
.footer-lang.open .chevron { transform: rotate(180deg); }

.footer-lang-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 160px;
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
}
.footer-lang.open .footer-lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.footer-lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .85rem;
  color: var(--fg);
  transition: background .15s;
}
.footer-lang-menu a:hover { background: var(--accent-soft); }
.footer-lang-menu a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.footer-lang-menu .fi { width: 1.25em; height: .9em; flex-shrink: 0; border-radius: 2px; }

/* ── Reveal Animations ────────────────────────── */
.reveal {
  opacity: 0;
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}

/* Default: fade up */
.reveal:not(.reveal-left):not(.reveal-right):not(.reveal-scale) {
  transform: translateY(32px);
}
.reveal.reveal-scale { transform: scale(.92) translateY(16px); }
.reveal.reveal-left { transform: translateX(-40px); }
.reveal.reveal-right { transform: translateX(40px); }

.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Staggered delays for grid children */
.input-grid .reveal:nth-child(1) { transition-delay: 0s; }
.input-grid .reveal:nth-child(2) { transition-delay: .08s; }
.input-grid .reveal:nth-child(3) { transition-delay: .16s; }
.input-grid .reveal:nth-child(4) { transition-delay: .24s; }
.input-grid .reveal:nth-child(5) { transition-delay: .32s; }

.viz-grid .reveal:nth-child(1) { transition-delay: 0s; }
.viz-grid .reveal:nth-child(2) { transition-delay: .08s; }
.viz-grid .reveal:nth-child(3) { transition-delay: .16s; }
.viz-grid .reveal:nth-child(4) { transition-delay: .24s; }
.viz-grid .reveal:nth-child(5) { transition-delay: .32s; }
.viz-grid .reveal:nth-child(6) { transition-delay: .40s; }

.adv-grid .reveal:nth-child(1) { transition-delay: 0s; }
.adv-grid .reveal:nth-child(2) { transition-delay: .08s; }
.adv-grid .reveal:nth-child(3) { transition-delay: .16s; }
.adv-grid .reveal:nth-child(4) { transition-delay: .24s; }
.adv-grid .reveal:nth-child(5) { transition-delay: .32s; }

.features-trio .reveal:nth-child(1) { transition-delay: 0s; }
.features-trio .reveal:nth-child(2) { transition-delay: .1s; }
.features-trio .reveal:nth-child(3) { transition-delay: .2s; }

/* ── Reduced motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
