/* =====================================================
   cdto Website — style.css
   Dark, premium developer tool aesthetic
   ===================================================== */

/* ── CSS Custom Properties ───────────────────────────── */
:root {
  --bg: #09090b;
  --surface: #111118;
  --surface-elevated: #18181f;
  --border: #27272f;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --purple: #a855f7;
  --text: #f4f4f5;
  --muted: #71717a;
  --green: #22c55e;
  --amber: #f59e0b;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --gradient: linear-gradient(135deg, #6366f1, #a855f7);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Nav */
  --nav-h: 64px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg { display: block; }

/* ── Layout Helpers ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-24);
}

/* ── Animations ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popupReveal {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes countUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.55; }
}

/* ── Scroll Reveal ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger for grid children */
.features-grid .feature-card.reveal:nth-child(1) { transition-delay: 0ms; }
.features-grid .feature-card.reveal:nth-child(2) { transition-delay: 80ms; }
.features-grid .feature-card.reveal:nth-child(3) { transition-delay: 160ms; }
.features-grid .feature-card.reveal:nth-child(4) { transition-delay: 240ms; }
.features-grid .feature-card.reveal:nth-child(5) { transition-delay: 320ms; }
.features-grid .feature-card.reveal:nth-child(6) { transition-delay: 400ms; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
}

.btn-xl {
  padding: 18px 40px;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.btn-glow:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.45),
              0 0 60px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* ── Gradient Text ───────────────────────────────────── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Headers ─────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.6;
}

/* ── Navigation ──────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: border-color var(--transition), background var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: var(--space-6);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  margin-inline: auto;
}

.nav-link {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  margin-left: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(9, 9, 11, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-6) var(--space-6);
}

.nav-mobile.open {
  display: block;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav-mobile .nav-link {
  display: block;
  font-size: 16px;
  padding: 10px 0;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + var(--space-16));
  padding-bottom: var(--space-24);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Animated radial background */
.hero-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(99, 102, 241, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: gradientShift 12s ease-in-out infinite;
  background-size: 200% 200%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-16);
  width: 100%;
}

/* Hero copy */
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  width: fit-content;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

/* Headline */
.hero-headline {
  font-size: clamp(44px, 6.5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* Subtitle */
.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-note {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.01em;
}

/* ── Hero Mockup ─────────────────────────────────────── */
.hero-mockup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: float 6s ease-in-out infinite;
}

.mockup-glow {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.35) 0%, rgba(168, 85, 247, 0.15) 50%, transparent 75%);
  filter: blur(40px);
  pointer-events: none;
  border-radius: 50%;
  animation: glowPulse 4s ease-in-out infinite;
  z-index: 0;
}

/* ── Finder Window ───────────────────────────────────── */
.finder-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: #1c1c1e;
  border-radius: 12px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.7),
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Title bar */
.finder-titlebar {
  display: flex;
  align-items: center;
  height: 38px;
  background: #2d2d30;
  padding: 0 12px;
  border-bottom: 1px solid #3a3a3c;
  gap: 8px;
}

.traffic-lights {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-right: 6px;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tl-red    { background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2); }
.tl-yellow { background: #febc2e; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2); }
.tl-green  { background: #28c840; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2); }

.finder-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #c8c8cc;
  letter-spacing: 0.01em;
}

.finder-search {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Toolbar */
.finder-toolbar {
  display: flex;
  align-items: center;
  height: 36px;
  background: #242426;
  padding: 0 10px;
  gap: 4px;
  border-bottom: 1px solid #3a3a3c;
}

.toolbar-nav {
  display: flex;
  gap: 2px;
}

.toolbar-views {
  display: flex;
  gap: 2px;
  margin-left: 6px;
}

.toolbar-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  color: #9999a8;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.toolbar-spacer { flex: 1; }

/* cdto icon in toolbar */
.cdto-toolbar-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
  margin-left: 4px;
  transition: all var(--transition);
  position: relative;
}

.cdto-toolbar-icon:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.7);
  transform: scale(1.06);
}

/* Finder body */
.finder-body {
  display: flex;
  height: 180px;
}

/* Sidebar */
.finder-sidebar {
  width: 130px;
  flex-shrink: 0;
  background: #1a1a1c;
  border-right: 1px solid #3a3a3c;
  padding: 8px 0;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 6px;
}

.sidebar-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #5a5a6a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 10px 4px;
}

.sidebar-items {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: #9999aa;
  border-radius: 5px;
  margin: 0 4px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.sidebar-item:hover,
.sidebar-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
}

/* Finder main area */
.finder-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.finder-path-bar {
  height: 24px;
  background: #222224;
  border-bottom: 1px solid #3a3a3c;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  color: #6a6a7a;
}

.finder-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px;
  align-content: flex-start;
  overflow-y: auto;
}

.finder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition);
  width: 74px;
}

.finder-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.finder-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finder-item-name {
  font-size: 10px;
  color: #c8c8cc;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  max-width: 66px;
}

/* ── cdto Popup ──────────────────────────────────────── */
.cdto-popup {
  position: relative;
  z-index: 2;
  margin-top: -8px;
  margin-left: auto;
  margin-right: 60px;

  /* Glass effect */
  background: rgba(20, 20, 30, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 0.5px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  width: 180px;
  overflow: hidden;

  /* Animation */
  animation: popupReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top right;
}

/* Hidden state for loop animation */
.cdto-popup.popup-hidden {
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  pointer-events: none;
}

.cdto-popup.popup-visible {
  animation: popupReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.popup-inner {
  padding: 5px 0;
}

.popup-list {
  display: flex;
  flex-direction: column;
}

.popup-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #d4d4e0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border-radius: 7px;
  margin: 0 4px;
}

.popup-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
}

.popup-item-active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
}

.popup-item-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.popup-item-name {
  font-size: 13px;
}

.popup-divider {
  height: 1px;
  background: rgba(99, 102, 241, 0.15);
  margin: 5px 12px;
}

.popup-browse {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  margin: 0 4px;
  transition: background var(--transition), color var(--transition);
}

.popup-browse:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

/* ── Stats Strip ─────────────────────────────────────── */
.stats-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-8);
}

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

.stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: var(--space-2) var(--space-10);
  text-align: center;
  justify-content: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  display: inline-block;
  text-align: right;
}

.stat-label {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

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

/* ── Features ────────────────────────────────────────── */
.features {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1), 0 8px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── How It Works ────────────────────────────────────── */
.how-it-works {
  background: var(--surface);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  position: relative;
}

/* Dashed connecting line */
.steps-line {
  position: absolute;
  top: 36px;
  left: calc(16.6% + 20px);
  right: calc(16.6% + 20px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  border-top: 1.5px dashed rgba(99, 102, 241, 0.3);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
}

.step-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1), 0 0 0 1px rgba(99, 102, 241, 0.3);
  position: relative;
  z-index: 1;
}

.step-number {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--primary);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 240px;
}

/* ── Apps Section ────────────────────────────────────── */
.apps-section {
  background: var(--bg);
}

.apps-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.apps-category-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.apps-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.app-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  cursor: default;
}

.app-pill:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-1px);
}

.app-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apps-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
  padding: var(--space-4) var(--space-5);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
}

.apps-note strong {
  color: var(--primary-light);
}

/* ── Install Section ─────────────────────────────────── */
.install-section {
  background: var(--surface);
}

.install-download {
  text-align: center;
  margin-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.install-version {
  font-size: 13px;
  color: var(--muted);
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.install-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.install-step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

code {
  font-family: 'SF Mono', 'Fira Mono', 'Cascadia Mono', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

kbd {
  font-family: 'SF Mono', 'Fira Mono', monospace;
  font-size: 0.85em;
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
}

/* Warning card */
.install-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 640px;
  margin-inline: auto;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
}

.warning-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: var(--space-2);
}

.warning-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.warning-content strong {
  color: var(--text);
}

/* ── FAQ ─────────────────────────────────────────────── */
.faq-section {
  background: var(--bg);
}

.faq-list {
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary-light);
}

.faq-question[aria-expanded="true"] {
  color: var(--primary-light);
}

.faq-chevron {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-light);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 0;
}

.faq-answer.open {
  opacity: 1;
}

.faq-answer-inner {
  padding: 0 var(--space-6) var(--space-5);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-16);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 200px;
}

.footer-logo {
  text-decoration: none;
}

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  max-width: 200px;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: var(--space-12);
  flex: 1;
  justify-content: flex-end;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.footer-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--primary-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom-right {
  opacity: 0.6;
}

/* ── Responsive — Tablet (≤1024px) ──────────────────── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .hero-copy {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
    align-items: center;
  }

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

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

  .hero-mockup {
    max-width: 520px;
    margin-inline: auto;
    align-self: center;
  }

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

  .footer-top {
    flex-direction: column;
    gap: var(--space-10);
  }

  .footer-nav {
    justify-content: flex-start;
    gap: var(--space-10);
  }
}

/* ── Responsive — Mobile (≤768px) ───────────────────── */
@media (max-width: 768px) {
  :root {
    --space-24: 64px;
    --space-20: 56px;
    --space-16: 48px;
  }

  /* Nav */
  .nav-links { display: none; }
  .nav-inner > .btn-primary { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-h) + var(--space-10));
    padding-bottom: var(--space-16);
  }

  .hero-headline {
    font-size: clamp(36px, 10vw, 52px);
  }

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

  /* Steps */
  .steps-container {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .steps-line { display: none; }

  .step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: var(--space-5);
  }

  .step-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
  }

  .step-icon svg {
    width: 22px;
    height: 22px;
  }

  .step-desc { max-width: none; }

  /* Stats */
  .stats-inner {
    flex-direction: column;
    gap: var(--space-6);
  }

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

  .stat { padding: 0; }

  /* Footer */
  .footer-nav {
    flex-direction: column;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  /* Mockup sizing */
  .finder-window {
    max-width: 100%;
  }

  .finder-body {
    height: 140px;
  }

  .finder-sidebar {
    width: 100px;
  }

  /* Popup */
  .cdto-popup {
    margin-right: 20px;
  }
}

/* ── Focus styles for accessibility ──────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Selection color ─────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text);
}

/* ── Scrollbar styling (webkit) ──────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
