/* Kernel and Thread LLC - Static Design System
 * Tokens: Geist / Geist Mono, Tailwind type scale, B2 spacing, flat dark surfaces
 */

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

:root {
  --bg-canvas: #000000;
  --bg-surface: #181818;
  --bg-elevated: #1f1f1f;
  --bg-interactive: #272727;
  --bg-border: #313131;

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: rgba(255, 255, 255, 0.3);
  --accent: #34d399;
  --accent-dim: rgba(52, 211, 153, 0.12);
  --accent-border: rgba(52, 211, 153, 0.35);

  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);

  --space-0: 0px;
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Never use italic anywhere */
em,
i,
cite {
  font-style: normal;
}

.font-mono {
  font-family: 'Geist Mono', monospace;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-200);
  z-index: 200;
  padding: var(--space-75) var(--space-100);
  border-radius: 8px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: top 300ms var(--ease-fluid);
}

.skip-link:focus {
  top: var(--space-200);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-300);
  padding-right: var(--space-300);
}

/* Fluid Island Nav */
.nav-wrapper {
  position: sticky;
  top: var(--space-300);
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-200);
  pointer-events: none;
}

.island-nav {
  pointer-events: auto;
  margin-top: var(--space-300);
  width: max-content;
  max-width: 100%;
  border-radius: 9999px;
  background-color: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-border);
  padding: var(--space-75) var(--space-200);
  display: flex;
  align-items: center;
  gap: var(--space-300);
  transition: all 700ms var(--ease-fluid);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 9999px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-200);
}

@media (min-width: 640px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  padding: var(--space-50) var(--space-75);
  border-radius: 9999px;
  transition: all 500ms var(--ease-fluid);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text-primary);
  background-color: var(--bg-interactive);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hamburger button */
.nav-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--bg-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 500ms var(--ease-fluid);
}

@media (min-width: 640px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle:hover {
  background-color: var(--bg-interactive);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hamburger-line {
  position: absolute;
  width: 14px;
  height: 1.5px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 500ms var(--ease-fluid);
}

.hamburger-line.top {
  transform: translateY(-3px);
}

.hamburger-line.bottom {
  transform: translateY(3px);
}

.nav-toggle[aria-expanded="true"] .hamburger-line.top {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-line.bottom {
  transform: translateY(0) rotate(-45deg);
}

/* Mobile Modal Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-300);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms var(--ease-fluid);
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  transform: translateY(48px);
  opacity: 0;
  transition: all 700ms var(--ease-fluid);
}

.nav-overlay.is-open .nav-overlay-link {
  transform: translateY(0);
  opacity: 1;
}

.nav-overlay.is-open .nav-overlay-link:nth-child(1) { transition-delay: 100ms; }
.nav-overlay.is-open .nav-overlay-link:nth-child(2) { transition-delay: 150ms; }
.nav-overlay.is-open .nav-overlay-link:nth-child(3) { transition-delay: 200ms; }
.nav-overlay.is-open .nav-overlay-link:nth-child(4) { transition-delay: 250ms; }

/* Typography & Hero */
.hero {
  padding-top: var(--space-900);
  padding-bottom: var(--space-800);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  padding: var(--space-50) var(--space-100);
  border-radius: 9999px;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-300);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: var(--accent);
}

.hero-title {
  max-width: 680px;
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
  background: linear-gradient(90deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-300);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 60px;
    line-height: 1;
  }
}

.hero-subtitle {
  max-width: 680px;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  color: var(--text-secondary);
  text-wrap: pretty;
  margin-bottom: var(--space-400);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-200);
  margin-bottom: var(--space-400);
}

.proof-line {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-75);
}

/* Buttons (Main: 8px vertical, 12px horizontal, text-base semibold) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border-radius: 8px;
  background-color: var(--text-primary);
  color: var(--bg-canvas);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--text-primary);
  cursor: pointer;
  transition: all 500ms var(--ease-fluid);
}

.btn-primary:hover {
  background-color: #e4e4e7;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border-radius: 8px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--bg-border);
  cursor: pointer;
  transition: all 500ms var(--ease-fluid);
}

.btn-secondary:hover {
  background-color: var(--bg-interactive);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sections */
.section {
  padding-top: var(--space-800);
  padding-bottom: var(--space-800);
}

.section-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-100);
}

.section-heading {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--text-primary);
  margin-bottom: var(--space-300);
  max-width: 680px;
}

.section-copy {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-secondary);
  text-wrap: pretty;
  max-width: 680px;
}

/* Grid & Cards (Full borders only, nested radius: 16px - 8px = 8px or 16px - 12px = 4px) */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-300);
  margin-top: var(--space-400);
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-300);
  margin-top: var(--space-400);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 16px;
  padding: var(--space-300);
  transition: all 700ms var(--ease-fluid);
}

.card:hover {
  background-color: var(--bg-elevated);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--bg-interactive);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: var(--space-200);
}

.card-title {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-75);
  text-wrap: balance;
}

.card-body {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Mandatory Tagline Reveal (B11) */
.tagline-section {
  padding-top: var(--space-900);
  padding-bottom: var(--space-900);
}

.tagline-reveal {
  max-width: 680px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .tagline-reveal {
    font-size: 48px;
    line-height: 1.1;
  }
}

.tagline-word {
  display: inline-block;
  color: var(--text-muted);
  transition: color 700ms var(--ease-fluid);
}

.tagline-word.is-active {
  color: var(--text-primary);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: var(--space-200);
  margin-top: var(--space-400);
  max-width: 680px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 16px;
  padding: var(--space-300);
}

.faq-question {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-75);
  text-wrap: balance;
}

.faq-answer {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Contact Form & Validation */
.contact-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 16px;
  padding: var(--space-400);
  max-width: 680px;
}

.form-grid {
  display: grid;
  gap: var(--space-200);
  margin-top: var(--space-300);
}

.form-label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-75);
}

.form-input {
  width: 100%;
  background-color: var(--bg-canvas);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: var(--space-100) var(--space-200);
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  line-height: 20px;
  transition: border-color 500ms var(--ease-fluid);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-status {
  font-size: 14px;
  line-height: 20px;
  margin-top: var(--space-100);
  min-height: 20px;
}

.form-status.is-error {
  color: #f87171;
}

.form-status.is-success {
  color: var(--accent);
}

/* Scroll Interpolation (B7) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(64px);
  filter: blur(12px);
  transition: opacity 900ms var(--ease-fluid),
              transform 900ms var(--ease-fluid),
              filter 900ms var(--ease-fluid);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .tagline-word {
    color: var(--text-primary);
    transition: none;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bg-border);
  padding-top: var(--space-600);
  padding-bottom: var(--space-600);
  margin-top: var(--space-600);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-300);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-meta {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-300);
}

.footer-link {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 500ms var(--ease-fluid);
}

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

.footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Legal pages */
.legal-article {
  max-width: 680px;
  padding-top: var(--space-700);
  padding-bottom: var(--space-700);
  display: grid;
  gap: var(--space-400);
}

.legal-section {
  display: grid;
  gap: var(--space-100);
}

.legal-heading {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--text-primary);
}

.legal-text {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-secondary);
  text-wrap: pretty;
}
