/* ============================================
   MEMORA — Nothing-Inspired Landing Page
   Fonts: Doto (display), Space Grotesk (body), Space Mono (labels)
   Mode: Dark (OLED black)
   ============================================ */

/* --- TOKENS --- */
:root {
  --black: #000000;
  --surface: #111111;
  --surface-raised: #1A1A1A;
  --border: #222222;
  --border-visible: #333333;
  --text-disabled: #666666;
  --text-secondary: #999999;
  --text-primary: #E8E8E8;
  --text-display: #FFFFFF;
  --accent: #D71921;
  --accent-subtle: rgba(215, 25, 33, 0.15);
  --success: #4A9E5C;
  --interactive: #5B9BF6;

  --font-display: "Doto", "Space Mono", monospace;
  --font-body: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", "JetBrains Mono", "SF Mono", monospace;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- RESET --- */
*, *::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: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--black);
}

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

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-display);
}

.logo-bracket {
  color: var(--text-disabled);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: color 200ms var(--ease);
}

.nav-links a:hover {
  color: var(--text-display);
}

.nav-gh {
  color: var(--text-disabled) !important;
}

.nav-gh:hover {
  color: var(--text-secondary) !important;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 32px 64px;
  overflow: hidden;
}

.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 0.5px, transparent 0.5px);
  background-size: 16px 16px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  text-align: left;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-display);
  margin-bottom: 32px;
}

.hero-title-line {
  display: block;
}

.hero-title-line.accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 64px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 14px 28px;
  border-radius: 999px;
  transition: all 200ms var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-display);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--text-primary);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-visible);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-display);
}

/* --- HERO STATS --- */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-display);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  display: block;
  margin-top: 6px;
}

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

/* --- SECTIONS --- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-display);
  margin-bottom: 64px;
}

/* --- PRODUCT DEMO --- */
.demo {
  padding: 128px 0;
  border-top: 1px solid var(--border);
}

.demo-window {
  border: 1px solid var(--border-visible);
  border-radius: 12px;
  overflow: hidden;
  background: var(--black);
}

/* Titlebar */
.demo-titlebar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.demo-traffic {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-close { background: #FF5F57; }
.dot-min   { background: #FEBC2E; }
.dot-max   { background: #28C840; }

.demo-titlebar-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.demo-search-hint {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-disabled);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Body layout */
.demo-body {
  display: flex;
  min-height: 380px;
}

/* Sidebar */
.demo-sidebar {
  width: 180px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-sidebar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-disabled);
  padding: 0 16px;
  margin-bottom: 4px;
}

.demo-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 16px;
  transition: all 200ms var(--ease);
}

.demo-sidebar-item.active {
  color: var(--text-display);
  background: var(--surface-raised);
}

.demo-sidebar-icon {
  display: flex;
  align-items: center;
  color: var(--text-disabled);
}

.demo-sidebar-item.active .demo-sidebar-icon {
  color: var(--text-primary);
}

.demo-co-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.demo-sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* Main area */
.demo-main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* Stats bar */
.demo-stats {
  display: flex;
  gap: 8px;
}

.demo-stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-display);
  line-height: 1;
}

.demo-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-disabled);
}

/* Account cards */
.demo-cards {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  flex: 1;
}

.demo-account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 200ms var(--ease);
  width: calc((100% - 16px) / 3);
  flex-shrink: 0;
  box-sizing: border-box;
}

.demo-account-card:hover {
  border-color: var(--border-visible);
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-display);
  flex-shrink: 0;
}

.demo-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.demo-card-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-disabled);
}

.demo-card-cat {
  color: var(--text-secondary);
  margin-left: 4px;
}

.demo-card-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.demo-card-status.active {
  background: var(--success);
  box-shadow: 0 0 6px rgba(74, 158, 92, 0.4);
}

.demo-card-status.renewal {
  background: var(--warning);
  box-shadow: 0 0 6px rgba(212, 168, 67, 0.4);
}

/* --- DEMO CHOREOGRAPHY STATES --- */

/* Initial: everything hidden until JS triggers boot */
.demo-sidebar {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.demo-stat-card {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}

.demo-account-card {
  opacity: 0;
  transform: translateY(12px) scale(1);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), border-color 200ms var(--ease);
}

/* Boot: JS adds .card-visible to each element with staggered delays */
.demo-sidebar.sidebar-visible {
  opacity: 1;
  transform: translateX(0);
}

.demo-stat-card.stat-visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-account-card.card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Filtered-out: fade then JS sets display:none for reflow */
.demo-account-card.card-visible.filtered-out {
  opacity: 0;
  transform: translateY(0) scale(0.92);
  pointer-events: none;
}

.demo-account-card.card-hidden {
  display: none;
}

/* Selected card gets a highlight border */
.demo-account-card.card-highlight {
  border-color: var(--text-secondary);
}

/* Pulsing status dots */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.demo-account-card .demo-card-status.active {
  animation: pulse 3s ease-in-out infinite;
}

/* --- ANIMATED CURSOR --- */
.demo-cursor {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: left 500ms cubic-bezier(0.4, 0, 0.2, 1),
              top 500ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms var(--ease);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.demo-cursor.cursor-visible {
  opacity: 1;
}

.demo-cursor.cursor-click {
  transform: scale(0.85);
  transition: left 500ms cubic-bezier(0.4, 0, 0.2, 1),
              top 500ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms var(--ease),
              transform 100ms var(--ease);
}

/* Click ripple */
.demo-cursor::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.demo-cursor.cursor-click::after {
  animation: clickRipple 300ms var(--ease) forwards;
}

@keyframes clickRipple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.demo-account-card .demo-card-status.renewal {
  animation: pulse 2s ease-in-out infinite;
}

/* --- SEARCH OVERLAY --- */
.demo-search-overlay {
  position: absolute;
  top: 56px;
  left: 180px;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms var(--ease);
  z-index: 20;
}

.demo-search-overlay.search-visible {
  opacity: 1;
  pointer-events: auto;
}

.demo-search-box {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-visible);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-secondary);
}

.demo-search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-display);
  min-height: 1.2em;
}

.demo-search-input::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 600ms steps(1) infinite;
}

.demo-search-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-disabled);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.demo-search-results {
  width: 280px;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.demo-search-overlay.search-has-results .demo-search-results {
  opacity: 1;
  transform: translateY(0);
}

.demo-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-raised);
}

.demo-search-result-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-display);
}

.demo-search-result-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-disabled);
  margin-left: auto;
}

/* Demo main needs relative for overlay positioning */
.demo-main {
  position: relative;
}

/* Demo responsive */
@media (max-width: 900px) {
  .demo-sidebar {
    width: 140px;
  }
  .demo-account-card {
    width: calc((100% - 8px) / 2);
  }
  .demo-search-overlay {
    left: 140px;
  }
}

@media (max-width: 600px) {
  .demo-sidebar {
    display: none;
  }
  .demo-account-card {
    width: 100%;
  }
  .demo-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .demo-body {
    min-height: auto;
  }
  .demo-search-overlay {
    left: 0;
  }
}

/* --- FEATURES --- */
.features {
  padding: 128px 0;
  border-top: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 32px;
  transition: background 250ms var(--ease);
}

.feature-card:hover {
  background: var(--surface-raised);
}

.feature-card--hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 24px;
  padding: 48px;
}

.feature-card--hero .feature-icon {
  grid-row: 1 / 3;
  align-self: start;
}

.feature-card--hero .feature-detail {
  grid-column: 2;
}

.feature-icon {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.feature-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--text-display);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.feature-detail {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.detail-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border: 1px solid var(--border-visible);
  padding: 4px 12px;
  border-radius: 999px;
}

/* --- PRIVACY --- */
.privacy {
  padding: 128px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.privacy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}

.privacy-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.privacy-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 200ms var(--ease);
}

.check-item:last-child {
  border-bottom: none;
}

.check-item:hover {
  background: var(--surface-raised);
}

.check-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-disabled);
  flex-shrink: 0;
}

.check-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 158, 92, 0.4);
}

.check-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

/* --- STACK --- */
.stack {
  padding: 128px 0;
  border-top: 1px solid var(--border);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.stack-item {
  background: var(--surface);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 250ms var(--ease);
}

.stack-item:hover {
  background: var(--surface-raised);
}

.stack-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-display);
}

.stack-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-disabled);
}

/* --- CTA --- */
.cta {
  padding: 128px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 0.5px, transparent 0.5px);
  background-size: 16px 16px;
  opacity: 0.3;
  pointer-events: none;
}

.cta-content {
  position: relative;
  text-align: center;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-display);
  margin-bottom: 16px;
}

.cta-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

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

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-disabled);
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  transition: color 200ms var(--ease);
}

.footer-link:hover {
  color: var(--text-secondary);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card--hero {
    grid-column: 1 / -1;
    display: block;
  }

  .feature-card--hero .feature-icon {
    margin-bottom: 20px;
  }

  .privacy-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

@media (max-width: 600px) {
  .nav-links {
    gap: 20px;
  }

  .nav-links a:not(.nav-gh) {
    display: none;
  }

  .hero {
    padding: 120px 24px 64px;
  }

  .hero-content {
    text-align: left;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

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

  .feature-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }


  .section-inner {
    padding: 0 24px;
  }

  .features,
  .privacy,
  .stack,
  .cta {
    padding: 80px 0;
  }

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

/* ============================================
   CREATIVE ANIMATIONS
   ============================================ */

/* --- LOGO LETTER CASCADE --- */
.logo-letters {
  display: inline-flex;
  gap: 0;
}

.logo-letters span {
  display: inline-block;
  opacity: 0;
  transform: translateY(-10px);
  animation: letterDrop 400ms var(--ease) forwards;
}

.logo-letters span:nth-child(1) { animation-delay: 0.1s; }
.logo-letters span:nth-child(2) { animation-delay: 0.18s; }
.logo-letters span:nth-child(3) { animation-delay: 0.26s; }
.logo-letters span:nth-child(4) { animation-delay: 0.34s; }
.logo-letters span:nth-child(5) { animation-delay: 0.42s; }
.logo-letters span:nth-child(6) { animation-delay: 0.50s; }

@keyframes letterDrop {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  60% {
    opacity: 1;
    transform: translateY(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-bracket {
  opacity: 0;
  animation: bracketFlash 300ms var(--ease) forwards;
}

.nav-logo .logo-bracket:first-child { animation-delay: 0s; }
.nav-logo .logo-bracket:last-child { animation-delay: 0.58s; }

@keyframes bracketFlash {
  0% { opacity: 0; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* --- NAV SCROLL STATE --- */
.nav {
  transition: height 250ms var(--ease), background 250ms var(--ease);
}

.nav-scrolled {
  background: rgba(0, 0, 0, 0.95);
}

.nav-scrolled .nav-inner {
  height: 48px;
  transition: height 250ms var(--ease);
}

/* --- HERO ENTRANCE --- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title-line,
  .hero-sub,
  .hero-actions,
  .hero-stats {
    opacity: 0;
    animation: fadeIn 600ms var(--ease) forwards;
  }

  .hero-title-line:nth-child(1) { animation-delay: 200ms; }
  .hero-title-line:nth-child(2) { animation-delay: 300ms; }
  .hero-title-line:nth-child(3) { animation-delay: 400ms; }
  .hero-sub { animation-delay: 500ms; }
  .hero-actions { animation-delay: 600ms; }
  .hero-stats { animation-delay: 700ms; }
}

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

/* --- TYPING CURSOR --- */
.typing-cursor::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 600ms steps(1) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- HERO DOT GRID DRIFT --- */
.hero-dot-grid {
  animation: dotDrift 30s linear infinite;
}

@keyframes dotDrift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* --- HERO ACCENT LINE GLOW --- */
.hero-title-line.accent {
  position: relative;
  text-shadow: 0 0 40px rgba(215, 25, 33, 0.3);
}

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

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

/* --- STAGGER CHILDREN REVEAL --- */
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.reveal-child.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- DEMO SCANLINE --- */
.demo-scanline {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 25, 33, 0.15), transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes scanline {
  0% { top: 40px; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* --- DEMO WINDOW GLOW ON SCROLL --- */
.demo-window {
  transition: border-color 500ms var(--ease), box-shadow 500ms var(--ease);
  position: relative;
}

.demo-window.revealed {
  border-color: var(--border-visible);
  box-shadow: 0 0 80px rgba(215, 25, 33, 0.04), 0 0 2px rgba(255, 255, 255, 0.05);
}

/* --- DEMO SIDEBAR ITEM TRANSITION --- */
.demo-sidebar-item {
  transition: all 250ms var(--ease);
}

.demo-sidebar-item.active {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

/* --- PRIVACY CHECKLIST SEQUENTIAL --- */
.check-item {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 350ms var(--ease), transform 350ms var(--ease);
}

.check-item.check-visible {
  opacity: 1;
  transform: translateX(0);
}

.check-item.check-visible .check-dot.active {
  animation: dotAppear 400ms var(--ease) forwards;
}

@keyframes dotAppear {
  0% {
    transform: scale(0);
    box-shadow: 0 0 0 rgba(74, 158, 92, 0);
  }
  60% {
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(74, 158, 92, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(74, 158, 92, 0.4);
  }
}

/* --- STACK ITEMS REVEAL --- */
.stack-item {
  opacity: 0;
  transform: rotateX(15deg) translateY(10px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
  transform-origin: center top;
}

.stack-item.stack-visible {
  opacity: 1;
  transform: rotateX(0) translateY(0);
}

/* --- FEATURE CARD HOVER GLOW --- */
.feature-card {
  position: relative;
  transition: background 250ms var(--ease), border-color 250ms var(--ease);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.03), transparent 60%);
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}

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

/* --- BUTTON HOVER --- */
.btn {
  transition: all 200ms var(--ease), transform 150ms var(--ease);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.03);
}

/* --- CTA SECTION GLOW --- */
.cta-title {
  text-shadow: 0 0 60px rgba(215, 25, 33, 0.15);
}

/* --- STAT VALUE FLICKER (mechanical feel) --- */
.stat-value {
  font-variant-numeric: tabular-nums;
}

/* --- RED ACCENT DOT IN NAV --- */
.nav-logo::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
  animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(215, 25, 33, 0.6); }
  50% { opacity: 0.4; box-shadow: 0 0 0 rgba(215, 25, 33, 0); }
}
