/* v1.1 shared layer for case studies. Loaded after each page's inline styles. */

/* Accessibility */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; text-decoration: none; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Reading progress, driven by scroll position with no JS */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    body::before {
      content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 130;
      background: var(--blue); transform-origin: 0 50%; transform: scaleX(0);
      animation: read-progress linear both; animation-timeline: scroll(root);
    }
    @keyframes read-progress { to { transform: scaleX(1); } }
  }
}

/* Hero: company as a label, two-line headline */
.hero .kicker { font-size: 15px; font-weight: 500; letter-spacing: -0.005em; margin-bottom: 18px; }
.h-hero { font-size: clamp(42px, 6.4vw, 78px); letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
.hero .h-hero { margin-bottom: 26px; }

/* Type rhythm */
.h2, .d-h, .dec-h, .block-h, .vh, .tile-h, .pull .big, .impact .h2, .sys-title { text-wrap: balance; }
.read p, .lede, .d-b, .dec-b, .vb, .tile-b, .figcap { text-wrap: pretty; }
.stat .n, .impact .n, .research-n, .substat .n, .d-num, .impact-fig, .meta .v { font-variant-numeric: tabular-nums; }
.meta .v { font-size: 17px; }

/* Media: a hairline edge so screenshots don't bleed into the grey */
.figure, .dec-media, .vrow .vmedia, .proto-frame { outline: 1px solid rgba(0, 0, 0, 0.05); outline-offset: -1px; }
.figure img, .dec-media img, .vmedia img { transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) { .figure a:hover img { transform: scale(1.015); } }

/* Pull statements get room and a single accent rule */
.pull .big { position: relative; padding-top: 36px; }
.pull .big::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 40px; height: 3px; border-radius: 3px;
  background: var(--blue); transform: translateX(-50%);
}

/* Floating name: glass surface once it sits over content */
.sticky-nav-fixed.is-floating {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 8px 24px rgba(0, 0, 0, 0.07);
  border-radius: 14px; padding: 6px 12px; margin: -6px 0 0 -12px;
}

/* Glass pill nav: bigger tap targets, stronger blur */
.pill-nav { backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); }
.pill-nav a { padding: 8px 16px; }

/* Prev / next: a real target, not just text */
.proj-nav a {
  padding: 28px 30px; border-radius: 24px; background: var(--gray);
  transition: background 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-nav a:hover { opacity: 1; background: #ececf0; transform: translateY(-2px); }
.proj-nav .pn-title { max-width: 22ch; text-wrap: balance; }

/* Footer lines up with the page column */
.footer-inner { max-width: 980px; padding: 0 22px 40px; }
