/* ═══════════════════════════════════════════════════════
   SHIELD OF STEEL — Website
   Aesthetic: Palantir x Apple — Dark, Premium, Cinematic
   ═══════════════════════════════════════════════════════ */

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

/* ── Custom Properties ── */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.3);
  --text-faint: rgba(255, 255, 255, 0.15);
  --font-display: 'Archivo', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --transition: 0.35s var(--ease);
}

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

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

body.menu-open { overflow: hidden; }

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }
::selection { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text);
}

h1 {
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

p { color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 32px; }

/* ── Page Transition ── */
body {
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
body.loaded { opacity: 1; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav-scrolled {
  border-bottom-color: var(--border-hover);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 28px; width: auto; opacity: 0.9; transition: opacity 0.2s; }
.nav-logo:hover img { opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-cta { margin-left: 8px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--ease);
}

.mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

.mobile-cta { margin-top: 8px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #fff;
  color: #0a0a0a;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.06);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 14px;
  border-radius: 4px;
}

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Hero — Home ── */
.hero-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
}

.hero-home::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  width: 120%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 60% 50% at 50% 20%, rgba(255, 255, 255, 0.03), transparent 70%);
  pointer-events: none;
}

/* Grid pattern background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

/* Floating geometric shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-shape-1 {
  width: 380px;
  height: 380px;
  top: 8%;
  right: -80px;
  border-radius: 6px;
  animation: shape-rotate 80s linear infinite;
}

.hero-shape-2 {
  width: 240px;
  height: 240px;
  bottom: 15%;
  left: -60px;
  border-radius: 50%;
  border-color: rgba(255, 255, 255, 0.025);
  animation: shape-rotate 60s linear infinite reverse;
}

.hero-shape-3 {
  width: 160px;
  height: 160px;
  top: 25%;
  left: 12%;
  border-radius: 4px;
  transform: rotate(45deg);
  animation: shape-float 12s ease-in-out infinite;
}

.hero-shape-4 {
  width: 100px;
  height: 100px;
  bottom: 30%;
  right: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.015), transparent 70%);
  border: none;
  animation: shape-pulse 8s ease-in-out infinite;
}

@keyframes shape-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shape-float {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(-30px); opacity: 0.8; }
}

@keyframes shape-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

/* Hero content */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hero-headline {
  position: relative;
  max-width: 900px;
  margin-bottom: 24px;
  z-index: 1;
}

.hero-subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
  z-index: 1;
  position: relative;
}

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 680px;
  width: 100%;
  z-index: 1;
  position: relative;
}

.stat-cell {
  background: var(--bg);
  padding: 28px 20px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(255, 255, 255, 0.025), transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  margin-bottom: 16px;
  position: relative;
}

.page-hero .lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Sections ── */
.section {
  padding: 120px 0;
  position: relative;
}

.section-sm { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title { margin-bottom: 16px; }

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ── Glass Cards ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.glass-card h3 { margin-bottom: 8px; }
.glass-card p { font-size: 15px; line-height: 1.7; }

/* ── Feature Grid (Home page teaser) ── */
.feature-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-preview-grid .glass-card:nth-child(1) { transform: translateY(0); }
.feature-preview-grid .glass-card:nth-child(2) { transform: translateY(32px); }
.feature-preview-grid .glass-card:nth-child(3) { transform: translateY(64px); }
.feature-preview-grid .glass-card:nth-child(1):hover { transform: translateY(-2px); }
.feature-preview-grid .glass-card:nth-child(2):hover { transform: translateY(30px); }
.feature-preview-grid .glass-card:nth-child(3):hover { transform: translateY(62px); }

.feature-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--text-faint);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.05em;
}

/* ── Bento Grid (Features page) ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-grid .glass-card.span-2 { grid-column: span 2; }

.bento-grid .glass-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
}

.feature-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Differentiators ── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.diff-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: transparent;
  transition: all var(--transition);
}

.diff-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.diff-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.diff-card h3 { margin-bottom: 8px; }
.diff-card p { font-size: 14px; line-height: 1.7; }

/* ── Architecture Cards ── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.arch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.arch-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.arch-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 12px;
}

.arch-card p { font-size: 14px; line-height: 1.7; }

/* ── Layered Cards (Platform page) ── */
.layered-cards {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.layered-cards .arch-card {
  text-align: left;
  padding: 48px;
}

.layered-cards .arch-card::before { display: none; }

.layer-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 20px;
}

.layer-features {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-features li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  position: relative;
  transition: all var(--transition);
  background: transparent;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.pricing-card.featured {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card);
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.02);
}

.pricing-card.featured:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.04);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-price { margin-bottom: 32px; }

.pricing-amount {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.pricing-period {
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
}

.pricing-features li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.pricing-card .btn { width: 100%; }

/* ── Comparison Table ── */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  padding-left: 24px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.comparison-table tbody tr {
  transition: background 0.2s var(--ease);
}

.comparison-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Highlighted column */
.col-hl {
  background: rgba(255, 255, 255, 0.02) !important;
  position: relative;
}

.comparison-table th.col-hl {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

/* Check / cross indicators */
.indicator-yes {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.indicator-no {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
}

/* Shimmer animation on table rows */
.comparison-table tbody tr {
  animation: table-shimmer 1.5s var(--ease) forwards;
  opacity: 0;
}

@keyframes table-shimmer {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.comparison-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.comparison-table tbody tr:nth-child(2) { animation-delay: 0.08s; }
.comparison-table tbody tr:nth-child(3) { animation-delay: 0.11s; }
.comparison-table tbody tr:nth-child(4) { animation-delay: 0.14s; }
.comparison-table tbody tr:nth-child(5) { animation-delay: 0.17s; }
.comparison-table tbody tr:nth-child(6) { animation-delay: 0.20s; }
.comparison-table tbody tr:nth-child(7) { animation-delay: 0.23s; }
.comparison-table tbody tr:nth-child(8) { animation-delay: 0.26s; }
.comparison-table tbody tr:nth-child(9) { animation-delay: 0.29s; }
.comparison-table tbody tr:nth-child(10) { animation-delay: 0.32s; }
.comparison-table tbody tr:nth-child(11) { animation-delay: 0.35s; }
.comparison-table tbody tr:nth-child(12) { animation-delay: 0.38s; }
.comparison-table tbody tr:nth-child(13) { animation-delay: 0.41s; }
.comparison-table tbody tr:nth-child(14) { animation-delay: 0.44s; }
.comparison-table tbody tr:nth-child(15) { animation-delay: 0.47s; }
.comparison-table tbody tr:nth-child(16) { animation-delay: 0.50s; }
.comparison-table tbody tr:nth-child(17) { animation-delay: 0.53s; }
.comparison-table tbody tr:nth-child(18) { animation-delay: 0.56s; }
.comparison-table tbody tr:nth-child(19) { animation-delay: 0.59s; }
.comparison-table tbody tr:nth-child(20) { animation-delay: 0.62s; }
.comparison-table tbody tr:nth-child(21) { animation-delay: 0.65s; }
.comparison-table tbody tr:nth-child(22) { animation-delay: 0.68s; }
.comparison-table tbody tr:nth-child(23) { animation-delay: 0.71s; }
.comparison-table tbody tr:nth-child(24) { animation-delay: 0.74s; }
.comparison-table tbody tr:nth-child(25) { animation-delay: 0.77s; }
.comparison-table tbody tr:nth-child(26) { animation-delay: 0.80s; }
.comparison-table tbody tr:nth-child(27) { animation-delay: 0.83s; }
.comparison-table tbody tr:nth-child(28) { animation-delay: 0.86s; }
.comparison-table tbody tr:nth-child(29) { animation-delay: 0.89s; }
.comparison-table tbody tr:nth-child(30) { animation-delay: 0.92s; }
.comparison-table tbody tr:nth-child(31) { animation-delay: 0.95s; }
.comparison-table tbody tr:nth-child(32) { animation-delay: 0.98s; }
.comparison-table tbody tr:nth-child(33) { animation-delay: 1.01s; }
.comparison-table tbody tr:nth-child(34) { animation-delay: 1.04s; }
.comparison-table tbody tr:nth-child(35) { animation-delay: 1.07s; }
.comparison-table tbody tr:nth-child(36) { animation-delay: 1.10s; }
.comparison-table tbody tr:nth-child(37) { animation-delay: 1.13s; }
.comparison-table tbody tr:nth-child(38) { animation-delay: 1.16s; }
.comparison-table tbody tr:nth-child(39) { animation-delay: 1.19s; }
.comparison-table tbody tr:nth-child(40) { animation-delay: 1.22s; }

/* ── Trust / Badges ── */
.trust-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}

.trust-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}

.trust-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.04em;
}

.trust-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.badge {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
}

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

.badge-highlight {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

/* ── CTA Block ── */
.cta-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.cta-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.cta-block h2 { margin-bottom: 16px; }

.cta-block p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-block .btn-group { justify-content: center; }

/* ── Footer ── */
.footer {
  padding: 64px 0 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer-logo { display: flex; align-items: center; margin-bottom: 12px; }
.footer-logo img { height: 24px; width: auto; opacity: 0.7; }

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 280px;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-faint);
}

/* ── Scroll Reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Advantages (Compare page) ── */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.advantage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition);
}

.advantage-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.advantage-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.advantage-card p {
  font-size: 14px;
  line-height: 1.7;
}

/* ── Horizontal Rule ── */
.rule {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Theme Toggle ── */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
  margin-left: 12px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.theme-toggle svg { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ── Logo Inversion (dark mode) ── */
[data-theme="dark"] .nav-logo img,
[data-theme="dark"] .footer-logo img {
  filter: brightness(0) invert(1);
}

/* ── Light Mode ── */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f5f5f7;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border-strong: rgba(0, 0, 0, 0.25);
  --text: #0a0a0a;
  --text-secondary: rgba(0, 0, 0, 0.55);
  --text-muted: rgba(0, 0, 0, 0.35);
  --text-faint: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] body::after { opacity: 0.012; }

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.97);
}

[data-theme="light"] .hero-home::before {
  background: radial-gradient(ellipse 60% 50% at 50% 20%, rgba(0, 0, 0, 0.02), transparent 70%);
}

[data-theme="light"] .page-hero::before {
  background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(0, 0, 0, 0.015), transparent 70%);
}

[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .hero-shape { border-color: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .hero-shape-4 { background: radial-gradient(circle, rgba(0, 0, 0, 0.015), transparent 70%); }

[data-theme="light"] .stat-cell { background: #fff; }
[data-theme="light"] .stats-bar { background: rgba(0, 0, 0, 0.08); }

[data-theme="light"] .arch-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

[data-theme="light"] .layer-features li { background: rgba(0, 0, 0, 0.03); }

[data-theme="light"] .btn-primary { background: #0a0a0a; color: #fff; }
[data-theme="light"] .btn-primary:hover { background: #222; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); }
[data-theme="light"] .btn-secondary { border-color: rgba(0, 0, 0, 0.15); color: #0a0a0a; }
[data-theme="light"] .btn-secondary:hover { border-color: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.03); }

[data-theme="light"] .pricing-badge { background: #0a0a0a; color: #fff; }
[data-theme="light"] .pricing-features li::before { background: rgba(0, 0, 0, 0.25); }
[data-theme="light"] .pricing-card.featured { border-color: rgba(0, 0, 0, 0.2); box-shadow: 0 0 60px rgba(0, 0, 0, 0.04); }
[data-theme="light"] .pricing-card.featured:hover { border-color: rgba(0, 0, 0, 0.3); box-shadow: 0 0 60px rgba(0, 0, 0, 0.06); }

[data-theme="light"] .comparison-wrapper { background: rgba(0, 0, 0, 0.01); }
[data-theme="light"] .comparison-table th { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .comparison-table tbody tr:hover td { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .col-hl { background: rgba(0, 0, 0, 0.02) !important; }
[data-theme="light"] .comparison-table th.col-hl { background: rgba(0, 0, 0, 0.04) !important; }
[data-theme="light"] .indicator-yes { background: #0a0a0a; }
[data-theme="light"] .indicator-no { border-color: rgba(0, 0, 0, 0.15); }

[data-theme="light"] .badge-highlight { border-color: rgba(0, 0, 0, 0.15); }

[data-theme="light"] .hero-badge .pulse-dot { background: #0a0a0a; }

[data-theme="light"] .cta-block { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .cta-block::before { background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent); }

[data-theme="light"] .glass-card:hover { box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06); }
[data-theme="light"] .arch-card:hover { box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06); }

[data-theme="light"] ::-webkit-scrollbar-track { background: #fff; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }
[data-theme="light"] ::selection { background: rgba(0, 0, 0, 0.1); color: #0a0a0a; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .feature-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-preview-grid .glass-card:nth-child(2) { transform: translateY(0); }
  .feature-preview-grid .glass-card:nth-child(3) { transform: translateY(0); grid-column: span 2; }
  .feature-preview-grid .glass-card:nth-child(2):hover { transform: translateY(-2px); }
  .feature-preview-grid .glass-card:nth-child(3):hover { transform: translateY(-2px); }
  .arch-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid .glass-card.span-2 { grid-column: span 2; }
  .footer-links-grid { gap: 48px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .container-narrow { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-home { min-height: auto; padding: 140px 20px 60px; }
  .page-hero { padding: 130px 0 60px; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); max-width: 360px; }

  .section { padding: 80px 0; }
  .section-sm { padding: 60px 0; }

  .feature-preview-grid { grid-template-columns: 1fr; }
  .feature-preview-grid .glass-card:nth-child(2),
  .feature-preview-grid .glass-card:nth-child(3) {
    transform: translateY(0);
    grid-column: span 1;
  }

  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid .glass-card.span-2 { grid-column: span 1; }

  .diff-grid { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; }

  .pricing-grid { max-width: 100%; }

  .cta-block { padding: 48px 24px; border-radius: var(--radius-lg); }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links-grid { gap: 40px; }
  .footer-bottom { text-align: center; }

  .hero-shape-1 { width: 200px; height: 200px; right: -60px; }
  .hero-shape-2 { width: 140px; height: 140px; left: -40px; }
  .hero-shape-3 { display: none; }
  .hero-shape-4 { display: none; }

  h1 { font-size: clamp(36px, 8vw, 52px); }
}

@media (max-width: 480px) {
  .btn-lg { padding: 14px 28px; font-size: 14px; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn-group .btn { width: 100%; }
  .hero-ctas { width: 100%; padding: 0 12px; }
  .hero-ctas .btn { width: 100%; }
  .footer-links-grid { flex-direction: column; gap: 24px; }
}
