/* ==========================================================================
   Low Earth Technologies — design tokens
   Dark space theme: deep-space background, white type, orbital-blue accent,
   a warm sun-glint accent used sparingly for the hero glow only.
   ========================================================================== */

:root {
  --bg: #05080D;
  --bg-panel: #0B1220;
  --ink: #F3F6FA;
  --muted: #93A2B8;
  --accent: #4FA8F0;
  --accent-warm: #FFB870;
  --line: #1C2536;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --wrap-max: 1160px;
  --radius: 3px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #05080D;
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #05080D;
}
.btn-primary:hover {
  background: #6DBAF5;
  box-shadow: 0 0 0 4px rgba(79, 168, 240, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-small {
  padding: 0.55em 1.2em;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 13, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

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

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

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

.nav a:not(.btn) {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  width: 100%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
  isolation: isolate;
  background-image: url('../assets/hero-earth.jpg');
  background-size: cover;
  background-position: center 65%;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(5, 8, 13, 0.94) 0%, rgba(5, 8, 13, 0.82) 32%, rgba(5, 8, 13, 0.38) 58%, rgba(5, 8, 13, 0.12) 78%),
    linear-gradient(to top, rgba(5, 8, 13, 0.9) 0%, rgba(5, 8, 13, 0) 34%);
}

.hero-inner { max-width: 640px; }

.hero-copy h1 {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.12;
  max-width: 17ch;
  color: var(--ink);
}

.hero-sub {
  margin-top: var(--space-3);
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.telemetry {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  padding: var(--space-5) 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.services h2, .approach h2, .contact h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.section-intro {
  margin-top: var(--space-1);
  color: var(--muted);
  max-width: 50ch;
}

.card-grid {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--bg-panel);
  padding: var(--space-4);
}

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(79, 168, 240, 0.35);
  border-radius: var(--radius);
  padding: 0.2em 0.55em;
  margin-bottom: var(--space-2);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Approach
   ========================================================================== */

.approach {
  padding: var(--space-5) 0;
  background: var(--bg);
}

.approach-list {
  margin-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.approach-row {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.approach-row h3 {
  font-size: 1.05rem;
  color: var(--ink);
}

.approach-row p {
  color: var(--muted);
  max-width: 55ch;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--bg-panel);
  color: var(--ink);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.contact h2 { color: var(--ink); }

.contact-copy p:not(.eyebrow) {
  margin-top: var(--space-2);
  color: var(--muted);
  max-width: 42ch;
}

.contact-fallback { margin-top: var(--space-3) !important; font-size: 0.92rem; }
.contact-fallback a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.optional { text-transform: none; letter-spacing: 0; color: #5C6C82; }

.field input,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55em 0.1em;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--accent);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #4A5972;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-form .btn-primary {
  margin-top: var(--space-2);
}

.contact-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
.form-status[data-state="success"] { color: #8FE0B0; }
.form-status[data-state="error"] { color: #F0A0A0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: var(--space-4) 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.footer-nav {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-nav a:hover { color: var(--ink); }

.footer-copy {
  width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  margin-top: var(--space-1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }

  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .approach-row { grid-template-columns: 1fr; gap: var(--space-1); }
}

@media (max-width: 700px) {
  .hero {
    min-height: auto;
    background-position: center 85%;
  }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 8, 13, 0.96) 0%, rgba(5, 8, 13, 0.93) 55%, rgba(5, 8, 13, 0.55) 82%, rgba(5, 8, 13, 0.25) 100%);
  }
}

@media (max-width: 480px) {
  .hero { padding-top: var(--space-5); }
  .brand-logo { height: 32px; }
}
