/* ============================================================
   SIREEN v2 — World-Class Cybersecurity Product Design System
   Inspired by Baseten precision + Antigravity interactivity
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Backgrounds — deep but not harsh on the eye */
  --bg-primary: #0c0c16;
  --bg-secondary: #131320;
  --bg-tertiary: #1a1a2a;
  --bg-elevated: #222234;
  --bg-card: rgba(26, 26, 42, 0.75);

  /* Text — higher contrast for comfort */
  --text-primary: #f2f2f7;
  --text-secondary: #a5a5b8;
  --text-muted: #7a7a90;
  --text-inverse: #0c0c16;

  /* Accents — electric, vibrant */
  --accent: #00e5ff;
  --accent-dim: rgba(0, 229, 255, 0.06);
  --accent-glow: rgba(0, 229, 255, 0.12);
  --accent-green: #3ddc84;
  --accent-amber: #ffb74d;
  --accent-red: #ff6b6b;
  --accent-blue: #60a5fa;

  /* Borders — visible but refined */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.20);
  --border-accent: rgba(0, 229, 255, 0.30);

  /* Spacing — generous */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  --space-5xl: 10rem;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  /* Radius — sharp for precision */
  --radius-sm: 4px;
  --radius-md: 6px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px rgba(0, 229, 255, 0.08);

  /* Transitions */
  --transition-micro: 75ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-nav: 100;
  --z-canvas: 0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ── Typography Scale ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  letter-spacing: -3.5px;
  line-height: 1.0;
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  letter-spacing: -1.8px;
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

h4 {
  font-size: 1.1rem;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Grid Background Pattern ──────────────────────────────── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 15%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 15%, transparent 65%);
  pointer-events: none;
}

/* ── Shell / Container ────────────────────────────────────── */
.shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.shell-narrow {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
}

/* ── Eyebrow Label ────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: var(--space-xl);
  transition: all var(--transition-fast);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  transition: border-color var(--transition-fast);
  pointer-events: none;
}

.card:hover::before {
  border-color: var(--border-accent);
}

.card:hover {
  background: rgba(24, 24, 34, 0.8);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.card:hover .card-icon {
  background: rgba(0, 229, 255, 0.1);
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
}

/* ── Code & Terminal ──────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

pre {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #a0a8b8;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* Syntax highlighting */
.token-keyword { color: #7dd3fc; }
.token-string { color: #7ee787; }
.token-comment { color: #5a6a7a; font-style: italic; }
.token-number { color: #fbbf24; }
.token-tag { color: #fbbf24; }
.token-function { color: #60a5fa; }
.token-operator { color: #ff8a65; }

/* ── Section Base ─────────────────────────────────────────── */
.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-lead {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-top: var(--space-md);
}

/* ── Navigation ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: rgba(7, 7, 10, 0.75);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid var(--border-subtle);
  transition: transform var(--transition-base), background var(--transition-base);
}

.site-header.hidden {
  transform: translateY(-100%);
}

.site-header.scrolled {
  background: rgba(7, 7, 10, 0.92);
  border-bottom-color: var(--border-medium);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-micro);
}

.desktop-nav a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.desktop-nav a.active {
  color: var(--accent);
}

.desktop-nav .btn {
  padding: 8px 18px;
  font-size: 0.8rem;
  margin-left: 8px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-subtle);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color var(--transition-micro);
}

.mobile-nav a:hover {
  color: var(--text-primary);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-2xl);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-sm);
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 5px 0;
  transition: color var(--transition-micro);
}

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

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: var(--space-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Reveal Animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* Stagger grid children */
.stagger-grid > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger-grid > .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger-grid > .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger-grid > .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger-grid > .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ── Animation Keyframes ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.02; }
  50% { opacity: 0.06; }
}

/* ── Demo Tabs ────────────────────────────────────────────── */
.demo-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 40px;
}

.demo-tab {
  padding: 14px 28px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-micro);
  font-family: inherit;
  letter-spacing: 0.02em;
}

.demo-tab:hover { color: var(--text-secondary); }
.demo-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.demo-panel {
  display: none;
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-top: none;
  background: var(--bg-secondary);
}

.demo-panel.active { display: block; }

/* ── FAQ Accordion ────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: color var(--transition-micro);
}

.faq-question:hover { color: var(--accent); }

.faq-question svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base), padding var(--transition-base);
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: 22px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Warning / Tip / Info boxes ───────────────────────────── */
.callout {
  padding: 20px 24px;
  border-left: 2px solid;
  background: var(--bg-card);
  margin: 20px 0;
}

.callout-warning { border-color: var(--accent-amber); }
.callout-warning > b { color: var(--accent-amber); }
.callout-tip { border-color: var(--accent-green); }
.callout-tip > b { color: var(--accent-green); }
.callout-info { border-color: var(--accent); }
.callout-info > b { color: var(--accent); }

.callout > b {
  font-size: 0.88rem;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.callout > p,
.callout > ul {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.callout > ul { padding-left: 18px; margin-top: 8px; }

/* ── Tables ───────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

th, td {
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

th {
  background: var(--bg-tertiary);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td { color: var(--text-secondary); }
td:first-child { color: var(--text-primary); font-weight: 500; }
td code { font-size: 0.8rem; }

/* ── Status Dots ──────────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-confirmed { background: var(--accent-green); box-shadow: 0 0 10px rgba(61, 220, 132, 0.3); }
.status-degraded { background: var(--accent-amber); box-shadow: 0 0 10px rgba(255, 183, 77, 0.3); }
.status-unverified { background: var(--accent); box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
.status-failed { background: var(--accent-red); box-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }
.status-clean { background: var(--accent-blue); box-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: rgba(0, 229, 255, 0.2);
  color: var(--text-primary);
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .section { padding: var(--space-3xl) 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .section { padding: var(--space-2xl) 0; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom { flex-direction: column; gap: 8px; }
  h1 { letter-spacing: -2px; }
  h2 { letter-spacing: -1px; }
  .demo-tabs { flex-wrap: wrap; }
  .demo-tab { padding: 10px 16px; font-size: 0.8rem; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 24px); }
  .btn { padding: 12px 20px; font-size: 0.82rem; }
  .card { padding: var(--space-lg); }
}
