/* VissionLink, shared foundation.
   Theme: locked dark. One accent. Jost display, Montserrat body.

   This file holds ONLY what more than one page uses: tokens, typography,
   buttons, nav, footer, the photo frame, status pills, the CTA band and the
   reveal primitives. Page-specific sections live in home.css and lab.css so
   neither page pays for the other's layout and neither file becomes the
   dumping ground this one was turning into. */

@font-face {
  font-family: 'Jost';
  src: url('assets/fonts/jost-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0e13;
  --bg-2: #10141c;
  --bg-3: #161b25;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --ink: #eef2f7;
  --ink-2: #a7b0bf;
  --ink-3: #6d7787;
  --accent: #4a90e8;
  --accent-ink: #0a1220;
  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Jost', ui-sans-serif, system-ui, sans-serif;
  --body: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Grid children default to a min-width of auto, which lets wide images push the
   page sideways. Every grid on this site is allowed to shrink instead. */
.footer-grid > * { min-width: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

p { margin: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #61a1ef; }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); }

.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ----------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background 240ms ease, border-color 240ms ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 14, 19, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--ink); }
/* The page you are already on should not read as somewhere to go. */
.nav-links a[aria-current='page'] { color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-inner { height: 64px; }
}

/* -------------------------------------------------------- scroll rule */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), hsl(calc(var(--accent-h, 210) + 40) 90% 62%));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* Continuous scroll effects are native, so there is no scroll handler and no
   main-thread work. Browsers without support simply keep the static layout. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Thin progress rule under the nav. Orientation, not decoration. */
    .scroll-progress {
      animation: progress-grow linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes progress-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------------------------------------------------------- photo frame */

/* Photographs share one frame treatment across the site. */
.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
  box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.7);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The frame is fixed and the picture settles inside it, so nothing reflows. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shot img {
      animation: shot-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
  }
}

@keyframes shot-settle {
  from { transform: scale(1.18); }
  to { transform: scale(1); }
}
.shot-wide {
  margin-bottom: 40px;
  aspect-ratio: 21 / 8;
}
.shot-tall { aspect-ratio: 3 / 4; }

@media (max-width: 900px) {
  .shot-wide { aspect-ratio: 16 / 9; margin-bottom: 32px; }
}

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

section { scroll-margin-top: 80px; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
}
.section-head p {
  margin-top: 16px;
  color: var(--ink-2);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ------------------------------------------------------------- tick list */

.ticks {
  list-style: none;
  margin: 24px 0 30px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.ticks-sm { margin: 14px 0 0; gap: 9px; }
.ticks-sm li { font-size: 13.5px; }

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------- status pill */

/* Real status, not a generic step number. Used by the home hardware pipeline
   and by the Lab's track list, which must stay honest about what ships. */
.stage-status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stage-status[data-state='active'] {
  color: var(--accent);
  border-color: rgba(74, 144, 232, 0.45);
  background: rgba(74, 144, 232, 0.08);
}

/* ----------------------------------------------------------------- cta */

.cta {
  padding: 104px 0 120px;
  background:
    radial-gradient(720px 360px at 50% 120%, rgba(74, 144, 232, 0.16), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line-soft);
}
.cta-inner {
  max-width: 620px;
  text-align: center;
  margin: 0 auto;
}
.cta-inner h2 { font-size: clamp(30px, 3.6vw, 44px); }
.cta-inner p { margin-top: 16px; color: var(--ink-2); }
.cta-inner .btn { margin-top: 34px; }

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

.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 14px;
  max-width: 32ch;
}

.footer h4 {
  margin: 0 0 14px;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer nav { display: grid; gap: 10px; align-content: start; }
.footer nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
}
.footer nav a:hover { color: var(--ink); }

.footer-base {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 13px;
}

@media (max-width: 940px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-brand { grid-column: auto; }
}

/* -------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 640ms cubic-bezier(0.16, 1, 0.3, 1), transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal { transition-delay: var(--enter-delay, 0ms); }
.reveal[data-delay='1'] { --enter-delay: 90ms; }
.reveal[data-delay='2'] { --enter-delay: 180ms; }
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn { transition: none; }
  .scroll-progress { display: none; }
}
