/* Precision Tech Supply — Coming Soon
   Static-first: all base styles describe the final, settled state.
   Motion is layered on inside @media (prefers-reduced-motion: no-preference)
   so reduced-motion users and non-animating browsers get a deliberate static page. */

:root {
  --ink-950: #050b14;
  --ink-900: #081321;
  --ink-850: #0b192b;
  --navy-800: #11243d;
  --blue-600: #0868d6;
  --blue-500: #0877e8;
  --blue-400: #2293ff;
  --cyan-300: #55d9ff;
  --white: #f7faff;
  --slate-200: #c5d1df;
  --slate-400: #8fa3ba;
  --line: rgba(139, 181, 226, 0.16);
  --line-strong: rgba(86, 180, 255, 0.34);
  --success: #52d9a7;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad-x: clamp(20px, 4.5vw, 64px);
  --par-x: 0;
  --par-y: 0;
}

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

html {
  background: var(--ink-950);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--slate-200);
  background:
    radial-gradient(720px 560px at 74% 38%, rgba(8, 119, 232, 0.16), transparent 65%),
    radial-gradient(560px 440px at 14% 28%, rgba(34, 147, 255, 0.07), transparent 62%),
    var(--ink-950);
  overflow-x: hidden;
}

/* Technical grid + vignette, behind all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(139, 181, 226, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 181, 226, 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.05;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 120% at 50% 46%, transparent 58%, rgba(2, 6, 12, 0.5) 100%);
  pointer-events: none;
}

::selection {
  background: rgba(8, 119, 232, 0.45);
  color: var(--white);
}

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

.site-header {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px var(--pad-x);
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { margin: 0; }

.brand-plate {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(2, 8, 18, 0.5);
}

.brand-plate img {
  display: block;
  width: clamp(150px, 13vw, 172px);
  height: auto;
}

.telemetry {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate-400);
  white-space: nowrap;
}

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

main {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px var(--pad-x) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}

.copy { max-width: 650px; }

.headline {
  margin: 0 0 26px;
  font-size: clamp(44px, 4.1vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--white);
}

.hl-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.hl-text { display: block; }

.support {
  margin: 0 0 22px;
  font-size: 19px;
  line-height: 1.55;
  max-width: 560px;
}

.micro {
  margin: 0;
  font-size: 13.5px;
  color: var(--slate-400);
}

/* ---------- Visual ---------- */

.visual {
  position: relative;
  justify-self: end;
  width: min(100%, 560px);
}

.glow {
  position: absolute;
  inset: -14%;
  background: radial-gradient(closest-side, rgba(8, 119, 232, 0.19), transparent 70%);
  pointer-events: none;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.net {
  display: block;
  width: 100%;
  height: auto;
}

.field {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.ticks path {
  stroke: var(--line-strong);
  stroke-width: 1.5;
  fill: none;
}

.tfrag {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.22em;
  fill: var(--slate-400);
  opacity: 0.75;
}

.route {
  fill: none;
  stroke: rgba(86, 180, 255, 0.42);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.nodes circle {
  fill: var(--ink-850);
  stroke: var(--line-strong);
  stroke-width: 1.2;
}

.trav {
  display: none;
  fill: var(--cyan-300);
}

.scanner {
  fill: none;
  stroke: rgba(85, 217, 255, 0.5);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 58 302;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.core-shell {
  fill: rgba(8, 19, 33, 0.78);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.core-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.core-mark {
  font-family: var(--font);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 0.16em;
  fill: var(--white);
  transform: translateX(4px);
}

.core-sub {
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  fill: var(--slate-400);
  transform: translateX(2px);
}

.orbit {
  position: absolute;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  color: var(--slate-200);
  white-space: nowrap;
}

.orbit::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.orbit-index {
  color: var(--cyan-300);
  font-weight: 500;
}

.orbit-1 { top: 13%; left: 2%; }
.orbit-2 { top: 46%; right: -1%; }
.orbit-3 { bottom: 9%; left: 15%; }

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

.site-footer {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px var(--pad-x) 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--slate-400);
}

/* ---------- Motion (only when the user allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes grid-fade { from { opacity: 0; } to { opacity: 0.05; } }
  /* 0.01 (not 0) so first paint still registers as an LCP candidate */
  @keyframes rise { from { opacity: 0.01; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes hl-rise { from { opacity: 0.01; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes core-in {
    from { opacity: 0; transform: scale(0.96); filter: blur(5px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes breathe { from { opacity: 0.88; } to { opacity: 1; } }
  @keyframes travel {
    0% { offset-distance: 0%; opacity: 0; }
    12% { opacity: 1; }
    84% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
  }

  body::before { animation: grid-fade 0.25s ease-out both; }

  .site-header { animation: rise 0.58s cubic-bezier(0.33, 1, 0.4, 1) 0.12s both; }
  .hl-1 { animation: hl-rise 0.72s cubic-bezier(0.3, 0.9, 0.3, 1) 0.2s both; }
  .hl-2 { animation: hl-rise 0.72s cubic-bezier(0.3, 0.9, 0.3, 1) 0.32s both; }
  .support { animation: rise 0.6s ease-out 0.42s both; }
  .micro { animation: rise 0.6s ease-out 0.52s both; }
  .site-footer { animation: fade 0.7s ease-out 0.7s both; }

  .route { animation: draw 0.75s cubic-bezier(0.5, 0, 0.3, 1) both; }
  .r3 { animation-delay: 0.3s; }
  .r1 { animation-delay: 0.36s; }
  .r5 { animation-delay: 0.42s; }
  .r7 { animation-delay: 0.48s; }
  .r2 { animation-delay: 0.54s; }
  .r6 { animation-delay: 0.6s; }
  .r4 { animation-delay: 0.64s; }
  .r9 { animation-delay: 0.68s; }
  .r8 { animation-delay: 0.7s; }
  .r10 { animation-delay: 0.7s; }

  .field,
  .ticks,
  .tfrag,
  .nodes { animation: fade 0.7s ease-out 0.3s both; }

  .core {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: core-in 0.75s cubic-bezier(0.3, 0.8, 0.3, 1) 0.8s both;
  }

  .scanner { animation: fade 0.6s ease-out 0.95s both, spin 14s linear 0.95s infinite; }

  .orbit-1 { animation: rise 0.45s ease-out 1.1s both; }
  .orbit-2 { animation: rise 0.45s ease-out 1.35s both; }
  .orbit-3 { animation: rise 0.45s ease-out 1.6s both; }

  .glow { animation: breathe 12s ease-in-out infinite alternate; }

  @supports (offset-path: path("M0 0 L10 10")) {
    .trav { display: block; }
    .t1 { offset-path: path("M28 172 H120 V280 H180"); animation: travel 5s linear 1.4s infinite; }
    .t2 { offset-path: path("M536 420 H460 V351 H351"); animation: travel 6.2s linear 2.8s infinite; }
    .t3 { offset-path: path("M60 480 H164 C216 480 209 416 209 351"); animation: travel 5.4s linear 4.1s infinite; }
  }

  /* Pointer parallax (vars set by app.js on capable desktop pointers only) */
  .stage { transform: translate(calc(var(--par-x) * 6px), calc(var(--par-y) * 6px)); }
  .glow { translate: calc(var(--par-x) * 10px) calc(var(--par-y) * 10px); }

  /* Ambient motion pauses while the tab is hidden (class set by app.js) */
  .pts-paused .glow,
  .pts-paused .scanner,
  .pts-paused .trav { animation-play-state: paused; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr); }
}

@media (max-width: 899px) {
  .telemetry { display: none; }

  .site-header { min-height: 72px; padding-block: 18px; }
  .brand-plate img { width: clamp(140px, 40vw, 176px); }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 52px;
    padding-top: 16px;
    padding-bottom: 40px;
  }

  .headline { font-size: clamp(42px, 11.6vw, 52px); }

  .visual {
    justify-self: center;
    width: min(340px, 88vw);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .stage {
    width: 100%;
    margin-bottom: 14px;
    transform: none;
  }

  .orbit {
    position: static;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(17, 36, 61, 0.3);
  }

  .site-footer { justify-content: center; text-align: center; }
}

@media (max-width: 359px) {
  .support { font-size: 18px; }
}

/* ---------- Forced colors / high contrast ---------- */

@media (forced-colors: active) {
  .brand-plate {
    forced-color-adjust: none;
    background: #f7faff;
    box-shadow: none;
    border: 1px solid #16233c;
  }

  .glow,
  body::before,
  body::after { display: none; }

  .visual .orbit { border: 1px solid CanvasText; }
}
