/* ==========================================================
   Chunhe Tang — Portfolio
   Hand-written rebuild of the Framer site (simplified)
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --bg-dark: #101014;
  --text: #101014;
  --text-inverse: #ffffff;
  --muted: #6b6b70;
  --border: #e7e7e4;
  --accent: #101014;
  --accent-soft: #f0f0ee;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow-card: 0 1px 2px rgba(16,16,20,.05), 0 8px 24px rgba(16,16,20,.06);
  --shadow-card-hover: 0 2px 4px rgba(16,16,20,.06), 0 16px 40px rgba(16,16,20,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: #26262b; }
.muted { color: var(--muted); }

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; color: var(--text); }
.logo svg { width: 40px; height: 40px; display: block; overflow: visible; }
.l-arc, .l-bar, .l-dot {
  transform-box: view-box;
  transition: transform .45s cubic-bezier(.55, 0, .25, 1);
}
.l-arc { transform-origin: 43.6px 50.2px; }
.logo:hover .l-arc,
.logo:focus-visible .l-arc { transform: translate(5.2px, 5.6px) rotate(-90deg); }
.logo:hover .l-bar,
.logo:focus-visible .l-bar { transform: translate(-43.8px, -15.7px); }
.logo:hover .l-dot,
.logo:focus-visible .l-dot { transform: translate(2.1px, -43.3px); }
@media (prefers-reduced-motion: reduce) {
  .l-arc, .l-bar, .l-dot { transition: none; }
}
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a.roll {
  display: inline-block; overflow: hidden;
  height: 1.45em; line-height: 1.45;
  font-size: .98rem; font-weight: 500; color: var(--text);
}
.roll-inner {
  display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.roll-inner span { display: block; height: 1.45em; }
.roll-inner span:last-child { color: var(--muted); }
.nav-links a.roll:hover .roll-inner,
.nav-links a.roll:focus-visible .roll-inner { transform: translateY(-1.45em); }
.nav-links a.roll[aria-current="page"] { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .roll-inner { transition: none; }
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px;
  background: var(--text); position: absolute; left: 9px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-open .nav-links { max-height: 360px; }
  .nav-links li { width: 100%; }
  .nav-links a.roll { display: block; height: auto; padding: 14px 24px; overflow: visible; }
  .roll-inner span:last-child { display: none; }
  .nav-links a.roll:hover .roll-inner { transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text);
  color: var(--text-inverse);
  font-weight: 600; font-size: .95rem;
  padding: 14px 28px; border-radius: 999px;
  border: 1.5px solid var(--text);
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: #3a3a40; transform: translateY(-2px); }
.btn-light { background: var(--text-inverse); color: var(--text); border-color: var(--text-inverse); }
.btn-light:hover { background: #d9d9d6; color: var(--text); border-color: #d9d9d6; }

/* Arrow buttons: dark fill -> outline on hover, arrow rotates ↗ -> → */
.btn-arrow .btn-ico {
  display: inline-flex; width: 18px; height: 18px;
}
.btn-arrow .btn-ico svg {
  width: 18px; height: 18px;
  transform: rotate(-45deg); /* ↗ at rest */
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
}
.btn-arrow:hover .btn-ico svg { transform: rotate(0deg); } /* → on hover */

/* About Me (dark) -> becomes white outline on hover */
.btn.btn-arrow:not(.btn-light):hover {
  background: transparent; color: var(--text); border-color: var(--text);
  transform: none;
}
/* Let's Connect (white) -> stays white, only arrow animates + slight lift */
.btn-light.btn-arrow:hover { background: #fff; color: var(--text); border-color: #fff; transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; }
.hero-top {
  display: flex; align-items: center; gap: 22px; margin-bottom: 36px;
}
.hero-top .hi { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.avatar-wrap { position: relative; display: inline-block; }
.avatar-pill {
  display: flex; align-items: flex-end; justify-content: center;
  width: 62px; height: 112px;
  background: #d9f7a3; border-radius: 999px;
  overflow: hidden; position: relative;
}
.avatar-pill img {
  width: 100%; display: block;
  transition: transform .35s ease;
}
.avatar-pill .wave {
  position: absolute; top: 12px; left: 50%;
  font-size: 1.5rem; line-height: 1;
  transform: translateX(-50%);
  opacity: 0; transition: opacity .25s ease;
  transform-origin: 70% 80%;
}
.avatar-wrap:hover .avatar-pill img { transform: translateY(7px); }
.avatar-wrap:hover .wave {
  opacity: 1;
  animation: wave-hand 1s ease-in-out infinite;
}
@keyframes wave-hand {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  25%      { transform: translateX(-50%) rotate(20deg); }
  50%      { transform: translateX(-50%) rotate(-12deg); }
  75%      { transform: translateX(-50%) rotate(16deg); }
}
.bubble {
  position: absolute; left: calc(100% + 16px); top: -4px;
  background: #d9f7a3; color: #33531c;
  font-weight: 600; font-size: .88rem; line-height: 1.45;
  padding: 12px 18px; border-radius: 14px;
  white-space: nowrap;
  opacity: 0; transform: translateY(6px) scale(.92);
  transform-origin: left center;
  transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.4, .5, 1);
  pointer-events: none;
}
.bubble::before {
  content: ""; position: absolute; left: -8px; top: 20px;
  border: 6px solid transparent;
  border-right: 10px solid #d9f7a3; border-left: 0;
}
.avatar-wrap:hover .bubble { opacity: 1; transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .avatar-wrap:hover .wave { animation: none; }
}
@media (max-width: 620px) { .bubble { display: none; } }
.hero h1 { max-width: 44ch; margin-bottom: 24px; }
.hero .lead { max-width: 62ch; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 40px; }

/* ---------- Work cards ---------- */
.work-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.work-tag {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.work-card h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 8px; }
.work-card .desc { color: var(--muted); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-size: .8rem; font-weight: 500;
  background: var(--accent-soft); color: #3a3a40;
  padding: 5px 12px; border-radius: 999px;
}
.metrics { display: flex; flex-wrap: wrap; gap: 32px; border-top: 1px solid var(--border); padding-top: 20px; }
.metric .num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.metric .lbl { font-size: .82rem; color: var(--muted); }
.work-card .cta { font-weight: 600; color: var(--text); margin-top: 20px; display: inline-block; }

/* ---------- Strengths grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.tile {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.tile h3 { font-size: 1.05rem; margin-bottom: 10px; }
.tile p { font-size: .95rem; color: var(--muted); }
.tile .icon { font-size: 1.4rem; margin-bottom: 14px; display: block; }

/* ---------- CTA / footer ---------- */
.cta-band { background: var(--bg-dark); color: var(--text-inverse); padding: 96px 0 0; }
.cta-band .eyebrow { color: #9a9aa2; }
.cta-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cta-band h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 8px 0 40px; line-height: 1.15; max-width: 20ch; }
.cta-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 32px 0; margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.cta-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.cta-nav a {
  font-size: 1rem; color: var(--text-inverse); opacity: .92;
  transition: opacity .2s ease;
}
.cta-nav a:hover { opacity: .55; }
.cta-copyright { color: #9a9aa2; font-size: .9rem; }
@media (max-width: 720px) {
  .cta-footer-row { flex-direction: column; align-items: flex-start; gap: 18px; }
}

.site-footer { background: var(--bg-dark); color: #9a9aa2; border-top: 1px solid rgba(255,255,255,.07); padding: 32px 0; }
.footer-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; gap: 22px; list-style: none; }
.footer-nav a { font-size: .9rem; transition: color .2s ease; }
.footer-nav a:hover { color: var(--text-inverse); }
.copyright { font-size: .85rem; }

/* ---------- Case study layout ---------- */
.case-hero { padding: 56px 0 24px; }
.case-hero img { border-radius: var(--radius); margin-bottom: 24px; }
.case-meta {
  display: flex; flex-wrap: wrap; gap: 40px;
  padding: 28px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin: 32px 0;
}
.case-meta .k { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.case-meta .v { font-weight: 600; }

.prose { max-width: 780px; }
.prose p { margin-bottom: 20px; color: #3a3a40; font-size: 1.02rem; }
.prose h2 { margin: 56px 0 18px; }
.prose h3 { margin: 36px 0 12px; }
.prose ul { margin: 0 0 20px 22px; color: #3a3a40; }
.prose li { margin-bottom: 8px; }

.figure { margin: 32px 0; }
.figure img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; text-align: center; }

.quote {
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  padding: 24px 28px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 32px 0; max-width: 780px;
}
.quote p { font-size: 1.1rem; font-weight: 500; font-style: italic; margin-bottom: 10px; }
.quote cite { font-size: .9rem; color: var(--muted); font-style: normal; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px 0; }
@media (max-width: 680px) { .stat-row { grid-template-columns: 1fr; } }
.stat {
  background: var(--bg-alt); border-radius: var(--radius); padding: 28px; text-align: center;
}
.stat .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--accent); }
.stat .lbl { font-weight: 600; margin-top: 4px; }
.stat .sub { font-size: .85rem; color: var(--muted); margin-top: 6px; }

.phase-steps { display: flex; gap: 12px; flex-wrap: wrap; margin: 40px 0 8px; }
.phase-steps .step {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-alt); border-radius: 999px; padding: 8px 18px;
  font-weight: 600; font-size: .92rem;
}
.phase-steps .step.active { background: var(--text); color: var(--text-inverse); }
.phase-steps .n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem;
}

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
@media (max-width: 680px) { .ba { grid-template-columns: 1fr; } }
.ba .col { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px; }
.ba .tag-before, .ba .tag-after {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}
.ba .tag-before { background: #fdeaea; color: #c0392b; }
.ba .tag-after { background: #e8f7ee; color: #1e8e4e; }
.ba h4 { margin-bottom: 8px; }
.ba p { font-size: .95rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 28px 0; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
table.cmp th, table.cmp td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; }
table.cmp th { background: var(--bg-alt); font-family: var(--font-display); }
table.cmp td img { max-width: 200px; border-radius: 6px; }

.divider-banner {
  background: var(--bg-dark); color: var(--text-inverse);
  border-radius: var(--radius); text-align: center;
  padding: 56px 24px; margin: 64px 0;
}
.divider-banner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.num-list { counter-reset: item; list-style: none; margin: 24px 0 !important; }
.num-list > li {
  counter-increment: item; position: relative;
  padding-left: 48px; margin-bottom: 22px;
}
.num-list > li::before {
  content: counter(item);
  position: absolute; left: 0; top: 2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: #3a3a40;
  font-weight: 700; font-family: var(--font-display);
  display: flex; align-items: center; justify-content: center;
}
.num-list b { display: block; margin-bottom: 2px; }

.video-embed { margin: 32px 0; }
.video-embed video { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.insight {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 28px 32px; margin: 32px 0; max-width: 780px;
}
.insight .k { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.insight p { font-size: 1.1rem; font-weight: 600; margin: 0; color: var(--text); }

/* ---------- About page ---------- */
.about-hero { display: grid; grid-template-columns: 1.75fr 1fr; gap: 90px; align-items: start; }
@media (max-width: 820px) {
  .about-hero { grid-template-columns: 1fr; gap: 40px; }
  .about-hero .portrait { margin-top: 0; max-width: 420px; }
}
.about-hero .portrait {
  border-radius: 13px; width: 100%;
  aspect-ratio: 773 / 799; object-fit: cover;
  margin-top: 56px;
}
.about-kv { margin-top: 36px; }
.about-kv .k { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.about-kv .v { font-weight: 600; font-size: 1.05rem; }

.xp-item {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--border);
}
.xp-item:last-child { border-bottom: 0; }
.xp-role { font-weight: 400; font-size: 1.15rem; }
.xp-role .co { font-weight: 400; }
.xp-role .sep { color: var(--border); margin: 0 10px; font-weight: 400; }
.xp-tags { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.xp-when { text-align: right; flex-shrink: 0; }
.xp-when .dates { font-weight: 400; }
.xp-when .loc { color: var(--muted); font-size: .95rem; margin-top: 6px; }
@media (max-width: 680px) {
  .xp-item { flex-direction: column; gap: 8px; }
  .xp-when { text-align: left; display: flex; gap: 14px; align-items: baseline; }
  .xp-when .loc { margin-top: 0; }
}
.arrow-list { list-style: none; margin-top: 20px; }
.arrow-list li {
  position: relative; padding: 10px 0 10px 36px;
  font-weight: 400; font-size: 1.08rem;
}
.arrow-list li::before {
  content: "→"; position: absolute; left: 0; color: var(--text);
}
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 680px) { .about-cols { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-hero { padding: 96px 0 96px; }
.contact-list { margin-top: 72px; max-width: 640px; }
.contact-row { padding: 30px 0; }
.contact-row .k { font-size: .95rem; color: var(--muted); margin-bottom: 10px; }
.contact-row .v { font-weight: 400; font-size: 1.3rem; }
.contact-row a.v {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: color .2s ease;
}
.contact-row a.v:hover { color: var(--muted); }
.contact-row a.v .arrow { font-size: 1.1rem; display: inline-block; transition: transform .25s ease; }
.contact-row a.v:hover .arrow { transform: rotate(45deg); }

/* ---------- Reveal animation (restrained) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Footer CTA: bouncier spring-style entrance (mirrors the Framer footer's
   Time 0.3s / Bounce 0.2 transition) — rises from further down with a soft
   overshoot when it scrolls into view. The section itself carries .reveal. */
.cta-band.reveal { opacity: 0; transform: translateY(60px); transition: opacity .5s ease, transform .7s cubic-bezier(.22, 1.4, .36, 1); }
.cta-band.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .work-card, .tile { transition: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Key strengths (Framer style) ---------- */
.strength-card {
  background: #f7f7f8;
  border-radius: 20px;
  padding: 44px 36px;
}
.strength-card h3 { font-size: 1.25rem; margin-bottom: 14px; }
.strength-card p { color: var(--muted); font-size: 1rem; }
.icon-tile {
  width: 56px; height: 56px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 30px;
}
.icon-tile svg { width: 26px; height: 26px; }
.c-teal   { background: #e4f6f1; color: #0d9488; }
.c-purple { background: #f4eafd; color: #9333ea; }
.c-blue   { background: #e7f0fe; color: #3b82f6; }
.c-orange { background: #feefe4; color: #f97316; }
.c-pink   { background: #fde7f1; color: #ec4899; }
.c-green  { background: #e8f6ea; color: #16a34a; }

/* ---------- Case study: text/image split rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  margin: 56px 0;
}
.split.reverse .split-text { order: 2; }
.split.reverse .split-media { order: 1; }
.split-text h2 { margin: 0 0 16px; }
.split-text h3 { margin: 0 0 12px; }
.split-text p { color: #3a3a40; font-size: 1.02rem; margin-bottom: 16px; }
.split-text p:last-child { margin-bottom: 0; }
.split-media { margin: 0; }
.split-media img {
  width: 100%; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.split-media figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; text-align: center; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 24px; margin: 40px 0; }
  .split.reverse .split-text { order: 1; }
  .split.reverse .split-media { order: 2; }
}

/* ============================================================
   CASE STUDY — faithful Framer rebuild, v2
   Unified 160px desktop margin system + real hero animation
   ============================================================ */

/* One shared horizontal-margin container for everything except the hero.
   Scales the side margin down gracefully on smaller viewports. */
/* Unified case-study content padding — T160 / R80 / B240 / L80 (matches design).
   Horizontal padding applies to every .cs-container; the top/bottom padding is
   placed on the first/last container only, so single-container pages get both
   and case 1 (split by a full-bleed band) keeps clean mid-page spacing.
   Scales down responsively. */
.cs-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}
main > .cs-container:first-of-type { padding-top: 160px; }
main > .cs-container:last-of-type  { padding-bottom: 240px; }
main > .cs-container:first-of-type > :first-child { margin-top: 0; }
main > .cs-container:last-of-type  > :last-child  { margin-bottom: 0; }
@media (max-width: 1023px) {
  .cs-container { padding: 0 48px; }
  main > .cs-container:first-of-type { padding-top: 120px; }
  main > .cs-container:last-of-type  { padding-bottom: 180px; }
}
@media (max-width: 639px) {
  .cs-container { padding: 0 24px; }
  main > .cs-container:first-of-type { padding-top: 88px; }
  main > .cs-container:last-of-type  { padding-bottom: 132px; }
}

/* ---------------- HERO ---------------- */
/* Full-bleed hero — no side margins (unlike the rest of the page, which
   uses the 160px desktop margin system). Loads slightly zoomed in and
   settles to its natural size as the page is scrolled — a subtle,
   Framer-style "Ken Burns" touch. The zoom amount is small (6%) so the
   sliver clipped by overflow:hidden at the very start is imperceptible
   and never touches the headline text or graphic content. */
/* ---- shared base (case 1, 2 & 4) ---- */
.cs-hero {
  width: 100%;
  padding: 56px 0 48px;
  overflow: hidden;
}
/* Entrance (opacity/translate) lives on the OUTER wrapper; the
   scroll-driven zoom lives on the INNER <picture>. Keeping them on
   separate elements means the entrance animation's fill state can never
   override the JS-driven scale — which was exactly the bug before. */
.cs-hero-image {
  opacity: 0;
  transform: translateY(28px);
  animation: cs-hero-in .8s cubic-bezier(.16,1,.3,1) .05s forwards;
}
.cs-hero-image picture {
  display: block;
  transform: scale(1.06);
  transform-origin: 50% 0%;
  will-change: transform;
}
.cs-hero-image img { width: 100%; display: block; }
@keyframes cs-hero-in {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-hero-image { opacity: 1; transform: none; animation: none; }
  .cs-hero-image picture { transform: none; }
}

/* ============ Coded hero (case 1 & 2): real headline overlaid on the device
   image. The image keeps its own original baked gradient, and the headline —
   previously baked in — is now real text positioned in vw units so it scales
   in lockstep with the full-bleed image at every width, matching the artwork.
   No CSS gradient is used, so the background matches the original exactly. */
.cs-hero--overlay { position: relative; }
.cs-hero--overlay .cs-hero-title {
  position: absolute;
  z-index: 2;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #101014;
  opacity: 0;
  transform: translateY(28px);
  animation: cs-hero-in .8s cubic-bezier(.16,1,.3,1) both;
}
/* 56px = the hero's top padding (the image starts below it); the vw values
   are each headline's original inset/size relative to its own artwork. */
.cs-hero--c1 .cs-hero-title { top: calc(56px + 2.82vw); left: 7.46vw; font-size: 5.43vw; line-height: 1.1; }
.cs-hero--c2 .cs-hero-title { top: calc(56px + 2.9vw);  left: 7.3vw;  font-size: 5.33vw; line-height: 1.125; }
@media (prefers-reduced-motion: reduce) {
  .cs-hero--overlay .cs-hero-title { opacity: 1; transform: none; animation: none; }
}

/* Section heading — centered, bold display */
.cs-h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  margin: 96px 0 40px;
}

/* Body copy */
.cs-body {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.65;
  color: #16161a;
  font-weight: 400;
}
.cs-body + .cs-body { margin-top: 20px; }

/* Intro meta row */
.cs-intro {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 64px;
}
.cs-meta .row { margin-bottom: 36px; }
.cs-meta .k { color: var(--muted); font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.cs-meta .v { font-size: 1.3rem; font-weight: 600; }
.cs-intro .lead-xl { font-size: clamp(1.3rem, 2.1vw, 1.85rem); line-height: 1.5; font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 800px) { .cs-intro { grid-template-columns: 1fr; gap: 28px; } }

/* Full-width figure */
.cs-fig { margin: 40px 0; }
.cs-fig img { width: 100%; border-radius: var(--radius-sm); display: block; }
.cs-fig figcaption { text-align: center; font-weight: 600; margin-top: 16px; font-size: 1rem; }
.cs-fig.plain img { border-radius: var(--radius); }

/* 3-column research cards */
.cs-research-panel { background: #f4f4f2; border-radius: 24px; padding: 44px; margin-top: 8px; }
.cs-research-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cs-research-card h3 { font-size: 1.4rem; margin-bottom: 20px; }
.cs-research-card img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 20px; aspect-ratio: 1/1; object-fit: cover; }
.cs-research-card p { color: var(--muted); font-size: 1rem; line-height: 1.6; }
@media (max-width: 820px) { .cs-research-wrap { grid-template-columns: 1fr; } }

/* Big centered quote */
.cs-quote { margin: 64px 0; }
.cs-quote .q {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-style: italic; color: #6b6b70; font-weight: 400;
  border-left: 4px solid #5b5bf5; padding-left: 28px; line-height: 1.4;
}
.cs-quote .cite { text-align: right; color: var(--muted); font-size: 1.05rem; margin-top: 18px; }

/* Numbered insights */
.cs-insights { margin-top: 32px; }
.cs-insight-block { margin-bottom: 44px; }
.cs-insight-block .num-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; }
.cs-insight-block .n { font-size: 1.6rem; font-weight: 700; }
.cs-insight-block h3 { font-size: 1.6rem; font-weight: 700; }
.cs-insight-block ul { list-style: none; padding-left: 0; }
.cs-insight-block li { position: relative; padding-left: 24px; margin-bottom: 12px; font-size: 1.1rem; }
.cs-insight-block li::before { content: "•"; position: absolute; left: 4px; }

/* Objective cards */
.cs-obj-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.cs-obj-card { background: #f4f4f2; border-radius: 20px; padding: 40px 36px; min-height: 260px; display: flex; flex-direction: column; }
.cs-obj-card h3 { font-size: 2.2rem; font-weight: 700; margin-bottom: auto; }
.cs-obj-card p { font-size: 1.1rem; margin-top: 50px; }
@media (max-width: 820px) { .cs-obj-wrap { grid-template-columns: 1fr; } .cs-obj-card { min-height: auto; } }

/* IA comparison table */
.cs-cmp {
  background: #f4f4f2; border-radius: 24px; padding: 40px; margin-top: 8px;
  display: grid; grid-template-columns: minmax(140px, 190px) repeat(3, 1fr);
  grid-template-rows: auto auto auto auto auto;
  column-gap: 28px; row-gap: 16px; align-items: center;
}
.cs-cmp .rlabel { grid-column: 1; text-align: right; font-weight: 700; font-size: 1.1rem; }
.cs-cmp .col { display: contents; }
.cs-cmp .col h4 { grid-row: 1; font-size: 1.15rem; font-weight: 700; align-self: end; }
.cs-cmp .col img { grid-row: 2; width: 100%; aspect-ratio: 830/457; object-fit: cover; border-radius: 10px; display: block; }
.cs-cmp .col .cell { font-size: 1.05rem; align-self: center; }
.cs-cmp .col .cell[data-row="density"]    { grid-row: 3; }
.cs-cmp .col .cell[data-row="focus"]      { grid-row: 4; }
.cs-cmp .col .cell[data-row="efficiency"] { grid-row: 5; }
.cs-cmp .col:nth-of-type(1) > * { grid-column: 2; }
.cs-cmp .col:nth-of-type(2) > * { grid-column: 3; }
.cs-cmp .col:nth-of-type(3) > * { grid-column: 4; }
.cs-cmp .rlabel[data-row="density"]    { grid-row: 3; }
.cs-cmp .rlabel[data-row="focus"]      { grid-row: 4; }
.cs-cmp .rlabel[data-row="efficiency"] { grid-row: 5; }
@media (max-width: 900px) {
  .cs-cmp { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 0; }
  .cs-cmp .rlabel { display: none; }
  .cs-cmp .col { display: block; padding: 24px 0; border-top: 1px solid var(--border); }
  .cs-cmp .col:first-of-type { border-top: 0; }
  .cs-cmp .col h4 { margin-bottom: 14px; }
  .cs-cmp .col img { aspect-ratio: 830/457; margin-bottom: 14px; }
  .cs-cmp .col .cell { display: block; padding: 5px 0; }
  .cs-cmp .col .cell::before { content: attr(data-label) ": "; font-weight: 700; }
}

/* Phase nav pills */
.cs-phases { display: flex; justify-content: center; gap: 40px; margin: 96px 0 0; flex-wrap: wrap; }
.cs-phase { display: flex; align-items: center; gap: 12px; opacity: .35; font-size: 1.25rem; font-weight: 600; }
.cs-phase.active { opacity: 1; }
.cs-phase .pn { width: 32px; height: 32px; border-radius: 50%; background: #e6e6e3; display: flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 700; }
.cs-phase.active .pn { background: #16161a; color: #fff; }

/* Before/After callout row */
.cs-ba { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cs-ba .tag { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.cs-ba .before .tag { color: #c0392b; }
.cs-ba .after .tag { color: #1e8e4e; }
.cs-ba .card { background: #f4f4f2; border-radius: 16px; padding: 26px; }
.cs-ba h4 { font-size: 1.1rem; margin-bottom: 10px; }
.cs-ba p { color: var(--muted); }
@media (max-width: 700px) { .cs-ba { grid-template-columns: 1fr; } }

/* Pre-class intro card: stacked [image + caption] rows */
.cs-note-card { background: #f4f4f2; border-radius: 24px; padding: 36px; margin-top: 32px; }
.cs-note-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.cs-note-row + .cs-note-row { margin-top: 32px; }
.cs-note-row img { width: 100%; border-radius: 12px; display: block; }
.cs-note-row .cap b { display: block; margin-bottom: 6px; }
.cs-note-row .cap p { color: var(--muted); font-size: .98rem; }
@media (max-width: 760px) { .cs-note-row { grid-template-columns: 1fr; gap: 16px; } }

/* Before: 5-tool grid */
.cs-tools { background: #f4f4f2; border-radius: 24px; padding: 36px; margin-top: 24px; }
.cs-tools .lbl { font-weight: 700; font-size: 1.3rem; margin-bottom: 22px; }
.cs-tools-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cs-tool h4 { text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; min-height: 2.4em; }
.cs-tool img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.cs-tool .cap { text-align: center; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .cs-tools-grid { grid-template-columns: 1fr 1fr; } }

/* After: table + annotated dashboard */
.cs-after { background: #f4f4f2; border-radius: 24px; padding: 36px; margin-top: 24px; }
.cs-after .lbl { font-weight: 700; font-size: 1.3rem; margin-bottom: 22px; }
.cs-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.cs-after-grid img { width: 100%; border-radius: 12px; display: block; }
.cs-after-right .dash { margin-bottom: 24px; }
.cs-after-right h4 { font-size: 1.05rem; margin: 18px 0 8px; }
.cs-after-right p, .cs-after-right li { color: #16161a; font-size: .98rem; }
.cs-after-right ul { padding-left: 20px; margin-top: 6px; }
@media (max-width: 820px) { .cs-after-grid { grid-template-columns: 1fr; } }

/* Manual/Automated + In-class two-tone panes (shared) */
.cs-panes { display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; overflow: hidden; margin-top: 8px; }
.cs-panes .pane { padding: 44px; }
.cs-panes .pane.a { background: #fdece9; }
.cs-panes .pane.b { background: #e8f7ee; }
.cs-panes .pane h3 { font-size: 1.45rem; margin-bottom: 6px; }
.cs-panes .pane .sub { color: #16161a; margin-bottom: 26px; }
.cs-panes .pane img { width: 100%; border-radius: 10px; margin-bottom: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.08); display: block; }
@media (max-width: 820px) { .cs-panes { grid-template-columns: 1fr; } }

/* Focus Student / Close Bond chat interaction card */
.cs-chatcard { background: #f4f4f2; border-radius: 24px; padding: 36px; margin-top: 40px; }
.cs-chat-pills { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-bottom: 24px; }
.cs-chat-pill { background: #22c37a; color: #fff; font-weight: 700; font-size: 1.05rem; text-align: center; padding: 14px 20px; border-radius: 999px; }
.cs-chat-cols { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; }
.cs-chat-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cs-chat-item h5 { font-size: 1rem; margin-bottom: 14px; }
.cs-chat-imgs { display: flex; flex-direction: column; gap: 12px; }
.cs-chat-imgs img { width: 100%; border-radius: 10px; display: block; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
@media (max-width: 900px) {
  .cs-chat-pills { grid-template-columns: 1fr; }
  .cs-chat-cols { grid-template-columns: 1fr; }
  .cs-chat-sub { grid-template-columns: 1fr; }
}

/* Split text/image */
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 48px; }
.cs-split.rev .txt { order: 2; }
.cs-split.rev .media { order: 1; }
.cs-split .txt h4 { font-size: 1.3rem; margin-bottom: 16px; }
.cs-split .txt p { color: #16161a; font-size: 1.08rem; margin-bottom: 14px; }
.cs-split .media img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
@media (max-width: 800px) {
  .cs-split { grid-template-columns: 1fr; gap: 24px; }
  .cs-split.rev .txt { order: 1; } .cs-split.rev .media { order: 2; }
}

/* Stat rows */
.cs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 48px; }
.cs-stat .big { font-size: clamp(2.4rem, 4.6vw, 3.4rem); font-weight: 700; margin-bottom: 8px; }
.cs-stat h4 { font-size: 1.1rem; margin-bottom: 6px; }
.cs-stat p { color: var(--muted); font-size: .96rem; }
@media (max-width: 700px) { .cs-stats { grid-template-columns: 1fr; gap: 28px; } }

/* Guidelines: 3 tall images */
.cs-guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; }
.cs-guides img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
@media (max-width: 820px) { .cs-guides { grid-template-columns: 1fr; } }

/* ---------- Case study: image placeholder (until real screens are added) ---------- */
.cs-ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(45deg, #f0f0ee 0 12px, #f6f6f4 12px 24px);
  border: 1px dashed #d4d4d0;
  display: flex; align-items: center; justify-content: center;
  color: #9a9a95; font-size: .95rem; font-weight: 600; text-align: center;
  padding: 20px;
}
.cs-ph.tall { aspect-ratio: 3 / 4; }
.cs-ph.wide { aspect-ratio: 21 / 9; }

/* ============================================================
   HOMEPAGE PROJECT CARDS v3 — full-bleed background artwork,
   text overlaid on the empty side, alternating left/right.
   Hover: bg zooms, text nudges toward center, corner arrow
   turns from translucent ↗ to solid white → (per reference).
   ============================================================ */
.pcard {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  background: #f4f3fb;
  margin-bottom: 36px;
  min-height: 540px;
}
.pcard-bg, .pcard-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.pcard-bg img {
  object-fit: cover; object-position: center;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
  transform-origin: center;
}
.pcard:hover .pcard-bg img { transform: scale(1.04); }

.pcard-body {
  position: relative; z-index: 1;
  max-width: 46%;
  min-height: 540px;
  padding: 60px 24px 136px 60px; /* bottom padding clears the corner arrow zone */
  display: flex; flex-direction: column;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.pcard.right .pcard-body { margin-left: auto; padding: 60px 60px 136px 24px; }
.pcard:hover .pcard-body { transform: translateX(14px); }
.pcard.right:hover .pcard-body { transform: translateX(-14px); }

.pcard-tag {
  color: #7b5cf0; font-weight: 700; font-size: .85rem;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px;
}
.pcard h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.15; margin-bottom: 16px; color: var(--text);
}
.pcard .desc { color: #4a4a52; font-size: 1.08rem; margin-bottom: 22px; }
.pcard .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: auto; }
.pcard .chip { background: #e9e4fb; color: #6b4fe0; }
.pcard-stats {
  display: flex; flex-wrap: nowrap;
  gap: clamp(16px, 2.5vw, 40px);
  margin-top: 40px;
}
.pcard-stats .st { flex: 1 1 0; min-width: 0; }
.pcard-stats .st b {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.pcard-stats .st span {
  color: var(--muted); font-size: .88rem; line-height: 1.35;
  display: block; /* labels may wrap to multiple lines */
}

/* Corner arrow: translucent ↗ at rest -> solid white → on hover */
.pcard-arrow {
  position: absolute; left: 36px; bottom: 40px; z-index: 2;
  width: 68px; height: 68px; border-radius: 50%;
  background: #fff;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  /* Hidden by default — only appears on hover. */
  opacity: 0;
  transform: scale(.85);
  box-shadow: 0 10px 30px rgba(20, 20, 40, .14);
  transition: opacity .35s ease, transform .45s cubic-bezier(.34, 1.4, .5, 1);
  pointer-events: none;
}
.pcard-arrow svg {
  width: 24px; height: 24px;
  transform: rotate(-45deg); /* pointing ↗ */
  transition: transform .45s cubic-bezier(.34, 1.3, .5, 1);
}
.pcard:hover .pcard-arrow {
  opacity: 1; transform: scale(1);
}
.pcard:hover .pcard-arrow svg { transform: rotate(0deg); } /* rotates ↗ -> → */

/* Placeholder art zone for cards without artwork yet */
.pcard-ph {
  position: absolute; top: 36px; bottom: 36px; right: 36px;
  width: 46%; z-index: 0;
}
.pcard.right .pcard-ph { right: auto; left: 36px; }
.pcard-ph .cs-ph { position: absolute; inset: 0; width: auto; height: auto; aspect-ratio: auto; }

@media (max-width: 860px) {
  /* Mobile: artwork block on top, text below (per reference).
     Card body uses the SAME color as the image's bottom edge (#f7f7f9)
     so the seam between image and text blends seamlessly. */
  .pcard { min-height: 0; border-radius: 22px; background: #f7f7f9; }
  .pcard-bg {
    position: relative; display: block;
    background: #f7f7f9;
  }
  /* Let the image define its own height (no fixed aspect = no letterbox);
     its baked-in lavender bg matches the card, so image->text is seamless. */
  .pcard-bg img { position: static; width: 100%; height: auto; display: block; }
  .pcard-body, .pcard.right .pcard-body {
    max-width: none; min-height: 0; margin: 0;
    padding: 26px 26px 34px; transform: none !important;
  }
  .pcard-stats { gap: 18px; margin-top: 28px; }
  .pcard-arrow { display: none; }
  .pcard-ph { position: relative; inset: auto; width: auto; height: 220px; margin: 24px 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard-bg img, .pcard-body, .pcard-arrow, .pcard-arrow svg { transition: none; }
}


/* ---- Next Case Study band (shared across case studies) ---- */
.ncs-next {
  width: 100%;
  background: var(--bg-dark); color: var(--text-inverse);
  padding: 110px 24px; margin-top: 128px;
}
.ncs-next .inner { max-width: var(--maxw); margin: 0 auto; }
.ncs-next .ncs-kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-bottom: 18px;
}
.ncs-next .ncs-kicker::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #fff; flex: none;
}
.ncs-next h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700;
  letter-spacing: -.02em; max-width: 760px; margin-bottom: 32px;
}
.ncs-next .link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.02rem;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: 14px 28px; transition: background .25s ease, color .25s ease;
}
.ncs-next .link:hover { background: #fff; color: var(--bg-dark); }


/* ---- Footer: Framer-style "curtain" uncover + roll-hover links ---- */
main { position: relative; z-index: 1; background: var(--bg); }
.site-footer { padding: 44px 0; }
.page-end { position: sticky; bottom: 0; z-index: 0; }
.page-end .ncs-next { margin-top: 0; }
.footer-nav a.roll {
  display: inline-block; overflow: hidden;
  height: 1.45em; line-height: 1.45;
  font-size: .9rem;
}
.footer-nav a.roll .roll-inner span:last-child { color: #fff; }
.footer-nav a.roll:hover .roll-inner,
.footer-nav a.roll:focus-visible .roll-inner { transform: translateY(-1.45em); }

/* ============ Case Study 3 — hero (gradient cover + auto marquee) ============ */
.cs3-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: linear-gradient(180deg, #ffffff 0%, #f5f2fb 22%, #ece4f8 52%, #f2edfb 78%, #ffffff 100%);
  padding-top: 88px;
  overflow: hidden;
}
.cs3-hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.cs3-title {
  font-family: 'Inter Tight', Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 4.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #111;
  max-width: 1000px;
  margin: 0;
  animation: cs3-rise .9s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes cs3-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.cs3-marquee {
  margin-top: 48px;
  padding: 44px 0 80px;
  overflow: hidden;
  animation: cs3-rise 1s .15s cubic-bezier(.22,.61,.36,1) both;
}
.cs3-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: cs3-scroll 60s linear infinite;
  will-change: transform;
}
@keyframes cs3-scroll { from { transform: translateX(0); } to { transform: translateX(-33.3333%); } }
.cs3-track:not(.js):has(img:hover) { animation-play-state: paused; }
.cs3-track.js { animation: none; }
.cs3-track img {
  height: min(210px, 19vw);
  width: auto;
  display: block;
  flex: none;
  position: relative;
  z-index: 0;
  transition: transform .35s ease, filter .35s ease;
  cursor: pointer;
}
.cs3-track:not(.js) img:hover,
.cs3-track img.is-focus {
  transform: scale(1.28);
  z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .cs3-track, .cs3-title, .cs3-marquee { animation: none; }
}
@media (max-width: 720px) {
  .cs3-hero { padding-top: 56px; }
  .cs3-hero-inner { padding: 0 24px; }
  .cs3-track img { height: 150px; }
  .cs3-marquee { margin-top: 32px; padding-bottom: 56px; }
}

/* ---- Case Study 3: In-class & After-school data analysis panels ---- */
.cs3-data { margin: 48px 0 64px; }
.cs3-data-title {
  text-align: center;
  font-family: 'Inter Tight', Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 28px;
}
.cs3-data-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: stretch;
}
/* right panel stretches to match the left one; spread its content evenly */
.cs3-data .panel:last-child {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cs3-data .panel {
  background: #f3f5fb;
  border-radius: 24px;
  padding: 28px;
}
.cs3-data .panel h4 {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 4px 0 20px;
}
.cs3-data .panel .sub {
  font-size: .95rem;
  font-weight: 400;
  margin: 20px 0 10px;
}
.cs3-data .panel img {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 860px) {
  .cs3-data-grid { grid-template-columns: 1fr; }
}

/* ---- Case Study 3: goal derivation flow (user needs + business -> product -> design) ---- */
.cs3-goalflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 48px 0 64px;
}
.cs3-goalflow .gcard {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
}
.cs3-goalflow .gcard h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.cs3-goalflow .gcard p {
  margin: 0;
  color: var(--muted, #555);
  font-size: .95rem;
  line-height: 1.9;
}
.cs3-goalflow .gf-op {
  align-self: center;
  font-size: 1.5rem;
  color: #b3b3b3;
}
.cs3-goalflow .gf-final { background: #111; }
.cs3-goalflow .gf-final h3 { color: #fff; }
.cs3-goalflow .gf-final p { color: rgba(255,255,255,.8); }
@media (max-width: 860px) {
  .cs3-goalflow { grid-template-columns: 1fr; }
  .cs3-goalflow .gf-op { justify-self: center; transform: rotate(90deg); }
}

/* ---- Case Study 3: gamification formula (content x method -> goal) ---- */
.cs3-formula {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  margin: 48px 0 64px;
}
.cs3-formula .op {
  align-self: center;
  font-size: 1.6rem;
  color: #999;
}
.cs3-formula .fcard {
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.cs3-formula .k {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: #999;
  margin: 0 0 16px;
}
.cs3-formula .fcard h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.7;
  margin: 0;
}
/* content: solid dark block */
.cs3-formula .fc-content { background: #111; }
.cs3-formula .fc-content .k { color: rgba(255,255,255,.55); }
.cs3-formula .fc-content h3 { color: #fff; }
/* method: dashed exploration container with stacked chips */
.cs3-formula .fc-method {
  border: 2px dashed #c9c9c9;
  background: transparent;
}
.cs3-formula .fc-method .q {
  display: inline-block;
  margin-left: 8px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: .8rem;
  letter-spacing: 0;
}
.cs3-formula .fc-method h3 { margin-bottom: 16px; }
.cs3-formula .fc-method ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs3-formula .fc-method li {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
}
/* goal: light card, bold outcome */
.cs3-formula .fc-goal { background: var(--bg-alt, #f4f4f2); }
.cs3-formula .fc-goal .note {
  margin: 14px 0 0;
  font-size: .9rem;
  color: var(--muted, #777);
}
@media (max-width: 860px) {
  .cs3-formula { grid-template-columns: 1fr; }
  .cs3-formula .op { justify-self: center; }
}

/* ---- Case Study 3: solution content — text left, phone panel right ---- */
.cs3-content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 56px 0 64px;
}
.cs3-content-split .txt h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 18px;
}
.cs3-content-split .txt p {
  color: var(--muted, #555);
  line-height: 1.9;
  margin: 0 0 16px;
}
.cs3-content-split .txt ol {
  margin: 0;
  padding-left: 1.3em;
  color: var(--muted, #555);
  line-height: 2.1;
}
.cs3-qtypes {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 24px;
  padding: 36px 28px;
  display: flex;
  justify-content: center;
  gap: 32px;
}
.cs3-qtypes figure { margin: 0; text-align: center; }
.cs3-qtypes figcaption {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: #777;
  margin-bottom: 16px;
}
.cs3-qtypes img {
  width: min(190px, 26vw);
  display: block;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(17,17,17,.08);
}
@media (max-width: 860px) {
  .cs3-content-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .cs3-qtypes { flex-direction: column; align-items: center; gap: 36px; }
  .cs3-qtypes img { width: min(260px, 78vw); }
}

/* ---- Case Study 3: student psychology bubble map ---- */
.cs3-mind {
  position: relative;
  height: 560px;
  margin: 40px 0 64px;
  overflow: hidden;
  border-radius: 24px;
}
.cs3-mind .ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px dashed #ddd;
  border-radius: 50%;
}
.cs3-mind .ring.r1 { width: 460px; height: 460px; }
.cs3-mind .ring.r2 { width: 760px; height: 760px; }
.cs3-mind .core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  z-index: 2;
}
.cs3-mind .core svg { width: 44px; height: 44px; color: rgba(255,255,255,.85); }
.cs3-mind .core p { margin: 0; font-weight: 600; font-size: .98rem; }
.cs3-mind .bub {
  position: absolute;
  border-radius: 50%;
  background: var(--bg-alt, #f0f0ee);
  color: #111;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform .3s ease;
}
.cs3-mind .bub:hover { transform: scale(1.08); }
.cs3-mind .b1 { width: 150px; height: 150px; left: 14%; top: 12%; }
.cs3-mind .b2 { width: 128px; height: 128px; right: 6%; top: 34%; }
.cs3-mind .b3 { width: 138px; height: 138px; left: 5%; top: 54%; }
.cs3-mind .b4 { width: 96px;  height: 96px;  left: 29%; bottom: 6%;  font-size: .9rem; }
.cs3-mind .b5 { width: 156px; height: 156px; left: 57%; top: 4%; }
.cs3-mind .b6 { width: 104px; height: 104px; right: 13%; top: 6%; font-size: .9rem; }
.cs3-mind .b7 { width: 148px; height: 148px; right: 14%; bottom: 5%; }
.cs3-mind .dot {
  position: absolute;
  border-radius: 50%;
  background: #e6e6e3;
}
.cs3-mind .d1 { width: 22px; height: 22px; left: 42%; top: 9%; }
.cs3-mind .d2 { width: 14px; height: 14px; left: 12%; top: 40%; }
.cs3-mind .d3 { width: 18px; height: 18px; right: 8%; bottom: 22%; }
@media (max-width: 720px) {
  .cs3-mind { height: auto; overflow: visible; padding: 24px 0; }
  .cs3-mind .ring, .cs3-mind .dot { display: none; }
  .cs3-mind .core {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 18px;
    padding: 18px;
    flex-direction: row;
    margin-bottom: 16px;
  }
  .cs3-mind .core svg { width: 28px; height: 28px; }
  .cs3-mind .bub {
    position: static;
    width: auto !important;
    height: auto !important;
    border-radius: 999px;
    padding: 10px 18px;
    display: inline-flex;
    margin: 6px 8px 0 0;
  }
}

/* ---- Case Study 3: game genre comparison (4 columns, reference -> application) ---- */
.cs3-games {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 40px 0 64px;
}
.cs3-games .gcol {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cs3-games .pill {
  display: inline-block;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: 10px 26px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.cs3-games .gitem {
  width: 100%;
  background: var(--bg-alt, #f4f4f2);
  border-radius: 16px;
  padding: 14px;
}
.cs3-games .gitem .t {
  font-weight: 700;
  font-size: .95rem;
  margin: 2px 0 10px;
}
.cs3-games .gitem img {
  width: 100%;
  display: block;
  border-radius: 10px;
}
.cs3-games .garrow {
  font-size: 1.3rem;
  color: #b3b3b3;
  line-height: 1;
  padding: 12px 0;
}
@media (max-width: 960px) { .cs3-games { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }
@media (max-width: 560px) { .cs3-games { grid-template-columns: 1fr; } }

/* ---- Case Study 3: question-type phones inside the "学习内容" pane ---- */
.cs-panes .pane-qtypes {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
}
.cs-panes .pane-qtypes figure { margin: 0; text-align: center; }
.cs-panes .pane-qtypes figcaption {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: #777;
  margin-bottom: 12px;
}
.cs-panes .pane-qtypes img {
  width: min(170px, 22vw);
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(17,17,17,.1);
}
@media (max-width: 640px) {
  .cs-panes .pane-qtypes img { width: min(170px, 38vw); }
}

.cs-panes .pane-img {
  width: 100%;
  display: block;
  border-radius: 14px;
  margin-top: 20px;
  box-shadow: 0 10px 26px rgba(17,17,17,.1);
}

/* ---- Case Study 3: flow design — two panels (by stage / by role), vertical flows ---- */
.cs3-flows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin: 40px 0 64px;
}
.cs3-flows .flowpanel {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 24px;
  padding: 32px 28px;
}
.cs3-flows .flowpanel h4 {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.cs3-flows .flowpanel .d {
  text-align: center;
  font-size: .9rem;
  color: var(--muted, #777);
  margin: 0 0 24px;
}
.cs3-flows .lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cs3-flows .lane {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.cs3-flows .who {
  align-self: center;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 22px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.cs3-flows .step {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: .95rem;
}
.cs3-flows .step small {
  display: block;
  font-weight: 400;
  font-size: .8rem;
  color: var(--muted, #888);
  margin-top: 3px;
}
.cs3-flows .fa {
  color: #b3b3b3;
  font-size: 1rem;
  line-height: 1;
  padding: 8px 0;
}
@media (max-width: 960px) { .cs3-flows { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .cs3-flows .lanes { grid-template-columns: 1fr; } }

/* cross-lane connector: bottom of left flow -> top of right flow (dashed elbow) */
.cs3-flows .lanes { position: relative; padding-bottom: 30px; }
.cs3-flows .lk-v {
  position: absolute;
  left: 46%;
  right: 50%;
  top: 74px;
  bottom: 4px;
  border-right: 2px dashed #c4c4c4;
  border-bottom: 2px dashed #c4c4c4;
  border-bottom-right-radius: 12px;
  pointer-events: none;
}
.cs3-flows .lk-h {
  position: absolute;
  left: 50%;
  width: 10px;
  top: 74px;
  border-top: 2px dashed #c4c4c4;
  pointer-events: none;
}
.cs3-flows .lk-a {
  position: absolute;
  left: calc(50% + 9px);
  top: 75px;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #c4c4c4;
  pointer-events: none;
}
.cs3-flows .lk-t {
  position: absolute;
  left: calc(50% + 8px);
  top: 45%;
  font-size: .72rem;
  line-height: 1.5;
  color: #9a9a9a;
  pointer-events: none;
}
@media (max-width: 480px) {
  .cs3-flows .lk-v, .cs3-flows .lk-h, .cs3-flows .lk-a, .cs3-flows .lk-t { display: none; }
  .cs3-flows .lanes { padding-bottom: 0; }
}

/* flow panels restyled: alternating stadium pills + solid rounded connectors */
.cs3-flows .lane { align-items: center; }
.cs3-flows .step {
  width: fit-content;
  min-width: 62%;
  border-radius: 999px;
  padding: 10px 24px;
  background: #fff;
  border: 1.5px solid #e2e2df;
}
.cs3-flows .lane .step:nth-of-type(even) {
  background: #111;
  color: #fff;
  border-color: #111;
}
.cs3-flows .lane .step:nth-of-type(even) small { color: rgba(255,255,255,.65); }
.cs3-flows .fa {
  font-size: 0;
  padding: 0;
  width: 2px;
  height: 18px;
  background: #9c9c9c;
  position: relative;
  margin: 5px 0 10px;
}
.cs3-flows .fa::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #9c9c9c;
}
.cs3-flows .lanes { padding-bottom: 36px; }
.cs3-flows .lk-v {
  left: 25%;
  right: 50%;
  top: 74px;
  bottom: 0;
  border-right: 2px solid #9c9c9c;
  border-bottom: 2px solid #9c9c9c;
  border-bottom-right-radius: 16px;
}
.cs3-flows .lk-d {
  position: absolute;
  left: 25%;
  bottom: 0;
  width: 2px;
  height: 42px;
  border-left: 2px solid #9c9c9c;
  pointer-events: none;
}
.cs3-flows .lk-h {
  left: 50%;
  width: 14px;
  top: 74px;
  border-top: 2px solid #9c9c9c;
}
.cs3-flows .lk-a {
  left: calc(50% + 13px);
  top: 75px;
  border-left-color: #9c9c9c;
}
@media (max-width: 480px) { .cs3-flows .lk-d { display: none; } }

/* flow pills: all white (no dark fill); who chips outlined */
.cs3-flows .lane .step,
.cs3-flows .lane .step:nth-of-type(even) {
  background: #fff;
  color: inherit;
  border-color: #e2e2df;
}
.cs3-flows .lane .step:nth-of-type(even) small { color: var(--muted, #888); }
.cs3-flows .who {
  background: #fff;
  color: #111;
  border: 2px solid #111;
}
/* dashed branch links (conditional / optional paths) */
.cs3-flows .step.branch {
  border-style: dashed;
  border-color: #b5b5b5;
}
.cs3-flows .fa.dash {
  width: 0;
  background: none;
  border-left: 2px dashed #b0b0b0;
  position: relative;
}
.cs3-flows .fa.dash::after { border-top-color: #b0b0b0; left: -1px; }
.cs3-flows .fa.dash i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: .7rem;
  color: #9a9a9a;
  white-space: nowrap;
}
/* replay loop: 排行榜 -> 开始游戏 (dashed, along the lane's left side) */
.cs3-flows .lane { position: relative; }
.cs3-flows .loop {
  position: absolute;
  left: -18px;
  width: 18px;
  top: 63%;
  bottom: 4%;
  border: 2px dashed #b5b5b5;
  border-right: none;
  border-radius: 12px 0 0 12px;
  pointer-events: none;
}
.cs3-flows .loop::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -6px;
  border: 5px solid transparent;
  border-left-color: #b5b5b5;
}
@media (max-width: 480px) { .cs3-flows .loop { display: none; } }

/* flow diagram: compact pills + smoother, tighter connectors */
.cs3-flows .flowpanel { padding: 28px 24px 32px; }
.cs3-flows .step {
  min-width: 0;
  padding: 8px 18px;
  font-size: .88rem;
  line-height: 1.4;
}
.cs3-flows .step small { font-size: .74rem; margin-top: 2px; }
.cs3-flows .who {
  padding: 6px 18px;
  font-size: .85rem;
  margin-bottom: 14px;
}
.cs3-flows .fa { height: 14px; margin: 4px 0 9px; }
.cs3-flows .fa::after { border-width: 4px; bottom: -5px; }
.cs3-flows .lanes { padding-bottom: 0; }

/* cross-lane connector: out of the last pill's right side, up the middle, into the first step */
.cs3-flows .lk-d { display: none; }
.cs3-flows .lk-v {
  left: calc(25% + 46px);
  right: 50%;
  top: 64px;
  bottom: 20px;
  border: 0;
  border-right: 2px solid #9c9c9c;
  border-bottom: 2px solid #9c9c9c;
  border-bottom-right-radius: 18px;
}
.cs3-flows .lk-h {
  left: 50%;
  width: calc(25% - 58px);
  top: 64px;
  border-top: 2px solid #9c9c9c;
}
.cs3-flows .lk-a {
  left: calc(75% - 60px);
  top: 65px;
}
/* replay loop hugs the pills */
.cs3-flows .loop {
  left: -6px;
  right: calc(50% + 44px);
  width: auto;
  top: 63%;
  bottom: 4.5%;
  border-radius: 14px 0 0 14px;
}
.cs3-flows .loop::after { top: -5px; border-width: 4px; }

/* connector: rounded top corner (like reference) + darker lane-title chips */
.cs3-flows .lk-v { top: 80px; }
.cs3-flows .lk-h {
  height: 16px;
  top: 64px;
  border-top: 2px solid #9c9c9c;
  border-left: 2px solid #9c9c9c;
  border-top-left-radius: 14px;
  margin-left: -2px;
}
.cs3-flows .who {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ---- Case Study 3: strategy sub-blocks — text/media alternating ---- */
.cs3-strat {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin: 48px 0 72px;
}
.cs3-strat.rev .txt { order: 2; }
.cs3-strat.rev .media { order: 1; }
.cs3-strat .txt h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 14px;
}
.cs3-strat .txt h4 .n {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cs3-strat .txt > p { color: var(--muted, #555); margin: 0 0 18px; }
.cs3-strat .note {
  border: 1px solid #e4e4e1;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.cs3-strat .note .t {
  font-weight: 700;
  margin: 0 0 6px;
}
.cs3-strat .note p { margin: 0; color: var(--muted, #666); font-size: .93rem; line-height: 1.8; }
.cs3-strat .media {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 24px;
  padding: 32px 28px;
}
.cs3-strat .media .phone { width: 100%; display: block; }
.cs3-strat .thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.cs3-strat .thumbs.two { grid-template-columns: repeat(2, 1fr); }
.cs3-strat .thumbs figure { margin: 0; }
.cs3-strat .thumbs img { width: 100%; display: block; border-radius: 10px; }
.cs3-strat .thumbs figcaption {
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .cs3-strat { grid-template-columns: 1fr; gap: 28px; }
  .cs3-strat.rev .txt { order: 1; }
  .cs3-strat.rev .media { order: 2; }
}

/* strategy blocks restyled: no media panel, plain notes with dotted leader lines */
.cs3-strat .media {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.cs3-strat .note {
  border: none;
  border-radius: 0;
  padding: 0 0 0 72px;
  margin-bottom: 26px;
  position: relative;
}
.cs3-strat .note::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 54px;
  border-top: 2px dotted #a8a8a8;
}
.cs3-strat .note::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(.62em - 3px);
  width: 5px;
  height: 5px;
  background: #fff;
  border: 2px solid #8f8f8f;
  border-radius: 50%;
}
.cs3-strat .note .t::before {
  content: "";
  position: absolute;
  left: 54px;
  top: calc(.62em - 4px);
  border: 5px solid transparent;
  border-left-color: #8f8f8f;
}
/* when text is on the left (media right), mirror the leader to the right side */
.cs3-strat:not(.rev) .note { padding: 0 72px 0 0; }
.cs3-strat:not(.rev) .note::before { left: auto; right: 0; }
.cs3-strat:not(.rev) .note::after { left: auto; right: 0; }
.cs3-strat:not(.rev) .note .t::before {
  left: auto;
  right: 54px;
  border-left-color: transparent;
  border-right-color: #8f8f8f;
}
@media (max-width: 860px) {
  .cs3-strat .note, .cs3-strat:not(.rev) .note { padding: 0; }
  .cs3-strat .note::before, .cs3-strat .note::after, .cs3-strat .note .t::before { display: none; }
}

/* strategy block 1: phone left + note aligned to the wheel; thumbnails row spans below */
.cs3-strat .note.push { margin-top: 64px; }
.cs3-strat .thumbrow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 4px;
}
.cs3-strat .thumbrow .thumbs { margin-top: 0; }
.cs3-strat .thumbrow .note { margin-bottom: 0; }
@media (max-width: 860px) {
  .cs3-strat .thumbrow { grid-template-columns: 1fr; gap: 20px; }
  .cs3-strat .note.push { margin-top: 24px; }
}

/* strategy block: phone row on top, thumbnails row below; phone column wider */
.cs3-strat.rev { grid-template-columns: 1.15fr 0.85fr; }
.cs3-strat .thumbrow { order: 3; margin-top: 28px; }

/* strategy text top-aligned with the phone; notes sit lower like the reference */
.cs3-strat .txt { align-self: start; padding-top: 6px; }
.cs3-strat .note.push { margin-top: 130px; }
/* branched leader: one stem circle, vertical dotted line linking both notes */
.cs3-strat .notegroup { position: relative; margin-top: 34px; }
.cs3-strat .notegroup::before {
  content: "";
  position: absolute;
  left: 0;
  top: .9em;
  bottom: 44px;
  border-left: 2px dotted #a8a8a8;
}
.cs3-strat .notegroup .note:not(:first-child)::after { display: none; }
@media (max-width: 860px) { .cs3-strat .notegroup::before { display: none; } }

/* mirrored branch stem when text sits on the left */
.cs3-strat:not(.rev) .notegroup::before { left: auto; right: 0; }

/* block 1 (media-left variant): drop leader arrows; align row widths */
.cs3-strat.rev .note { padding-left: 0; }
.cs3-strat.rev .note::before,
.cs3-strat.rev .note::after,
.cs3-strat.rev .note .t::before { display: none; }
.cs3-strat .thumbrow {
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
}

/* tighter block spacing */
.cs3-strat { row-gap: 24px; margin: 40px 0 56px; }
.cs3-strat .thumbrow { margin-top: 0; }
.cs3-strat .note.push { margin-top: 56px; }
.cs3-strat .txt > p { margin-bottom: 12px; }

/* more air between the two strategy blocks */
.cs3-strat { margin: 48px 0 96px; }
/* block 2: no leader arrows at all; text vertically centered; tighter column gap */
.cs3-strat .note,
.cs3-strat:not(.rev) .note { padding: 0; }
.cs3-strat .note::before,
.cs3-strat .note::after,
.cs3-strat .note .t::before,
.cs3-strat .notegroup::before { display: none; }
.cs3-strat:not(.rev) { column-gap: 28px; }
.cs3-strat:not(.rev) .txt { align-self: center; padding-top: 0; }
.cs3-strat .notegroup { margin-top: 24px; }

/* ---- Case Study 3: strategy 2 — three cards left, heading right ---- */
.cs3-exp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin: 48px 0 96px;
}
.cs3-exp .card {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 18px;
}
.cs3-exp .card:last-child { margin-bottom: 0; }
.cs3-exp .card .k {
  font-weight: 700;
  margin: 0 0 8px;
}
.cs3-exp .card p { margin: 0; color: var(--muted, #666); font-size: .95rem; line-height: 1.9; }
.cs3-exp .txt h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px;
}
.cs3-exp .txt > p { color: var(--muted, #555); line-height: 1.9; margin: 0; }
@media (max-width: 860px) {
  .cs3-exp { grid-template-columns: 1fr; gap: 28px; }
  .cs3-exp .txt { order: -1; }
}

/* strategy 2: text left, cards right */
.cs3-exp .cards { order: 2; }
.cs3-exp .txt { order: 1; }
@media (max-width: 860px) { .cs3-exp .cards { order: 2; } .cs3-exp .txt { order: 1; } }

/* ---- Case Study 3: motivation framework — 4 icon cards ---- */
.cs3-motiv {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0 72px;
}
.cs3-motiv .mcard {
  background: var(--bg-alt, #f4f4f2);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
}
.cs3-motiv .mcard svg {
  width: 34px;
  height: 34px;
  color: #111;
  margin-bottom: 16px;
}
.cs3-motiv .mcard h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.cs3-motiv .mcard p {
  margin: 0;
  color: var(--muted, #666);
  font-size: .9rem;
  line-height: 1.8;
}
@media (max-width: 960px) { .cs3-motiv { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cs3-motiv { grid-template-columns: 1fr; } }

.cs3-motiv .mcard .en {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #999;
  margin: -4px 0 10px;
}

/* full-width three-thumb row with two-line captions (motivation showcase) */
.cs3-strat .thumbs3 {
  order: 3;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.cs3-strat .thumbs3 figure { margin: 0; }
.cs3-strat .thumbs3 img { width: 100%; display: block; border-radius: 12px; }
.cs3-strat .thumbs3 figcaption { margin-top: 12px; }
.cs3-strat .thumbs3 figcaption b {
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}
.cs3-strat .thumbs3 figcaption span {
  font-size: .85rem;
  color: var(--muted, #777);
}
@media (max-width: 640px) { .cs3-strat .thumbs3 { grid-template-columns: 1fr; } }

/* vertically center text against the phone in the motivation showcase */
.cs3-strat.center .txt { align-self: center; padding-top: 0; }
.cs3-strat.center .note.push { margin-top: 40px; }

/* cs3 — 制作游戏 flow panel */
.cs3-make { background: var(--bg-alt); border-radius: 24px; padding: 40px 44px 34px; margin: 48px 0 96px; }
.cs3-make .mk-label { font-weight: 700; font-size: 1.02rem; margin: 0 0 26px; }
.cs3-make .mk-flow { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 44px; align-items: center; }
.cs3-make figure { margin: 0; position: relative; }
.cs3-make figure img { width: 100%; display: block; border-radius: 10px; }
.cs3-make figcaption { text-align: center; font-size: .85rem; color: #444; margin-top: 10px; }
.cs3-make .dual { position: relative; display: grid; gap: 22px; }
.cs3-make .arr::after { content: ""; position: absolute; top: 50%; left: calc(100% + 8px); width: 24px; border-top: 2px dashed #9c9c9c; }
.cs3-make .arr::before { content: ""; position: absolute; top: 50%; left: calc(100% + 30px); transform: translateY(-4px); border: 4px solid transparent; border-left: 7px solid #9c9c9c; border-right: 0; }
.cs3-make .mk-notes { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 40px; }
.cs3-make .mk-notes p { margin: 0; text-align: center; font-weight: 600; font-size: .95rem; line-height: 2; }
.cs3-make .mk-notes p + p { border-left: 1px dashed #c5c5c5; }
@media (max-width: 760px) {
  .cs3-make { padding: 28px 22px; }
  .cs3-make .mk-flow { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .cs3-make .arr::after, .cs3-make .arr::before { display: none; }
  .cs3-make .mk-notes { grid-template-columns: 1fr; gap: 14px; }
  .cs3-make .mk-notes p + p { border-left: 0; }
}

.cs3-strat.solo { display: block; margin: 96px 0 0; }
.cs3-make { margin-top: 32px; }

.cs3-make.img { background: none; border-radius: 0; padding: 0; }
.cs3-make.img img { width: 100%; display: block; }

/* cs3 — 奖励机制 即时反馈 */
.cs3-fb { margin: 32px 0 96px; }
.cs3-fb .fb-label { font-weight: 700; font-size: .98rem; margin: 0 0 14px; }
.cs3-fb .fb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cs3-fb .fb-grid img { width: 100%; display: block; border-radius: 12px; }
.cs3-fb .fb-grid.second { margin-top: 44px; }
.cs3-fb .fb-note { align-self: center; margin: 34px 0 0; font-weight: 600; font-size: .98rem; line-height: 2; }
@media (max-width: 760px) {
  .cs3-fb .fb-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cs3-fb .fb-note { margin: 0; }
}

/* cs3 — 策略三 排行榜 */
.cs3-strat .thumbs3.four { grid-template-columns: repeat(4, 1fr); }
.cs3-strat .thumbs3 .rk-label { grid-column: 1 / -1; font-weight: 700; font-size: .98rem; margin: 8px 0 0; }

.cs3-stitle { font-size: 1.25rem; font-weight: 700; margin: 48px 0 14px; }

/* cs3 — 细分策略 阶段/目标/策略 */
.cs3-seg { margin: 40px 0 96px; }
.cs3-seg .sg-row { display: grid; grid-template-columns: 64px 1fr 1fr 1fr; column-gap: 36px; align-items: center; }
.cs3-seg .sg-side { font-weight: 700; margin: 0; }
.cs3-seg .sg-pill { background: #111; color: #fff; border-radius: 999px; padding: 11px 0; text-align: center; font-weight: 600; width: min(220px, 80%); justify-self: center; margin: 0; }
.cs3-seg .sg-goal { text-align: center; font-weight: 600; margin: 0; }
.cs3-seg .sg-a { justify-self: center; position: relative; height: 40px; border-left: 2px dashed #9c9c9c; margin: 8px 0; }
.cs3-seg .sg-a::after { content: ""; position: absolute; left: -5px; bottom: -6px; border: 4px solid transparent; border-top: 6px solid #9c9c9c; border-bottom: 0; }
.cs3-seg img { width: 100%; display: block; border-radius: 12px; }
@media (max-width: 760px) {
  .cs3-seg .sg-row { grid-template-columns: 44px 1fr 1fr 1fr; column-gap: 12px; }
  .cs3-seg .sg-side { font-size: .85rem; }
  .cs3-seg .sg-pill, .cs3-seg .sg-goal { font-size: .82rem; }
  .cs3-seg .sg-a { height: 24px; }
}

/* cs3 — 数据表现 */
.cs-stats.four { grid-template-columns: repeat(4, 1fr); }
.cs3-stat-notes { margin: 56px 0 0; padding-left: 20px; }
.cs3-stat-notes li { color: var(--muted, #555); line-height: 2.1; }
@media (max-width: 700px) { .cs-stats.four { grid-template-columns: 1fr 1fr; } }

/* cs3 — 用户反馈 双语对照 可滚动 */
.cs3-voice { max-height: 640px; overflow-y: auto; background: var(--bg-alt); border-radius: 20px; padding: 32px 36px; margin: 40px 0 96px; }
.cs3-voice .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.cs3-voice .pair + .pair { margin-top: 40px; padding-top: 40px; border-top: 1px dashed #d8d8d8; }
.cs3-voice .chat { display: flex; flex-direction: column; gap: 10px; }
.cs3-voice .chat .m { max-width: 88%; padding: 10px 14px; border-radius: 12px; background: #fff; align-self: flex-start; font-size: .82rem; line-height: 1.75; margin: 0; }
.cs3-voice .chat .m.me { background: #dbe9fb; align-self: flex-end; }
.cs3-voice .pair img { width: 100%; display: block; border-radius: 12px; }
@media (max-width: 860px) {
  .cs3-voice { padding: 20px; max-height: 520px; }
  .cs3-voice .pair { grid-template-columns: 1fr; gap: 18px; }
}

.cs3-voice .chat mark { background: #d5efd6; color: inherit; padding: 0 2px; border-radius: 3px; }

/* cs3 — Before/After 动机循环 */
.cs3-ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; margin: 40px 0 96px; }
.cs3-ba .panel { background: var(--bg-alt); border-radius: 24px; padding: 34px 26px 30px; }
.cs3-ba .bt { text-align: center; font-weight: 700; font-size: 1.05rem; margin: 0 0 20px; }
.cs3-ba .cycle { position: relative; width: min(330px, 100%); aspect-ratio: 1 / 1; margin: 0 auto; }
.cs3-ba .c { position: absolute; width: 116px; height: 116px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .95rem; box-shadow: 0 8px 22px rgba(17,17,17,.06); }
.cs3-ba .c.top { left: 50%; top: 0; transform: translateX(-50%); }
.cs3-ba .c.right { right: 0; top: 50%; transform: translateY(-50%); }
.cs3-ba .c.bottom { left: 50%; bottom: 0; transform: translateX(-50%); }
.cs3-ba .c.left { left: 0; top: 50%; transform: translateY(-50%); }
.cs3-ba .c.dark { background: #8a8a8a; color: #fff; }
.cs3-ba .panel.after .c.dark { background: #111; }
.cs3-ba .ar { position: absolute; width: 13px; height: 13px; border-top: 3px solid #c4c4c4; border-right: 3px solid #c4c4c4; border-radius: 2px; }
.cs3-ba .panel.after .ar { border-color: #111; }
.cs3-ba .ar.a1 { left: 66%; top: 27%; transform: rotate(90deg); }
.cs3-ba .ar.a2 { left: 66%; top: 66%; transform: rotate(180deg); }
.cs3-ba .ar.a3 { left: 27%; top: 66%; transform: rotate(270deg); }
.cs3-ba .ar.a4 { left: 27%; top: 27%; transform: rotate(0deg); }
.cs3-ba .bl { text-align: center; margin: 24px 0 0; font-size: 1.15rem; font-weight: 600; }
.cs3-ba .bl b { font-size: 1.65rem; font-weight: 800; }
.cs3-ba .vs { font-weight: 700; letter-spacing: 3px; margin: 0; }
@media (max-width: 860px) { .cs3-ba { grid-template-columns: 1fr; } .cs3-ba .vs { text-align: center; } }

/* cs3 — 思考总结卡片 */
.cs3-learn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 40px 0 96px; }
.cs3-learn .card { background: var(--bg-alt); border-radius: 20px; padding: 42px 32px; text-align: center; }
.cs3-learn .card svg { width: 34px; height: 34px; margin-bottom: 18px; }
.cs3-learn .card h4 { font-size: 1.08rem; margin: 0 0 12px; }
.cs3-learn .card p { color: var(--muted, #555); font-size: .95rem; line-height: 1.9; margin: 0; }
@media (max-width: 860px) { .cs3-learn { grid-template-columns: 1fr; } }
