/* Quick Bank Case Study — HTML/CSS/JS (no React) */

/* ===== index.css ===== */
:root {
  --navy: #283a8d;
  --blue: #3584e7;
  --teal: #1bc39a;
  --red: #e92c3e;
  --gray: #666666;
  --gray-2: #585d63;
  --muted: #eef2ff;
  --page: #f7f7f7;
  --white: #ffffff;
  --black: #000000;
  --radius-lg: 50px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --max: 1920px;
  --pad: clamp(24px, 5.625vw, 108px);
  --font-display: 'Josefin Sans', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

#root {
  min-height: 100vh;
}

.page {
  width: 100%;
  max-width: var(--max);
  min-width: 0;
  margin: 0 auto;
  background: var(--white);
}

@media (min-width: 1920px) {
  .page {
    width: 1920px;
  }
}

.section-pad {
  padding-left: var(--pad);
  padding-right: var(--pad);
}

@media (max-width: 900px) {
  :root {
    --pad: 16px;
  }
}


/* ===== App.css ===== */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
}

.site-nav__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 48, 0.55);
  cursor: pointer;
}

.site-nav__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100% - 40px));
  padding: 36px 32px;
  border-radius: 24px;
  background: #fcfcfc;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.site-nav__panel a {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 8px;
  border-radius: 12px;
  opacity: 0.8;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.site-nav__panel a:hover,
.site-nav__panel a:focus-visible {
  opacity: 1;
  background: rgba(40, 58, 141, 0.08);
}


/* ===== Header.css ===== */
.qb-cs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 30px var(--pad);
  background: #fcfcfc;
}

.header__side {
  display: flex;
  align-items: center;
  gap: 48px;
  min-width: 0;
}

.header__side--right {
  gap: clamp(24px, 6.5vw, 124px);
}

.header__label,
.header__cta {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 50px;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.header__side--left:hover .header__label,
.header__cta:hover {
  opacity: 0.7;
}

.header__icon {
  display: inline-flex;
  width: 30px;
  height: 29px;
  overflow: hidden;
}

.header__icon img,
.header__menu img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qb_header__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  width: auto;
  max-width: min(300px, 34vw);
}

.qb_header__logo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  position: relative;
}

.header__cta-here {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
}

.header__cta-here img {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.header__menu {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .qb-cs-header {
    padding: 16px 20px;
  }

  .header__side {
    gap: 12px;
  }

  .header__side--right {
    gap: 16px;
  }

  .header__label,
  .header__cta {
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.2;
  }

  .qb_header__logo {
    height: 40px;
    max-width: min(200px, 42vw);
  }

  .header__cta-here img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 600px) {
  .header__label,
  .header__cta span:first-child {
    display: none;
  }

  .qb_header__logo {
    position: static;
    transform: none;
    height: 36px;
    max-width: 160px;
  }

  .qb-cs-header {
    gap: 12px;
  }
}


/* ===== Hero.css ===== */
.hero {
  padding: 16px var(--pad) 0;
  background: var(--white);
}

.hero__card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
  padding: clamp(32px, 3vw, 48px);
  min-height: clamp(480px, 40vw, 648px);
}

/* Exact Figma Quickmfb logo (167×64) — mark + wordmark + subline */
.hero__logo {
  position: relative;
  width: 167px;
  height: 64px;
  max-width: 100%;
  margin-bottom: clamp(40px, 8vw, 120px);
  flex-shrink: 0;
}

.hero__logo-mark {
  position: absolute;
  inset: 0 62.54% 30.93% 0;
}

.hero__logo-word {
  position: absolute;
  inset: 8.25% 0 32.01% 40.56%;
}

.hero__logo-mark img,
.hero__logo-word img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.hero__logo-sub {
  position: absolute;
  left: calc(50% - 61.39px);
  top: 50.8px;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 9.897px;
  line-height: 13.196px;
  letter-spacing: 2.5732px;
  color: var(--black);
  white-space: nowrap;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.hero__left h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  max-width: 16ch;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 24px;
  max-width: 644px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  font-size: clamp(16px, 1.25vw, 24px);
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.hero__tag:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.hero__desc {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
}

@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
  }

  .hero__left h1 {
    max-width: none;
  }
}


/* ===== ServicesTicker.css ===== */
.ticker {
  height: 99px;
  overflow: hidden;
  background: var(--muted);
  display: flex;
  align-items: center;
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 24px;
}

.ticker:hover .ticker__track {
  animation-play-state: paused;
}

.ticker__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: clamp(20px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--black);
}

.ticker__item img {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
}


/* ===== Metrics.css ===== */
.metrics {
  padding: clamp(64px, 5.2vw, 100px) var(--pad) clamp(80px, 6vw, 120px);
  text-align: center;
  background: var(--white);
}

.metrics h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.4;
  margin-bottom: clamp(40px, 4vw, 64px);
}

.metrics__stage {
  position: relative;
  min-height: clamp(220px, 20vw, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.metrics__pair {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.metrics__value-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(90px, 16vw, 300px);
  overflow: hidden;
}

.metrics__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(80px, 15.6vw, 300px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}

.metrics__label-slot {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: clamp(48px, 5vw, 90px);
  margin-top: -0.15em;
  overflow: hidden;
}

.metrics__label {
  margin-left: clamp(40px, 8vw, 160px);
  padding: 16px 24px;
  border-radius: 10px;
  color: var(--white);
  font-size: clamp(18px, 2.5vw, 48px);
  line-height: 1.2;
  white-space: nowrap;
}

.metrics__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.metrics__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d4e0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.metrics__dots button.is-active {
  background: var(--navy);
  transform: scale(1.25);
}

@media (max-width: 700px) {
  .metrics__label-slot {
    justify-content: center;
  }

  .metrics__label {
    margin-left: 0;
    white-space: normal;
    max-width: 90vw;
  }
}


/* ===== ProblemGrid.css ===== */
.problem {
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
  border-radius: var(--radius-lg);
}

.problem__intro {
  max-width: 1156px;
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  text-align: center;
}

.problem__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  max-width: 680px;
  margin: 0 auto 16px;
}

.problem__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
}

.problem__intro strong {
  font-weight: 700;
  color: var(--black);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(200px, 16.5vw, 300px);
  max-width: 1704px;
  margin: 0 auto;
  overflow: hidden;
}

.problem__cell {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.problem__cell--text,
.problem__cell--note,
.problem__cell--soft,
.problem__cell--accent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 1.8vw, 36px) clamp(18px, 1.5vw, 32px);
  background: var(--white);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
}

.problem__cell--text p,
.problem__cell--note p,
.problem__cell--soft p {
  font-size: clamp(16px, 1.25vw, 24px);
  line-height: 1.35;
  max-width: 280px;
}

.problem__cell--text p {
  font-size: clamp(20px, 1.7vw, 32px);
  line-height: 1.4;
  max-width: 350px;
}

.problem__cell--stat {
  background: var(--navy);
  color: var(--white);
  padding: clamp(28px, 2.2vw, 40px) clamp(28px, 2.5vw, 48px);
}

.problem__cell--soft {
  background: var(--muted);
}

.problem__cell--empty {
  background: var(--white);
}

.problem__cell--media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.problem__stat {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 72px);
  line-height: 1.15;
  margin-bottom: -8px;
}

.problem__stat--navy {
  color: var(--navy);
}

.problem__stat-label {
  font-size: clamp(16px, 1.5vw, 28px);
  font-weight: 500;
}

.problem__stat-label--dark {
  color: var(--black);
  font-weight: 400;
}

.problem__icon {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: auto;
  opacity: 0.55;
}

@media (max-width: 1100px) {
  .problem__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(200px, 28vw, 280px);
  }

  .problem__cell--empty {
    display: none;
  }
}

@media (max-width: 640px) {
  .problem__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
}


/* ===== SplitCopy.css ===== */
.split {
  display: grid;
  grid-template-columns: minmax(0, 771px) minmax(0, 696px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
  min-height: clamp(520px, 42vw, 729px);
}

.split__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  margin: 0;
  will-change: transform;
}

.split__body {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  padding-top: 148px;
}

.split__body p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .split__title {
    transform: none !important;
  }

  .split__body {
    padding-top: 0;
  }
}


/* ===== Solution.css ===== */
.solution {
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
}

.solution__intro {
  max-width: 1212px;
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  text-align: center;
}

.solution__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  margin-bottom: 32px;
}

.solution__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
}

.solution__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  max-width: 1458px;
  margin: 0 auto;
  align-items: stretch;
}

.solution__card {
  border-radius: var(--radius-sm);
  border: 2.5px solid transparent;
  padding: 24px 40px;
  min-height: 321px;
  display: flex;
  align-items: center;
  color: var(--white);
}

.solution__card--blue {
  background: var(--blue);
  border-color: var(--white);
}

.solution__card--blue p {
  font-size: clamp(18px, 1.45vw, 28px);
  line-height: 1.4;
}

.solution__card--navy {
  background: var(--navy);
  border-color: var(--navy);
}

.solution__card--navy p {
  font-family: var(--font-display);
  font-size: clamp(24px, 1.9vw, 36px);
  line-height: 1.3;
}

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

  .solution__card {
    min-height: auto;
  }
}


/* ===== Capabilities.css ===== */
.capabilities {
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: clip;
}

.capabilities h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.3vw, 64px);
  line-height: 1.06;
  text-align: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .capabilities h2 {
    white-space: normal;
    width: auto;
  }
}

.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 53px 48px;
  max-width: 1441px;
  margin: 0 auto;
}

.capabilities__card {
  --corner-size: 48px;
  --corner-inset: 24px;
  position: relative;
  min-height: clamp(360px, 30vw, 561px);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  outline: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capabilities__card:hover,
.capabilities__card:focus-visible,
.capabilities__card.is-open {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.capabilities__card h3 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(452px, 80%);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 50px);
  line-height: 1.3;
  text-align: center;
  z-index: 2;
  transition: opacity 0.28s ease 0.05s;
}

.capabilities__card.is-open h3,
.capabilities__card:hover h3,
.capabilities__card:focus-visible h3 {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}

/* Corner square — expands from its own corner on every card */
.capabilities__corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  bottom: var(--corner-inset);
  background: var(--navy);
  border-radius: 8px;
  z-index: 1;
  pointer-events: none;
  transition:
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    bottom 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.45s ease;
}

/* Cards 1 & 3 — square bottom-right, expands up and left */
.capabilities__card:nth-child(1) .capabilities__corner,
.capabilities__card:nth-child(3) .capabilities__corner {
  right: var(--corner-inset);
  left: auto;
}

.capabilities__card:nth-child(1).is-open .capabilities__corner,
.capabilities__card:nth-child(1):hover .capabilities__corner,
.capabilities__card:nth-child(1):focus-visible .capabilities__corner,
.capabilities__card:nth-child(3).is-open .capabilities__corner,
.capabilities__card:nth-child(3):hover .capabilities__corner,
.capabilities__card:nth-child(3):focus-visible .capabilities__corner {
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
}

/* Cards 2 & 4 — square bottom-left, expands up and right */
.capabilities__card:nth-child(2) .capabilities__corner,
.capabilities__card:nth-child(4) .capabilities__corner {
  left: var(--corner-inset);
  right: auto;
}

.capabilities__card:nth-child(2).is-open .capabilities__corner,
.capabilities__card:nth-child(2):hover .capabilities__corner,
.capabilities__card:nth-child(2):focus-visible .capabilities__corner,
.capabilities__card:nth-child(4).is-open .capabilities__corner,
.capabilities__card:nth-child(4):hover .capabilities__corner,
.capabilities__card:nth-child(4):focus-visible .capabilities__corner {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
}

.capabilities__panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  color: var(--white);
  display: flex;
  align-items: stretch;
  padding: clamp(28px, 2.4vw, 40px) clamp(24px, 2vw, 32px);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease 0.18s;
}

.capabilities__card.is-open .capabilities__panel,
.capabilities__card:hover .capabilities__panel,
.capabilities__card:focus-visible .capabilities__panel {
  opacity: 1;
  pointer-events: auto;
}

.capabilities__panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(8px, 1vw, 16px);
}

.capabilities__panel li {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.4vw, 20px);
  font-size: clamp(17px, 1.45vw, 26px);
  line-height: 1.25;
  min-height: 0;
}

.capabilities__icon {
  width: clamp(32px, 2.4vw, 42px);
  height: clamp(32px, 2.4vw, 42px);
  flex-shrink: 0;
  overflow: hidden;
}

.capabilities__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

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

  /* Single column: keep alternating expand origins */
  .capabilities__card:nth-child(odd) .capabilities__corner {
    right: var(--corner-inset);
    left: auto;
  }

  .capabilities__card:nth-child(odd).is-open .capabilities__corner,
  .capabilities__card:nth-child(odd):hover .capabilities__corner,
  .capabilities__card:nth-child(odd):focus-visible .capabilities__corner {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
  }

  .capabilities__card:nth-child(even) .capabilities__corner {
    left: var(--corner-inset);
    right: auto;
  }

  .capabilities__card:nth-child(even).is-open .capabilities__corner,
  .capabilities__card:nth-child(even):hover .capabilities__corner,
  .capabilities__card:nth-child(even):focus-visible .capabilities__corner {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .capabilities__corner,
  .capabilities__panel,
  .capabilities__card h3 {
    transition-duration: 0.01ms;
  }
}


/* ===== FeatureStack.css ===== */
.stack {
  --stack-sticky-top: 56px;
  --stack-peek: 72px;
  --stack-card-width: min(840px, 100%);
  /*
    Card + peeks must fit in one viewport so image + title + body stay visible.
    Reserve peek space above the front card when the stack is fully built.
  */
  --stack-card-height: min(
    960px,
    calc(100dvh - var(--stack-sticky-top) - (var(--stack-peek) * 2) - 24px)
  );
  padding: clamp(48px, 4vw, 80px) var(--pad) 0;
  background: var(--white);
}

.stack__intro {
  max-width: 898px;
  margin: 0 auto clamp(32px, 3vw, 56px);
  text-align: center;
}

.stack__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  margin-bottom: 24px;
}

.stack__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
}

/* Scroll runway — pins the stage while cards stack through phases */
.stack__track {
  position: relative;
  height: calc(var(--stack-card-height) + 220vh);
}

.stack__stage {
  position: sticky;
  top: var(--stack-sticky-top);
  width: var(--stack-card-width);
  height: calc(var(--stack-card-height) + var(--stack-peek) * 2);
  margin: 0 auto;
  overflow: visible;
}

.stack__card {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--stack-card-height);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  color: var(--white);
  display: flex;
  flex-direction: column;
  will-change: transform;
  box-sizing: border-box;
}

.stack__media {
  position: relative;
  /* 340px tall when the card has room; shrinks before the copy does */
  flex: 0 1 340px;
  width: calc(100% - 40px);
  height: 340px;
  min-height: 0;
  margin: 20px auto 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.stack__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.stack__copy {
  position: relative;
  /* Grows into spare space, never shrinks below its text */
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 20px);
  padding: clamp(20px, 2.4vw, 40px) clamp(24px, 3.5vw, 48px) clamp(28px, 3vw, 48px);
  text-align: center;
}

.stack__copy h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 44px);
  line-height: 1.3;
  margin: 0;
  color: #fff !important;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.stack__copy p {
  font-size: clamp(15px, 1.4vw, 26px);
  line-height: 1.4;
  max-width: 728px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .stack {
    --stack-sticky-top: 48px;
    --stack-peek: 48px;
  }

  .stack__track {
    height: calc(var(--stack-card-height) + 180vh);
  }

  .stack__media {
    width: calc(100% - 28px);
    margin-top: 14px;
    max-height: 42%;
  }

  .stack__copy {
    padding: 18px 18px 24px;
    gap: 10px;
  }
}


/* ===== Architecture.css ===== */
.architecture {
  display: grid;
  grid-template-columns: minmax(0, 840px) minmax(0, 763px);
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
  padding: clamp(80px, 6.5vw, 120px) var(--pad);
  min-height: clamp(520px, 48vw, 900px);
  background: var(--white);
  box-sizing: border-box;
}

.architecture__copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  margin-bottom: 48px;
  max-width: 840px;
}

.architecture__copy p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
  max-width: 840px;
}

.architecture__visual {
  width: min(100%, 640px);
  margin-left: auto;
}

.architecture__visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 1000px) {
  .architecture {
    grid-template-columns: 1fr;
    padding-block: clamp(64px, 8vw, 100px);
  }

  .architecture__visual {
    margin: 0 auto;
    width: min(100%, 420px);
  }
}


/* ===== FeatureCarousel.css ===== */
.feat {
  padding: clamp(48px, 4vw, 72px) var(--pad);
  background: #fafafa;
  min-height: auto;
  box-sizing: border-box;
}

.feat__layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  max-width: 1704px;
  margin: 0 auto;
  min-height: min(78vh, 760px);
}

.feat__phone {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat__phone img {
  width: 100%;
  height: auto;
  max-height: min(78vh, 760px);
  object-fit: contain;
  background: transparent;
}

.feat__copy {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  min-height: min(64vh, 640px);
}

.feat__copy-body {
  flex: 1 1 auto;
}

.feat__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 30px);
  line-height: 1.3;
  margin-bottom: 28px;
}

.feat__copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 1.7vw, 32px);
  line-height: 1.3;
  margin-bottom: 18px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .feat__copy h2 {
    white-space: normal;
  }
}

.feat__body {
  display: flex;
  flex-direction: column;
  gap: 1em;
  color: var(--gray-2);
  font-size: clamp(16px, 1.25vw, 24px);
  line-height: 1.4;
  margin-bottom: 32px;
}

.feat__nav {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
}

.feat__btn {
  position: relative;
  width: 56px;
  height: 56px;
}

.feat__btn-bg,
.feat__btn-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feat__btn-icon {
  inset: 16px;
  width: 24px;
  height: 24px;
}

.feat__btn:hover {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .feat__layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .feat__phone {
    max-width: 320px;
    min-height: 0;
  }

  .feat__phone img {
    max-height: 580px;
  }

  .feat__copy {
    min-height: 0;
  }
}


/* ===== AccessMap.css ===== */
.access {
  padding: clamp(64px, 5.2vw, 100px) 0 0;
  background: var(--white);
}

.access__intro {
  max-width: 868px;
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  padding: 0 var(--pad);
  text-align: center;
}

.access__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.3vw, 64px);
  line-height: 1.06;
  margin-bottom: 32px;
}

.access__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
}

.access__map {
  position: relative;
  min-height: clamp(520px, 50vw, 956px);
  overflow: hidden;
}

.access__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.access__card {
  position: absolute;
  width: min(408px, calc(100% - 40px));
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  border: 2.5px solid var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.access__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.access__card--navy {
  background: var(--navy);
  color: var(--white);
}

.access__card--blue {
  background: var(--blue);
  color: var(--white);
}

.access__card--soft {
  background: var(--muted);
  color: var(--gray-2);
}

.access__card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.9vw, 36px);
  line-height: 1.3;
  margin-bottom: 24px;
}

.access__card--navy h3,
.access__card--blue h3 {
  color: #fff !important;
}

.access__card p {
  font-size: clamp(14px, 1.25vw, 24px);
  line-height: 1.4;
}

.access__card--navy p,
.access__card--blue p {
  color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 800px) {
  .access__map {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px 20px;
    min-height: auto;
  }

  .access__bg {
    position: relative;
    inset: auto;
    min-height: 220px;
    border-radius: 24px;
  }

  .access__card {
    position: static;
    width: 100%;
  }
}


/* ===== Testimonial.css ===== */
.testimonial {
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
}

.testimonial__intro {
  max-width: 730px;
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  text-align: center;
}

.testimonial__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.4;
  margin-bottom: 32px;
}

.testimonial__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
  max-width: 642px;
  margin: 0 auto;
}

.testimonial__card {
  max-width: 1416px;
  margin: 0 auto;
  padding: clamp(40px, 3.5vw, 64px) clamp(32px, 4.5vw, 88px);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.testimonial__card > p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 40px);
  line-height: 1.4;
  text-align: center;
}

.testimonial__card > p + p {
  margin-top: 1.4em;
}

.testimonial__card footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: clamp(40px, 4vw, 80px);
  font-size: clamp(16px, 1.67vw, 32px);
  text-align: center;
}

.testimonial__card strong {
  font-weight: 700;
}


/* ===== Wireframe.css ===== */
.wire {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0;
  background: #f3f3f3;
  overflow: hidden;
}

.wire__image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  /* Preserve sharpness — avoid cover cropping / stretch distortion */
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  -webkit-user-drag: none;
}


/* ===== Ecosystem.css ===== */
.eco {
  padding: clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--white);
}

.eco__intro {
  width: max-content;
  max-width: min(1467px, 100%);
  margin: 0 auto clamp(48px, 4.4vw, 84px);
  text-align: center;
}

.eco__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.3vw, 64px);
  line-height: 1.06;
  margin-bottom: 32px;
}

.eco__intro p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .eco__intro p {
    white-space: normal;
  }
}

.eco__list {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 6vw, 120px);
  max-width: 1467px;
  margin: 0 auto;
}

.eco__row {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 100px);
  align-items: center;
}

.eco__row--left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
}

.eco__row--left .eco__phone {
  order: 2;
}

.eco__row--left .eco__copy {
  order: 1;
}

.eco__phone {
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

.eco__phone-shell {
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.eco__phone-shell img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.eco__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 48px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(24px, 1.9vw, 36px);
  margin-bottom: 48px;
}

.eco__copy p {
  font-size: clamp(18px, 1.67vw, 32px);
  line-height: 1.4;
  color: var(--gray-2);
  max-width: 779px;
}

@media (max-width: 900px) {
  .eco__row,
  .eco__row--left {
    grid-template-columns: 1fr;
  }

  .eco__row--left .eco__phone,
  .eco__row--left .eco__copy {
    order: initial;
  }

  .eco__phone {
    max-width: 320px;
    margin: 0 auto;
  }
}


/* ===== SimilarWorks.css ===== */
.similar {
  padding: clamp(64px, 5.2vw, 100px) 0 clamp(64px, 5.2vw, 100px) var(--pad);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}

.similar__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  max-width: 1800px;
  margin-bottom: 48px;
  padding-right: var(--pad);
}

.similar__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 48px);
  margin-bottom: 10px;
  color: var(--white);
}

.similar__head p {
  font-size: clamp(16px, 1.25vw, 24px);
  color: rgba(255, 255, 255, 0.65);
}

.similar__controls {
  display: flex;
  gap: 12px;
}

.similar__controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: var(--white);
  font-size: 20px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.similar__controls button:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.similar__track {
  display: flex;
  gap: 62px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.similar__track::-webkit-scrollbar {
  display: none;
}

.similar__card {
  flex: 0 0 min(809px, 85vw);
  scroll-snap-align: start;
}

.similar__visual {
  height: clamp(280px, 26vw, 500px);
  border-radius: 24px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #f3f5fa;
}

.similar__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.similar__meta h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 40px);
  color: var(--white);
}

.similar__meta span {
  font-size: clamp(14px, 1.1vw, 20px);
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
}


/* ===== CTA.css ===== */
.cta {
  position: relative;
  padding: 80px var(--pad);
  min-height: 544px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  color: var(--white);
}

.cta__ribbon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1392px, 140%);
  height: auto;
  transform: translate(-50%, -50%) rotate(180deg);
  opacity: 0.8;
  filter: blur(28px);
  pointer-events: none;
  max-width: none;
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 1102px;
  text-align: center;
}

.cta__inner h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 96px);
  line-height: 1.08;
  letter-spacing: -0.047em;
  margin-bottom: 16px;
}

.cta__inner p {
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 1.58;
  max-width: 1058px;
  margin: 0 auto 32px;
}

.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 242px;
  height: 60px;
  padding: 0 28px;
  border-radius: 10px;
  background: #fd6672;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(253, 102, 114, 0.35);
}


/* ===== Footer.css ===== */
.footer {
  padding: clamp(28px, 2.6vw, 48px) var(--pad);
  background: var(--white);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 40px);
  max-width: 1704px;
  margin: 0 auto;
}

.footer__copy {
  margin: 0;
  color: var(--black);
  font-size: clamp(13px, 1vw, 18px);
  line-height: 1.4;
}

.footer__mark {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: clamp(20px, 1.7vw, 30px);
}



/* ===== vanilla interaction helpers ===== */
.metrics__value,
.metrics__label {
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.metrics__value.is-exit { opacity: 0; transform: translateY(-72px); }
.metrics__value.is-enter { opacity: 0; transform: translateY(72px); }
.metrics__value.is-active { opacity: 1; transform: translateY(0); }
.metrics__label.is-exit { opacity: 0; transform: translateY(-36px); transition-duration: 0.3s; }
.metrics__label.is-enter { opacity: 0; transform: translateY(48px); }
.metrics__label.is-active { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.feat__phone img,
.feat__slide {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.feat__phone img.is-exit,
.feat__slide.is-exit { opacity: 0; transform: translateX(-20px); }
.feat__phone img.is-enter,
.feat__slide.is-enter { opacity: 0; transform: translateX(20px); }
.feat__phone img.is-active,
.feat__slide.is-active { opacity: 1; transform: translateX(0); }
.site-nav[hidden] { display: none !important; }
.stack__card { transform: translateY(var(--stack-y, 0px)); }
/* ==========================================================================
   Mobile / 320px responsive pass
   Target: 320px viewport, 16px page margins, keep desktop interactions
   ========================================================================== */
@media (max-width: 767.98px) {
  :root {
    --pad: 16px;
    --radius-lg: 24px;
    --radius-md: 16px;
  }

  html,
  body {
    overflow-x: clip;
  }

  .page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* ----- Hero ----- */
  .hero {
    padding: 16px var(--pad) 0;
  }

  .hero__card {
    padding: 20px 16px 24px;
    min-height: 0;
    border-radius: var(--radius-lg);
  }

  .hero__logo {
    width: 140px;
    height: 54px;
    margin-bottom: 28px;
  }

  .hero__logo-sub {
    left: 0;
    right: 0;
    top: 42px;
    font-size: 8.2px;
    line-height: 11px;
    letter-spacing: 1.8px;
    text-align: left;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero__left h1 {
    font-size: 26px;
    line-height: 1.15;
    max-width: none;
  }

  .hero__tags {
    gap: 8px;
    margin-top: 16px;
    max-width: none;
  }

  .hero__tag {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
  }

  .hero__desc {
    font-size: 15px;
    line-height: 1.45;
  }

  /* ----- Metrics ----- */
  .metrics {
    padding: 48px var(--pad) 56px;
    text-align: center;
  }

  .metrics h2 {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 28px;
  }

  .metrics__stage {
    min-height: 200px;
  }

  .metrics__value-slot {
    min-height: 100px;
    width: 100%;
  }

  .metrics__value {
    font-size: 80px;
    letter-spacing: -0.03em;
  }

  .metrics__label-slot {
    justify-content: center;
    min-height: 44px;
    margin-top: 4px;
  }

  .metrics__label {
    margin-left: 0;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    max-width: 100%;
    text-align: center;
  }

  /* ----- Problem grid ----- */
  .problem {
    padding: 48px var(--pad);
    border-radius: 0;
    text-align: center;
  }

  .problem__intro {
    margin-bottom: 28px;
    text-align: center;
  }

  .problem__intro h2 {
    font-size: 26px;
    line-height: 1.15;
    max-width: none;
  }

  .problem__intro p {
    font-size: 15px;
    text-align: center;
  }

  .problem__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
    overflow: visible;
  }

  .problem__cell {
    min-height: 180px;
    border-radius: 12px;
  }

  .problem__cell--media {
    min-height: 0;
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .problem__cell--media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .problem__cell--text,
  .problem__cell--note,
  .problem__cell--soft,
  .problem__cell--accent,
  .problem__cell--stat {
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  .problem__cell--text p,
  .problem__cell--note p,
  .problem__cell--soft p {
    font-size: 15px;
    max-width: none;
    text-align: center;
  }

  .problem__cell--text p {
    font-size: 16px;
  }

  .problem__cell--text strong {
    font-size: 1.4em;
    display: inline;
  }

  .problem__stat {
    font-size: 48px;
    margin-bottom: 4px;
    text-align: center;
  }

  .problem__stat-label {
    font-size: 14px;
    text-align: center;
  }

  .problem__icon {
    right: 12px;
    bottom: 12px;
    width: 36px;
  }

  .problem__cell--empty {
    display: none;
  }

  /* ----- Split copy ----- */
  .split {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 48px var(--pad);
    min-height: 0;
    text-align: center;
    justify-items: center;
  }

  .split__title {
    font-size: 26px;
    line-height: 1.15;
    transform: none !important;
    text-align: center;
  }

  .split__body {
    padding-top: 0;
    gap: 12px;
    text-align: center;
  }

  .split__body p {
    font-size: 15px;
    text-align: center;
  }

  /* ----- Solution ----- */
  .solution {
    padding: 48px var(--pad);
    text-align: center;
  }

  .solution__intro {
    margin-bottom: 28px;
    text-align: center;
  }

  .solution__intro h2 {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .solution__intro p {
    font-size: 15px;
    text-align: center;
  }

  .solution__cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .solution__card {
    min-height: 0;
    padding: 24px 16px;
    text-align: center;
    justify-content: center;
  }

  .solution__card--blue p,
  .solution__card--navy p {
    text-align: center;
  }

  .solution__card--blue p {
    font-size: 15px;
  }

  .solution__card--navy p {
    font-size: 20px;
  }

  /* ----- Capabilities ----- */
  .capabilities {
    padding: 48px var(--pad);
    border-radius: 0;
    text-align: center;
  }

  .capabilities h2 {
    font-size: 24px;
    line-height: 1.2;
    white-space: normal;
    width: auto;
    max-width: none;
    margin-bottom: 28px;
    text-align: center;
  }

  .capabilities__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .capabilities__card {
    min-height: 280px;
  }

  .capabilities__card h3 {
    font-size: 22px;
    width: min(240px, 86%);
    text-align: center;
  }

  .capabilities__panel {
    padding: 24px 16px;
    align-items: stretch;
    justify-content: flex-start;
  }

  .capabilities__panel ul {
    align-items: stretch;
    justify-content: space-between;
  }

  .capabilities__panel li {
    font-size: 14px;
    gap: 12px;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }

  .capabilities__icon {
    width: 28px;
    height: 28px;
  }

  /* Touch: rely on tap / .is-open, not sticky hover */
  .capabilities__card:hover:not(.is-open):not(:focus-visible) {
    transform: none;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.08);
  }

  .capabilities__card:hover:not(.is-open):not(:focus-visible) h3 {
    opacity: 1;
    pointer-events: auto;
  }

  .capabilities__card:hover:not(.is-open):not(:focus-visible) .capabilities__corner {
    width: var(--corner-size);
    height: var(--corner-size);
    bottom: var(--corner-inset);
    border-radius: 8px;
  }

  .capabilities__card:nth-child(odd):hover:not(.is-open):not(:focus-visible) .capabilities__corner {
    right: var(--corner-inset);
    left: auto;
  }

  .capabilities__card:nth-child(even):hover:not(.is-open):not(:focus-visible) .capabilities__corner {
    left: var(--corner-inset);
    right: auto;
  }

  .capabilities__card:hover:not(.is-open):not(:focus-visible) .capabilities__panel {
    opacity: 0;
    pointer-events: none;
  }

  /* ----- Feature stack ----- */
  .stack {
    --stack-sticky-top: 16px;
    --stack-peek: 28px;
    --stack-card-width: 100%;
    --stack-card-pad: 12px;
    /* Fallback until JS measures content; all cards share this height */
    --stack-card-height: 420px;
    padding: 40px var(--pad) 0;
  }

  .stack__intro {
    margin-bottom: 24px;
  }

  .stack__intro h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .stack__intro p {
    font-size: 15px;
  }

  .stack__track {
    height: calc(var(--stack-card-height) + (var(--stack-peek) * 2) + 180vh);
  }

  .stack__stage {
    height: calc(var(--stack-card-height) + var(--stack-peek) * 2);
    overflow: visible;
  }

  .stack__card {
    /* Same fixed height as desktop — required for overlap / no white gaps */
    height: var(--stack-card-height);
    min-height: 0;
  }

  .stack__media {
    flex: 0 1 auto;
    width: calc(100% - (var(--stack-card-pad) * 2));
    margin: var(--stack-card-pad) auto 0;
    max-height: 180px;
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .stack__copy {
    flex: 1 0 auto;
    padding: var(--stack-card-pad);
    gap: 8px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  .stack__copy h3 {
    font-size: 20px;
    text-align: center;
  }

  .stack__copy p {
    font-size: 13px;
    text-align: center;
  }

  /* ----- Architecture ----- */
  .architecture {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px var(--pad);
    min-height: 0;
  }

  .architecture__copy h2 {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .architecture__copy p {
    font-size: 15px;
  }

  .architecture__visual {
    margin: 0 auto;
    width: 100%;
  }

  /* ----- Feature carousel ----- */
  .feat {
    padding: 40px var(--pad);
  }

  .feat__layout {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
  }

  .feat__phone {
    width: min(280px, 100%);
    max-width: 280px;
    min-height: 0;
  }

  .feat__phone img {
    max-height: 540px;
  }

  .feat__copy {
    min-height: 0;
    max-width: none;
  }

  .feat__tag {
    padding: 10px 16px;
    font-size: 15px;
    margin-bottom: 16px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .feat__copy h2 {
    font-size: 22px;
    white-space: normal;
    margin-bottom: 12px;
  }

  .feat__body {
    font-size: 14px;
    margin-bottom: 20px;
    gap: 0.85em;
  }

  .feat__nav {
    gap: 12px;
    justify-content: flex-start;
  }

  .feat__btn {
    width: 48px;
    height: 48px;
  }

  .feat__btn-icon {
    inset: 14px;
    width: 20px;
    height: 20px;
  }

  /* ----- Access map ----- */
  .access {
    padding: 48px 0 0;
  }

  .access__intro {
    margin-bottom: 24px;
    padding: 0 var(--pad);
  }

  .access__intro h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .access__intro p {
    font-size: 15px;
  }

  .access__map {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 var(--pad) 24px;
    min-height: 0;
    overflow: visible;
  }

  .access__bg {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 200px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    object-fit: cover;
  }

  .access__card {
    position: static;
    width: 100%;
    padding: 14px 16px;
  }

  .access__card h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .access__card p {
    font-size: 14px;
  }

  /* ----- Testimonial ----- */
  .testimonial {
    padding: 48px var(--pad);
  }

  .testimonial__intro {
    margin-bottom: 24px;
  }

  .testimonial__intro h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .testimonial__intro p {
    font-size: 15px;
  }

  .testimonial__card {
    padding: 24px 16px;
    border-radius: 16px;
  }

  .testimonial__card > p {
    font-size: 16px;
  }

  .testimonial__card footer {
    margin-top: 28px;
    font-size: 14px;
  }

  /* ----- Wireframe (cropped peek of screens) ----- */
  .wire {
    width: auto;
    margin: 24px var(--pad) 32px;
    padding: 0;
    height: min(260px, 72vw);
    border-radius: 16px;
    background: #e8e8e8;
    overflow: hidden;
  }

  .wire__image {
    width: 175%;
    max-width: none;
    height: auto;
    margin-left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
  }

  /* ----- Ecosystem ----- */
  .eco {
    padding: 48px var(--pad) 56px;
  }

  .eco__intro {
    width: auto;
    max-width: none;
    margin-bottom: 32px;
  }

  .eco__intro h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .eco__intro p {
    font-size: 15px;
    white-space: normal;
  }

  .eco__list {
    gap: 48px;
  }

  .eco__row,
  .eco__row--left {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .eco__row--left .eco__phone,
  .eco__row--left .eco__copy {
    order: initial;
  }

  .eco__phone {
    max-width: 280px;
    margin: 0 auto;
  }

  .eco__tag {
    padding: 12px 20px;
    font-size: 18px;
    margin-bottom: 16px;
  }

  .eco__copy p {
    font-size: 15px;
    max-width: none;
  }

  /* ----- Footer ----- */
  .footer {
    padding: 24px var(--pad) 32px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer__copy {
    font-size: 13px;
  }

  .footer__mark {
    height: 20px;
  }
}

/* Extra-tight 320px refinements */
@media (max-width: 360px) {
  .hero__left h1,
  .metrics h2,
  .problem__intro h2,
  .split__title,
  .solution__intro h2,
  .stack__intro h2,
  .architecture__copy h2,
  .access__intro h2,
  .testimonial__intro h2,
  .eco__intro h2 {
    font-size: 24px;
  }

  .metrics__value {
    font-size: 72px;
  }

  .capabilities h2 {
    font-size: 22px;
  }

  .capabilities__card {
    min-height: 260px;
  }

  .feat__phone {
    max-width: 260px;
  }

  .stack {
    --stack-peek: 28px;
  }
}

/* Mobile page-wide centering (hero stays left-aligned) */
@media (max-width: 767.98px) {
  .hero__card,
  .hero__content,
  .hero__left h1,
  .hero__desc {
    text-align: left;
  }

  .hero__logo {
    margin-left: 0;
    margin-right: 0;
  }

  .hero__logo-sub {
    text-align: left;
  }

  .hero__tags {
    justify-content: flex-start;
  }

  .hero__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .stack__intro,
  .stack__intro h2,
  .stack__intro p,
  .stack__copy {
    text-align: center;
  }

  .architecture {
    text-align: center;
    justify-items: center;
  }

  .architecture__copy h2,
  .architecture__copy p {
    text-align: center;
  }

  .feat {
    text-align: center;
  }

  .feat__layout {
    justify-items: center;
  }

  .feat__copy {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .feat__copy-body,
  .feat__tag,
  .feat__copy h2,
  .feat__body {
    text-align: center;
  }

  .feat__nav {
    justify-content: center;
  }

  .access,
  .access__intro,
  .access__card,
  .access__card h3,
  .access__card p {
    text-align: center;
  }

  .access__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .testimonial,
  .testimonial__intro,
  .testimonial__card,
  .testimonial__card > p {
    text-align: center;
  }

  .eco,
  .eco__intro,
  .eco__intro h2,
  .eco__intro p,
  .eco__copy,
  .eco__copy p {
    text-align: center;
  }

  .eco__row,
  .eco__row--left {
    justify-items: center;
  }

  .eco__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


/* ===== SandCup chrome integration (does not alter case study layout) ===== */
body.portfolio-quick-bank.case-study {
  background: #fff;
}

body.portfolio-quick-bank .page {
  position: relative;
  z-index: 1;
}
