/* Shared chrome for /work pages. Mirrors the home page tokens (index.html). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --black: #0a0a0a; --white: #fafaf8; --light: #e8e8e4; --muted: #555; }
html { scroll-behavior: smooth; color-scheme: only light; background: var(--white); }
body { background: var(--white); color: var(--black); font-family: 'Instrument Sans', sans-serif; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }
main p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: var(--black); color: var(--white); }

.skip-link { position: absolute; top: -48px; left: 0; background: var(--black); color: var(--white); padding: 0.75rem 1.25rem; z-index: 200; text-decoration: none; font-family: 'DM Mono', monospace; font-size: 12px; }
.skip-link:focus { top: 0; }

body > nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 1rem 3rem; background: var(--white); border-bottom: 1px solid var(--light); }
.nav-mark { display: flex; align-items: center; text-decoration: none; }
.nav-logo { height: 64px; width: auto; display: block; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; margin-right: 2rem; }
.nav-links a { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 0.9rem 0; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--black); }
.nav-cta { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--black); text-decoration: none; letter-spacing: 0.03em; padding: 0.9rem 1.5rem; border: 1px solid var(--black); border-radius: 2px; transition: background 0.2s, color 0.2s; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.nav-cta:hover { background: var(--black); color: var(--white); }

main { padding-top: 97px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 3rem; }

/* Page / case header */
.page-header { padding: 4rem 0 3rem; border-bottom: 1px solid var(--light); }
.breadcrumb { font-family: 'DM Mono', monospace; font-size: 13px; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumb a { text-decoration: none; display: inline-block; padding: 0.75rem 0.35rem; margin: 0 -0.35rem; }
.breadcrumb a:hover { color: var(--black); }
.page-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.3rem, 4.2vw, 3.6rem); line-height: 1.08; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 1rem; }
.page-lede { font-family: 'DM Serif Display', serif; font-style: italic; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.4; color: #444; max-width: 720px; }
.tag { display: inline-block; font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #444; border: 1px solid #ccc; border-radius: 99px; padding: 0.2rem 0.7rem; margin-bottom: 1.25rem; }

/* Hero media on case pages */
.hero-media { margin: 3rem 0 0; }
.hero-media img, .hero-media video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--light); background: #ececea; box-shadow: 0 20px 60px rgba(0,0,0,0.10); }
.case-privacy { font-size: 13px; color: #666; margin-top: 1rem; }
.media-note { font-size: 13px; color: #666; margin-top: 0.75rem; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--light); border-radius: 8px; margin: 3rem 0; background: #fff; }
.stat { padding: 1.4rem 1.6rem; }
.stat + .stat { border-left: 1px solid var(--light); }
.stat-value { font-family: 'DM Serif Display', serif; font-size: 2rem; line-height: 1.1; }
.stat-label { font-size: 14px; color: #555; margin-top: 0.3rem; }

/* Body sections */
.case-section { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--light); }
.case-section h2 { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #333; padding-top: 0.3rem; }
.case-section p { font-size: 17px; line-height: 1.75; color: #333; max-width: 680px; }
.case-section p + p { margin-top: 1rem; }
.case-section ul { list-style: none; max-width: 680px; }
.case-section li { font-size: 17px; line-height: 1.6; color: #333; padding: 0.5rem 0 0.5rem 1.4rem; position: relative; }
.case-section li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 7px; height: 7px; background: var(--black); border-radius: 50%; }
.case-bridge > div { border-left: 3px solid var(--black); padding-left: 1.25rem; }
.bridge { font-family: 'DM Serif Display', serif; font-style: italic; font-size: 1.35rem !important; line-height: 1.4 !important; color: var(--black) !important; }

/* Video pause control (WCAG 2.2.2) */
.vid-wrap { position: relative; }
.vid-toggle { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.6); background: rgba(10,10,10,0.72); color: #fff; font: 600 14px/1 'Instrument Sans', sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vid-toggle:hover { background: rgba(10,10,10,0.9); }
.gallery .phones-row .vid-wrap { display: inline-block; max-width: min(46%, 300px); }
.gallery .phones-row .vid-wrap video { width: 100%; max-width: 100%; }

/* Click-to-zoom screenshots */
img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10,10,10,0.97); display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 96vw; text-align: center; }
.lightbox img { display: block; max-width: 96vw; max-height: 82vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; background: #ececea; }
.lightbox figcaption { color: #ddd; font-size: 14px; margin-top: 0.75rem; max-width: 720px; margin-left: auto; margin-right: auto; }
.lightbox-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: #fff; color: var(--black); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding: 2.5rem 0; border-top: 1px solid var(--light); }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery figure.phones { display: flex; gap: 1.5rem; justify-content: center; }
.gallery img, .gallery video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--light); background: #ececea; }
.phones-row { display: flex; gap: 1.5rem; justify-content: center; }
.gallery .phones-row img, .gallery .phones-row video { width: auto; max-width: min(46%, 300px); height: auto; border-radius: 22px; }
.gallery figcaption { font-size: 14px; color: #555; margin-top: 0.6rem; }
.photo-credits { font-size: 13px; color: #666; padding: 0 0 1.5rem; max-width: 720px; }
.stack { font-family: 'DM Mono', monospace; font-size: 14px; color: #333; line-height: 1.8; }

/* Work index cards */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; padding: 1rem 0 3rem; }
.case-card { display: block; text-decoration: none; color: inherit; border-top: 1px solid #cfcfca; padding: 2rem 0 2.75rem; }
.case-card img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; border: 1px solid var(--light); background: #ececea; margin-bottom: 1rem; transition: transform 0.25s, box-shadow 0.25s; }
.case-card:hover img { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.10); }
.case-card h2 { font-family: 'DM Serif Display', serif; font-size: 1.5rem; font-weight: 400; line-height: 1.2; margin: 0.4rem 0 0.4rem; }
.case-card h2::after { content: " \2192"; font-family: 'Instrument Sans', sans-serif; font-size: 0.85em; }
.case-card p { font-size: 16px; color: #555; line-height: 1.6; }
.case-kind { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #555; }
.also { padding: 2rem 0 3rem; border-top: 1px solid var(--light); }
.also h2 { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #333; margin-bottom: 1rem; }
.also p { font-size: 16px; color: #333; max-width: 720px; }
.privacy-note { font-size: 14px; color: #555; max-width: 720px; margin-top: 1.25rem; }

/* Next / CTA */
.next-case { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--light); font-family: 'DM Mono', monospace; font-size: 13px; letter-spacing: 0.02em; }
.next-case { align-items: center; }
.next-case a { text-decoration: none; padding: 0.6rem 1.15rem; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--black); border-radius: 999px; transition: background 0.2s, color 0.2s; }
.next-case a:hover { background: var(--black); color: var(--white); }
.case-cta { padding: 4.5rem 1.5rem; background: var(--black); color: var(--white); text-align: center; }
.case-cta h2 { font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 400; line-height: 1.15; margin-bottom: 1rem; }
.case-cta p { font-size: 16px; color: #aaa; margin: 0 auto 2rem; max-width: 460px; }
.case-cta a { font-family: 'DM Mono', monospace; font-size: 13px; letter-spacing: 0.03em; text-decoration: none; padding: 0.85rem 2rem; border-radius: 2px; display: inline-block; background: var(--white); color: var(--black); border: 1px solid var(--white); transition: background 0.2s, color 0.2s; }
.case-cta a:hover { background: transparent; color: var(--white); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.case-cta a.cta-call { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.case-cta a.cta-call:hover { background: var(--white); color: var(--black); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.5rem 3rem; border-top: 1px solid var(--light); font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); letter-spacing: 0.03em; }
footer > span:first-child { max-width: 56ch; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; border-radius: 2px; }
.case-cta a:focus-visible { outline-color: var(--white); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  video[autoplay] { display: none; }
  video[autoplay] + .reduced-poster { display: block !important; }
  .vid-toggle { display: none; }
}

@media (max-width: 768px) {
  body > nav { padding: 0.75rem 1.25rem; }
  .nav-logo { height: 44px; }
  .nav-links { margin-right: 1rem; gap: 0; }
  .nav-links a:not([href="/work/"]) { display: none; }
  .nav-links a[href="/work/"] { padding: 0.9rem 0.5rem; }
  main { padding-top: 69px; }
  .wrap { padding: 0 1.25rem; }
  .page-header { padding: 2.25rem 0 2rem; }
  .hero-media { margin-top: 2rem; }
  .stats { grid-template-columns: 1fr; margin: 2rem 0; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--light); }
  .case-section { grid-template-columns: 1fr; gap: 0.75rem; padding: 2rem 0; }
  .case-section p, .case-section li { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .phones-row img, .gallery .phones-row video, .gallery .phones-row .vid-wrap { max-width: 47%; }
  .gallery .phones-row .vid-wrap video { max-width: 100%; }
  .cases { grid-template-columns: 1fr; gap: 0; padding: 0.5rem 0 2rem; }
  .case-card { padding: 1.75rem 0 2.25rem; }
  .next-case { flex-direction: column; align-items: flex-start; }
  footer { padding: 1.25rem; flex-direction: column; gap: 0.5rem; text-align: center; }
}
