@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap");

/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  --bg-base: #0a0d12;
  --bg-surface: #121721;
  --bg-surface-hover: #171f2d;
  --border-subtle: #1e2638;
  --border-active: #38bdf8;

  --accent-primary: #38bdf8;
  --accent-secondary: #64748b;
  --status-green: #10b981;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-mono: "JetBrains Mono", "Space Mono", monospace;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-max: 1280px;
  --header-height: 72px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* ==========================================================================
   RESETS & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Structural Background Grid */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    linear-gradient(to right, rgba(30, 38, 56, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 38, 56, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   TYPOGRAPHY & MONOSPACE ELEMENTS
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6,
.font-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
}
h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
}
h4 {
  font-size: 1.1rem;
  font-weight: 500;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 3rem;
  max-width: 800px;
}

.section-title {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.navbar {
  height: var(--header-height);
  background-color: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  background: rgba(18, 23, 33, 0.6);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--status-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--status-green);
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-primary);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 2px;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ==========================================================================
   CARDS & COMPONENTS
   ========================================================================== */
.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  position: relative;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.card-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: block;
}

.card-title {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30, 38, 56, 0.6);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.75rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background-color: #0284c7;
  border-color: #0284c7;
}

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

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 2px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background-color: #0a0d12;
  color: #f8fafc;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #ef4444;
  display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 6rem 0 5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-content {
  max-width: 900px;
}

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

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 2.25rem;
  max-width: 780px;
  line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: #07090d;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--accent-primary);
}

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

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 868px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-base);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
    display: none;
  }

  .nav-menu.is-active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    font-size: 1rem;
  }

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

  .form-group.full-width {
    grid-column: span 1;
  }

  .hero {
    padding: 4rem 0 3rem 0;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
