/* ========================================================================
   MerMD Landing Page — Design System & Styles
   Palette derived from the app's Material 3 purple theme
   ======================================================================== */

/* ── Google Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ────────────────────────────────────────────── */
:root {
  /* Primary palette */
  --primary:            #6750A4;
  --primary-light:      #D0BCFF;
  --primary-container:  #EADDFF;
  --on-primary:         #FFFFFF;
  --primary-dark:       #4F378B;

  /* Surface & background */
  --bg:                 #0F0E13;
  --bg-elevated:        #1C1B1F;
  --surface:            #1C1B1F;
  --surface-variant:    #49454F;
  --surface-container:  #211F26;

  /* Text */
  --text-primary:       #E6E1E5;
  --text-secondary:     #CAC4D0;
  --text-muted:         #938F99;

  /* Accent */
  --glow-purple:        #2A1F4E;
  --glow-purple-bright: #7B61FF;

  /* Misc */
  --border:             rgba(202, 196, 208, 0.1);
  --glass-bg:           rgba(28, 27, 31, 0.6);
  --glass-border:       rgba(208, 188, 255, 0.12);

  /* Spacing */
  --section-padding:    100px 0;
  --container-width:    1200px;
  --radius-sm:          8px;
  --radius-md:          16px;
  --radius-lg:          24px;
  --radius-xl:          32px;

  /* Transitions */
  --transition-fast:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium:  0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:    0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--glow-purple-bright);
}

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

/* ── Container ────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ───────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.navbar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 24px rgba(103, 80, 164, 0.3);
}

.btn-primary:hover {
  background: var(--glow-purple-bright);
  color: var(--on-primary);
  box-shadow: 0 8px 32px rgba(123, 97, 255, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border: 1.5px solid var(--primary-light);
}

.btn-secondary:hover {
  background: rgba(208, 188, 255, 0.08);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-xl);
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ── Hero Section ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  overflow: hidden;
}

/* Animated gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--glow-purple) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(103, 80, 164, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(123, 97, 255, 0.08) 0%, transparent 50%);
  z-index: 0;
}

/* Floating grid pattern overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(208, 188, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208, 188, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(208, 188, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.hero-badge::before {
  content: '✨';
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--glow-purple-bright) 50%, #BB86FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

.phone-mockup {
  position: relative;
  width: 280px;
  transition: transform var(--transition-slow);
}

.phone-mockup:hover {
  transform: scale(1.05);
}

/* ── Phone Frame Component ────────────────────────────────────────────── */
.phone-frame {
  position: relative;
  background: linear-gradient(135deg, #444 0%, #161616 15%, #161616 85%, #333 100%); /* Metallic body */
  padding: 10px 5px; /* Refined bezel thickness */
  border-radius: 12px;
  box-shadow: 
    0 0 0 1.5px #333, /* sharp metallic rim */
    inset 0 0 0 1px #000, /* inner gap */
    inset 0 0 2px 2px rgba(255,255,255,0.05), /* tiny bevel */
    0 32px 80px rgba(0, 0, 0, 0.6); /* grounded shadow */
  z-index: 1;
}

.phone-frame img {
  border-radius: 6px; /* Sharp inner screen corners */
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.scrollable-screen {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1080 / 2316;
  overflow-y: auto;
  border-radius: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #000;
}
.scrollable-screen::-webkit-scrollbar {
  display: none;
}
.scrollable-screen {
  overflow: hidden !important; /* Disable native jumpy scroll */
}
.phone-frame .scrollable-screen img {
  border-radius: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  transition: object-position 8s ease-in-out, opacity 0.35s ease;
}
.screenshot-item:hover .phone-frame .scrollable-screen img {
  object-position: bottom center;
}

/* Glass Glare Overlay */
.glass-overlay {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  right: 5px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 3;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.5); /* Sinks the screen */
}

/* Hardware Buttons */
.hw-btn {
  position: absolute;
  background: linear-gradient(to bottom, #111 0%, #444 20%, #444 80%, #111 100%);
  z-index: -1;
  box-shadow: 
    inset 0 0 1px rgba(255,255,255,0.2),
    0 0 2px rgba(0,0,0,0.5);
}

.hw-btn.volume-up {
  left: -2px;
  top: 25%;
  width: 2px;
  height: 20px;
  border-radius: 2px 0 0 2px;
}

.hw-btn.volume-down {
  left: -2px;
  top: calc(25% + 28px);
  width: 2px;
  height: 20px;
  border-radius: 2px 0 0 2px;
}

.hw-btn.power {
  right: -2px;
  top: 35%;
  width: 2px;
  height: 30px;
  border-radius: 0 2px 2px 0;
}

/* Hole Punch Camera */
.phone-frame::before {
  content: '';
  position: absolute;
  pointer-events: none;
  top: 14px; /* Placed inside the screen */
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 45% 45%, transparent 25%, rgba(30, 50, 100, 0.8) 50%, transparent 65%),
    radial-gradient(circle at 50% 50%, #000 35%, #050505 60%),
    #0a0a0a;
  border-radius: 50%;
  z-index: 4; /* Above glass overlay */
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Glow orb behind phone */
.phone-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 80, 164, 0.3), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.5; transform: scale(0.9); }
  to   { opacity: 1;   transform: scale(1.1); }
}

/* ── Section Headings ─────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Features Section ─────────────────────────────────────────────────── */
.features {
  padding: var(--section-padding);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(208, 188, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ── Cloud Storage Section ────────────────────────────────────────────── */
.cloud {
  padding: 100px 0 40px;
  position: relative;
  overflow: hidden;
}

.cloud-network {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 8 / 3.5;
  margin: 56px auto 0;
}

/* Radial aura behind center node */
.cloud-aura {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208, 188, 255, 0.12) 0%, rgba(208, 188, 255, 0.03) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: aura-breathe 4s ease-in-out infinite;
}

@keyframes aura-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Concentric pulse rings */
.pulse-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(208, 188, 255, 0.15);
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: ring-expand 4s ease-out infinite;
}

.ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.ring-2 { width: 200px; height: 200px; animation-delay: 1.3s; }
.ring-3 { width: 200px; height: 200px; animation-delay: 2.6s; }

@keyframes ring-expand {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* SVG container */
.cloud-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Background glow lines (solid, soft) */
.network-line-bg {
  stroke-width: 1.5;
  opacity: 0.4;
}

/* Foreground dashed animated lines */
.network-line {
  stroke-width: 2;
  stroke-dasharray: 8 6;
  animation: dash-flow 2s linear infinite;
}

.network-line:nth-of-type(1) { animation-delay: 0s; }
.network-line:nth-of-type(2) { animation-delay: 0.4s; }
.network-line:nth-of-type(3) { animation-delay: 0.8s; }
.network-line:nth-of-type(4) { animation-delay: 1.2s; }
.network-line:nth-of-type(5) { animation-delay: 1.6s; }

@keyframes dash-flow {
  to { stroke-dashoffset: -28; }
}

/* Traveling dot particles */
.traveling-dot {
  opacity: 0.85;
}

/* Nodes (both center and providers) */
.network-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
  transform: translate(-50%, -50%);
  animation: node-fade-in 0.8s ease-out both;
}

@keyframes node-fade-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Center MerMD node */
.center-node {
  left: 50%;
  top: 50%;
  z-index: 3;
  animation-delay: 0s;
}

.center-node img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 8px;
  background: rgba(208, 188, 255, 0.08);
  border: 2px solid rgba(208, 188, 255, 0.35);
  box-shadow:
    0 0 20px rgba(208, 188, 255, 0.25),
    0 0 50px rgba(208, 188, 255, 0.10),
    0 0 100px rgba(208, 188, 255, 0.05);
  animation: center-pulse 3s ease-in-out infinite;
}

@keyframes center-pulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(208, 188, 255, 0.25),
      0 0 50px rgba(208, 188, 255, 0.10),
      0 0 100px rgba(208, 188, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 30px rgba(208, 188, 255, 0.4),
      0 0 70px rgba(208, 188, 255, 0.18),
      0 0 120px rgba(208, 188, 255, 0.08);
  }
}

/* Provider nodes */
.provider-node {
  transition: transform 0.3s ease;
}

.provider-node:hover {
  transform: translate(-50%, -50%) scale(1.12) !important;
}

.node-tl { left: 20%; top: 40%; animation-delay: 0.15s; }
.node-bl { left: 30%; top: 85%; animation-delay: 0.30s; }
.node-tr { left: 80%; top: 40%; animation-delay: 0.45s; }
.node-br { left: 70%; top: 85%; animation-delay: 0.60s; }
.node-tc { left: 50%; top: 15%; animation-delay: 0.75s; }

.provider-node .cloud-provider-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-container);
  border: 1px solid var(--border);
  transition: all var(--transition-medium);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.provider-node:hover .cloud-provider-icon {
  border-color: rgba(208, 188, 255, 0.5);
  background: rgba(208, 188, 255, 0.06);
  box-shadow:
    0 0 20px rgba(208, 188, 255, 0.2),
    0 0 40px rgba(208, 188, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.3);
}

.provider-node span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--transition-medium);
}

.provider-node:hover span {
  color: var(--text-primary);
}

/* ── Screenshots Section ──────────────────────────────────────────────── */
.screenshots {
  padding: 60px 0 100px;
  position: relative;
}

/* Theme Toggle */
.theme-toggle-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  background: var(--surface-container);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 4px;
  position: relative;
  cursor: pointer;
  gap: 0;
}

.theme-toggle-btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle-btn.active {
  color: var(--on-primary);
}

.theme-toggle-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--primary);
  border-radius: 100px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.4);
}

.theme-toggle[data-mode="light"] .theme-toggle-indicator {
  transform: translateX(100%);
}

.theme-toggle-btn svg {
  width: 14px;
  height: 14px;
}

/* Screenshot swap animation */
.screenshot-item .phone-frame img,
.screenshot-item .phone-frame .scrollable-screen img {
  transition: opacity 0.35s ease, object-position 8s ease-in-out;
}

.screenshot-item.swapping .phone-frame img,
.screenshot-item.swapping .phone-frame .scrollable-screen img {
  opacity: 0;
}

.screenshot-group {
  margin-bottom: 56px;
}

.screenshot-group:last-child {
  margin-bottom: 0;
}

.screenshot-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.01em;
}

.screenshot-group-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.screenshots-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  perspective: 1200px;
}

.screenshot-item {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-medium);
}


.screenshot-item:hover {
  transform: scale(1.05) !important;
  z-index: 10;
}

.screenshot-item:hover .phone-frame {
  box-shadow:
    0 0 0 2px rgba(208, 188, 255, 0.3),
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(103, 80, 164, 0.25);
}

.screenshot-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── CTA Section ──────────────────────────────────────────────────────── */
.cta {
  padding: var(--section-padding);
  position: relative;
}

.cta-card {
  text-align: center;
  background: linear-gradient(135deg, var(--glow-purple) 0%, var(--surface-container) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 80, 164, 0.2), transparent 70%);
  filter: blur(40px);
}

.cta-card::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.15), transparent 70%);
  filter: blur(40px);
}

.cta-card > * {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── How It Works ────────────────────────────────────────────────────── */
.how-it-works {
  padding: var(--section-padding);
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.step-card:hover {
  border-color: rgba(103, 80, 164, 0.4);
  transform: translateY(-4px);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7B61FF);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Use Cases ───────────────────────────────────────────────────────── */
.use-cases {
  padding: var(--section-padding);
  position: relative;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.use-case-card {
  padding: 32px 24px;
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.use-case-card:hover {
  border-color: rgba(103, 80, 164, 0.4);
  transform: translateY(-4px);
}

.use-case-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(208, 188, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.use-case-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.use-case-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Capabilities ────────────────────────────────────────────────────── */
.capabilities {
  padding: var(--section-padding);
  position: relative;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.capability-block {
  padding: 32px;
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.3s ease;
}

.capability-block:hover {
  border-color: rgba(103, 80, 164, 0.3);
}

.capability-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(208, 188, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.capability-block h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.capability-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.capability-block li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.capability-block li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.capability-block li strong {
  color: var(--text-primary);
}

/* ── FAQ Section ─────────────────────────────────────────────────────── */
.faq {
  padding: var(--section-padding);
  position: relative;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(103, 80, 164, 0.4);
}

.faq-item[open] {
  border-color: rgba(103, 80, 164, 0.3);
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item p {
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.faq-item p strong {
  color: var(--text-primary);
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-brand span {
  font-weight: 600;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

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

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

/* ── Scroll Animations ────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Responsive ───────────────────────────────────────────────────────── */

/* ── Tablet (≤1024px) ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-visual {
    order: -1;
  }

  .phone-mockup {
    width: 220px;
    transform: none;
  }

  /* Hide tooltip on tablet — it overflows right */
  #simulator-tooltip-container {
    display: none !important;
  }

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

  .screenshots-gallery {
    gap: 20px;
  }

  .screenshot-item {
    width: 200px;
  }

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

/* ── Mobile (≤768px) ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-padding: 72px 0;
  }

  .container {
    padding: 0 16px;
  }

  /* --- Navigation --- */
  .navbar.menu-open {
    background: rgba(18, 18, 18, 0.92) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: none !important;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 12px 24px 24px;
    gap: 4px;
    border-top: none;
    border-bottom: 1px solid rgba(103, 80, 164, 0.2);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-links a {
    padding: 12px 16px;
    font-size: 1rem;
    display: block;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
  }

  .navbar-links a:hover {
    background: rgba(103, 80, 164, 0.15);
  }

  .navbar-toggle {
    display: flex;
    z-index: 10;
  }

  .navbar-toggle span {
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  /* Animated X when menu is open */
  .navbar-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .navbar-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Hero --- */
  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

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

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.7;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    margin-bottom: 16px;
  }

  .phone-mockup {
    width: 200px;
  }

  .phone-glow {
    width: 260px;
    height: 260px;
  }

  .simulator-badge {
    top: -10px;
    right: -10px;
    font-size: 0.65rem;
    padding: 4px 10px;
  }

  /* --- Features --- */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  /* --- Cloud Network --- */
  .cloud-network {
    margin-top: 32px;
  }

  .cloud-aura {
    width: 150px;
    height: 150px;
  }

  .pulse-ring { display: none; }

  .center-node img {
    width: 48px;
    height: 48px;
    padding: 4px;
  }

  .provider-node .cloud-provider-icon {
    width: 40px;
    height: 40px;
  }

  .provider-node .cloud-provider-icon svg,
  .provider-node .cloud-provider-icon img {
    width: 20px !important;
    height: 20px !important;
  }

  .provider-node span {
    font-size: 0.65rem;
  }



  /* --- Screenshots --- */
  .screenshot-group {
    margin-bottom: 40px;
  }

  .screenshot-group-title {
    font-size: 1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  .screenshots-gallery {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
  }

  .screenshot-item {
    width: calc(50% - 12px);
    min-width: 140px;
    max-width: 200px;
  }

  .screenshot-item:nth-child(1),
  .screenshot-item:nth-child(2),
  .screenshot-item:nth-child(3) {
    transform: none;
  }

  .screenshot-label {
    font-size: 0.75rem;
  }

  /* --- Buttons --- */
  .btn-large {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  /* --- CTA --- */
  .cta-card {
    padding: 48px 20px;
    border-radius: var(--radius-lg);
  }

  .cta h2 {
    font-size: 1.75rem;
  }

  .cta p {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  /* --- Footer --- */
  .footer {
    padding: 36px 0;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

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

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .footer-copy {
    font-size: 0.75rem;
    margin-top: 12px;
  }
}

/* ── Small phones (≤480px) ─────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --section-padding: 56px 0;
  }

  .container {
    padding: 0 12px;
  }

  .hero {
    padding: 100px 0 48px;
  }

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

  .hero p {
    font-size: 0.9rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .phone-mockup {
    width: 180px;
  }

  .phone-glow {
    width: 200px;
    height: 200px;
  }



  .center-node img {
    width: 40px;
    height: 40px;
    padding: 3px;
  }

  .provider-node .cloud-provider-icon {
    width: 34px;
    height: 34px;
  }

  .provider-node .cloud-provider-icon svg,
  .provider-node .cloud-provider-icon img {
    width: 16px !important;
    height: 16px !important;
  }

  .provider-node span {
    font-size: 0.6rem;
  }

  /* Screenshots single column on very small screens */
  .screenshots-gallery {
    flex-direction: column;
    align-items: center;
  }

  .screenshot-item {
    width: 75%;
    max-width: 220px;
    min-width: unset;
  }

  .screenshot-group-title {
    font-size: 0.9rem;
  }

  /* Section headers */
  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.85rem;
  }

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

  /* CTA */
  .cta-card {
    padding: 36px 16px;
  }

  .cta h2 {
    font-size: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Feature cards */
  .feature-card {
    padding: 20px;
  }

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

  .feature-card p {
    font-size: 0.82rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
  }
}

/* App Simulator Hotspots */
#simulator-hotspots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  cursor: default;
  pointer-events: none;
  background: transparent;
  border-radius: 6px;
}

.simulator-badge {
  position: absolute;
  top: -15px;
  right: -25px;
  background: var(--primary);
  color: #121212;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(208, 188, 255, 0.4);
  animation: float-badge 3s ease-in-out infinite;
  pointer-events: none;
}

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

@keyframes hotspot-pulse {
  0% { background: rgba(208, 188, 255, 0.0); }
  50% { background: rgba(208, 188, 255, 0.15); box-shadow: 0 0 8px rgba(208, 188, 255, 0.2); }
  100% { background: rgba(208, 188, 255, 0.0); }
}

/* Simulator Extensions */
.simulator-screen-container::-webkit-scrollbar {
  display: none;
}
.simulator-screen-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.simulator-tooltip {
  background: var(--surface);
  border: 1px solid rgba(208, 188, 255, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 12px;
}

.simulator-tooltip.visible {
  opacity: 1;
  transform: translateX(0);
}

.simulator-tooltip strong {
  display: block;
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

/* ── Responsive: New SEO Sections ────────────────────────────────────── */
@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 600px) {
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
  
  .step-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .capability-block {
    padding: 24px 20px;
  }

  .faq-item summary {
    padding: 16px 20px;
    font-size: 0.95rem;
  }

  .faq-item p {
    padding: 0 20px 16px;
    font-size: 0.88rem;
  }
}
