/* case.css — inherits reset, html/body from style.css */

/* ── BACK LINK ── */
.case-back {
  position: fixed;
  top: 56px;
  left: 40px;
  z-index: 200;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(240, 240, 245, 0.2);
  border-radius: 999px;
  background: rgba(8, 8, 15, 0.4);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease;
}
.case-back:hover { border-color: rgba(240, 240, 245, 0.5); }

/* ── SCROLL SPACE (phases 1 + 2) ── */
.case-scroll-space {
  position: relative;
  /* height set by JS: HERO_ZONE + INTRO_ZONE + VH */
}

.case-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ── HERO ── */
.case-hero {
  position: absolute;
  inset: 0;
  background: var(--color-black);
  overflow: hidden;
}

/* Each column: absolutely positioned strip, transforms driven by JS */
.case-col {
  position: absolute;
  top: 0;
  width: 680px;
  will-change: transform;
  pointer-events: none;
}

#caseCol1 { left: calc(50% - 1052px); }
#caseCol2 { left: calc(50% - 340px); }
#caseCol3 { left: calc(50% + 380px); }

.case-img-block {
  position: absolute;
  top: var(--case-image-top);
  height: var(--case-image-height);
  width: 680px;
  overflow: hidden;
  opacity: 0;
}

@keyframes caseBlockFadeIn {
  to { opacity: 1; }
}

.case-img-block.is-revealed {
  animation: caseBlockFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .case-img-block { opacity: 1; }
}

.case-img-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--case-image-fit, cover);
  object-position: var(--case-image-position, center);
  display: block;
}

/* ── INTRO WRAP ── */
.case-intro-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: var(--surface-page);
  transform: translateY(100%);
  will-change: transform, padding;
}

.case-intro-card {
  width: 100%;
  height: 549px;
  background: var(--color-black);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: border-radius;
}

.case-intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.case-intro-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 80px 56px 75px;
}

.case-intro-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.case-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: 1px solid var(--color-neutral-400);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-white);
  white-space: nowrap;
}

.case-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -1.5px;
  color: var(--color-white);
  text-align: center;
}

.case-intro-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 0;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(240,240,245,0) 0%, rgba(240,240,245,0.06) 50%, rgba(240,240,245,0) 100%) 1;
  flex-shrink: 0;
}

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

.case-meta-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--color-neutral-400);
}

.case-meta-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.2px;
  color: var(--color-white);
}

/* ── CASE BODY ── */
.case-body {
  background: var(--surface-page);
  position: relative;
  z-index: 1;
}

/* ── SECTIONS ── */
.case-section {
  padding: 104px max(264px, calc((100% - 912px) / 2));
}

.case-section--light {
  background: var(--surface-page);
}

.case-section--dark {
  background: var(--color-black);
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* Header row: section label + body text */
.case-section-inner {
  display: flex;
  gap: 152px;
  align-items: flex-start;
  width: 100%;
}

/* Plain text section label (replaces pill badge) */
.case-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  line-height: normal;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--color-neutral-400);
  white-space: nowrap;
  width: 80px;
  flex-shrink: 0;
}

.case-section-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.case-section-text--tight { gap: 16px; }
.case-section-text--compact { gap: 24px; }
.case-section-text--spacious { gap: 40px; }

.case-cols--spacious { gap: 48px; }

.case-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-body-text {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--color-black);
  margin: 0;
}
.case-body-text--light { color: var(--color-white); }
.case-emphasis { color: var(--color-white); }
.case-muted { color: var(--color-neutral-400); }
.case-quote { font-style: italic; }

/* ── IMAGES ── */
.case-images {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.case-img-wrap {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.case-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.case-img-wrap--layered {
  position: relative;
  background: var(--color-white);
}

.case-img-layer {
  position: absolute;
  inset: 4% 16%;
  width: 68%;
  height: 92%;
  object-fit: contain;
}

/* ── CARDS ── */
.case-card {
  background: var(--color-neutral-900);
  border: 1px solid rgba(61, 61, 96, 0.25);
  border-radius: 20px;
  padding: 24px;
  overflow: hidden;
}

.case-card-sm-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--color-neutral-400);
  margin: 0 0 16px;
}

.case-card-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-white);
  margin: 0 0 8px;
}

/* Two-column layout for card pairs */
.case-cols {
  display: flex;
  gap: 16px;
  width: 100%;
}
.case-cols > * { flex: 1 1 0; min-width: 0; }

/* Muted text variant for dark sections */
.case-body-text--muted { color: var(--color-neutral-400); }

/* ── METRICS GRID ── */
.case-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.case-metric {
  background: var(--color-black);
  border: 1px solid var(--case-card-border);
  border-radius: 16px;
  padding: 25px 27px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-metric-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 1.05px;
  text-transform: uppercase;
  color: var(--color-neutral-400);
  margin: 0;
}

.case-metric-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -1px;
  color: var(--color-white);
  margin: 0;
}

.case-metric-sub {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-neutral-400);
  margin: 0;
}

/* ── RESULT HIGHLIGHT ── */
.case-result-highlight {
  background: var(--color-neutral-900);
  border: 1px solid rgba(61, 61, 96, 0.25);
  border-radius: 14px;
  padding: 25px 29px;
  display: flex;
  gap: 24px;
  align-items: center;
  width: 100%;
}

.case-result-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -1.5px;
  color: var(--color-blue-400);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

/* ── MARKETING STATS ── */
.case-stats-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.case-stats-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--color-neutral-400);
  margin: 0;
}

.case-stats {
  display: flex;
  gap: 11px;
  width: 100%;
}

.case-stat {
  background: var(--case-card-surface);
  border: 1px solid var(--case-card-border);
  border-radius: 10px;
  padding: 21px 23px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.3px;
  color: var(--color-white);
  margin: 0;
}

.case-stat-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-neutral-400);
  margin: 0;
}

/* ── REFLECTIONS ── */
.case-reflections {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.case-reflection-item {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-neutral-900);
}

.case-reflection-item:first-child { padding-top: 0; }
.case-reflection-item:last-child { border-bottom: none; padding-bottom: 0; }

.case-reflection-num {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 28px;
  color: var(--color-neutral-600);
  flex-shrink: 0;
  white-space: nowrap;
}

/* contact-section e site-footer vêm do style.css */
.contact-section { padding-top: 32px; }
.footer-nav a:hover { color: var(--color-black); }
.footer-copy { font-size: 14px; color: var(--color-neutral-400); }

/* ── MOBILE ── */
@media (max-width: 767px) {
  .case-back { top: 16px; left: 16px; }

  .case-scroll-space { height: auto !important; }
  .case-sticky {
    position: relative;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }
  .case-hero {
    position: sticky;
    top: 0;
    height: 55svh;
    overflow: hidden;
    z-index: 0;
  }
  .case-col        { will-change: auto; }
  .case-intro-wrap { will-change: auto; }
  .case-intro-card { will-change: auto; }
  #caseCol3 { display: none; }
  #caseCol1 {
    left: 0;
    width: 50%;
  }
  #caseCol2 {
    left: 50%;
    transform: none !important;
    width: 50%;
  }
  #caseCol1 .case-img-block,
  #caseCol2 .case-img-block {
    width: 100%;
  }
  .case-intro-wrap {
    position: relative;
    bottom: auto;
    transform: none !important;
    padding: 0 !important;
    background: var(--color-black);
    z-index: 1;
  }
  .case-intro-card {
    border-radius: 0;
    height: auto;
  }
  .case-intro-inner { padding: 64px 24px 48px; justify-content: flex-start; }
  .case-title { font-size: 32px; line-height: 40px; }
  .case-intro-meta { flex-direction: column; gap: 24px; }

  .case-section { padding: 64px 24px; }
  .case-section--dark { gap: 40px; }
  .case-section-inner { flex-direction: column; gap: 24px; }
  .case-images { gap: 16px; }
  .case-img-wrap { border-radius: 10px; }

  .case-cols { flex-direction: column; }
  .case-cols > * { flex: none; width: 100%; }
  .case-metrics { grid-template-columns: 1fr; }
  .case-stats { flex-direction: column; }
  .case-result-highlight { flex-direction: column; gap: 12px; }
  .case-result-big { font-size: 36px; line-height: 44px; }

  .case-body-text { font-size: 16px; line-height: 26px; }
  .case-metric-value { font-size: 28px; line-height: 36px; }
  .case-stat-value { font-size: 20px; line-height: 28px; }
  .case-meta-value { font-size: 17px; line-height: 24px; }
  .case-chip { font-size: 13px; padding: 10px 20px; }
  .case-label { width: auto; white-space: normal; }
  .case-intro-meta { padding: 24px 0; }
}

/* ── SECTION MEDIA (full-width image/video below text) ── */
.case-section-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.case-video-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--case-card-surface-deep);
}

.case-video-wrap video {
  width: 100%;
  height: auto;
  display: block;
}

/* ── 2×2 IMAGE GRID (awareness section) ── */
.case-img-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.case-img-grid-row {
  display: flex;
  gap: 16px;
}

.case-img-grid-row img {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 448 / 680;
  display: block;
  width: 0;
}

@media (max-width: 767px) {
  .case-img-grid-row { flex-direction: column; }
  .case-img-grid-row img { width: 100%; aspect-ratio: 4 / 5; }
  .case-section-img { border-radius: 10px; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .case-intro-wrap { transform: none !important; }
  .case-col { transform: none !important; }
}

/* ── PLAYGROUND PAGE (prefixo play- — pg- é do PasswordGate) ── */
.play-hero {
  min-height: 100svh;
  padding: var(--space-14) var(--page-gutter) var(--space-10);
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  overflow: hidden;
}

.play-hero-top {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-subtle);
}

.play-lockup {
  position: relative;
  flex: 1;
  width: min(100%, var(--layout-max));
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.play-title {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-display-xl);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--text-primary);
  pointer-events: none;
}

.play-title span:last-child {
  align-self: flex-end;
}

.play-piece {
  min-width: 0;
  margin: 0;
}

.play-piece--hero {
  position: absolute;
  z-index: 1;
  width: min(46vw, 580px);
  transform: rotate(-2deg);
  opacity: 0;
  animation: playHeroPieceIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes playHeroPieceIn {
  from { opacity: 0; transform: translateY(var(--space-8)) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

.play-media {
  width: 100%;
  border-radius: var(--radius-image);
  overflow: hidden;
  background: var(--case-card-surface-deep);
}

.play-media--square {
  aspect-ratio: 1;
}

.play-media img,
.play-media video {
  display: block;
  width: 100%;
  height: auto;
}

.play-media--square video {
  height: 100%;
  object-fit: cover;
}

.play-caption {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body);
  color: var(--text-muted);
}

.play-piece--hero .play-caption {
  color: var(--text-subtle);
}

.play-scroll-cue {
  align-self: center;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-label);
  line-height: normal;
  letter-spacing: var(--tracking-label);
  color: var(--text-subtle);
}

.play-gallery {
  position: relative;
  padding: var(--space-32) var(--page-gutter);
  background: var(--surface-dark);
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
  overflow: hidden;
}

.play-gallery-title {
  width: min(100%, var(--layout-max));
  margin: 0 auto;
}

.play-gallery > .play-piece,
.play-collage {
  width: min(100%, var(--layout-max));
  margin-inline: auto;
}

.play-piece--banking {
  padding-right: 16%;
}

.play-piece--character {
  padding-left: 16%;
}

.play-collage {
  position: relative;
  padding-top: var(--space-20);
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.play-piece--retail {
  position: relative;
  z-index: 1;
  width: 44%;
}

.play-piece--social {
  width: 68%;
  margin-left: auto;
}

.play-piece--checkout {
  width: 66%;
  margin-left: 4%;
}

.play-piece--mobile {
  width: 44%;
  margin-right: 4%;
  margin-left: auto;
}

.play-reveal {
  opacity: 0;
  transform: translateY(var(--space-8));
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.play-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .play-hero,
  .play-gallery {
    padding-inline: var(--space-10);
  }

  .play-piece--hero {
    width: min(54vw, 520px);
  }
}

@media (max-width: 767px) {
  .play-hero {
    min-height: 100svh;
    padding: var(--space-24) var(--mobile-gutter) var(--space-8);
  }

  .play-title {
    font-size: var(--text-heading-xl);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-heading);
  }

  .play-piece--hero {
    width: 76vw;
  }

  .play-gallery {
    padding: var(--space-20) var(--mobile-gutter);
    gap: var(--space-24);
  }

  .play-piece--banking,
  .play-piece--character {
    padding: 0;
  }

  .play-piece--character {
    width: 92% !important;
    margin-left: auto !important;
  }

  .play-collage {
    padding-top: var(--space-8);
    gap: var(--space-24);
  }

  .play-piece--retail,
  .play-piece--mobile {
    width: 88%;
  }

  .play-piece--social,
  .play-piece--checkout {
    width: 100%;
  }

  .play-piece--checkout {
    margin-left: 0;
  }

  .play-piece--mobile {
    margin-right: 0;
  }

  .play-media {
    border-radius: var(--radius-sm);
  }

  .play-caption {
    font-size: var(--text-label);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-piece--hero,
  .play-reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}
