/* ════════════════════════════════════════════════
   Astral Informatics — custom styles
   Industrial / drafting aesthetic on top of Tailwind
   ════════════════════════════════════════════════ */

:root {
  --ink: #0A0A0A;
  --astral-red: #E11D27;
  --astral-blue: #38BDF8;
  --line: #D4D4CF;
  --paper: #FAFAF7;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* tabular figures for stats */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* ────────────────────────────────────────────────
   BLUEPRINT GRID BACKGROUNDS
   ──────────────────────────────────────────────── */
.blueprint-grid {
  background-image:
    linear-gradient(to right,  rgba(10,10,10,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.06) 1px, transparent 1px),
    linear-gradient(to right,  rgba(10,10,10,0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.10) 1px, transparent 1px);
  background-size:
    24px 24px,
    24px 24px,
    120px 120px,
    120px 120px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 50%, transparent 95%);
          mask-image: radial-gradient(ellipse at center, black 50%, transparent 95%);
}

.blueprint-grid-dark {
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to right,  rgba(56,189,248,0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56,189,248,0.10) 1px, transparent 1px);
  background-size:
    28px 28px,
    28px 28px,
    140px 140px,
    140px 140px;
}

/* ────────────────────────────────────────────────
   REGISTRATION / CROSSHAIR MARKS
   (drafting "+" marks on section corners)
   ──────────────────────────────────────────────── */
.reg-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  position: relative;
  opacity: 0.65;
}
.reg-mark::before,
.reg-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.reg-mark::before {
  top: 50%; left: 0;
  width: 100%; height: 1px;
  transform: translateY(-50%);
}
.reg-mark::after {
  left: 50%; top: 0;
  height: 100%; width: 1px;
  transform: translateX(-50%);
}
.reg-mark--light::before,
.reg-mark--light::after {
  background: rgba(255,255,255,0.55);
}

/* ────────────────────────────────────────────────
   MARQUEE — client logo train
   ──────────────────────────────────────────────── */
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 4rem;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* logo train items */
.logo-track > img {
  height: clamp(84px, 8.5vw, 120px);
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(0.95);
  opacity: 0.95;
  transition: filter .25s, opacity .25s, transform .25s;
}
.logo-track > img:hover {
  filter: saturate(1.05);
  opacity: 1;
  transform: translateY(-1px);
}

/* legacy text marquee (kept for any other section that may use spans) */
.marquee-track > span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  letter-spacing: -0.02em;
  color: rgba(10,10,10,0.42);
  text-transform: uppercase;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ────────────────────────────────────────────────
   PROJECT CARDS
   ──────────────────────────────────────────────── */
.project-card {
  display: block;
}
.project-card .aspect-\[16\/11\],
.project-card .aspect-\[16\/10\] {
  position: relative;
  isolation: isolate;
}
.project-card img {
  filter: saturate(0.95) contrast(1.02);
}
.project-card:hover img {
  filter: saturate(1.05) contrast(1.05);
}

/* ────────────────────────────────────────────────
   SCROLL REVEAL
   ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}

/* ────────────────────────────────────────────────
   HEADER ELEVATION ON SCROLL
   ──────────────────────────────────────────────── */
#siteHeader.is-stuck {
  box-shadow: 0 1px 0 rgba(10,10,10,0.06), 0 10px 30px -20px rgba(10,10,10,0.20);
}

/* ────────────────────────────────────────────────
   TYPOGRAPHIC POLISH
   ──────────────────────────────────────────────── */
h1, h2, h3 { text-wrap: balance; }
p          { text-wrap: pretty; }

/* fine baseline for monospaced labels */
.font-mono { font-feature-settings: "ss01", "ss02"; }

/* selection dot used in reg-mark variants */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9c9c4; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a9a9a3; }
::-webkit-scrollbar-track { background: var(--paper); }
