@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --case-progress: 0;
  --accent: #00d4ff;
  --accent-soft: rgba(0,212,255,.13);
  --accent-line: rgba(0,212,255,.34);
  --green: #24974f;
  --bg: #04070d;
  --text: #eef2ff;
  --muted: rgba(238,242,255,.58);
  --paper: #f6f8fb;
  --ink: #07101d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: 'Outfit', sans-serif;
}
a { color: inherit; text-decoration: none; }

.case-atmosphere {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(circle at 50% 8%, rgba(0,212,255,.12), transparent 28%),
    radial-gradient(circle at 78% 34%, rgba(36,151,79,.055), transparent 22%),
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px),
    #04070d;
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
}

.case-flow-rail {
  position: fixed; z-index: -1; top: 0; bottom: 0; left: 50%; width: 144px;
  transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,.035) 32%, rgba(0,212,255,.08) 50%, rgba(0,212,255,.035) 68%, transparent);
}
.case-flow-rail::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: rgba(0,212,255,.12); transform: translateX(-50%);
}
.case-flow-progress {
  position: absolute; top: 0; left: 50%; width: 3px;
  height: calc(var(--case-progress) * 100%); transform: translateX(-50%);
  border-radius: 0 0 99px 99px;
  background: linear-gradient(180deg, #fff 0%, var(--accent) 12%, #1762ff 78%, var(--accent) 100%);
  box-shadow: 0 0 12px rgba(0,212,255,.92), 0 0 38px rgba(0,212,255,.38);
}
.flow-nav {
  position: absolute; z-index: 10; top: 0; left: 50%;
  display: flex; align-items: center; justify-content: space-between;
  width: min(1180px, calc(100% - 48px)); padding: 24px 0;
  transform: translateX(-50%);
}
.flow-nav-brand { display: flex; align-items: center; gap: 9px; }
.flow-nav-brand > img:first-child { width: 35px; height: auto; }
.flow-nav-brand > img:last-child { width: 102px; height: auto; }
.flow-nav-back {
  color: rgba(238,242,255,.48); font-family: 'Space Grotesk', sans-serif; font-size: 12px;
  transition: color .2s, transform .2s;
}
.flow-nav-back:hover { color: var(--accent); transform: translateX(-3px); }

.flow-hero {
  position: relative; display: grid;
  grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr);
  align-items: center; gap: 0;
  width: min(1240px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto;
  padding: 128px 0 90px;
}
.flow-hero-copy { grid-column: 1; max-width: 510px; padding-right: clamp(30px,5vw,80px); }
.flow-kicker {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  color: var(--accent); font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
}
.flow-kicker::before { content: ''; width: 22px; height: 1px; background: var(--accent); }
.flow-hero h1 {
  margin-bottom: 24px; font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(48px,6.2vw,88px); line-height: .94; letter-spacing: -.058em;
}
.flow-hero h1 span { color: var(--accent); }
.case-ursa .flow-hero-copy { max-width: 545px; padding-right: 30px; }
.case-ursa .flow-hero h1 { font-size: clamp(48px,5.35vw,76px); }
.case-ursa .flow-hero h1 > .hero-title-line {
  display: block;
  color: inherit;
  white-space: nowrap;
}
.case-ursa .flow-hero h1 .hero-title-accent { color: var(--accent); }
.flow-hero-copy > p { max-width: 520px; color: rgba(238,242,255,.69); font-size: clamp(16px,1.5vw,20px); line-height: 1.65; }
.flow-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.flow-meta span {
  padding: 7px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px;
  color: rgba(238,242,255,.5); font-size: 10px;
}

.client-portrait {
  grid-column: 3; justify-self: end; width: min(410px,100%); margin: 0;
  border-radius: 22px; overflow: hidden; background: var(--paper); color: var(--ink);
  box-shadow: 0 34px 90px rgba(0,0,0,.38);
}
.client-portrait-image {
  display: grid; place-items: center; height: 300px; padding: 38px;
  background: #fff; border-bottom: 1px solid rgba(7,16,29,.08);
}
.client-portrait-image img { width: min(100%,330px); height: 100%; object-fit: contain; }
.case-ursa .client-portrait-image { background: #f3f3e9; }
.case-ursa .client-portrait-image img { width: min(72%,250px); }
.client-portrait figcaption { display: grid; gap: 8px; padding: 25px 28px 28px; }
.client-portrait figcaption span {
  color: #087d98; font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.client-portrait figcaption strong { max-width: 310px; font-family: 'Space Grotesk', sans-serif; font-size: 21px; line-height: 1.18; }

.flow-scroll-cue {
  position: absolute; left: 50%; bottom: 24px; display: grid; place-items: center; gap: 10px;
  transform: translateX(-50%); color: rgba(238,242,255,.42);
  font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
}
.flow-scroll-cue i { display: block; width: 1px; height: 32px; background: linear-gradient(var(--accent),transparent); }

.flow-story { width: min(1240px, calc(100% - 64px)); margin: 0 auto; }
.flow-chapter {
  position: relative; display: grid;
  grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr);
  align-items: center; min-height: 100vh; padding: 110px 0;
}
.chapter-copy { max-width: 500px; }
.flow-chapter--left .chapter-copy { grid-column: 1; justify-self: start; padding-right: clamp(30px,5vw,80px); }
.flow-chapter--right .chapter-copy { grid-column: 3; justify-self: end; padding-left: clamp(30px,5vw,80px); }
.chapter-copy h2 {
  margin-bottom: 22px; font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(34px,4.2vw,58px); line-height: 1.01; letter-spacing: -.045em;
}
.chapter-copy p { color: var(--muted); font-size: clamp(15px,1.25vw,18px); line-height: 1.72; }
.chapter-copy p + p { margin-top: 16px; }

.chapter-junction {
  grid-column: 2; grid-row: 1; z-index: 2; justify-self: center;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid rgba(0,212,255,.6); border-radius: 50%;
  background: #06101b; box-shadow: 0 0 0 8px rgba(0,212,255,.05), 0 0 30px rgba(0,212,255,.24);
}
.chapter-junction span { color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: 9px; font-weight: 600; }

.chapter-evidence {
  position: relative; width: min(440px,100%); overflow: hidden;
  border-radius: 20px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.34);
}
.flow-chapter--left .chapter-evidence { grid-column: 3; justify-self: end; }
.flow-chapter--right .chapter-evidence { grid-column: 1; justify-self: start; }
.chapter-evidence::before {
  content: ''; position: absolute; top: 50%; width: 90px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,212,255,.1), rgba(0,212,255,.65));
}
.flow-chapter--left .chapter-evidence::before { right: 100%; }
.flow-chapter--right .chapter-evidence::before { left: 100%; transform: rotate(180deg); }
.evidence-label {
  color: #087d98; font-family: 'Space Grotesk', sans-serif;
  font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}

.evidence-inputs { padding: 30px; }
.evidence-inputs h3 { max-width: 320px; margin: 12px 0 28px; font-family: 'Space Grotesk', sans-serif; font-size: 30px; line-height: 1.04; }
.input-stack { display: grid; gap: 8px; }
.input-stack span {
  position: relative; display: block; padding: 13px 16px 13px 38px;
  border: 1px solid rgba(7,16,29,.08); border-radius: 10px; background: #fff;
  color: rgba(7,16,29,.68); font-size: 13px;
}
.input-stack span::before { content: ''; position: absolute; left: 16px; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #a9b2bf; transform: translateY(-50%); }

.evidence-product { padding: 18px; background: #eef2f6; }
.product-window { overflow: hidden; border: 1px solid rgba(7,16,29,.09); border-radius: 13px; background: #fff; }
.product-bar { display: flex; align-items: center; gap: 5px; padding: 11px 13px; border-bottom: 1px solid rgba(7,16,29,.07); }
.product-bar i { width: 6px; height: 6px; border-radius: 50%; background: #cbd1d9; }
.product-bar span { margin-left: auto; color: #10253d; font-family: 'Space Grotesk', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.product-grid { display: grid; gap: 8px; padding: 13px; }
.product-grid > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 13px; border-radius: 9px; background: #f5f7fa; }
.product-grid small { grid-column: 1; color: #8a95a3; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.product-grid strong { grid-column: 1; font-family: 'Space Grotesk', sans-serif; font-size: 14px; }
.product-grid .status { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--green); font-size: 9px; }
.evidence-product > p { padding: 18px 5px 3px; color: rgba(7,16,29,.58); font-size: 13px; line-height: 1.5; }
.document-flow-list { display: grid; gap: 7px; padding: 13px; }
.document-flow-list > div {
  display: grid; grid-template-columns: 27px 1fr; gap: 3px 10px; align-items: center;
  padding: 11px 12px; border-radius: 9px; background: #f5f7fa;
}
.document-flow-list > div > span {
  grid-row: 1 / 3; display: grid; place-items: center; width: 27px; height: 27px;
  border-radius: 50%; background: rgba(0,212,255,.09); color: #078dab;
  font-family: 'Space Grotesk', sans-serif; font-size: 8px; font-weight: 600;
}
.document-flow-list strong { font-family: 'Space Grotesk', sans-serif; font-size: 13px; }
.document-flow-list small { color: #8993a0; font-size: 9px; }

.evidence-results { padding: 28px 30px 30px; }
.evidence-results ul { list-style: none; margin-top: 14px; }
.evidence-results li { display: grid; grid-template-columns: 32px 1fr; align-items: center; min-height: 53px; border-top: 1px solid rgba(7,16,29,.08); color: rgba(7,16,29,.76); font-size: 14px; }
.evidence-results li span { color: #0792b0; font-family: 'Space Grotesk', sans-serif; font-size: 9px; }

.flow-case-cta {
  position: relative; z-index: 1; width: min(740px,calc(100% - 48px)); margin: 60px auto 140px;
  padding: 64px 54px; border-radius: 24px; background: var(--paper); color: var(--ink); text-align: center;
  box-shadow: 0 35px 90px rgba(0,0,0,.4);
}
.flow-case-cta .flow-kicker { color: #078dab; }
.flow-case-cta .flow-kicker::before { background: #078dab; }
.flow-case-cta h2 { margin-bottom: 16px; font-family: 'Space Grotesk', sans-serif; font-size: clamp(34px,5vw,56px); line-height: 1; letter-spacing: -.045em; }
.flow-case-cta p { max-width: 560px; margin: 0 auto 28px; color: rgba(7,16,29,.62); font-size: 16px; line-height: 1.6; }
.flow-case-cta > a { display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px; border-radius: 999px; background: #07101d; color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; }
.flow-case-cta > a span { color: var(--accent); transition: transform .2s; }
.flow-case-cta > a:hover span { transform: translateX(4px); }
.flow-case-footer { padding: 32px 24px; border-top: 1px solid rgba(255,255,255,.07); color: rgba(238,242,255,.28); text-align: center; font-size: 11px; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .85s cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.flow-hero [data-reveal]:nth-child(2) { transition-delay: .14s; }
.flow-chapter--left .chapter-evidence, .flow-chapter--right .chapter-copy { transition-delay: .12s; }

@media (max-width: 860px) {
  .case-flow-rail { left: 29px; width: 58px; transform: none; }
  .flow-nav { width: calc(100% - 36px); padding: 20px 0; }
  .flow-nav-brand > img:last-child { width: 88px; }
  .flow-hero, .flow-chapter { grid-template-columns: 58px minmax(0,1fr); width: calc(100% - 36px); }
  .flow-hero { align-items: start; gap: 36px 0; min-height: auto; padding: 125px 0 120px; }
  .flow-hero-copy { grid-column: 2; max-width: none; padding: 0; }
  .case-ursa .flow-hero-copy { max-width: none; padding: 0; }
  .client-portrait { grid-column: 2; justify-self: stretch; width: min(100%,500px); }
  .client-portrait-image { height: 230px; }
  .flow-scroll-cue { left: 29px; bottom: 28px; transform: translateX(-50%); }
  .flow-scroll-cue span { display: none; }
  .flow-story { width: calc(100% - 36px); }
  .flow-chapter { align-items: start; gap: 30px 0; min-height: auto; padding: 100px 0; }
  .chapter-junction { grid-column: 1; grid-row: 1; margin-top: 2px; }
  .flow-chapter .chapter-copy, .flow-chapter .chapter-evidence {
    grid-column: 2; justify-self: stretch; width: min(100%,520px); padding-left: 24px; padding-right: 0;
  }
  .flow-chapter .chapter-copy { grid-row: 1; }
  .flow-chapter .chapter-evidence { grid-row: 2; margin-left: 24px; }
  .flow-chapter--right .chapter-evidence { grid-row: 2; }
  .flow-chapter--right .chapter-copy { grid-row: 1; }
  .chapter-evidence::before, .flow-chapter--left .chapter-evidence::before, .flow-chapter--right .chapter-evidence::before { display: none; }
}

@media (max-width: 520px) {
  .flow-nav-brand > img:first-child { width: 30px; }
  .flow-nav-brand > img:last-child { display: none; }
  .flow-hero h1 { font-size: clamp(43px,14vw,64px); }
  .client-portrait-image { height: 190px; padding: 26px; }
  .client-portrait figcaption { padding: 21px; }
  .chapter-copy h2 { font-size: 34px; }
  .chapter-evidence { border-radius: 16px; }
  .evidence-inputs, .evidence-results { padding: 24px 20px; }
  .flow-case-cta { margin-bottom: 90px; padding: 46px 24px; text-align: left; }
  .flow-case-cta p { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
