/* =========================================================
   responsive.css — breakpoint overrides
   The fluid rem system in reset.css already rescales the
   whole page; these rules retarget layout grids, hide
   nav etc. for each breakpoint.
   ========================================================= */

/* --------- 1280 --------- */
@media (max-width: 1280px) {
  .work-card { width: 300rem; height: 400rem; }
}

/* --------- 1024 --------- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 40rem;
    padding-inline-end: var(--gutter);
  }
  .hero__hero-c {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
  }
  .hero__copy { position: relative; z-index: 2; }
  .scroll-indicator { display: none; }

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

  .timeline__nodes { grid-template-columns: repeat(2, 1fr); row-gap: 60rem; }
  .timeline__line  { display: none; }

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

  .logos__track {
    gap: 70rem;
  }

  .cta__grid       { grid-template-columns: 1fr; }
  .cta__phone-wrap { order: -1; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40rem; }
  .footer__newsletter-inner { grid-template-columns: 1fr; gap: 32rem; }

  /* Sticky grid: 2 columns, 8 images, shorter scroll */
  .block.block--main { height: 350vh; }
  .gallery { width: 90vw; max-width: 600rem; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); column-gap: 24rem; row-gap: 28rem; }
  .gallery__item:nth-child(n + 9) { display: none; }
}

/* --------- 768 --------- */
@media (max-width: 768px) {
  .section {
    padding-block: 72rem;
  }
  .hero { padding-block: 130rem 60rem; }
  .hero__title { font-size: clamp(40rem, 11vw, 64rem); }
  .hero__cta { gap: 14rem; }

  .logos__track {
    gap: 54rem;
  }
  .logos__item { font-size: clamp(16rem, 4vw, 20rem); }
  .logos__viewport,
  .logos__viewport.is-swipeable {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .logos__viewport::-webkit-scrollbar,
  .logos__viewport.is-swipeable::-webkit-scrollbar {
    display: none;
  }
  .logos__track,
  .logos__track.is-swipeable {
    display: flex;
    width: max-content;
    min-width: 100%;
    padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    will-change: auto;
    transform: none !important;
  }
  .logos__track .logos__item,
  .logos__track.is-swipeable .logos__item {
    scroll-snap-align: center;
  }

  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 18rem; }
  .service-card {
    padding: 26rem 24rem;
  }
  .service-card__icon {
    width: 48rem;
    height: 48rem;
    margin-bottom: 16rem;
  }
  .service-card__icon svg { width: 22rem; height: 22rem; }
  .service-card__title {
    font-size: 14rem;
    letter-spacing: 0.12em;
    margin-bottom: 10rem;
  }
  .service-card__desc {
    font-size: 14rem;
    line-height: 1.58;
  }

  .work { padding-top: 72rem; }
  .work__head { margin-bottom: 24rem; }
  .work-section { height: auto; padding-block: 8rem 0; overflow: hidden; }
  .work-track {
    /* Must be a constrained-width flex container for overflow-x scroll to work */
    position: relative;
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* hide the scrollbar visually but keep scrollability */
    scrollbar-width: none;
    padding: 4rem var(--gutter) 22rem;
    height: auto;
    gap: 16rem;
    /* stop cards from being clipped at the trailing edge */
    padding-inline-end: var(--gutter);
  }
  .work-track::-webkit-scrollbar { display: none; }
  .work-card {
    scroll-snap-align: start;
    flex: 0 0 clamp(280rem, 82vw, 350rem);
    width: clamp(280rem, 82vw, 350rem);
    height: auto;
    min-height: 0;
    grid-template-rows: minmax(210rem, 58vw) auto;
  }
  .work-card__foot {
    padding: 16rem 18rem 18rem;
    gap: 6rem;
    overflow: visible;
  }
  .work-card__cat {
    font-size: 11rem;
    letter-spacing: 0.16em;
  }
  .work-card__title { font-size: 16rem; }
  .work-card__cta {
    transform: none;
    font-size: 11rem;
    letter-spacing: 0.12em;
  }
  .work + .process {
    padding-top: 24rem;
  }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .achieve { padding-top: 84rem; }
  .testimonial {
    padding: 38rem 24rem 28rem;
    margin-top: 22rem;
  }
  .testimonial__quote { font-size: 96rem; opacity: 0.38; left: 22rem; }
  .testimonial__slides { min-height: 0; }
  .testimonial__text {
    font-size: 16rem;
    line-height: 1.68;
    color: var(--text-primary);
  }
  .testimonial__author strong { font-size: 14rem; }
  .testimonial__author span {
    font-size: 13rem;
    color: var(--text-secondary);
  }
  .dot {
    min-width: 44px;
    min-height: 44px;
  }
  .news-card {
    aspect-ratio: 16 / 10;
  }
  .news-card__body {
    left: 18rem;
    right: 18rem;
    bottom: 18rem;
  }
  .news-card__cat,
  .news-card__date {
    letter-spacing: 0.14em;
  }
  .news-card__title {
    font-size: 17rem;
  }
  .cta {
    padding-block: 72rem;
  }
  .cta__grid {
    gap: 28rem;
  }
  .cta__phone-wrap {
    transform: none;
  }
  .cta__phone {
    width: clamp(132rem, 38vw, 180rem);
    border-radius: 28rem;
  }
  .cta__lead {
    font-size: 15rem;
    line-height: 1.65;
    margin-bottom: 24rem;
  }

  /* Sticky grid: 2 columns x 6 rows */
  .block.block--main { height: 280vh; }
  .gallery__grid { row-gap: 22rem; column-gap: 18rem; }
  .gallery__item:nth-child(n + 9) { display: none; }
  /* sticky-grid.js detects this and reduces zoom scale */
}

/* --------- 560 --------- */
@media (max-width: 560px) {
  :root { --gutter: 18rem; }
  body > .preloader,
  body > .cursor,
  body > .site-header,
  body > main,
  body > .site-footer,
  body > .footer,
  main {
    max-width: 100%;
    overflow-x: clip;
  }
  main,
  .container,
  .site-header,
  .hero,
  .logos,
  .about,
  .services,
  .work,
  .work-section,
  .process,
  .achievements,
  .testimonials,
  .news,
  .cta,
  .site-footer,
  .footer {
    width: 100%;
    max-width: 100%;
  }
  .container {
    overflow-wrap: anywhere;
  }
  .section,
  .hero__bg,
  .hero__veil,
  .work-track,
  .logos__track,
  .partners__track,
  .phone-slides {
    max-width: none;
  }
  .section {
    padding-block: 56px;
  }
  .hero {
    padding-block: 112px 48px;
  }
  .hero__title {
    font-size: clamp(38px, 10.5vw, 46px);
    line-height: 0.98;
  }
  .hero__inner,
  .hero__copy,
  .section-head,
  .section-head--row {
    min-width: 0;
    max-width: 100%;
  }
  .hero__c {
    width: min(72vw, 280px);
    max-width: 100%;
  }
  .hero__c-glow {
    width: 72vw;
    max-width: 280px;
  }
  .h-display {
    font-size: clamp(32px, 9vw, 40px);
    line-height: 1;
  }
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.12em;
    margin-bottom: 16rem;
  }
  .btn {
    font-size: 13px;
    padding: 13px 18px;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
  }
  .hero__cta,
  .page-hero__cta {
    gap: 10px;
  }
  .services__grid { grid-template-columns: 1fr; }
  .news__grid     { grid-template-columns: 1fr; }
  .timeline { padding-block: 12rem; }
  .timeline__nodes { grid-template-columns: 1fr; row-gap: 22rem; }
  .step { gap: 8rem; }
  .step__circle {
    width: 64rem;
    height: 64rem;
  }
  .step__circle svg { width: 24rem; height: 24rem; }
  .step__title {
    font-size: 15rem;
    letter-spacing: 0.12em;
  }
  .step__desc {
    font-size: 14rem;
    line-height: 1.55;
    max-width: 300rem;
  }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 14rem; }
  .work + .process { padding-top: 28rem; }
  .stat { padding: 20rem 16rem; }
  .stat__num { font-size: 34rem; }
  .stat__label {
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-top: 8rem;
  }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__grid {
    gap: 30rem;
    padding-block: 58rem 44rem;
  }
  .footer__col h4 {
    font-size: 12rem;
    letter-spacing: 0.1em;
    margin-bottom: 16rem;
  }
  .footer__col:not(.footer__brand) a,
  .footer__col:not(.footer__brand) span:not(.footer__icon) {
    font-size: 15rem;
    line-height: 1.45;
  }
  .footer__col ul:not(.socials) { gap: 12rem; }
  .footer__tagline { font-size: 15rem; }
  .footer__copy,
  .footer__legal a {
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.06em;
  }
  .footer__bottom-inner { flex-direction: column; text-align: center; gap: 12rem; }
  .footer__newsletter-field { flex-direction: column; border-radius: var(--r-lg); padding: 14rem; }
  .footer__newsletter-btn { width: 100%; justify-content: center; }
  .footer__newsletter-input {
    padding-block: 8rem;
    min-width: 0;
    width: 100%;
  }
  .logos__track {
    gap: 38rem;
  }
  .logos__item { letter-spacing: 0.12em; }
  .testimonial__quote { font-size: 84rem; }
  .cta__phone-wrap { order: 2; }
  .cta__copy { order: 1; }
  .cta__copy h2 { margin-bottom: 16rem; }
  .cta {
    padding-block: 56px;
  }
  .cta__grid,
  .footer__grid,
  .footer__bottom-inner {
    min-width: 0;
    max-width: 100%;
  }
  .cta__streak {
    right: -24%;
    width: 96%;
    max-width: 100vw;
  }
  .cta__phone {
    max-width: 70vw;
  }
  .partners__marquee,
  .block,
  .block__wrapper {
    max-width: 100%;
    overflow-x: clip;
  }
  .logos__viewport {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
  }
  .block__wrapper {
    padding-inline: 0;
  }
  .gallery {
    width: min(88vw, 320px);
    max-width: calc(100vw - 36px);
  }
  .content {
    padding-inline: var(--gutter);
    max-width: 100%;
  }
  .content__description {
    max-width: min(100%, 320px);
  }
}

@media (max-width: 480px) {
  .services__grid { grid-template-columns: 1fr; }
  .service-card {
    padding: 22rem 20rem;
  }
  .service-card__icon {
    width: 44rem;
    height: 44rem;
    margin-bottom: 14rem;
  }
  .work-track {
    padding-inline-start: var(--gutter);
    padding-inline-end: 14vw;
  }
  .work-card {
    flex-basis: clamp(252px, 79vw, 330px);
    width: clamp(252px, 79vw, 330px);
    max-width: calc(100vw - 54px);
    grid-template-rows: minmax(178px, 50vw) auto;
  }
  .work-card__foot {
    padding: 14px 16px 16px;
  }
  .work-card__cat,
  .work-card__cta,
  .news-card__cat,
  .news-card__date {
    font-size: 12px;
    letter-spacing: 0.08em;
  }
  .work-card__title,
  .news-card__title {
    font-size: 16px;
    line-height: 1.3;
  }
}

/* --------- 380 --------- */
@media (max-width: 380px) {
  .hero__title { font-size: 38px; }
  .h-display   { font-size: 32px; }
  .btn         { padding: 12px 16px; font-size: 13px; }
  .section     { padding-block: 52px; }
  .work-card {
    flex-basis: 78vw;
    width: 78vw;
  }
}

/* Touch devices — disable custom cursor */
@media (hover: none), (pointer: coarse) {
  html, body, * { cursor: auto !important; }
  .cursor { display: none !important; }
}
