/* ════════════════════════════════════════
   TABLET  ≤ 1024px
════════════════════════════════════════ */
@media (max-width: 1024px) {

  .diff__grid {
    grid-template-columns: 1fr;
  }

  .diff__divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .diff__col {
    padding: var(--space-xl) 0;
  }

  .process__timeline {
    grid-template-columns: 1fr 1fr;
  }

  .process__step {
    padding: var(--space-xl) var(--space-lg) var(--space-xl) 0;
  }

  .process__step:nth-child(2) {
    border-right: none;
  }

  .process__step:nth-child(3) {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xl);
  }

  .process__step:nth-child(4) {
    border-right: none;
    border-top: 1px solid var(--color-border);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .clients__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metrics__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric__item:nth-child(2) {
    border-right: none;
  }

  .metric__item:nth-child(3) {
    border-top: 1px solid var(--color-border);
  }

  .metric__item:nth-child(4) {
    border-top: 1px solid var(--color-border);
    border-right: none;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  /* Stack cards — reduce image height on tablet */
  .stack__card-images {
    height: clamp(220px, 32vh, 400px);
  }

  .stack__card-num {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
  }

  /* Process v2 — slightly tighter */
  .pv2__num {
    font-size: clamp(3rem, 8vw, 6rem);
  }
}

/* ════════════════════════════════════════
   MOBILE  ≤ 768px
════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Typography */
  .br-desktop { display: none; }

  /* Nav */
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__overlay { display: flex; }

  /* Hero */
  .hero {
    padding-top: calc(var(--space-3xl) + 4rem);
    padding-bottom: var(--space-2xl);
  }

  .hero__headline {
    letter-spacing: -0.03em;
    font-size: 42px;
  }

  .hero__line--indent {
    padding-left: clamp(1rem, 4vw, 3rem);
  }

  /* Services */
  .service__trigger {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-sm);
  }

  .service__tags {
    display: none;
  }

  .service__body {
    padding-left: 0;
  }

  /* Projects */
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project__card--featured {
    grid-column: 1;
  }

  .project__card--featured .project__img-wrap {
    aspect-ratio: 16/9;
  }

  /* Metrics */
  .metrics__grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric__item {
    padding: var(--space-lg) var(--space-md);
  }

  /* Process */
  .process__timeline {
    grid-template-columns: 1fr;
  }

  .process__step {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg) 0;
  }

  .process__step:last-child {
    border-bottom: none;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about__accent-block {
    padding: var(--space-xl);
  }

  /* Clients */
  .clients__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .contact__ctas {
    flex-direction: column;
  }

  .contact__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Diff */
  .diff__grid {
    grid-template-columns: 1fr;
    padding-top: var(--space-xl);
  }

  .diff__statement {
    font-size: var(--text-xl);
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__nav {
    grid-template-columns: 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  /* WA float */
  .wa-float {
    bottom: var(--space-md);
    right: var(--space-md);
  }

  /* Section header row stacks */
  .section__header--row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Stack cards — switch to flat vertical list on mobile */
  .stack__wrapper {
    padding-inline: var(--space-sm);
  }

  .stack__pin {
    height: auto;
    padding-bottom: var(--space-md);
  }

  .stack__card {
    position: relative;
    top: auto !important;
    transform: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  }

  .stack__card-images {
    flex-direction: column;
    height: auto;
  }

  .stack__col-left {
    flex-direction: row;
    flex: none;
    height: 150px;
  }

  .stack__col-right {
    height: 240px;
  }

  .stack__card-top {
    gap: var(--space-sm);
  }

  .stack__card-num {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .stack__card-tags {
    display: none;
  }

  .stack__card-cta {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Process v2 */
  .pv2__num {
    font-size: clamp(3rem, 8vw, 5rem);
    min-width: clamp(2.8rem, 8vw, 5rem);
  }

}

/* ════════════════════════════════════════
   SMALL MOBILE  ≤ 480px
════════════════════════════════════════ */
@media (max-width: 480px) {

  .clients__grid {
    grid-template-columns: 1fr 1fr;
  }

  .metrics__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav__mobile-link {
    font-size: var(--text-2xl);
  }

  /* Stack cards: disable sticky on small mobile, show flat */
  .stack__pin {
    height: auto;
    padding-bottom: var(--space-md);
  }

  .stack__card {
    position: relative;
    top: auto !important;
    box-shadow: none;
    border-radius: 16px;
  }

  .stack__card-images {
    flex-direction: column;
    height: auto;
    gap: var(--space-xs);
  }

  .stack__col-left {
    flex-direction: row;
    flex: none;
    height: 130px;
  }

  .stack__col-right {
    height: 220px;
  }

  .stack__card-cta {
    width: 100%;
    justify-content: center;
  }

  /* Process v2 */
  .pv2__row {
    gap: var(--space-sm);
  }

  .pv2__num {
    font-size: clamp(2.5rem, 15vw, 4rem);
    min-width: 2.5rem;
  }

  .pv2__name {
    font-size: var(--text-base);
  }
}

/* ════════════════════════════════════════
   SERVICES V2 SCROLL STACK — RESPONSIVE
════════════════════════════════════════ */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .svc-stack__name {
    font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  }
  .svc-stack__num {
    font-size: clamp(3rem, 6vw, 5rem);
  }
  .svc-stack__desc {
    font-size: var(--text-sm);
  }
}

/* Mobile ≤ 640px — disable scroll stack, show as flat list */
@media (max-width: 640px) {

  /* Reset track: no sticky, natural flow */
  .svc-scroll__track {
    height: auto !important;
  }

  .svc-scroll__sticky {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    padding-top: 0;
    padding-bottom: 0;
  }

  .svc-scroll__stage {
    position: relative;
    height: auto;
    padding-inline: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  /* Cards: static, full width, no transforms */
  .svc-scroll__card {
    position: relative;
    inset: auto;
    transform: none !important;
    filter: none !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }

  .svc-stack__inner {
    grid-template-columns: 1fr;
    height: auto;
  }

  .svc-stack__left {
    border-right: none;
    padding: var(--space-lg);
  }

  .svc-stack__right {
    height: 200px;
    border-top: 1px solid var(--color-border);
  }

  .svc-stack__img-grid {
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 1fr;
    height: 100%;
  }

  .svc-stack__img--a {
    border-bottom: none;
    border-right: 1px solid var(--color-border);
  }

  .svc-stack__num {
    font-size: clamp(3rem, 12vw, 5rem);
  }
}
