:root {
  --ink: #111116;
  --ink-soft: #1b1920;
  --paper: #f4f1eb;
  --paper-bright: #fbfaf7;
  --pink: #ff4fd3;
  --purple: #7247e8;
  --blue: #516cff;
  --lime: #b9ff4a;
  --muted: #77726d;
  --line: rgba(17,17,22,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

.page-progress {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
}
.page-progress span { display: block; width: 0; height: 100%; background: var(--pink); }

.case-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 72px;
  padding: 0 32px;
  color: white;
  background: rgba(12,11,16,.82);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 40px;
}
.case-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.case-brand span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--pink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}
.case-brand strong { font-size: 13px; }
.case-header nav { display: flex; gap: 28px; color: rgba(255,255,255,.58); font-size: 11px; }
.case-header nav a:hover { color: white; }
.back-home {
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-hero {
  min-height: 880px;
  padding: 150px max(40px, calc((100vw - 1240px) / 2)) 48px;
  color: white;
  background:
    radial-gradient(circle at 80% 20%, rgba(114,71,232,.32), transparent 32%),
    radial-gradient(circle at 16% 70%, rgba(255,79,211,.18), transparent 34%),
    #111116;
  overflow: hidden;
}
.hero-grid {
  min-height: 620px;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 72px;
  align-items: center;
}
.eyebrow, .section-title > p, .section-index {
  margin: 0 0 24px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .17em;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(70px, 8vw, 118px);
  line-height: .88;
  letter-spacing: -.075em;
}
.hero-copy h1 span { color: rgba(255,255,255,.26); }
.hero-lead {
  max-width: 640px;
  margin: 35px 0 42px;
  color: rgba(255,255,255,.66);
  font-size: 19px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}
.hero-meta div { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-meta small, .hero-meta strong { display: block; }
.hero-meta small { color: var(--pink); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.hero-meta strong { margin-top: 9px; font-size: 11px; line-height: 1.45; }
.hero-visual {
  position: relative;
  border: 7px solid #28232d;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 42px 100px rgba(0,0,0,.42);
  transform: rotate(2deg);
}
.hero-visual img { width: 100%; }
.hero-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  color: white;
  background: #d92cb6;
  border-radius: 10px;
  transform: rotate(-3deg);
}
.hero-visual figcaption span, .hero-visual figcaption strong { display: block; }
.hero-visual figcaption span { font-size: 7px; letter-spacing: .14em; }
.hero-visual figcaption strong { font-size: 20px; }
.hero-route {
  margin-top: 42px;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.55);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}
.hero-route i { width: 32px; height: 1px; background: rgba(255,255,255,.2); }
.hero-route b { margin: 0 auto; padding: 8px 12px; border-radius: 999px; color: var(--ink); background: var(--pink); }

.case-section { padding: 132px 0; overflow: hidden; }
.section-shell { width: min(1240px, calc(100% - 64px)); margin: 0 auto; }
.section-title { margin-bottom: 70px; }
.section-title h2, .principle-copy h2, .impact-copy h2 {
  margin: 0;
  font-size: clamp(50px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -.06em;
}
.section-title > span { display: block; max-width: 650px; margin-top: 24px; color: var(--muted); }
.section-title.inverse h2 { color: white; }
.section-title.inverse > span { color: rgba(255,255,255,.52); }

.context-section { background: var(--paper); }
.problem-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.problem-card {
  min-height: 270px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-bright);
}
.problem-card > span { color: var(--purple); font-size: 11px; font-weight: 900; }
.problem-card h3 { margin: 56px 0 12px; font-size: 24px; letter-spacing: -.035em; }
.problem-card p { margin: 0; color: var(--muted); font-size: 14px; }
.statement {
  margin: 70px 0;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: .3fr 1.7fr;
  gap: 50px;
}
.statement p { margin: 7px 0 0; color: var(--purple); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.statement strong { font-size: clamp(26px,3.2vw,44px); line-height: 1.25; letter-spacing: -.04em; }
.wide-evidence, .dark-evidence, .framed-evidence {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(22,18,30,.1);
}
.wide-evidence img, .dark-evidence img, .framed-evidence img { width: 100%; }
.wide-evidence figcaption {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.principle-section { background: var(--paper-bright); }
.split-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; align-items: center; }
.principle-copy > p:not(.section-index) { color: var(--muted); font-size: 16px; }
.principle-copy ul { padding: 0; margin: 38px 0 0; list-style: none; }
.principle-copy li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
}
.principle-copy li b { color: var(--purple); }
.principle-copy li span { color: var(--muted); font-size: 13px; }

.workflow-section, .learning-section { color: white; background: var(--ink); }
.stage-line {
  display: grid;
  grid-template-columns: repeat(8,1fr);
  gap: 8px;
  margin-bottom: 38px;
}
.stage-line div {
  min-height: 100px;
  padding: 15px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.stage-line b, .stage-line span { display: block; }
.stage-line b { color: var(--pink); font-size: 9px; }
.stage-line span { margin-top: 24px; color: rgba(255,255,255,.65); font-size: 10px; }
.stage-line .gate { color: var(--ink); background: var(--pink); border-color: var(--pink); }
.stage-line .gate b, .stage-line .gate span { color: var(--ink); }
.dark-evidence { border-color: rgba(255,255,255,.1); background: white; }
.video-feature {
  margin-bottom: 38px;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  background: #19171e;
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 42px;
  align-items: center;
}
.video-copy > p:first-child, .generation-copy > p:first-child, .mapping-intro > p {
  margin: 0;
  color: var(--pink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}
.video-copy h3 {
  margin: 34px 0 14px;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.video-copy > p:last-child { margin: 0; color: rgba(255,255,255,.5); font-size: 13px; }
.video-feature video {
  width: 100%;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: #08070a;
  box-shadow: 0 22px 55px rgba(0,0,0,.28);
}
.evidence-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 80px; }
.evidence-card {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: #17161c;
  overflow: hidden;
}
.evidence-copy { padding: 28px; }
.evidence-copy span { color: var(--pink); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.evidence-copy h3 { margin: 30px 0 10px; font-size: 25px; }
.evidence-copy p { margin: 0; color: rgba(255,255,255,.5); font-size: 13px; }
.evidence-card img { width: 100%; border-top: 1px solid rgba(255,255,255,.12); }
.gate-feature {
  margin-top: 22px;
  padding: 38px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--pink);
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 50px;
  align-items: center;
}
.gate-copy > p:first-child { font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.gate-copy h3 { margin: 38px 0 15px; font-size: 34px; line-height: 1.1; letter-spacing: -.04em; }
.gate-copy > p:last-child { font-size: 14px; }
.gate-feature img { border-radius: 14px; }
.output-gallery, .mapping-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 80px; }
.output-gallery figure, .mapping-gallery figure {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  overflow: hidden;
  background: white;
}
.output-gallery img, .mapping-gallery img { width: 100%; }
.output-gallery figcaption {
  padding: 18px 20px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.output-gallery figcaption span { color: var(--purple); font-weight: 900; }

.mapping-section { background: var(--paper); }
.generation-feature {
  margin-bottom: 100px;
  padding: 48px;
  border-radius: 28px;
  color: white;
  background: var(--ink);
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 52px;
  align-items: center;
  box-shadow: 0 28px 75px rgba(28,20,38,.16);
}
.generation-copy h3 {
  margin: 38px 0 18px;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -.045em;
}
.generation-copy > p:not(:first-child) { color: rgba(255,255,255,.55); font-size: 14px; }
.generation-points { margin-top: 35px; border-top: 1px solid rgba(255,255,255,.13); }
.generation-points span {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.13);
  display: grid;
  grid-template-columns: 38px 1fr;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}
.generation-points b { color: var(--pink); font-size: 9px; }
.generation-feature figure {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: white;
  overflow: hidden;
}
.generation-feature figure img { width: 100%; }
.generation-feature figcaption {
  padding: 16px 19px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
}
.generation-feature figcaption span { color: var(--muted); text-align: right; }
.mapping-intro {
  margin-bottom: 42px;
  display: grid;
  grid-template-columns: .35fr 1.65fr;
  gap: 40px;
  align-items: start;
}
.mapping-intro h3 {
  max-width: 800px;
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.mapping-steps {
  margin-bottom: 70px;
  border-top: 1px solid var(--line);
}
.mapping-steps div {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px .8fr 1.2fr;
  align-items: center;
  gap: 25px;
}
.mapping-steps span { color: var(--purple); font-size: 10px; font-weight: 900; }
.mapping-steps strong { font-size: 22px; }
.mapping-steps small { color: var(--muted); font-size: 13px; }
.spec-feature {
  margin-top: 70px;
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 60px;
  align-items: center;
}
.spec-feature > div > p:first-child { color: var(--purple); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.spec-feature h3 { margin: 35px 0 15px; font-size: 36px; line-height: 1.1; letter-spacing: -.04em; }
.spec-feature > div > p:last-child { color: var(--muted); }
.spec-feature img { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 60px rgba(20,15,25,.12); }
.mapping-gallery figure { border-color: var(--line); }
.mapping-gallery figcaption { padding: 16px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.mistake-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 65px; align-items: center; }
.mistake-copy > p, .outcome-grid article > p { color: var(--pink); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.mistake-copy h3 { margin: 35px 0 22px; font-size: 36px; line-height: 1.15; letter-spacing: -.045em; }
.mistake-copy ul, .outcome-grid ul { padding-left: 18px; color: rgba(255,255,255,.55); }
.mistake-copy li, .outcome-grid li { margin: 10px 0; }
.guardrails {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-top: 80px;
}
.guardrails div { min-height: 155px; padding: 22px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; }
.guardrails span, .guardrails strong { display: block; }
.guardrails span { color: var(--pink); font-size: 9px; }
.guardrails strong { margin-top: 48px; font-size: 13px; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 80px; }
.outcome-grid article { padding: 38px; border-radius: 22px; background: #1b1920; }
.outcome-grid h3 { margin: 34px 0 20px; font-size: 30px; }

.impact-section { background: var(--paper-bright); }
.impact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 85px; align-items: center; }
.impact-copy > p:not(.section-index) { color: var(--muted); }
.impact-copy blockquote {
  margin: 50px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid var(--line);
  color: var(--purple);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.35;
}
.thanks-card { width: 72%; margin: 0 auto; }
.thanks-card img { border-radius: 18px; box-shadow: 0 30px 80px rgba(66,39,112,.22); }
.thanks-card figcaption { margin-top: 12px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-align: center; text-transform: uppercase; }

.case-end {
  padding: 100px max(32px, calc((100vw - 1240px) / 2));
  color: white;
  background: linear-gradient(135deg, #6e42e5, #df31bd);
}
.case-end p { margin: 0 0 25px; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.case-end h2 { max-width: 1050px; margin: 0; font-size: clamp(38px,5vw,70px); line-height: 1.08; letter-spacing: -.05em; }
.case-end a { display: inline-flex; gap: 22px; margin-top: 55px; padding: 13px 18px; border-radius: 999px; color: var(--ink); background: var(--lime); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.case-end small { display: block; max-width: 850px; margin-top: 70px; color: rgba(255,255,255,.55); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero-grid, .split-layout, .impact-grid { grid-template-columns: 1fr; }
  .hero-visual { width: min(800px,100%); }
  .stage-line { grid-template-columns: repeat(4,1fr); }
  .mistake-layout, .spec-feature, .video-feature, .generation-feature { grid-template-columns: 1fr; }
  .thanks-card { width: min(560px,80%); }
}

@media (max-width: 720px) {
  .case-header { height: 66px; padding: 0 17px; }
  .case-header nav { display: none; }
  .case-hero { min-height: auto; padding: 120px 22px 38px; }
  .hero-grid { min-height: auto; gap: 50px; }
  .hero-copy h1 { font-size: clamp(58px,18vw,78px); }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-route { flex-wrap: wrap; }
  .hero-route b { order: 3; width: 100%; margin-top: 10px; text-align: center; }
  .case-section { padding: 86px 0; }
  .section-shell { width: calc(100% - 36px); }
  .section-title { margin-bottom: 48px; }
  .section-title h2, .principle-copy h2, .impact-copy h2 { font-size: 45px; }
  .problem-grid, .evidence-pair, .output-gallery, .mapping-gallery, .outcome-grid { grid-template-columns: 1fr; }
  .statement { grid-template-columns: 1fr; gap: 15px; }
  .stage-line { grid-template-columns: 1fr 1fr; }
  .video-feature, .generation-feature { padding: 24px; }
  .gate-feature { padding: 25px; grid-template-columns: 1fr; gap: 24px; }
  .mapping-intro { grid-template-columns: 1fr; gap: 15px; }
  .mapping-steps div { grid-template-columns: 42px 1fr; gap: 12px; }
  .mapping-steps small { grid-column: 2; }
  .guardrails { grid-template-columns: 1fr 1fr; }
  .thanks-card { width: 100%; }
  .case-end { padding: 75px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Keep cropped poster and playback in the same stable frame. */
.ai-workflow-case .video-feature video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 1030;
  object-fit: contain;
}
