/* ═══════════════════════════════════════════════
   SEMMAP Labs — Design System
   Aesthetic: Structural / Architectural / Precise
   ═══════════════════════════════════════════════ */

:root {
  /* Palette */
  --bg-root: #050507;
  --bg-surface: #0b0b10;
  --bg-raised: #111118;
  --bg-hover: #16161f;

  --border-subtle: #1a1a25;
  --border-default: #252535;
  --border-accent: #e2ff5440;

  --text-primary: #d4d4d8;
  --text-secondary: #71717a;
  --text-muted: #3f3f46;
  --text-accent: #e2ff54;

  --accent: #e2ff54;
  --accent-dim: #e2ff5420;
  --accent-mid: #e2ff5460;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 60px;
}

/* ── Reset ────────────────────────────────── */

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

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

body {
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

::selection {
  background: var(--accent);
  color: var(--bg-root);
}

/* ── Grid Background ─────────────────────── */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ──────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  background: var(--bg-root);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 7, 0.85);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__wordmark span {
  color: var(--text-accent);
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--text-primary);
  opacity: 1;
}

.nav__link--active {
  color: var(--text-accent);
}

/* ── Page Container ──────────────────────── */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

/* ── Hero ─────────────────────────────────── */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.hero__overline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 0.2s forwards;
}

.hero__overline::before {
  content: '>';
  margin-right: var(--space-sm);
  opacity: 0.5;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  max-width: 14ch;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 0.4s forwards;
}

.hero__title em {
  font-style: normal;
  color: var(--text-accent);
  position: relative;
}

.hero__description {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 0.6s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease 0.8s forwards;
}

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  opacity: 1;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-root);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: #d4eb4e;
  border-color: #d4eb4e;
  opacity: 1;
}

/* ── Divider ─────────────────────────────── */

.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.divider__line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default) 20%, var(--border-default) 80%, transparent);
}

/* ── Products Section ────────────────────── */

.section__overline {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

/* ── Product Card ────────────────────────── */

.product-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

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

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-mid), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.75rem;
  margin-bottom: var(--space-lg);
}

.product-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.product-card__tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 55ch;
}

.product-card__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.feature {
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-root);
}

.feature__label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.feature__value {
  font-size: 0.8rem;
  color: var(--text-primary);
}

/* ── Code Block ──────────────────────────── */

.code-block {
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  padding: var(--space-md) var(--space-lg);
  overflow-x: auto;
  margin-top: var(--space-md);
}

.code-block__line {
  display: block;
  white-space: pre;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.code-block__line .cmd {
  color: var(--text-accent);
}

.code-block__line .flag {
  color: #a78bfa;
}

.code-block__line .comment {
  color: var(--text-muted);
  font-style: italic;
}

/* ── Philosophy Section ──────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.principle {
  background: var(--bg-surface);
  padding: var(--space-xl);
}

.principle__number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.principle__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.principle__description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────── */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__left {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer__left span {
  color: var(--text-secondary);
}

.footer__right {
  display: flex;
  gap: var(--space-lg);
}

.footer__link {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer__link:hover {
  color: var(--text-accent);
  opacity: 1;
}

/* ── Status Indicator ────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d39960;
  animation: pulse 2s ease infinite;
}

/* ── 404 Page ────────────────────────────── */

.not-found {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.not-found__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 8rem;
  color: var(--bg-raised);
  line-height: 1;
}

.not-found__message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
}

/* ── Animations ──────────────────────────── */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ── Responsive ──────────────────────────── */

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .nav__links {
    display: none;
  }

  .product-card {
    padding: var(--space-lg);
  }

  .product-card__features {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: var(--space-xl) var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
