/* ============================================
   CASE STUDY STYLES — Rachel Chen Style
   Clean narrative flow with right-side navigation
   ============================================ */

/* Case Study Layout */
.case-study {
  padding: 100px 32px 0;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

/* Back Link */
.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

/* Side Navigation */
.case-sidenav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 100;
}

.sidenav-link {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  padding: 3px 0;
  transition: color 0.2s, transform 0.2s;
  opacity: 0.5;
}

.sidenav-link:hover {
  color: var(--text);
  opacity: 1;
}

.sidenav-link.active {
  color: var(--text);
  font-weight: 500;
  opacity: 1;
}

/* Hero */
.case-hero {
  margin-bottom: 60px;
}

/* Client Logo */
.case-logo {
  margin-bottom: 24px;
  width: 10%;
  height:auto;
}


.case-eyebrow {
  font-size: 14px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 16px;
}

.case-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 48px;
}

/* Meta */
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.meta-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Sections */
.case-section {
  margin-bottom: 80px;
  scroll-margin-top: 120px;
}

.section-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-bottom: 16px;
}

.case-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 20px;
}

.case-section h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text);
}

.case-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Solution Grid */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.solution-card {
  text-align: center;
}

.solution-video {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-card);
}

.solution-video img {
  width: 100%;
  display: block;
}

.solution-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.solution-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Outcomes */
.outcomes-intro {
  margin-bottom: 32px;
}

.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: 12px;
}

.outcome-stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* Pain Points */
.pain-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.pain-card {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pain-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.pain-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.pain-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Key Insight Box */
.key-insight {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 3px solid var(--text);
  margin-top: 32px;
}

.insight-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.key-insight p {
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  margin: 0;
  color: var(--text);
}

/* Research Images */
.research-img {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}

.research-img img {
  width: 100%;
  display: block;
}

/* Quote */
.case-quote {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 40px 0;
  color: var(--text);
}

.quote-attr {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Insights Grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.insight-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.insight-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.insight-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.insight-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* HMW Statement */
.hmw-statement {
  padding: 40px;
  background: var(--bg-card);
  border-radius: 12px;
  text-align: center;
  margin-top: 40px;
}

.hmw-statement h3 {
  margin: 0;
  font-size: 22px;
}

/* Full Width Images */
.case-img-full {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
}

.case-img-full img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  border-radius: 20px;

}

.case-img-full.wide img {
  max-height: none;
}

.case-img-full .annotation {
  text-align: center;
  max-width: 560px;
  margin-top: 0;
}

/* Process Timeline */
.process-timeline {
  margin-top: 40px;
}

.process-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.process-step:last-child {
  border-bottom: none;
}

.process-step:nth-child(even) {
  direction: rtl;
}

.process-step:nth-child(even) > * {
  direction: ltr;
}

.process-img {
  border-radius: 8px;
  overflow: hidden;
}

.process-img img {
  width: 100%;
  display: block;
}

.process-info h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.process-info p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Finals Grid */
.finals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.final-screen img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.final-screen span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Learnings */
.learnings {
  margin-top: 32px;
}

.learning-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.learning-item:first-child {
  border-top: 1px solid var(--border);
}

.learning-item h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.learning-item p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Thank You */
.case-thanks {
  max-width: 300px;
  margin: 60px auto;
  text-align: center;
}

.case-thanks img {
  max-width: 100%;
}

/* Visual Identity Carousel */
.visual-carousel {
  position: relative;
  margin: 40px 0;
  overflow: hidden;
  border-radius: 12px;
}

.visual-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.visual-slide {
  flex-shrink: 0;
  width: 100%;
  position: relative;
}

.visual-slide img {
  width: 100%;
  display: block;
}

.visual-slide-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

body.dark .visual-slide-label {
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
}

.carousel-nav {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

body.dark .carousel-dot {
  background: rgba(255, 255, 255, 0.3);
}

body.dark .carousel-dot.active {
  background: #fff;
}

/* Annotated Screens - Dark Mode */
.annotated-screen {
  position: relative;
}

.annotated-screen img {
  width: 100%;
  border-radius: 8px;
}

/* Dark mode: invert annotations to white on black */
body.dark .final-screen img,
body.dark .annotated-screen img {
  /* Keep images normal, but apply filter to annotation overlays if needed */
}

/* If using SVG or overlay annotations */
.screen-annotation {
  color: var(--text);
  stroke: var(--text);
}

body.dark .screen-annotation {
  color: #fff;
  stroke: #fff;
}

/* Navigation */
.case-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.case-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.2s;
}

.case-nav-link:hover {
  opacity: 0.6;
}

.case-nav-link.prev {
  align-items: flex-start;
}

.case-nav-link.next {
  align-items: flex-end;
}

.case-nav-link.all {
  font-size: 13px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s;
}

.case-nav-link.all:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  opacity: 1;
}

.nav-dir {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
  .case-sidenav {
    display: none;
  }
}

/* ============================================
   BEATDROP SPECIFIC STYLES
   ============================================ */

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.overview-item {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.overview-item h4 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.overview-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Opportunity Grid */
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.opp-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.opp-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.opp-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.2s;
}

.cta-btn:not(.secondary) {
  background: var(--text);
  color: var(--bg);
}

.cta-btn:not(.secondary):hover {
  opacity: 0.85;
}

.cta-btn.secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.cta-btn.secondary:hover {
  background: var(--bg-card);
}

/* Magic Moment Section */
.magic-moment-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.magic-text h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
}

.magic-text p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.magic-image {
  display: flex;
  justify-content: center;
}

.magic-image img {
  max-width: 280px;
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  object-position: center;
}

/* Flow Cards */
.flow-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.flow-card:last-of-type {
  border-bottom: none;
}

.flow-card.reverse {
  direction: rtl;
}

.flow-card.reverse > * {
  direction: ltr;
}

.flow-media {
  max-width: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flow-media img {
  width: 100%;
  border-radius: 12px;
  max-height: 400px;
  object-fit: contain;
}

/* Phone frame — hugs the image naturally, no cropping */
.flow-media.phone-frame {
  /* Size to image content, not a fixed box */
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  max-width: 240px;
  padding: 10px 6px 14px;    /* top bezel, side bezel, bottom bezel */
  background: linear-gradient(160deg, #2c2c2e 0%, #1c1c1e 100%);
  border-radius: 40px;
  box-shadow:
    0 0 0 1.5px #3a3a3c,
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 20px 48px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

/* Dynamic Island notch */
.flow-media.phone-frame::before {
  content: '';
  display: block;
  width: 72px;
  height: 20px;
  background: #1c1c1e;
  border-radius: 0 0 14px 14px;
  margin-bottom: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Image fills width, height follows naturally — no cropping */
.flow-media.phone-frame img {
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 2px;
  object-fit: contain;
  display: block;
}

/* Wide view for TV + phone combo - no crop */
.flow-media.no-bg-wide {
  width: 100%;
  max-width: 500px;
  height: auto;
  overflow: visible;
  border-radius: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.flow-media.no-bg-wide img {
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 8px;
}

/* Light/Dark mode image switching */
.light-only {
  display: block;
}

.dark-only {
  display: none;
}

body.dark .light-only {
  display: none;
}

body.dark .dark-only {
  display: block;
}

/* Magic moment image with phone frame */
.magic-image {
  width: 220px;
  padding: 4px;
  background: #1a1a1a;
  border-radius: 32px;
  box-shadow: 
    0 0 0 1px #333,
    0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
}

.magic-image img {
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 28px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Annotations */
.annotated-img {
  margin: 32px 0;
  text-align: center;
}

.annotated-img img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
}

.annotation {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

/* Wraps phone frame + annotation — centers annotation under the image */
.flow-media-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.flow-media-wrap .annotation {
  width: 100%;
  max-width: 240px;
  margin-top: 0;
  text-align: center;
}

/* Flow annotation label */
.flow-media {
  position: relative;
}

.flow-annotation {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Memory Grid - side by side phones */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  margin-top: 40px;
  justify-items: center;
}

.memory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.memory-item .annotation {
  max-width: 220px;
  text-align: center;
}

/* Solution video cards (legacy support) */
.solution-video {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: transparent;
}

.solution-video img {
  width: 100%;
  display: block;
  border-radius: 24px;
  max-width: 240px;
  margin: 0 auto;
}

.flow-text h4 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 12px;
}

.flow-text p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 12px;
  margin: 32px 0;
}

.stats-row .stat-item {
  text-align: center;
}

.stats-row .stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 8px;
}

.stats-row .stat-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Quotes Grid */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.user-quote {
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 3px solid var(--text);
  margin: 0;
}

.user-quote span {
  display: block;
  font-size: 13px;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Prototype Grid */
.prototype-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.proto-card {
  text-align: center;
}

.proto-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

.proto-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.proto-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* Beyond Grid */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.beyond-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.beyond-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.beyond-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Impact Metrics */
.impact-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.metric {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
}

.metric-arrow {
  display: block;
  font-size: 32px;
  font-weight: 500;
  color: #22c55e;
  margin-bottom: 8px;
}

.metric-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.metric p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* Future Grid */
.future-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.future-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.future-item h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.future-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Research Image */
.research-img {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}

.research-img img {
  width: 100%;
  display: block;
}

/* Responsive for BeatDrop */
@media (max-width: 900px) {
  .overview-grid,
  .opportunity-grid,
  .beyond-grid,
  .future-grid,
  .impact-metrics,
  .prototype-grid,
  .quotes-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .flow-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .flow-card.reverse {
    direction: ltr;
  }
  
  .flow-media {
    max-width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .flow-media.phone-frame {
    max-width: 180px;
  }
  
  .flow-media.no-bg-wide {
    max-width: 100%;
  }
  
  .magic-moment-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .magic-image {
    order: -1;
    width: 200px;
    margin: 0 auto;
  }
  
  .memory-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .case-meta {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .solution-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .outcomes-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .pain-points {
    grid-template-columns: 1fr;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
  }
  
  .process-step {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .process-step:nth-child(even) {
    direction: ltr;
  }
  
  .finals-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-study {
    padding: 80px 20px 0;
  }
  
  .case-title {
    font-size: 28px;
  }
  
  .case-meta {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .case-section {
    margin-bottom: 60px;
  }
  
  .case-section h2 {
    font-size: 24px;
  }
  
  .stat-num {
    font-size: 36px;
  }
  
  .hmw-statement {
    padding: 24px;
  }
  
  .hmw-statement h3 {
    font-size: 18px;
  }
  
  .case-nav {
    flex-direction: column;
    gap: 24px;
  }
  
  .case-nav-link.prev,
  .case-nav-link.next {
    align-items: center;
  }
}

/* ============================================
   DOCUMENTATION SECTIONS (Montage)
   ============================================ */
.doc-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  position: relative;
}

.doc-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.doc-card h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 10px;
}

.doc-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Quote Block */
.quote-block {
  background: var(--bg-card);
  border-left: 3px solid var(--text);
  padding: 32px;
  margin: 40px 0;
  border-radius: 0 12px 12px 0;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 16px;
}

.quote-author {
  font-size: 14px;
  color: var(--text-muted);
}

/* Final Quote */
.final-quote {
  text-align: center;
  padding: 60px 40px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
}

.final-quote p {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 28px);
  font-style: italic;
  line-height: 1.4;
  max-width: 500px;
  margin: 0 auto 16px;
}

.final-quote span {
  font-size: 14px;
  color: var(--text-muted);
}

/* Reflection Grid */
.reflection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.reflection-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.reflection-card h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
}

.reflection-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Code styling */
code {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Responsive for doc sections */
@media (max-width: 768px) {
  .doc-sections {
    grid-template-columns: 1fr;
  }
  
  .reflection-grid {
    grid-template-columns: 1fr;
  }
  
  .final-quote {
    padding: 40px 20px;
  }
}
/* ============================================
   NARRATIVE STYLE — Rachel Chen-inspired
   ============================================ */

/* Outcome strip — 3 big numbers in a row */
.outcome-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin: 48px 0;
}

.outcome-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 32px 28px;
  border-right: 1px solid var(--border);
}

.outcome-item:last-child {
  border-right: none;
}

.outcome-num {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

.outcome-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Narrative list — styled prose bullets */
.narrative-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.narrative-list li {
  padding-left: 20px;
  position: relative;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  border-left: 2px solid var(--border);
  padding-left: 20px;
}

.narrative-list li strong {
  color: var(--text);
}

/* Process steps — numbered with text beside */
.process-step {
  display: grid;
  grid-template-columns: 48px 1fr !important;
  gap: 28px !important;
  align-items: flex-start !important;
  padding: 36px 0 !important;
  border-bottom: 1px solid var(--border) !important;
  direction: ltr !important;
}

.process-step:last-child {
  border-bottom: none !important;
}

/* Override the even-reverse from old CSS */
.process-step:nth-child(even) {
  direction: ltr !important;
}
.process-step:nth-child(even) > * {
  direction: ltr !important;
}

.process-num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 400;
  padding-top: 3px;
  flex-shrink: 0;
}

.process-body h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.process-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
}

.process-body code {
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text);
}

@media (max-width: 640px) {
  .outcome-strip { grid-template-columns: 1fr; }
  .outcome-item { border-right: none; border-bottom: 1px solid var(--border); }
  .outcome-item:last-child { border-bottom: none; }
  .process-step { grid-template-columns: 36px 1fr !important; gap: 16px !important; }
  .process-num { font-size: 18px; }
}
/* Approach grid — 3 column strategy overview */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 32px 0 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.approach-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.approach-item p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .approach-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================
   QUOTE CARD — pull quote style
   ============================================ */
.quote-card {
  margin: 48px 0;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.quote-card p {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.5vw, 24px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 16px;
}

.quote-card p::before { content: '\201C'; }
.quote-card p::after  { content: '\201D'; }

.quote-card span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
  letter-spacing: 0.02em;
}
/* ============================================
   GIF FRAME — no notch/padding, just a border
   for GIFs that already contain phone chrome
   ============================================ */

/* ============================================
   GIF FRAME — for GIFs with phone chrome drawn
   inside the image. No padding, no notch.
   ============================================ */
.flow-media.gif-frame {
  width: 240px;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.flow-media.gif-frame {
  border: 8px solid #1c1c1e;
  box-shadow:
    0 0 0 1px #3a3a3c,
    0 10px 40px rgba(0,0,0,0.35);
}

/* Crop using transform instead of guessing width/height */
.flow-media.gif-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18) translateY(0);
  transform-origin: center;
}

/* ============================================
   SCREEN TABS — Final Designs
   ============================================ */
.screen-tabs-wrap {
  margin-top: 32px;
}

/* Tab row — sits above panel, active tab merges into it */
.screen-tabs {
  display: flex;
  gap: 4px;
  padding: 0 2px;
  border-bottom: none;         /* we'll use panel border instead */
  overflow-x: auto;
  scrollbar-width: none;
  align-items: flex-end;       /* tabs grow downward from top, flush at bottom */
}
.screen-tabs::-webkit-scrollbar { display: none; }

.screen-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  position: relative;
  bottom: -1px;               /* sit slightly below so active tab seals the gap */
}

.screen-tab:hover {
  color: var(--text);
  background: var(--bg-card);
}

/* Active tab: same bg as panel, no bottom border — visually connected */
.screen-tab.active {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-card);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg-card);  /* erases the panel top border */
  z-index: 2;
}

/* Panel — border wraps all 4 sides, top-left corner only if first tab active */
.screen-panel {
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}

.screen-panel.active {
  display: flex;
}

.screen-panel img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 260px);
  object-fit: contain;
  object-position: top;
  display: block;
  background: var(--bg-card);
}

/* Caption bar below image */
.screen-caption {
  padding: 14px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin: 0;
  background: var(--bg);
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.screen-caption strong {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .screen-tab { padding: 8px 12px; font-size: 11px; }
  .screen-caption { flex-direction: column; gap: 4px; padding: 12px 16px; }
  .flow-media.gif-frame { width: 180px; }
}

.pp-main {
  padding: 5rem 2rem; /* Increased from 3rem */
}
.how-section {
  padding: 6rem 0; /* Increased for better visual separation */
}