/* ========================================================
   KlasperAI — Arcane-Inspired Dark Futuristic Landing
   ======================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Core Palette (Synthesized from App Screenshots) */
  --bg: #0b0d17;
  --bg-subtle: #05060b;
  --surface: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.3);
  
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.5);
  --text-body: rgba(255, 255, 255, 0.7);
  
  --accent: #8b5cf6;
  --accent-soft: #c084fc;
  --accent-deep: #6366f1;
  
  --glow: rgba(139, 92, 246, 0.5);
  --glow-wide: rgba(139, 92, 246, 0.15);
  
  /* State Colors (Flashcards / Feedback) */
  --diff-very-hard: #ef4444;
  --diff-hard: #f97316;
  --diff-normal: #6b7280;
  --diff-easy: #10b981;
  --diff-very-easy: #06b6d4;

  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Inter", system-ui, -apple-system, 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(--sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.65;
  font-weight: 400;
}

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

/* ---------- STAR CANVAS ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- TOPBAR ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.topbar.scrolled {
  background: rgba(8, 6, 14, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

/* ---------- BRAND / LOGO ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.k-logo {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  filter: drop-shadow(0 0 12px var(--glow));
}

.k-logo-footer {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* ---------- NAV ---------- */
nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #fff;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px clamp(24px, 5vw, 72px) 60px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  gap: 40px;
}

.hero-text {
  position: relative;
  z-index: 3;
}

.hero-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
  color: #fff;
}

.hero-text h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-soft);
  display: block;
}

.hero-desc {
  max-width: 42ch;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

/* ---------- GLOWING PORTAL ---------- */
.portal-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  min-height: 480px;
  gap: 24px;
}

.portal {
  position: relative;
  width: 260px;
  height: 400px;
}

.portal-inner {
  position: absolute;
  inset: 0;
  border-radius: 130px 130px 0 0;
  overflow: hidden;
  background: linear-gradient(180deg,
      rgba(168, 85, 247, 0.08) 0%,
      rgba(139, 92, 246, 0.04) 50%,
      transparent 100%);
  border: 1.5px solid;
  border-image: linear-gradient(180deg, var(--accent) 0%, rgba(168, 85, 247, 0.15) 70%, transparent 100%) 1;
  /* Optional floating animation for portal */
  animation: portalPulse 4s ease-in-out infinite alternate, float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Portrait image inside portal */
.portal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 130px 130px 0 0;
  opacity: 0.85;
  mix-blend-mode: lighten;
}

/* Quote below portal */
.portal-quote {
  text-align: center;
  max-width: 320px;
  margin-top: 4px;
}

.portal-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.portal-quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portal-author {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-soft);
  letter-spacing: 0.03em;
}

.portal-author-role {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-dim);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.portal-light {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 40px;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 70%);
  filter: blur(10px);
  animation: portalLightPulse 3s ease-in-out infinite alternate;
}

@keyframes portalPulse {
  0% {
    box-shadow: 0 0 60px rgba(168, 85, 247, .15), 0 0 120px rgba(139, 92, 246, .08), inset 0 0 60px rgba(168, 85, 247, .06);
  }

  100% {
    box-shadow: 0 0 80px rgba(168, 85, 247, .25), 0 0 160px rgba(139, 92, 246, .12), inset 0 0 80px rgba(168, 85, 247, .1);
  }
}

@keyframes portalLightPulse {
  0% {
    opacity: 0.6;
    transform: translateX(-50%) scaleX(1);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.15);
  }
}

/* ---------- BUTTONS ---------- */
.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0 24px;
  height: 48px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.btn-glow:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow), 0 0 40px rgba(168, 85, 247, .1);
  transform: translateY(-2px);
}

.btn-glow:hover::before {
  opacity: 1;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 48px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-body);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.35s ease;
}

.btn-outline:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-app-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.btn-app-store::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.btn-app-store:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.btn-app-store:hover::after {
  opacity: 1;
}

.btn-app-store svg {
  display: block;
}
/* ---------- STATS ROW ---------- */
.stats-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1280px;
  margin: 80px auto 0;
  width: 100%;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.stat {
  background: var(--bg-subtle);
  padding: 28px 24px;
  transition: background 0.3s ease;
}

.stat:hover {
  background: rgba(168, 85, 247, 0.04);
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.stat span {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---------- QUOTE SECTION ---------- */
.quote-section {
  position: relative;
  z-index: 1;
  padding: clamp(100px, 14vw, 200px) 24px;
  text-align: center;
  overflow: hidden;
}

.quote {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  position: relative;
  z-index: 2;
}

.quote em {
  font-style: italic;
  color: var(--accent-soft);
}

.glow-ellipse {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: min(700px, 90vw);
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
      rgba(168, 85, 247, 0.3) 0%,
      rgba(139, 92, 246, 0.12) 40%,
      transparent 70%);
  filter: blur(30px);
  animation: ellipseGlow 5s ease-in-out infinite alternate;
  z-index: 1;
}

.glow-ellipse-sm {
  width: min(500px, 80vw);
  height: 120px;
  top: 20%;
}

@keyframes ellipseGlow {
  0% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scaleX(1);
  }

  100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scaleX(1.1);
  }
}

/* ---------- SECTIONS ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 10vw, 140px) clamp(24px, 5vw, 72px);
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  max-width: 16ch;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 48px;
}

/* ---------- FEATURES GRID (4 col) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-subtle);
  padding: 32px 24px;
  transition: background 0.3s ease;
}

.feature-card:hover {
  background: rgba(168, 85, 247, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.15);
  border-color: var(--border-hover);
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---------- PROCESS GRID ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.process-step:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.step-num {
  display: inline-block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.7;
}

.process-step h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.process-step p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- EVIDENCE GRID ---------- */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.evidence-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.evidence-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 40px -15px rgba(168, 85, 247, 0.2);
}

.evidence-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.evidence-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.evidence-card a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-soft);
  transition: color 0.3s ease;
}

.evidence-card a:hover {
  color: #fff;
}

/* ---------- COMPARE TABLE ---------- */
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  margin-top: 24px;
}

.compare-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

td {
  color: var(--text-body);
  font-size: 0.88rem;
}

tr:last-child td {
  border-bottom: none;
}

/* ---------- TESTIMONIAL ---------- */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-body);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.testimonial-card cite {
  display: block;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-style: normal;
  color: var(--text-dim);
}

/* ---------- CTA SECTION ---------- */
.section-cta {
  text-align: center;
  overflow: hidden;
}

.section-cta .section-title {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-cta .section-label {
  text-align: center;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 64px;
}

/* ---------- BLOG GRID ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.blog-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.blog-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-card a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-soft);
  transition: color 0.3s ease;
}

.blog-card a:hover {
  color: #fff;
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px clamp(24px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

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

.footer-links a {
  color: var(--text-dim);
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
}

.footer-links a:hover {
  color: var(--accent-soft);
  transform: translateY(-2px);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ---------- SCROLL REVEAL ---------- */
.hero-text,
.hero-inner .portal-wrap,
.stats-row,
.quote,
.section-label,
.section-title,
.section-desc,
.features-grid,
.process-step,
.evidence-card,
.compare-card,
.testimonial-card,
.cta-buttons,
.blog-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Stagger grid items */
.process-step:nth-child(2),
.evidence-card:nth-child(2),
.blog-card:nth-child(2) {
  transition-delay: 0.1s;
}

.process-step:nth-child(3),
.evidence-card:nth-child(3),
.blog-card:nth-child(3) {
  transition-delay: 0.2s;
}

/* ==========================================================
   RESPONSIVE — ALL DEVICE SIZES
   ========================================================== */

/* ----- LARGE DESKTOP / SMALL LAPTOP (≤1280px) ----- */
@media (max-width: 1280px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----- TABLET LANDSCAPE (≤1080px) ----- */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 1;
  }

  .portal-wrap {
    order: 0;
    min-height: 300px;
  }

  .portal {
    width: 200px;
    height: 280px;
  }

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

  .hero-actions {
    justify-content: center;
  }

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

  .hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 48px;
  }

  .section-title {
    max-width: 100%;
  }

  .process-grid,
  .evidence-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  }
}

/* ----- TABLET PORTRAIT (≤768px) ----- */
@media (max-width: 768px) {

  /* Mobile nav */
  nav {
    display: none;
  }

  nav.nav-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 6, 14, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 48px 32px;
    gap: 24px;
    z-index: 99;
    animation: fadeSlideIn 0.3s ease;
  }

  @keyframes fadeSlideIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  nav.nav-open a {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: 100px;
    padding-bottom: 40px;
    min-height: auto;
  }

  .portal-wrap {
    min-height: 240px;
  }

  .portal {
    width: 160px;
    height: 240px;
  }

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

  .hero-desc {
    font-size: 0.88rem;
  }

  /* Stats */
  .stats-row {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .stat {
    padding: 22px 20px;
  }

  .stat strong {
    font-size: 1.3rem;
  }

  /* Grids */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .process-grid,
  .evidence-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .feature-card {
    padding: 24px 20px;
  }

  .process-step,
  .evidence-card,
  .blog-card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .compare-card {
    padding: 24px 16px;
    border-radius: 16px;
  }

  .testimonial-card {
    padding: 24px 20px;
    border-radius: 16px;
    font-size: 1rem;
  }

  /* Table: horizontal scroll on small screens */
  .compare-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 520px;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Sections */
  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-desc {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  /* CTA */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
  }

  .btn-glow,
  .btn-outline {
    width: 100%;
    max-width: 320px;
    padding: 16px 28px;
    font-size: 0.9rem;
  }

  /* Quote */
  .quote-section {
    padding: 80px 20px;
  }

  .glow-ellipse {
    height: 120px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 32px 24px;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ----- SMALL TABLET / LARGE PHONE (≤600px) ----- */
@media (max-width: 600px) {
  .topbar {
    height: 56px;
    padding: 0 16px;
  }

  .brand span {
    font-size: 0.85rem;
  }

  .k-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .hero {
    padding: 80px 16px 32px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }

  .portal-wrap {
    min-height: 200px;
  }

  .portal {
    width: 130px;
    height: 200px;
  }

  .stats-row {
    border-radius: 12px;
  }

  .section {
    padding: 48px 16px;
  }

  .section-label {
    font-size: 0.65rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .features-grid {
    border-radius: 12px;
  }

  .feature-card h3 {
    font-size: 1.05rem;
  }

  .process-step h3,
  .evidence-card h3,
  .blog-card h3 {
    font-size: 1.05rem;
  }

  .quote {
    font-size: 1.4rem;
  }

  nav.nav-open {
    top: 56px;
    padding: 32px 24px;
  }
}

/* ----- SMALL PHONE (≤400px) ----- */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.7rem;
    line-height: 1.15;
  }

  .hero-desc {
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .hero-label {
    font-size: 0.6rem;
  }

  .btn-glow,
  .btn-outline {
    padding: 14px 20px;
    font-size: 0.85rem;
  }

  .stat strong {
    font-size: 1.15rem;
  }

  .stat span {
    font-size: 0.72rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .quote {
    font-size: 1.2rem;
  }

  .portal {
    width: 110px;
    height: 170px;
  }

  .portal-wrap {
    min-height: 170px;
  }

  .feature-card,
  .process-step,
  .evidence-card,
  .blog-card {
    padding: 20px 16px;
  }

  .compare-card {
    padding: 20px 12px;
  }

  .testimonial-card {
    padding: 20px 16px;
    font-size: 0.92rem;
  }

  .footer-inner {
    padding: 24px 16px;
  }

  .footer-copy {
    font-size: 0.7rem;
  }
}

/* ---------- FOOTER LEGAL LINKS ---------- */
.footer-legal-links {
  display: flex;
  gap: 24px;
  align-items: center;
  width: 100%;
  justify-content: center;
  padding-top: 8px;
}

.footer-legal-links a {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.footer-legal-links a:hover {
  color: var(--accent-soft);
}

/* ---------- LEGAL PAGES ---------- */
.legal-header {
  position: relative;
  z-index: 1;
  padding: 160px clamp(24px, 5vw, 72px) 60px;
  text-align: center;
}

.legal-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.legal-header .update-date {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.legal-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 72px) 120px;
}

.legal-section {
  margin-bottom: 48px;
}

.legal-section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal-section h3 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal-section p {
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 14px;
}

.legal-section ul li {
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.8;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}

.legal-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.legal-section a {
  color: var(--accent-soft);
  transition: color 0.3s ease;
}

.legal-section a:hover {
  color: #fff;
}

.legal-note {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-note p {
  color: var(--text-body);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 768px) {
  .legal-header {
    padding: 120px 24px 48px;
  }

  .legal-content {
    padding-bottom: 80px;
  }

  .footer-legal-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* ---------- URGENCY BAR ---------- */
#urgency-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(8, 6, 14, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #c084fc;
  text-align: center;
  transition: transform 0.3s ease;
}

#urgency-bar.hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.urgency-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.urgency-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  margin-left: 12px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.urgency-close:hover {
  color: #fff;
}

body.has-urgency-bar .topbar {
  top: 42px;
}

body.has-urgency-bar .hero {
  padding-top: 185px;
}

/* ---------- NAV CTA BUTTON ---------- */
.nav-cta-btn {
  display: inline-flex !important;
  align-items: center;
  padding: 8px 20px !important;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #fff !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  transition: all 0.3s ease !important;
}

.nav-cta-btn:hover {
  background: rgba(168, 85, 247, 0.28) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
  transform: translateY(-1px) !important;
}

/* ---------- HERO BADGE ---------- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-soft);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: dotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* ---------- HERO TRUST + PRIMARY BUTTON ---------- */
.hero-trust {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.btn-primary-hero {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(124, 58, 237, 0.22) 100%);
  border-color: rgba(168, 85, 247, 0.55);
  padding: 16px 36px;
  font-size: 0.9rem;
}

.btn-primary-hero:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%) !important;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.45), 0 0 80px rgba(168, 85, 247, 0.12) !important;
}

/* ---------- STATS SOURCE ---------- */
.stat-source {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 5px;
  opacity: 0.65;
}

/* ---------- PAIN SECTION ---------- */
.section-pain {
  background: linear-gradient(180deg, transparent 0%, rgba(124, 58, 237, 0.03) 50%, transparent 100%);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.pain-card {
  background: rgba(168, 85, 247, 0.035);
  border: 1px solid rgba(168, 85, 247, 0.1);
  border-radius: 20px;
  padding: 32px 28px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease;
}

.pain-card.is-visible {
  opacity: 1;
  transform: none;
}

.pain-card:hover {
  border-color: rgba(168, 85, 247, 0.28);
  transform: translateY(-3px);
}

.pain-card:nth-child(2) { transition-delay: 0.08s; }
.pain-card:nth-child(3) { transition-delay: 0.16s; }
.pain-card:nth-child(4) { transition-delay: 0.24s; }

.pain-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.18);
  color: var(--accent-soft);
  margin-bottom: 18px;
  flex-shrink: 0;
}

.pain-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.pain-card p {
  color: var(--text-dim);
  font-size: 0.87rem;
  line-height: 1.65;
}

.pain-card p em {
  font-style: normal;
  color: var(--accent-soft);
  font-weight: 500;
}

.pain-bridge {
  margin-top: 52px;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  color: var(--text-body);
  text-align: center;
  line-height: 1.45;
}

.pain-bridge strong {
  color: #fff;
  font-style: italic;
}

/* ---------- TESTIMONIALS V2 ---------- */
.testimonials-section {
  margin-top: 12px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.testimonial-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  margin: 0;
  font-style: normal;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease;
}

.testimonial-card-v2.is-visible {
  opacity: 1;
  transform: none;
}

.testimonial-card-v2:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.testimonial-card-v2:nth-child(2) { transition-delay: 0.1s; }
.testimonial-card-v2:nth-child(3) { transition-delay: 0.2s; }

.testimonial-stars {
  color: #f59e0b;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.testimonial-card-v2 p {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 20px;
}

.testimonial-card-v2 cite {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-style: normal;
}

.cite-name {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.cite-role {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* ---------- CTA DESC + TRUST INDICATORS ---------- */
.cta-desc {
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.72;
  max-width: 56ch;
  margin: 0 auto 32px;
  text-align: center;
}

.cta-desc strong {
  color: var(--accent-soft);
  font-weight: 600;
}

.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 56px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.trust-item svg {
  color: #22c55e;
  flex-shrink: 0;
}

/* ---------- LEAD MAGNET ---------- */
.lead-magnet {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 48px;
  text-align: left;
}

.lead-magnet-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.lead-magnet-text {
  flex: 1;
}

.lead-magnet-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
}

.lead-magnet-text h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.35;
}

.lead-magnet-text p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 52ch;
}

.lead-magnet-btn {
  display: inline-flex;
  padding: 12px 24px;
  font-size: 0.85rem;
}

.lead-magnet-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(124, 58, 237, 0.12));
  border: 1.5px solid rgba(168, 85, 247, 0.28);
  flex-shrink: 0;
  gap: 2px;
}

.lead-magnet-badge span:first-child {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-soft);
  letter-spacing: 0.05em;
}

.lead-magnet-badge span:last-child {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- BLOG CARD CTA ---------- */
.blog-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-soft);
  transition: color 0.3s ease;
}

.blog-card-cta:hover {
  color: #fff;
}

/* ---------- STICKY MOBILE CTA ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 16px 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 6, 14, 0.96) 32%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sticky-cta.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-cta-btn {
  width: 100%;
  max-width: 420px;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center;
  padding: 16px 24px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.4) !important;
}

/* ---------- EVIDENCE CARD STRONG ---------- */
.evidence-card strong {
  color: #fff;
  font-weight: 600;
}

/* ==========================================================
   RESPONSIVE — NEW ELEMENTS
   ========================================================== */
@media (max-width: 1080px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sticky-cta {
    display: block;
  }

  body.has-urgency-bar .hero {
    padding-top: 160px;
  }

  #urgency-bar {
    font-size: 0.76rem;
    padding: 9px 16px;
  }

  .pain-grid {
    grid-template-columns: 1fr;
  }

  .pain-card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .lead-magnet {
    padding: 28px 24px;
  }

  .lead-magnet-inner {
    flex-direction: column;
  }

  .lead-magnet-badge {
    display: none;
  }

  .lead-magnet-text p {
    max-width: 100%;
  }

  .trust-indicators {
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .trust-indicators {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  body.has-urgency-bar .hero {
    padding-top: 140px;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- APP SHOWCASE ---------- */
.app-showcase {
  background: var(--bg-subtle);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.showcase-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.showcase-header {
  text-align: center;
  margin-bottom: 80px;
}

.showcase-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  align-items: start;
}

.showcase-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  opacity: 1; /* Keeping visible for now, can add JS scroll reveal later */
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.iphone-mockup {
  position: relative;
  width: 280px;
  height: 580px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 
    0 50px 100px -20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 20px rgba(168, 85, 247, 0.15);
  border: 4px solid #1a1a1a;
}

/* Notch */
.iphone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 25px;
  background: #1a1a1a;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 2;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-item h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #fff;
  text-align: center;
  margin-top: 10px;
}

.showcase-item p {
  color: var(--text-body);
  text-align: center;
  font-size: 0.95rem;
  max-width: 240px;
}

@media (max-width: 768px) {
  .iphone-mockup {
    width: 240px;
    height: 500px;
  }
}

/* ---------- STEP VISUAL ---------- */
.step-visual {
  width: 100%;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.iphone-mockup.mini {
  width: 100%;
  height: 180px; /* Fixed height for the "cut" look but wrapped in a mockup */
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 8px 8px 0 8px;
  border-width: 4px 4px 0 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.iphone-mockup.mini::before {
  width: 80px;
  height: 18px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.iphone-mockup.mini .iphone-screen {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.step-visual img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.process-step:hover .iphone-mockup.mini img {
  transform: translateY(-5px);
}