:root {
  --bg: #050505;
  --surface: rgba(25, 25, 25, 0.4);
  --surface-2: rgba(40, 40, 40, 0.6);
  --ink: #fdfdfd;
  --muted: #a0a0a5;
  --line: rgba(255, 255, 255, 0.08);
  --blue: #3b82f6;
  --teal: #14b8a6;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --max: 1180px;
  --glow: rgba(20, 184, 166, 0.15);
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-2: rgba(240, 240, 240, 0.8);
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(0, 0, 0, 0.1);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
  --glow: rgba(20, 184, 166, 0.1);
}

html[data-theme="light"] h1 {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .glass-card {
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .hero-line {
  color: var(--muted);
}

html[data-theme="light"] .glass-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .site-footer {
  background: #f1f5f9;
}

html[data-theme="light"] .phone-frame {
  background: #fff;
  border: 6px solid #f1f5f9;
  outline: 1px solid #cbd5e1;
  box-shadow: -20px 20px 50px rgba(0,0,0,0.15);
}

html[data-theme="light"] .browser-frame {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .browser-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] .browser-bar div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

html[data-theme="light"] .dashboard-grid {
  background: #ffffff;
}

html[data-theme="light"] .contact-container {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), #fff);
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
}

html[data-theme="light"] .moon-icon { display: none; }
html[data-theme="light"] .sun-icon { display: block !important; }

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}
.theme-toggle-btn:hover {
  background: var(--surface-2);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
}

body {
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  top: -10%;
  left: 20%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, var(--glow) 0%, transparent 60%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.1) translate(20px, 10px); opacity: 1; }
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* Typography Update */
h1, h2, h3, h4, h5, h6, .brand, .button, .eyebrow {
  font-family: 'Outfit', system-ui, sans-serif;
}

h1 {
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

p {
  color: var(--muted);
  font-size: 18px;
}

.hero-line {
  font-size: clamp(20px, 3vw, 26px);
  color: #e4e4e7;
  font-weight: 400;
  margin-bottom: 24px;
}

/* Layout */
.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 120px 0;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px max(24px, calc((100vw - var(--max)) / 2));
  background: transparent;
  transition: all 0.3s ease;
}

.site-header[data-elevated="true"] {
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.brand-logo-container {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-svg {
  width: 20px;
  height: 20px;
  color: white;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 99px;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.button.primary {
  background: var(--ink);
  color: var(--bg);
}

.button.primary:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

.button.secondary {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.button.secondary:hover {
  background: rgba(20, 184, 166, 0.25);
}

.button.ghost {
  color: var(--ink);
  background: transparent;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section Visuals */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  padding-top: 100px;
}

.hero-visual {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
}

.browser-frame {
  position: relative;
  width: 100%;
  z-index: 1;
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--line);
}

.browser-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4b5563;
}

.browser-bar div {
  margin-left: 16px;
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  font-family: monospace;
}

.dashboard-grid {
  padding: 30px 200px 30px 30px; /* Right padding for the phone */
  display: grid;
  gap: 20px;
  background: linear-gradient(to bottom, rgba(20, 184, 166, 0.05), transparent);
}

.risk-panel {
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
}

.status-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}

@keyframes pulseDanger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes fillRing {
  from { background: conic-gradient(var(--red) 0%, rgba(255,255,255,0.1) 0); }
  to { background: conic-gradient(var(--red) 82%, rgba(255,255,255,0.1) 0); }
}

.danger { 
  background: rgba(239, 68, 68, 0.2); 
  color: #fca5a5; 
  animation: pulseDanger 2s infinite;
}
.safe { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  font-family: 'Outfit';
  background: conic-gradient(var(--red) 82%, rgba(255,255,255,0.1) 0);
  border: 4px solid var(--bg);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  margin-top: 16px;
  animation: fillRing 1.5s ease-out forwards;
}

.signal-list {
  display: grid;
  gap: 12px;
}

.signal-list > div {
  padding: 16px;
}

.signal-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.signal-list span {
  font-size: 13px;
  color: var(--muted);
}

.phone-frame {
  position: absolute;
  bottom: 0;
  right: 20px;
  z-index: 2;
  width: 260px;
  height: 480px;
  padding: 20px;
  background: #000;
  border: 4px solid #333;
  border-radius: 36px;
  box-shadow: -20px 20px 40px rgba(0,0,0,0.8);
}

.phone-notch {
  width: 40%;
  height: 24px;
  background: #333;
  border-radius: 0 0 12px 12px;
  margin: -20px auto 20px;
}

.phone-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
}

.section-heading {
  margin-bottom: 48px;
}
.copy-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.depth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.depth-grid .glass-card {
  padding: 32px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, 0.1);
  color: var(--teal);
  border-radius: 12px;
  margin-bottom: 24px;
}

.feature-card .icon svg {
  width: 24px;
  height: 24px;
}

/* Workflow */
.workflow-section {
  max-width: none;
  width: 100%;
  padding: 120px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(20, 184, 166, 0.03);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Contact Section Update */
.contact-container {
  padding: 60px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), transparent);
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-content h2 {
  margin-bottom: 20px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Footer Update */
.site-footer {
  border-top: 1px solid var(--line);
  background: #000;
  padding: 80px 0 0 0;
  margin-top: 60px;
}

.footer-grid {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  padding-bottom: 60px;
}

.platform-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.platform-badge svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
}

.platform-badge.upcoming {
  opacity: 0.6;
  border-style: dashed;
}

.platform-badge.upcoming svg {
  color: var(--amber);
}

.footer-bottom {
  padding: 32px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
}

.flowchart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
}

.flow-node {
  padding: 20px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  font-family: 'Outfit';
}

.flow-node.active, .flow-node:hover {
  color: var(--ink);
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.1);
}

.flow-node::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -16px;
  width: 16px;
  height: 2px;
  background: var(--line);
}
.flow-node:last-child::after { display: none; }
.flow-node.active::after { background: var(--teal); }

.explanation-panel {
  padding: 32px;
}

/* Architecture Map */
.architecture-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.arch-column {
  padding: 24px;
}

.arch-column > div {
  padding: 16px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
}

.arch-column.guarded {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

/* Screenshots / Galleries */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 99px;
  width: fit-content;
}

.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-family: 'Outfit';
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: var(--ink);
  color: var(--bg);
}

.gallery {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.gallery.active { display: grid; }

.gallery figure {
  margin: 0;
  overflow: hidden;
}

.image-fallback {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.gallery figcaption {
  padding: 16px;
  font-weight: 600;
  font-size: 15px;
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 24px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Outfit';
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.accordion-panel {
  padding: 0 24px 24px;
}

/* Roadmap */
.roadmap {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.roadmap li {
  padding: 24px;
  font-size: 18px;
  font-weight: 600;
}

.roadmap span {
  display: block;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  font-family: 'Outfit';
  font-weight: 800;
}

/* Scroll Animation Utilities */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Nav toggle for mobile */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  z-index: 60;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
  transition: all 0.3s ease;
}

@media (max-width: 980px) {
  .hero, .split-section, .workflow-layout, .footer-grid { grid-template-columns: 1fr; }
  .hero-visual { flex-direction: column; align-items: center; }
  .dashboard-grid { padding: 20px; }
  .architecture-map { grid-template-columns: 1fr 1fr; }
  .browser-frame { position: relative; top: 0; right: 0; width: 100%; }
  .phone-frame { position: relative; bottom: 0; right: 0; margin-top: -60px; margin-left: auto; margin-right: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.8); }
  .flowchart { grid-template-columns: 1fr; }
  .flow-node::after { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    width: 280px;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 24px 24px;
    border: none;
    border-left: 1px solid var(--line);
    z-index: 50;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .site-nav.open { 
    display: flex; 
    transform: translateX(0);
  }
  .architecture-map { grid-template-columns: 1fr; }
}
