/* ===== DESIGN TOKENS ===== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ===== LIGHT MODE (Deep Ocean Theme) ===== */
:root, [data-theme="light"] {
  --color-bg:             #f4f6f8;
  --color-surface:        #ffffff;
  --color-surface-2:      #f8fafb;
  --color-surface-offset: #edf1f5;
  --color-divider:        #d4dbe3;
  --color-border:         #c5ced9;

  --color-text:           #0f1c2e;
  --color-text-muted:     #5a6a7e;
  --color-text-faint:     #9ba8b8;
  --color-text-inverse:   #f4f6f8;

  --color-primary:        #0b3d6e;
  --color-primary-hover:  #0a2f55;
  --color-primary-active: #07203b;
  --color-primary-light:  #e8f0f8;

  --color-accent:         #0891b2;
  --color-accent-hover:   #0e7490;
  --color-accent-light:   #e0f7fa;

  --shadow-sm: 0 1px 2px rgba(15, 28, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 28, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 28, 46, 0.12);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:             #0b1929;
  --color-surface:        #0f2137;
  --color-surface-2:      #132843;
  --color-surface-offset: #0d1e33;
  --color-divider:        #1a3350;
  --color-border:         #213d5e;

  --color-text:           #d4dfe9;
  --color-text-muted:     #7f97b2;
  --color-text-faint:     #4a6380;
  --color-text-inverse:   #0b1929;

  --color-primary:        #4a9ede;
  --color-primary-hover:  #6db5e8;
  --color-primary-active: #357abd;
  --color-primary-light:  #132843;

  --color-accent:         #22d3ee;
  --color-accent-hover:   #67e8f9;
  --color-accent-light:   #0f2137;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0b1929;
    --color-surface:        #0f2137;
    --color-surface-2:      #132843;
    --color-surface-offset: #0d1e33;
    --color-divider:        #1a3350;
    --color-border:         #213d5e;
    --color-text:           #d4dfe9;
    --color-text-muted:     #7f97b2;
    --color-text-faint:     #4a6380;
    --color-text-inverse:   #0b1929;
    --color-primary:        #4a9ede;
    --color-primary-hover:  #6db5e8;
    --color-primary-active: #357abd;
    --color-primary-light:  #132843;
    --color-accent:         #22d3ee;
    --color-accent-hover:   #67e8f9;
    --color-accent-light:   #0f2137;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

/* ===== LAYOUT ===== */
.page-container {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-4) 0;
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.nav-links a.active {
  color: var(--color-primary);
  font-weight: 600;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-6);
    gap: var(--space-4);
    box-shadow: var(--shadow-md);
  }
}

/* ===== HERO ===== */
.hero {
  padding: clamp(var(--space-12), 6vw, var(--space-20)) 0;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-4);
  background: var(--color-accent-light);
  border-radius: var(--radius-full);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto var(--space-10);
  line-height: 1.5;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  max-width: 1000px;
}

.hero-image-wrap img {
  width: 100%;
  display: block;
}

.hero-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-6) var(--space-6) var(--space-4);
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  color: #e8edf2;
  font-size: var(--text-xs);
  line-height: 1.5;
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(var(--space-10), 5vw, var(--space-20)) 0;
}

.section + .section {
  border-top: 1px solid var(--color-divider);
}

.section-header {
  margin-bottom: var(--space-8);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.section-header .section-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

/* Two-column layout: text + image */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}

.content-grid.reverse {
  direction: rtl;
}

.content-grid.reverse > * {
  direction: ltr;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .content-grid.reverse {
    direction: ltr;
  }
}

.content-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.content-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
}

.content-image img {
  width: 100%;
  display: block;
}

.content-image figcaption {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding: var(--space-3) var(--space-4);
}

/* ===== APPLICATION CARDS ===== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}

.app-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
}

.app-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.app-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.app-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== SIEM PRODUCT ===== */
.product-highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  margin-top: var(--space-8);
}

.product-highlight-header {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.product-highlight-header img {
  width: 120px;
  border-radius: var(--radius-md);
}

.product-highlight-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.product-highlight-header .subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.product-body p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.spec-item {
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.spec-item .spec-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.spec-item .spec-value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

/* ===== VIDEO DEMO ===== */
.video-demo {
  margin-top: var(--space-8);
}

.video-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.video-comparison figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
}

.video-comparison img {
  width: 100%;
  display: block;
}

.video-comparison figcaption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
  font-weight: 500;
  text-align: center;
}

@media (max-width: 600px) {
  .video-comparison {
    grid-template-columns: 1fr;
  }
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-10) 0 var(--space-8);
  margin-top: var(--space-12);
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-brand img {
  height: 32px;
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.footer-tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 500px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
}

.footer-attribution a {
  color: var(--color-text-faint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== SONAR IMAGES PAGE ===== */
.gallery-intro {
  text-align: center;
  padding: clamp(var(--space-10), 5vw, var(--space-16)) 0 var(--space-8);
}

.gallery-intro h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.gallery-intro p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  padding-bottom: var(--space-12);
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: var(--space-4) var(--space-5);
}

.gallery-item figcaption h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.gallery-item figcaption p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== INTERNAL NAV ===== */
.page-nav {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  flex-wrap: wrap;
}

.page-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.page-nav a:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.page-nav a.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

@media (max-width: 768px) {
  .product-highlight {
    padding: var(--space-6);
  }
  .product-highlight-header {
    flex-direction: column;
    text-align: center;
  }
}
