/* ========================================================
   500x — Case Study Template (Option A · Cinematic)
   Shared stylesheet for all project case study pages.
   ======================================================== */

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-elev: #1a1a1a;
  --ink: #f4f4f0;
  --ink-soft: #a8a8a4;
  --ink-faint: #6b6b68;
  --line: #1f1f1f;
  --line-soft: #2a2a2a;
  --grad: linear-gradient(135deg, #7a3fa8 0%, #2a5cdb 50%, #d94a5e 100%);
  --display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --max: 1400px;
  --gutter: 32px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.display, .h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Nav */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 10, 0.5);
  transition: background 0.3s;
}
nav.top.scrolled { background: rgba(10, 10, 10, 0.85); border-bottom: 1px solid var(--line); }
nav.top .brand-mark { height: 32px; }
nav.top .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s;
}
nav.top .back-link:hover { color: var(--ink); }
nav.top .back-link .arrow { transition: transform 0.3s; }
nav.top .back-link:hover .arrow { transform: translateX(-4px); }

/* Hero — full bleed */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c1, #1a1a3e), var(--c2, #3d2860));
  z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, transparent 30%, transparent 60%, rgba(10,10,10,0.85) 100%);
  z-index: 1;
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 80px;
}
.hero-content-inner { max-width: var(--max); margin: 0 auto; width: 100%; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.hero-meta .sep { color: rgba(255,255,255,0.3); }
.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 9.5vw, 150px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #fff;
  margin-bottom: 32px;
  max-width: 18ch;
}
.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  max-width: 54ch;
  font-weight: 300;
}
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: scrollHint 2.4s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
}
@keyframes scrollHint {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* Intro section */
.intro-section {
  padding: 200px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}
.intro-content { max-width: 880px; }
.intro-content .eyebrow { display: block; margin-bottom: 28px; }
.intro-content p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(27px, 3.1vw, 42px);
  line-height: 1.3;
  letter-spacing: -0.018em;
  color: var(--ink-soft);
}
.intro-content p em { font-style: normal; color: var(--ink); }

/* Full-bleed image section */
.full-bleed {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
.full-bleed-img {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c1, #2a1d4d), var(--c2, #5b3a8a));
}
.full-bleed-img img { width: 100%; height: 100%; object-fit: cover; }
.full-bleed-caption {
  position: absolute;
  bottom: 40px;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
}
.full-bleed-caption .inner {
  width: 100%;
  max-width: var(--max);
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.full-bleed-caption .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.full-bleed-caption .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
}

/* Beat — split text/image */
.beat {
  padding: 160px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: center;
}
@media (max-width: 900px) { .beat { grid-template-columns: 1fr; padding: 100px var(--gutter); } }
.beat.reverse > div:first-child { order: 2; }
@media (max-width: 900px) { .beat.reverse > div:first-child { order: 0; } }
.beat-text .eyebrow { display: block; margin-bottom: 20px; }
.beat-text h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 3.8vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 28px;
  max-width: 18ch;
}
.beat-text p { font-size: 17px; line-height: 1.65; color: var(--ink-soft); max-width: 50ch; }
.beat-text p em { font-style: normal; color: var(--ink); }
.beat-image {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--c1, #1a3a4d), var(--c2, #2e5d7a));
  border-radius: 8px;
  overflow: hidden;
}
.beat-image img { width: 100%; height: 100%; object-fit: cover; }

/* Outcome */
.outcome-section {
  padding: 180px var(--gutter);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent, rgba(122, 63, 168, 0.06), transparent);
}
.outcome-section .eyebrow { margin-bottom: 60px; }
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
  max-width: 1200px;
  width: 100%;
}
@media (max-width: 900px) { .outcome-grid { grid-template-columns: 1fr; gap: 60px; } }
.stat { text-align: center; }
.stat .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(66px, 9vw, 128px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 18px;
}
.stat .label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 28ch;
  margin: 0 auto;
}

/* Credits */
.credits {
  padding: 140px var(--gutter) 100px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.credits .eyebrow { display: block; margin-bottom: 32px; }
.credits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: left;
}
@media (max-width: 600px) { .credits-grid { grid-template-columns: 1fr; } }
.credit-row {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
}
.credit-row .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.credit-row .name { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--ink); font-weight: 500; }

/* Next project */
.next-project {
  position: relative;
  height: 70vh;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.next-project-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c1, #1f2e4d), var(--c2, #3a5b8a));
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s;
  filter: saturate(0.7);
}
.next-project:hover .next-project-bg { transform: scale(1.04); filter: saturate(1); }
.next-project-bg img { width: 100%; height: 100%; object-fit: cover; }
.next-project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.6) 0%, transparent 40%, transparent 70%, rgba(10,10,10,0.7) 100%);
  z-index: 1;
}
.next-project-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.next-project-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.next-project-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 6.5vw, 88px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: #fff;
  margin-bottom: 20px;
}
.next-project-client {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--bg); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .brand-mark { height: 38px; }
.footer-brand .place { margin-top: 16px; font-size: 14px; color: var(--ink-soft); max-width: 32ch; }
.footer-brand .email { margin-top: 16px; font-size: 14px; font-weight: 500; }
.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13px; color: var(--ink-soft); transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-faint);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}

/* Dock */
.dock {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--grad);
  border: 1.5px solid rgba(255,255,255,0.4);
  box-shadow: 0 12px 40px rgba(122, 63, 168, 0.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 90;
  font-family: var(--display);
  font-size: 26px; font-weight: 500;
  color: rgba(255,255,255,0.95);
  transition: transform 0.3s, box-shadow 0.3s;
}
.dock:hover { transform: scale(1.08); box-shadow: 0 16px 60px rgba(122, 63, 168, 0.6); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ========================================================
   Light-plated heroes and full-bleeds
   --------------------------------------------------------
   The default scrims were tuned against dark photography
   (night roads, unlit studios). Over a high-key plate — an
   ivory gift box, a white-ground product shot — white type
   at 0.7 alpha disappears completely. These variants deepen
   the scrim where the type actually sits rather than
   darkening the whole image, so the artwork still reads.
   ======================================================== */
.hero.light .hero-overlay {
  background: linear-gradient(180deg,
    rgba(10,10,10,0.42) 0%,
    rgba(10,10,10,0.10) 20%,
    rgba(10,10,10,0.30) 48%,
    rgba(10,10,10,0.94) 100%);
}
.full-bleed.light::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(10,10,10,0.88));
  z-index: 1;
  pointer-events: none;
}

/* A quiet disclaimer under the credits, for pages whose interface screenshots
   carry illustrative figures rather than client operating data. */
.credits-note {
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* Interface heroes. A dashboard is high-frequency detail edge to edge, so the
   photographic scrim leaves the title sitting in a thicket of small type. This
   holds the artwork readable at the top and clears a calm field at the bottom
   for the words. */
.hero.dense .hero-overlay {
  background: linear-gradient(180deg,
    rgba(6,12,20,0.55) 0%,
    rgba(6,12,20,0.22) 26%,
    rgba(6,12,20,0.72) 58%,
    rgba(6,12,20,0.97) 100%);
}
.full-bleed.dense::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(6,12,20,0.92));
  z-index: 1;
  pointer-events: none;
}

/* Beat images default to 4:5, which is right for product photography but
   guillotines a landscape screenshot. Interface work uses the wide variant. */
.beat-image.wide { aspect-ratio: 16/10; }

/* Client quote. The legacy site carried a real testimonial on every case
   study and the template had nowhere to put one. */
.pullquote {
  padding: 120px var(--gutter);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}
.pullquote blockquote {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pullquote blockquote::before { content: '\201C'; }
.pullquote blockquote::after  { content: '\201D'; }
.pullquote .attrib {
  margin-top: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 900px) { .pullquote { padding: 80px var(--gutter); } }

/* Space Grotesk ships no italic, so a UA-default <em> renders as a
   synthesised oblique. Emphasis is tone here, never slant. */
em { font-style: normal; }

/* The homepage wall's frame becomes this hero as one image (wall.js).
   Every case study, generated or hand-built, draws its hero as .hero-bg img. */
@view-transition { navigation: auto; }
.hero-bg img { view-transition-name: work-hero; }
