/* ---------------------------------------------------------
   BlueCrest Robotics — mission-control design system
--------------------------------------------------------- */

:root {
  --bg:          #07080B;
  --bg-panel:    #121620;
  --ink:         #F5F6F8;
  --ink-mid:     #C4C8CE;
  --ink-dim:     #8A8F98;
  --signal:      #6FD6FF;
  --signal-dim:  #2C7B99;
  --error:       #FF5C5C;
  --line:        rgba(245,246,248,0.10);
  --line-soft:   rgba(245,246,248,0.05);

  /* side gutter that also centers content once the viewport exceeds --wrap */
  --wrap:  1200px;
  --pad-x: max(clamp(24px, 5vw, 64px), calc((100% - var(--wrap)) / 2));

  --font-display: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-body:    'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
}

* { 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; }
}

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

::selection {
  background: var(--signal);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--signal);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 999;
  font-family: var(--font-mono);
}
.skip-link:focus {
  left: 24px;
  top: 24px;
}

/* -------------------- status dot -------------------- */

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111,214,255,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(111,214,255,0); }
}

/* -------------------- header -------------------- */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--pad-x);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.wordmark span { color: var(--ink-dim); }

.wordmark-logo {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--signal);
}
.wm-ring {
  fill: none;
  stroke: rgba(111, 214, 255, 0.35);
  stroke-width: 1.5;
}
.wm-sweep {
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); }
.site-nav a.nav-cta {
  color: var(--ink);
}
.site-nav a.nav-cta:hover,
.site-nav a.nav-cta:focus-visible { color: var(--signal); }

/* -------------------- generic section rhythm -------------------- */

section {
  position: relative;
  z-index: 5;
  padding: clamp(72px, 9vw, 112px) var(--pad-x);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 0 0 18px;
}

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

/* -------------------- hero -------------------- */

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 64px;
}

/* flex item after the text; scope centers in the leftover width */
.hero-decor {
  order: 2;
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.scope {
  position: relative;
  width: min(560px, 44vw);
  aspect-ratio: 1;
  flex: none;
}

.scope-face,
.scope-blips {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring { stroke: rgba(111, 214, 255, 0.13); }
.ring-outer { stroke: rgba(111, 214, 255, 0.16); }

.xhair { stroke: rgba(111, 214, 255, 0.08); }
.xhair-diag { stroke: rgba(111, 214, 255, 0.05); }

/* dasharray on a thick-stroked circle renders as radial azimuth ticks */
.ticks-minor {
  stroke: rgba(111, 214, 255, 0.08);
  stroke-width: 7;
  stroke-dasharray: 1.4 14.66;
  stroke-dashoffset: 0.7;
}
.ticks-major {
  stroke: rgba(111, 214, 255, 0.15);
  stroke-width: 13;
  stroke-dasharray: 2 92.25;
  stroke-dashoffset: 1;
}

.center-dot { fill: rgba(111, 214, 255, 0.7); }

/* rotating sweep: hard bright leading edge, ~45° phosphor trail fading to nothing */
.scope-sweep {
  position: absolute;
  inset: 2.5%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 315deg,
    rgba(111, 214, 255, 0) 315deg,
    rgba(111, 214, 255, 0.12) 355deg,
    rgba(111, 214, 255, 0.5) 359.2deg,
    rgba(111, 214, 255, 0.9) 360deg
  );
  animation: sweep-rotate 6s linear infinite;
}
@keyframes sweep-rotate {
  to { transform: rotate(360deg); }
}

/* returns flash as the sweep passes their bearing, then decay until next pass;
   per-blip animation-delay (inline) syncs each to the 6s sweep period */
.blip {
  fill: var(--signal);
  filter: drop-shadow(0 0 5px rgba(111, 214, 255, 0.85));
  opacity: 0;
  animation: blip-fade 6s linear infinite;
}
.blip-faint { filter: none; }
@keyframes blip-fade {
  0% { opacity: 0.95; }
  10% { opacity: 0.7; }
  60% { opacity: 0.12; }
  100% { opacity: 0.02; }
}

@media (prefers-reduced-motion: reduce) {
  .scope-sweep { animation: none; opacity: 0.35; }
  .blip { animation: none; opacity: 0.55; }
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 0 1 680px;
  max-width: 680px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 24px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-dim);
  max-width: 52ch;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* -------------------- buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 500;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--signal);
  border-color: var(--signal);
}

.btn-text {
  background: none;
  color: var(--ink-mid);
  padding: 14px 4px;
}
.btn-text:hover,
.btn-text:focus-visible { color: var(--ink); }

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

/* -------------------- two-column section layout -------------------- */

/* on wide screens each section becomes eyebrow/intro (left) + content (right) */
@media (min-width: 940px) {
  .services,
  .about,
  .contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(56px, 7vw, 120px);
    align-items: start;
  }
  .services .section-head,
  .about .section-head,
  .contact .section-head {
    grid-column: 1;
    margin-bottom: 0;
    position: sticky;
    top: 48px;
  }
  .services > :not(.section-head),
  .about > :not(.section-head),
  .contact > :not(.section-head) {
    grid-column: 2;
  }

  /* top-align the list with the left column and let the section
     border close it off, instead of doubling up hairlines */
  .capability-list { border-top: none; }
  .capability-list li:first-child { padding-top: 0; }
  .capability-list li:last-child { border-bottom: none; padding-bottom: 0; }
}

/* -------------------- services / capability list -------------------- */

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.capability-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 28px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.part-icon {
  color: var(--ink-dim);
  width: 32px;
  height: 32px;
}
.part-icon svg { width: 100%; height: 100%; }

.part-copy h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.part-copy p {
  margin: 0;
  color: var(--ink-dim);
  max-width: 60ch;
}

/* -------------------- about -------------------- */

.about-copy {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-mid);
  max-width: 68ch;
}
.about-copy + .about-copy {
  margin-top: 20px;
}

/* -------------------- contact -------------------- */

.contact-sub {
  color: var(--ink-dim);
  margin-top: 14px;
  max-width: 50ch;
}

.contact-form {
  max-width: 560px;
  border: 1px solid var(--line);
  padding: 40px clamp(24px, 4vw, 48px);
  position: relative;
}
.contact-form::before,
.contact-form::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
}
.contact-form::before { top: -1px; left: -1px; border-top: 1px solid var(--signal); border-left: 1px solid var(--signal); }
.contact-form::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--signal); border-right: 1px solid var(--signal); }

.field-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.field-row label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field-row label span {
  text-transform: none;
  color: var(--ink-mid);
  opacity: 0.7;
}

.field-row input,
.field-row textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 2px;
  resize: vertical;
}
.field-row input:focus,
.field-row textarea:focus {
  outline: none;
  border-bottom-color: var(--signal);
}

.form-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  margin: 18px 0 0;
  min-height: 1.2em;
}
.form-status[data-state="ok"] { color: var(--ink); }
.form-status[data-state="error"] { color: var(--error); }

/* -------------------- footer -------------------- */

.site-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 22px var(--pad-x) 34px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* -------------------- responsive -------------------- */

@media (max-width: 760px) {
  .site-header { padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; row-gap: 12px; }
  .site-nav { gap: 14px; font-size: 12px; flex-wrap: wrap; }

  section { padding-top: 64px; padding-bottom: 64px; }
  .section-head { margin-bottom: 36px; }

  .hero { min-height: auto; padding-top: 72px; padding-bottom: 72px; }
  /* scope drops back to a dim full-bleed backdrop behind the text */
  .hero-decor {
    position: absolute;
    inset: 0;
    display: block;
  }
  .scope {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    opacity: 0.4;
  }

  .hero-sub { font-size: 1rem; margin-bottom: 32px; }
  .hero-actions { gap: 20px; }

  .capability-list li {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
  }
  .part-icon { width: 28px; height: 28px; }

  .contact-form { padding: 32px 22px; }

  .wordmark { font-size: 12px; letter-spacing: 0.1em; }
}

@media (max-width: 560px) {
  /* let the headline wrap naturally instead of forcing the desktop break */
  .hero h1 br { display: none; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.4rem); }

  .contact-form .btn-primary { width: 100%; }
}
