@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Base ──────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #F4F6FF; /* matches 'page' token */
  color: #1C1E2E;
}

/* ─── Typography ────────────────────────────────── */
h1, h2 {
  font-family: 'Cal Sans', ui-sans-serif, system-ui, sans-serif;
}

/* ─── Skip to content ───────────────────────────── */
.skip-to-content {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #6c25a7;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 0;
}

/* ─── Scroll progress bar ───────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #6c25a7, #FB7185, #FBBF24);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── Scroll fade-in ─────────────────────────────── */
.fade-in-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  #scroll-progress { display: none; }
}

/* ─── Background orbs ───────────────────────────── */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: 0;
}

/* ─── Glass surface ─────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 32px rgba(60, 60, 120, 0.07),
    0 2px 8px rgba(60, 60, 120, 0.04);
}

.glass-hover {
  transition: background 0.25s ease, border-color 0.25s ease,
              box-shadow 0.25s ease, transform 0.25s ease;
}
.glass-hover:hover {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 20px 52px rgba(60, 60, 120, 0.10),
    0 4px 12px rgba(60, 60, 120, 0.06);
  transform: translateY(-4px);
}

/* ─── Nav ────────────────────────────────────────── */
#nav {
  background: rgba(244, 246, 255, 0.78);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: 0 1px 0 rgba(100, 100, 160, 0.06);
  transition: box-shadow 0.2s ease;
}
#nav.scrolled {
  box-shadow: 0 2px 16px rgba(100, 100, 160, 0.10);
}

/* ─── Logo icon with gradient ───────────────────── */
.logo-icon {
  display: inline-block;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #6c25a7 0%, #FB7185 60%, #FBBF24 100%);
  -webkit-mask-image: url(/photosphere.svg);
          mask-image: url(/photosphere.svg);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.10));
}

/* ─── Gradient text ──────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #6c25a7 0%, #FB7185 60%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-warm {
  background: linear-gradient(135deg, #FB7185 0%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #6c25a7 0%, #FB7185 60%, #FBBF24 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 6px 24px rgba(129, 140, 248, 0.35);
  color: #ffffff;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6D75F5 0%, #F06078 60%, #F5AB0E 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 10px 36px rgba(129, 140, 248, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(129, 140, 248, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 8px rgba(60, 60, 120, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #111827;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(129, 140, 248, 0.70);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 4px 16px rgba(99, 102, 241, 0.18);
  color: #030712;
  transform: translateY(-1px);
}

/* ─── Feature cards ─────────────────────────────── */
.feature-card-teal {
  background: rgba(209, 250, 229, 0.48);
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.feature-card-teal:hover { border-color: rgba(52, 211, 153, 0.50); }
.feature-card-teal h3 { color: #134e3a; }

.feature-card-blue {
  background: rgba(219, 234, 254, 0.48);
  border: 1px solid rgba(96, 165, 250, 0.28);
}
.feature-card-blue:hover { border-color: rgba(96, 165, 250, 0.50); }
.feature-card-blue h3 { color: #1a2f6e; }

.feature-card-purple {
  background: rgba(237, 233, 254, 0.48);
  border: 1px solid rgba(167, 139, 250, 0.28);
}
.feature-card-purple:hover { border-color: rgba(167, 139, 250, 0.50); }
.feature-card-purple h3 { color: #2e1a6e; }

.feature-card-rose {
  background: rgba(254, 226, 226, 0.48);
  border: 1px solid rgba(252, 165, 165, 0.28);
}
.feature-card-rose:hover { border-color: rgba(252, 165, 165, 0.50); }
.feature-card-rose h3 { color: #5a1a2a; }

.feature-card-amber {
  background: rgba(254, 243, 199, 0.48);
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.feature-card-amber:hover { border-color: rgba(251, 191, 36, 0.50); }
.feature-card-amber h3 { color: #4a2e08; }

.feature-card-sky {
  background: rgba(224, 242, 254, 0.48);
  border: 1px solid rgba(14, 165, 233, 0.28);
}
.feature-card-sky:hover { border-color: rgba(14, 165, 233, 0.50); }
.feature-card-sky h3 { color: #0c2d4a; }

.feature-card-fuchsia {
  background: rgba(253, 232, 255, 0.48);
  border: 1px solid rgba(217, 70, 239, 0.22);
}
.feature-card-fuchsia:hover { border-color: rgba(217, 70, 239, 0.42); }
.feature-card-fuchsia h3 { color: #6b1272; }

.feature-card-slate {
  background: rgba(241, 245, 249, 0.55);
  border: 1px solid rgba(100, 116, 139, 0.22);
}
.feature-card-slate:hover { border-color: rgba(100, 116, 139, 0.42); }
.feature-card-slate h3 { color: #1e293b; }

/* feature card headings — Inter for a grounded, professional feel */
.feature-card-teal h3,
.feature-card-blue h3,
.feature-card-purple h3,
.feature-card-rose h3,
.feature-card-amber h3,
.feature-card-sky h3,
.feature-card-fuchsia h3,
.feature-card-slate h3 {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

/* ─── Download cards ─────────────────────────────── */
.dl-card {
  background: rgba(255, 255, 255, 0.60);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 16px rgba(60,60,120,0.05);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 32px rgba(60,60,120,0.09);
}
.dl-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

/* Active/highlighted card (detected OS) */
.dl-card--active {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(238, 242, 255, 0.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 24px rgba(99,102,241,0.12);
}
.dl-card--active:hover {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 32px rgba(99,102,241,0.18);
}
.dl-card--active .dl-card-icon {
  background: rgba(238, 242, 255, 0.90);
  border-color: rgba(99, 102, 241, 0.18);
  color: #6366F1;
}

.dl-btn {
  display: inline-block;
  text-align: center;
  background: #ffffff;
  color: #374151;
  border: 1px solid rgba(0,0,0,0.13);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer;
}
.dl-btn:hover {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.20);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.9);
  text-decoration: none;
}
.dl-card--active .dl-btn {
  background: #6366F1;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.dl-card--active .dl-btn:hover {
  background: #4F46E5;
}

.dl-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #6366F1;
}
.dl-card--active .dl-badge {
  display: inline-block !important;
}

/* ─── Storage distribution diagram ─────────────────── */
.storage-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.storage-lib-wrap {
  display: flex;
  justify-content: center;
}

.storage-lib-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.storage-lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.storage-lib-grid div {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.storage-thumb {
  background-size: cover;
  background-position: center;
}

.storage-lib-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.storage-flow-svg {
  width: 100%;
  height: 72px;
  overflow: visible;
}

.storage-flow-path {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  animation: storageDots 1.6s linear infinite;
}
.storage-flow-path--2 { animation-delay: 0.53s; }
.storage-flow-path--3 { animation-delay: 1.06s; }

@keyframes storageDots {
  from { stroke-dashoffset: 36; }
  to   { stroke-dashoffset: 0;  }
}

.storage-dest-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
  gap: 12px;
}

/* Storage provider chips */
.storage-provider-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 14px;
  flex: 1;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.storage-provider-chip:hover {
  border-color: rgba(100, 116, 139, 0.38);
  transform: translateY(-2px);
}
.storage-provider-chip .chip-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.storage-provider-chip .chip-sub {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.3;
}

/* shared for feature cards */
.feature-card-teal,
.feature-card-blue,
.feature-card-purple,
.feature-card-rose,
.feature-card-amber,
.feature-card-sky,
.feature-card-fuchsia,
.feature-card-slate {
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 20px rgba(60, 60, 120, 0.05);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card-teal:hover,
.feature-card-blue:hover,
.feature-card-purple:hover,
.feature-card-rose:hover,
.feature-card-amber:hover,
.feature-card-sky:hover,
.feature-card-fuchsia:hover,
.feature-card-slate:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 16px 40px rgba(60, 60, 120, 0.09);
}

/* ─── Icon rings ─────────────────────────────────── */
.icon-ring {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
}

/* ─── Step circles ───────────────────────────────── */
.step-circle {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 16px rgba(60, 60, 120, 0.10);
}

/* ─── Platform active card ───────────────────────── */
.platform-card-active {
  border: 1px solid rgba(52, 211, 153, 0.40);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(52, 211, 153, 0.08),
    0 8px 28px rgba(52, 211, 153, 0.10);
}

/* ─── Code block ─────────────────────────────────── */
.code-block {
  background: rgba(18, 20, 40, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 60px rgba(30, 30, 80, 0.18);
}

/* ─── Chip ───────────────────────────────────────── */
.chip {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.90);
}

/* ─── Section backgrounds ────────────────────────── */
.section-white {
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: linear-gradient(180deg,
    rgba(238, 242, 255, 0.60) 0%,
    rgba(246, 240, 255, 0.60) 100%);
  border-top:    1px solid rgba(200, 200, 255, 0.20);
  border-bottom: 1px solid rgba(200, 200, 255, 0.20);
}

/* ─── Download section (animated aurora background) ─ */
.section-download {
  background: #ffffff;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.download-orb-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.download-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.download-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28) 0%, transparent 70%);
  top: -140px;
  right: -80px;
  animation: orbDrift1 20s ease-in-out infinite;
}
.download-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.20) 0%, transparent 70%);
  bottom: -80px;
  left: -60px;
  animation: orbDrift2 26s ease-in-out infinite;
}
.download-orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  top: 40%;
  left: 38%;
  animation: orbDrift3 18s ease-in-out infinite;
}
@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(-50px, 50px); }
  66%       { transform: translate(35px, -40px); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(55px, -35px); }
  66%       { transform: translate(-30px, 55px); }
}
@keyframes orbDrift3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-40px, -30px); }
}

/* ─── Sync section ───────────────────────────────── */
.sync-device-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #FFF;
  border: 1px solid rgba(167, 139, 250, 0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 16px rgba(99,102,241,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366F1;
}
.sync-device-icon--cloud {
  width: 80px;
  height: 80px;
  color: #7C3AED;
}
.sync-point {
  background: rgba(249, 246, 255, 0.60);
  border: 1px solid rgba(167, 139, 250, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.sync-point h4 { font-size: 0.9375rem; }
.sync-point p  { font-size: 0.8125rem; }

/* ─── FAQ ────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #1C1E2E;
  line-height: 1.4;
  transition: color 0.2s;
}
.faq-trigger:hover { color: #6c25a7; }

.faq-icon {
  flex-shrink: 0;
  color: #6c25a7;
  transition: transform 0.25s ease;
}
.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-bottom: 0;
}
.faq-answer.open {
  max-height: 300px;
  padding-bottom: 20px;
}
.faq-answer p {
  color: #4a4d6a;
  line-height: 1.7;
  font-size: 0.9375rem;
}
.faq-answer strong { color: #1C1E2E; }

/* ─── Sphere security badge ─────────────────────── */
.sphere-badge {
  position: absolute;
  top: 18%;
  right: 4%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px 7px 10px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c25a7;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  animation: badgeFloat 3.8s ease-in-out infinite;
}

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

/* ─── Under the hood cards ──────────────────────── */
.under-hood-card {
  background: rgba(248, 250, 252, 0.80);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 12px rgba(60,60,120,0.05);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.under-hood-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 12px 28px rgba(60,60,120,0.09);
}

/* ─── Developer / build-from-source section ─────── */
.section-dev {
  background: linear-gradient(180deg,
    rgba(15, 23, 42, 0.03) 0%,
    rgba(30, 27, 75, 0.05) 100%);
  border-top:    1px solid rgba(99, 102, 241, 0.10);
  border-bottom: 1px solid rgba(99, 102, 241, 0.10);
  position: relative;
  z-index: 1;
}

.dev-badge {
  background: rgba(99, 102, 241, 0.10);
  color: #6366F1;
  border: 1px solid rgba(99, 102, 241, 0.20);
}

.dev-perk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ─── Mobile menu ────────────────────────────────── */
#mobile-menu {
  display: none;
  background: rgba(244, 246, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
#mobile-menu.open { display: block; }

/* ─── Merkle popover ─────────────────────────────── */
.merkle-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: inherit;
  font-weight: 600;
  color: #818CF8;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s ease;
}
.merkle-trigger:hover { color: #6366F1; }

/* Wrapper must be relative so popover can anchor to it */
.merkle-trigger { position: relative; }

.merkle-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 280px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.merkle-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.merkle-popover-inner {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 32px rgba(60, 60, 120, 0.14),
    0 2px 8px rgba(60, 60, 120, 0.08);
}

/* Little arrow pointing down */
.merkle-popover-inner::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(129, 140, 248, 0.25);
  border-bottom: 1px solid rgba(129, 140, 248, 0.25);
}

/* ─── Device popover ─────────────────────────────── */
/* Anchor span — must be relative so the popover can position against it */
.popover-anchor {
  position: relative;
  display: inline;
}

.device-trigger {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font: inherit;
  font-weight: 600;
  color: #10B981;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s ease;
}
.device-trigger:hover { color: #059669; }
.device-trigger svg {
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

.device-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  transform: translateY(6px);
  width: 260px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.device-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.device-popover .merkle-popover-inner::after {
  left: 24px;
  transform: rotate(45deg);
}
.device-popover .merkle-popover-inner {
  border-color: rgba(52, 211, 153, 0.25);
}
.device-popover .merkle-popover-inner::after {
  border-color: rgba(52, 211, 153, 0.25);
}

/* ─── Demo frame ─────────────────────────────────── */
.demo-frame {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    0 24px 80px rgba(60, 60, 120, 0.12),
    0 4px 16px rgba(60, 60, 120, 0.06);
}

/* ─── Photo sphere ──────────────────────────────── */

/* Perspective wrapper — gives the grid 3D depth */
/* Three.js photo sphere canvas */
#sphere-canvas {
  width: 480px;
  height: 480px;
  display: block;
  max-width: 100%;
}

@media (max-width: 1023px) {
  #sphere-canvas {
    width: 360px;
    height: 360px;
  }
}

@media (max-width: 640px) {
  #sphere-canvas {
    width: 300px;
    height: 300px;
  }
}

/* ─── Aurora drift (open-source section) ────────── */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.aurora-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #818CF8 0%, transparent 70%);
  top: -120px;
  left: -100px;
  animation: aurora-drift-1 12s ease-in-out infinite;
}

.aurora-2 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #FB7185 0%, transparent 70%);
  bottom: -100px;
  right: -80px;
  animation: aurora-drift-2 15s ease-in-out infinite;
}

.aurora-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #FBBF24 0%, transparent 70%);
  top: 40%;
  left: 55%;
  animation: aurora-drift-3 18s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, 40px) scale(1.08); }
  66%       { transform: translate(-30px, 60px) scale(0.94); }
}

@keyframes aurora-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-50px, -40px) scale(1.06); }
  66%       { transform: translate(40px, -60px) scale(0.96); }
}

#code-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes aurora-drift-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33%       { transform: translate(calc(-50% + 40px), calc(-50% - 50px)) scale(1.10); }
  66%       { transform: translate(calc(-50% - 60px), calc(-50% + 30px)) scale(0.92); }
}

/* ─── News section ───────────────────────────────── */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  transition: background 0.18s ease, transform 0.18s ease;
  position: relative;
}
.news-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: rgba(99, 102, 241, 0.08);
}
.news-item:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(3px);
}

.news-bullet {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.news-bullet--teal   { background: #14B8A6; box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18); }
.news-bullet--indigo { background: #6366F1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }
.news-bullet--sky    { background: #0EA5E9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18); }
.news-bullet--rose   { background: #FB7185; box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18); }
.news-bullet--amber  { background: #FBBF24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8B90A0;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.news-tag--teal   { background: rgba(20, 184, 166, 0.1);  color: #0D9488; border-color: rgba(20, 184, 166, 0.2); }
.news-tag--indigo { background: rgba(99, 102, 241, 0.1);  color: #4F46E5; border-color: rgba(99, 102, 241, 0.2); }
.news-tag--sky    { background: rgba(14, 165, 233, 0.1);  color: #0284C7; border-color: rgba(14, 165, 233, 0.2); }
.news-tag--rose   { background: rgba(251, 113, 133, 0.1); color: #E11D48; border-color: rgba(251, 113, 133, 0.2); }
.news-tag--amber  { background: rgba(251, 191, 36, 0.1);  color: #B45309; border-color: rgba(251, 191, 36, 0.2); }

.news-body {
  flex: 1;
  min-width: 0;
}

.news-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1C1E2E;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.news-desc {
  font-size: 0.8125rem;
  color: #5A5E72;
  line-height: 1.55;
}

/* ─── Book promo ─────────────────────────────────── */
.book-mockup {
  position: relative;
  width: 192px;
  flex-shrink: 0;
  filter: drop-shadow(6px 14px 32px rgba(79,70,229,0.30));
  transform: rotate(-3deg);
  transition: transform 0.35s ease, filter 0.35s ease;
  cursor: default;
  user-select: none;
}
.book-mockup:hover {
  transform: rotate(0deg) translateY(-5px);
  filter: drop-shadow(8px 18px 40px rgba(79,70,229,0.42));
}
.book-mockup::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 5px;
  bottom: 5px;
  width: 10px;
  background: linear-gradient(180deg, #b8520a 0%, #d46b14 50%, #b8520a 100%);
  border-radius: 2px 0 0 2px;
}
.book-face {
  width: 100%;
  aspect-ratio: 7 / 10;
  background: #fdf8f2;
  border-radius: 2px 5px 5px 2px;
  padding: 1.375rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.07);
}
.book-cover-img {
  width: 80%;
  height: auto;
  display: block;
  margin: 0.25rem auto 0.875rem;
  flex-shrink: 0;
}
.book-face-title {
  font-family: 'Cal Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1C1E2E;
  margin-bottom: 0.35rem;
  text-align: center;
  flex: 1;
}
.book-face-subtitle {
  font-size: 0.5rem;
  font-weight: 500;
  color: #6B7280;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
  text-align: center;
}
.book-face-author {
  font-size: 0.5625rem;
  font-weight: 600;
  color: #4B5563;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
}

.book-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: #3A3D52;
  line-height: 1.45;
}
.book-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366F1;
  flex-shrink: 0;
  margin-top: 0.45rem;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}

.book-quote {
  position: relative;
  padding: 1rem 1.125rem;
  background: rgba(255,255,255,0.7);
  border-left: 3px solid rgba(99,102,241,0.35);
  border-radius: 0 0.625rem 0.625rem 0;
  font-size: 0.8125rem;
  color: #4A4E65;
  line-height: 1.6;
  font-style: italic;
}
.book-quote-attr {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7A7E92;
}

/* ─── Roadmap / Kanban ───────────────────────────── */
.roadmap-board {
  display: flex;
  gap: 0.875rem;
  overflow-x: auto;
  padding-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.18) transparent;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.roadmap-board:active { cursor: grabbing; }
.roadmap-board::-webkit-scrollbar { height: 4px; }
.roadmap-board::-webkit-scrollbar-track { background: transparent; }
.roadmap-board::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.18);
  border-radius: 2px;
}

.roadmap-col {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 1280px) {
  .roadmap-col { flex: 1 1 0; min-width: 196px; }
}

.roadmap-col-header {
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.375rem;
  border: 1px solid transparent;
}
.roadmap-col-header--shipped { background: rgba(20,184,166,0.07);  border-color: rgba(20,184,166,0.18); }
.roadmap-col-header--active  { background: rgba(99,102,241,0.08);  border-color: rgba(99,102,241,0.20); }
.roadmap-col-header--planned { background: rgba(14,165,233,0.07);  border-color: rgba(14,165,233,0.18); }
.roadmap-col-header--later   { background: rgba(168,85,247,0.07);  border-color: rgba(168,85,247,0.18); }
.roadmap-col-header--horizon { background: rgba(251,113,133,0.07); border-color: rgba(251,113,133,0.18); }

.roadmap-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.roadmap-status-badge--shipped { color: #0D9488; }
.roadmap-status-badge--active  { color: #4F46E5; }
.roadmap-status-badge--planned { color: #0284C7; }
.roadmap-status-badge--later   { color: #7C3AED; }
.roadmap-status-badge--horizon { color: #BE123C; }

.roadmap-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.roadmap-status-dot--shipped { background: #14B8A6; }
.roadmap-status-dot--active  { background: #6366F1; animation: roadmap-pulse 1.8s ease-in-out infinite; }
.roadmap-status-dot--planned { background: #0EA5E9; }
.roadmap-status-dot--later   { background: #A855F7; }
.roadmap-status-dot--horizon { background: #FB7185; }

@keyframes roadmap-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(99,102,241,0.55); }
  50%       { box-shadow: 0 0 0 4px rgba(99,102,241,0); }
}

.roadmap-col-version {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1C1E2E;
  font-family: 'Cal Sans', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.2;
}
.roadmap-col-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #8B90A0;
  margin-top: 0.1rem;
}

.roadmap-card {
  background: rgba(255,255,255,0.88);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(99,102,241,0.07);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.roadmap-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
}
.roadmap-card--shipped { opacity: 0.78; }
.roadmap-card--shipped .roadmap-card-title { text-decoration: line-through; text-decoration-color: rgba(99,102,241,0.3); }

.roadmap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.roadmap-card-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.6;
}
.roadmap-card-tag--teal   { background: rgba(20,184,166,0.1);  color: #0D9488; border-color: rgba(20,184,166,0.2); }
.roadmap-card-tag--indigo { background: rgba(99,102,241,0.1);  color: #4F46E5; border-color: rgba(99,102,241,0.2); }
.roadmap-card-tag--sky    { background: rgba(14,165,233,0.1);  color: #0284C7; border-color: rgba(14,165,233,0.2); }
.roadmap-card-tag--violet { background: rgba(168,85,247,0.1);  color: #7C3AED; border-color: rgba(168,85,247,0.2); }
.roadmap-card-tag--rose   { background: rgba(251,113,133,0.1); color: #BE123C; border-color: rgba(251,113,133,0.2); }
.roadmap-card-tag--amber  { background: rgba(251,191,36,0.1);  color: #B45309; border-color: rgba(251,191,36,0.2); }

.roadmap-card-check {
  flex-shrink: 0;
  color: #14B8A6;
  opacity: 0.8;
}

.roadmap-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1C1E2E;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.roadmap-card-desc {
  font-size: 0.75rem;
  color: #7A7E92;
  line-height: 1.5;
}

/* ─── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F4F6FF; }
::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 200, 0.18);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(100, 100, 200, 0.32); }
