:root {
  /* Brand Core - Electric Aurora & Obsidian */
  --bg-primary: #08090e;
  --bg-secondary: #0f111a;
  --bg-tertiary: #161926;
  --surface-glass: rgba(18, 22, 36, 0.65);
  --surface-glass-hover: rgba(28, 34, 55, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 189, 248, 0.35);
  
  /* Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand Vibrant Accents (Different from app internal colors) */
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  
  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-glow: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px -8px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px -10px rgba(56, 189, 248, 0.25);
  
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme override if user explicitly has light preferences */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --surface-glass: rgba(255, 255, 255, 0.75);
    --surface-glass-hover: rgba(255, 255, 255, 0.95);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-highlight: rgba(14, 165, 233, 0.4);
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --gradient-glow: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 35px -8px rgba(14, 165, 233, 0.2);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Ambient background canvas effect */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: orbFloat 14s infinite alternate ease-in-out;
}

.glow-orb-1 {
  width: 550px;
  height: 550px;
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
}

.glow-orb-2 {
  width: 600px;
  height: 600px;
  top: 40%;
  right: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  animation-duration: 18s;
  animation-delay: -5s;
}

.glow-orb-3 {
  width: 500px;
  height: 500px;
  bottom: 5%;
  left: -100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 70%);
  animation-duration: 16s;
  animation-delay: -8s;
}

/* Typography & Links */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-main);
}

h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.75rem;
  position: relative;
  z-index: 2;
}

/* Header & Glass Navbar */
header.header-nav {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.25rem;
  display: flex;
  justify-content: center;
}

.nav-pill {
  width: 100%;
  max-width: 1040px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-pill:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.logo-ed {
  color: var(--text-main);
  font-weight: 800;
}

.logo-loop {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-left: 1px;
}

/* Dynamic Brand Loop Glyph - Signature Spin in Place & Rest */
.brand-loop-glyph {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-loop-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.loop-spin-group {
  transform-origin: 100px 100px;
  transform-box: view-box;
  animation: loopOrbitRest 5.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-wrapper:hover .loop-spin-group {
  transform: rotate(360deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff !important;
  box-shadow: 0 6px 20px -4px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(129, 140, 248, 0.55);
}

.btn-secondary {
  background: var(--surface-glass);
  color: var(--text-main);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--surface-glass-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-sky);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-sky);
  box-shadow: 0 0 8px var(--accent-sky);
  animation: pulseDot 2s infinite;
}

/* Hero Section */
.hero-section {
  padding-top: 10.5rem;
  padding-bottom: 5.5rem;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Metric Ticker / Key Stat Highlights */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.75rem 2rem;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.metric-item {
  text-align: center;
}

.metric-val {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Sections Common */
section {
  padding: 6.5rem 0;
  position: relative;
  z-index: 2;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-head h2 {
  margin-bottom: 1rem;
}

.section-head p {
  font-size: 1.15rem;
}

/* Ecosystem / Products Grid */
.ecosystem-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

.product-card {
  background: var(--surface-glass);
  background-image: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  transition: var(--transition);
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow);
}

/* Flagship App Highlight */
.product-card.flagship {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
  box-shadow: 0 10px 40px -10px rgba(56, 189, 248, 0.15);
}

.product-card.flagship::before {
  background: var(--gradient-brand);
}

.card-top {
  margin-bottom: 2rem;
}

.card-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.card-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-badge.pipeline {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.card-badge.research {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.product-card h3 {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
}

.product-card p {
  font-size: 1rem;
  line-height: 1.6;
}

.feature-bullets {
  list-style: none;
  margin: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-bullets li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.bullet-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-sky);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Feature Architecture / Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pillar-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.85rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-glass-hover);
}

.pillar-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.pillar-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

/* The Loop Step Section */
.loop-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: left;
  backdrop-filter: blur(14px);
  transition: var(--transition);
  position: relative;
}

.step-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-4px);
}

.step-seq {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-sky);
  margin-bottom: 0.75rem;
}

.step-card h3 {
  margin-bottom: 0.75rem;
}

/* Founder / Mission Section */
.mission-box {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.mission-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.mission-box h2 {
  margin-bottom: 1.25rem;
}

.mission-box p {
  font-size: 1.15rem;
  max-width: 740px;
  margin: 0 auto 1.75rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 3rem;
  background: var(--bg-secondary);
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 380px;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Legal Pages Styling (privacy.html & delete-account.html) */
.legal-header {
  padding-top: 9.5rem;
  padding-bottom: 3.5rem;
  text-align: center;
}

.legal-header h1 {
  margin-bottom: 0.75rem;
}

.legal-header .tagline {
  color: var(--text-dim);
  font-size: 1rem;
}

.legal-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 6rem;
}

.legal-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(14px);
}

.legal-card h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.legal-card p, .legal-card li {
  color: var(--text-muted);
  font-size: 1rem;
}

.legal-card ul, .legal-card ol {
  padding-left: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

.legal-summary-box {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.legal-summary-box strong {
  color: var(--accent-sky);
  font-size: 1.05rem;
}

/* Styled Table for Legal Data */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table-responsive th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.table-responsive td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: top;
}

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

/* Animations */
.animate-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Signature Spin-and-Rest: Spins smoothly 360°, settles into iconic logo position, rests for ~3 seconds, then repeats */
@keyframes loopOrbitRest {
  0% {
    transform: rotate(0deg) scale(1);
  }
  30% {
    transform: rotate(360deg) scale(1.08);
  }
  38% {
    transform: rotate(360deg) scale(1);
  }
  /* Stays completely still as the recognizable logo mark */
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.08); }
  100% { transform: translate(-4%, 3%) scale(0.96); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Responsive Media Queries */
@media (max-width: 980px) {
  .ecosystem-grid,
  .pillars-grid,
  .loop-steps {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  
  .hero-section {
    padding-top: 8rem;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
