/* ==========================================================================
   Tech555 — Design System
   Dark, engineering-grade aesthetic. Space Grotesk + Inter.
   ========================================================================== */

:root {
  --bg: #070a12;
  --bg-elev: #0c111f;
  --surface: #101729;
  --surface-2: #141c33;
  --border: rgba(148, 163, 198, 0.14);
  --border-strong: rgba(148, 163, 198, 0.28);
  --text: #e8ecf6;
  --text-muted: #9aa5c0;
  --text-faint: #67718c;
  --accent: #4f7cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --gradient: linear-gradient(120deg, #4f7cff 0%, #22d3ee 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --container: 1160px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--gradient);
}

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 62ch;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  padding: clamp(80px, 11vw, 140px) 0;
  position: relative;
}

.section--alt {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.btn--primary {
  background: var(--gradient);
  color: #06080f;
  box-shadow: 0 8px 30px rgba(79, 124, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.4);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn--ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: baseline;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current="page"] {
  color: var(--text);
}

.site-nav .btn {
  padding: 10px 22px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(9, 12, 22, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px;
    display: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }
  .site-nav .btn {
    margin-top: 18px;
    justify-content: center;
  }
  body.nav-locked {
    overflow: hidden;
  }
  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(70px, 12vw, 130px)) 0
    clamp(80px, 11vw, 130px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 198, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 198, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 35%, transparent 75%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  top: -360px;
  right: -180px;
  background: radial-gradient(
    circle,
    rgba(79, 124, 255, 0.22) 0%,
    rgba(34, 211, 238, 0.1) 40%,
    transparent 70%
  );
  filter: blur(10px);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 16ch;
}

.hero .lead {
  margin-bottom: 38px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 90px);
}

.stat {
  background: var(--bg-elev);
  padding: 30px 28px;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 124, 255, 0.25);
  margin-bottom: 22px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-2);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin: 0;
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-2);
}

.card .card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.card:hover .card-link svg {
  transform: translateX(4px);
}

/* Feature list (checks) */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.feature-list li::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent-soft)
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2322d3ee" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center / 10px no-repeat;
  border: 1px solid rgba(34, 211, 238, 0.35);
}

/* --------------------------------------------------------------------------
   Split sections
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

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

.split .visual {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px;
}

/* Terminal mock */
.terminal {
  background: #0a0e1a;
  border-radius: 14px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #aeb8d6;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2c3550;
}

.terminal-bar i:first-child {
  background: #ff5f57;
}

.terminal-bar i:nth-child(2) {
  background: #febc2e;
}

.terminal-bar i:nth-child(3) {
  background: #28c840;
}

.terminal-body {
  padding: 20px 22px 26px;
}

.terminal-body .c-green {
  color: #4ade80;
}

.terminal-body .c-blue {
  color: #4f7cff;
}

.terminal-body .c-cyan {
  color: #22d3ee;
}

.terminal-body .c-dim {
  color: #5b6480;
}

/* --------------------------------------------------------------------------
   Process / steps
   -------------------------------------------------------------------------- */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 24px;
}

.step {
  counter-increment: step;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: var(--surface);
}

.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.12rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(140deg, var(--surface) 0%, var(--surface-2) 100%);
  padding: clamp(48px, 7vw, 80px);
  text-align: center;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 70%);
  pointer-events: none;
}

.cta-band h2 {
  max-width: 22ch;
  margin-inline: auto;
}

.cta-band .lead {
  margin-inline: auto;
  margin-bottom: 34px;
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */

.page-hero {
  padding: calc(var(--header-h) + clamp(60px, 9vw, 100px)) 0 clamp(50px, 7vw, 80px);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(
    ellipse 70% 90% at 70% -20%,
    rgba(79, 124, 255, 0.14),
    transparent 60%
  );
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
}

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

.contact-channel {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.contact-channel:last-child {
  border-bottom: none;
}

.contact-channel .card-icon {
  margin: 0;
  flex: 0 0 52px;
}

.contact-channel strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 3px;
}

.contact-channel a,
.contact-channel span {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.contact-channel a:hover {
  color: var(--accent-2);
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 13px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.2);
}

.form-note {
  font-size: 0.83rem;
  color: var(--text-faint);
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: clamp(56px, 8vw, 80px) 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

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

.site-footer .logo {
  margin-bottom: 16px;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.93rem;
  max-width: 38ch;
}

.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-bottom a {
  color: var(--text-faint);
}

.footer-bottom a:hover {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Prose (legal pages)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.2em;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 60px) 24px 80px;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  background: var(--accent);
  color: #06080f;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* Audit refinements */
h1,
h2,
h3 {
  text-wrap: balance;
}

.btn,
.site-nav a,
.nav-toggle,
.card-link {
  touch-action: manipulation;
}
