/* ============================================
   FAIL SAFE AUTOMATION — Design Tokens
   ============================================
   Color:
     --bg:          #081619  near-black teal, base canvas
     --bg-elevated: #0E2F33  spruce, section/card surfaces
     --coral:       #F0573A  primary accent
     --coral-dim:   #C9432A  hover / pressed states
     --text:        #F5F1E8  warm off-white
     --muted:       #7FA39E  muted teal-grey, secondary text
   Type:
     Display: Space Grotesk — bold, geometric, technical warmth
     Body:    Inter — clean, highly legible
     Utility: IBM Plex Mono — clock, eyebrows, numbered labels
   Signature:
     Ambient canvas node-graph in the hero — literal automation:
     disconnected business tools, connecting.
   ============================================ */

:root {
  --bg: #081619;
  --bg-elevated: #0E2F33;
  --coral: #F0573A;
  --coral-dim: #C9432A;
  --text: #F5F1E8;
  --muted: #7FA39E;
  --border: rgba(245, 241, 232, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
}

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

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

a { color: inherit; text-decoration: none; }

.accent { color: var(--coral); }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 20px;
}

#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 22, 25, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}
.nav-clock {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--text); opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  background: var(--coral);
  color: var(--bg) !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--coral-dim); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px 32px 24px 32px;
  gap: 4px;
}
.nav-mobile a {
  padding: 12px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }

@media (min-width: 900px) {
  .nav-clock { display: block; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 32px 80px 32px;
}
.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}
.hero-headline {
  font-size: clamp(52px, 11vw, 128px);
  margin-bottom: 32px;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}
.btn-solid {
  background: var(--coral);
  color: var(--bg);
}
.btn-solid:hover { background: var(--coral-dim); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }
.btn-large { padding: 20px 44px; font-size: 16px; }

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--muted), transparent);
  animation: scrollpulse 2s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============ SECTIONS ============ */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 32px;
  background: var(--bg);
}
.section-alt { background: var(--bg-elevated); }
.section-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.section-headline {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 64px;
  max-width: 720px;
}

/* Fix cards */
.fix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.fix-card {
  background: var(--bg);
  padding: 40px;
}
.fix-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--coral);
  margin-bottom: 16px;
}
.fix-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.fix-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
@media (max-width: 780px) {
  .fix-grid { grid-template-columns: 1fr; }
}

/* Process steps */
.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process-step {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.process-step:last-child { border-bottom: 1px solid var(--border); }
.process-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--coral);
  opacity: 0.5;
  width: 100px;
  flex-shrink: 0;
}
.process-text h3 {
  font-size: 24px;
  margin-bottom: 8px;
}
.process-text p {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
}
@media (max-width: 640px) {
  .process-step { gap: 20px; }
  .process-num { font-size: 32px; width: 60px; }
}

/* Chips */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s;
}
.chip:hover { border-color: var(--coral); }

/* About */
.about-inner { max-width: 780px; }
.about-body {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 640px;
}

/* CTA band */
.cta-band {
  position: relative;
  z-index: 1;
  background: var(--coral);
  padding: 100px 32px;
  text-align: center;
}
.cta-inner { max-width: 700px; margin: 0 auto; }
.cta-headline {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--bg);
  margin-bottom: 16px;
}
.cta-sub {
  color: rgba(8, 22, 25, 0.75);
  font-size: 17px;
  margin-bottom: 36px;
}
.cta-band .btn-solid {
  background: var(--bg);
  color: var(--text);
}
.cta-band .btn-solid:hover { background: #0E2F33; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--coral);
}
.contact-form button {
  margin-top: 28px;
  border: none;
  cursor: pointer;
  width: fit-content;
}
.form-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact-item a {
  font-size: 18px;
  font-weight: 600;
  transition: color 0.2s;
}
.contact-item a:hover { color: var(--coral); }
@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 32px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 13px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}
