/* Mobile layout templates for in-scope marketing pages (≤768px). Excludes Work, Capabilities, How-to-work. */
@media (max-width: 768px) {
  :is([class$="-page"], .solution-page, .landing-page):not(.work-page):not(.capabilities-page):not(.how-page),
  :is([class$="-page"], .solution-page, .landing-page):not(.work-page):not(.capabilities-page):not(.how-page) .page-scaler {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* ——— bs-hero (brand / service pages) ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero {
    position: relative !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    padding: 16px var(--tvl-gutter, 20px) 28px;
    overflow: hidden;
    pointer-events: auto;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__bg {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: min(52vh, 380px) !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__ellipse {
    display: none;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__eyebrow,
  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__title,
  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__lead,
  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__visual {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100%;
    white-space: normal !important;
    z-index: 1;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__title {
    margin: 0 0 12px;
    font-size: var(--tvl-m-display) !important;
    line-height: 1.15 !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__lead {
    margin: 0 0 16px;
    font-size: var(--tvl-m-body) !important;
    line-height: 1.45 !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__visual {
    width: min(100%, 340px) !important;
    height: auto !important;
    margin: 0 auto;
    order: 3;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .bs-hero__visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* ——— Benefits (why-reddit) — horizontal scroll, no pin (channel landing pages keep scroll-pinned track) ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit--scroll-reveal .why-reddit__pin,
  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit--scroll-reveal.is-benefits-pinned .why-reddit__pin {
    position: relative !important;
    top: auto !important;
    transform: none !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit__pin-spacer {
    display: none !important;
    height: 0 !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit__viewport::-webkit-scrollbar {
    display: none;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit__track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    width: max-content !important;
    transform: none !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit__eyebrow {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 0 10px;
    white-space: normal !important;
  }

  /* ——— Solution process grid ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .process {
    padding: 36px var(--tvl-gutter, 20px) !important;
    margin-bottom: 24px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process__eyebrow {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 0 10px;
    white-space: normal !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process__title {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 0 0 20px;
    font-size: var(--tvl-m-display) !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    text-align: left;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process__grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process-card--photo {
    padding: 0;
    aspect-ratio: 4 / 3;
    min-height: 120px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process-card--copy {
    padding: 18px 14px;
    min-height: 120px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .process-card h3,
  :not(.work-page):not(.capabilities-page):not(.how-page) .process-card p {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: 100%;
    white-space: normal !important;
  }

  /* ——— Niche block ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block {
    position: relative !important;
    height: auto !important;
    padding: 32px var(--tvl-gutter, 20px) !important;
    margin-bottom: 24px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__panel,
  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__content,
  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__visual,
  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__bg {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__visual {
    margin-top: 16px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 20px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__title,
  :not(.work-page):not(.capabilities-page):not(.how-page) .niche-block__text {
    white-space: normal !important;
    width: auto !important;
    max-width: 100%;
  }

  /* ——— Ad formats & benefit cards ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .ad-formats,
  :not(.work-page):not(.capabilities-page):not(.how-page) main:not(.channel-landing-page) .why-reddit {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 32px var(--tvl-gutter, 20px) !important;
    margin-bottom: 24px;
    box-sizing: border-box;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .ad-formats__grid {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 14px;
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin-top: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .ad-formats__grid::-webkit-scrollbar {
    display: none;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card {
    flex: 0 0 min(82vw, 280px);
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: min(82vw, 280px) !important;
    height: auto !important;
    min-height: 0;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__shell,
  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__copy,
  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__preview,
  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__head,
  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__head h3,
  :not(.work-page):not(.capabilities-page):not(.how-page) .format-card__copy p {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    transform: none !important;
    white-space: normal !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .benefit-card {
    position: relative !important;
    flex: 0 0 min(78vw, 260px);
    width: min(78vw, 260px) !important;
    height: auto !important;
    left: auto !important;
    top: auto !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .benefit-card__image,
  :not(.work-page):not(.capabilities-page):not(.how-page) .benefit-card__body,
  :not(.work-page):not(.capabilities-page):not(.how-page) .benefit-card__body h3,
  :not(.work-page):not(.capabilities-page):not(.how-page) .benefit-card__body p {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    white-space: normal !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .industry,
  :not(.work-page):not(.capabilities-page):not(.how-page) .testimonials,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-studies {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 32px var(--tvl-gutter, 20px) !important;
    box-sizing: border-box;
  }

  /* ——— Brand: value-prop, included, approach, growth-services ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop,
  :not(.work-page):not(.capabilities-page):not(.how-page) .included,
  :not(.work-page):not(.capabilities-page):not(.how-page) .approach,
  :not(.work-page):not(.capabilities-page):not(.how-page) .growth-services {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 32px var(--tvl-gutter, 20px) !important;
    margin-bottom: 32px;
    box-sizing: border-box;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop__card,
  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .included__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .included__accordion,
  :not(.work-page):not(.capabilities-page):not(.how-page) .approach__grid,
  :not(.work-page):not(.capabilities-page):not(.how-page) .approach__card,
  :not(.work-page):not(.capabilities-page):not(.how-page) .growth-services__grid,
  :not(.work-page):not(.capabilities-page):not(.how-page) .growth-services__card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin: 0 0 16px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .included__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 24px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop__title,
  :not(.work-page):not(.capabilities-page):not(.how-page) .value-prop__text,
  :not(.work-page):not(.capabilities-page):not(.how-page) .included__title {
    position: relative !important;
    width: auto !important;
    max-width: 100%;
    white-space: normal !important;
    font-size: var(--tvl-m-display) !important;
    line-height: 1.15 !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .included__item {
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .approach__grid,
  :not(.work-page):not(.capabilities-page):not(.how-page) .growth-services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ——— Company page ——— */
  .company-page .philosophy,
  .company-page .team,
  .company-page .studio-history {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 24px var(--tvl-gutter, 20px);
    box-sizing: border-box;
  }

  .company-page .philosophy__title,
  .company-page .team__title,
  .company-page .studio-history__title {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    white-space: normal !important;
    font-size: var(--tvl-m-display) !important;
  }

  .company-page .team__grid,
  .company-page .philosophy__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .company-page .team__member,
  .company-page .philosophy__card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .company-page .philosophy__card-title,
  .company-page .philosophy__card-text,
  .company-page .team__member-photo,
  .company-page .team__member-name,
  .company-page .team__member-role,
  .company-page .studio-history__timeline,
  .company-page .studio-history__item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    white-space: normal !important;
  }

  /* ——— Blog ——— */
  .blog-inner-page .blog-article-hero {
    position: relative !important;
    height: auto !important;
    padding: 24px var(--tvl-gutter, 20px);
  }

  .blog-inner-page .blog-article__content,
  .blog-inner-page .blog-article__sidebar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    padding: 0 var(--tvl-gutter, 20px);
  }

  /* ——— Contact page (unique layout) ——— */
  .contact-page .contact-hero {
    position: relative !important;
    top: auto !important;
    height: min(42vh, 280px) !important;
    overflow: hidden;
  }

  .contact-page .contact-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .contact-page .contact-panel {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 24px var(--tvl-gutter, 20px) 40px;
  }

  /* ——— Case studies: vertical cards (no desktop stack overlap) ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-studies,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-studies--stack {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 32px var(--tvl-gutter, 20px) 40px !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study-pin,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study-stack {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    pointer-events: auto;
    will-change: auto !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tanishq,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tata {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(30, 30, 30, 0.1);
    padding: 20px var(--tvl-gutter, 20px) 24px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__tag,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__name,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__desc,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__services,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__cta,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__media-zoom,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__tag,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__name,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__desc,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__services,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__cta,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tanishq .case-study__media,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tata .case-study__media {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100%;
    white-space: normal !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__tag {
    order: 0;
    letter-spacing: 3px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__name {
    order: 1;
    font-size: var(--tvl-m-display) !important;
    line-height: 1.05 !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__desc {
    order: 2;
    font-size: var(--tvl-m-body) !important;
    line-height: 1.45 !important;
    opacity: 1;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__services {
    order: 3;
    padding-left: 0;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__cta {
    order: 4;
    align-self: flex-start;
    min-width: 44px;
    min-height: 44px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__media {
    order: 5;
    aspect-ratio: 16 / 10;
    min-height: 0;
    max-height: none;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 10px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__media-zoom {
    height: 100%;
    width: 100%;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study__media img,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--titan .case-study__media img,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tanishq .case-study__media img,
  :not(.work-page):not(.capabilities-page):not(.how-page) .case-study--tata .case-study__media img {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
    border-radius: 10px;
  }

  /* Brand Strategy — separate stack markup (bs-case-*) */
  .brand-strategy-page .bs-case-studies-stack {
    height: auto !important;
    min-height: 0 !important;
    padding: 32px var(--tvl-gutter, 20px) 40px !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .brand-strategy-page .bs-case-study-pin,
  .brand-strategy-page .bs-case-study-pin:nth-child(1),
  .brand-strategy-page .bs-case-study-pin:nth-child(2),
  .brand-strategy-page .bs-case-study-pin:nth-child(3) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .brand-strategy-page .bs-case-study-motion {
    height: auto !important;
    transform: none !important;
    will-change: auto !important;
  }

  .brand-strategy-page .bs-case-studies-stack .case-study,
  .brand-strategy-page .bs-case-studies-stack .case-study--tanishq,
  .brand-strategy-page .bs-case-studies-stack .case-study--tata {
    top: auto !important;
    height: auto !important;
  }

  /* ——— FAQ ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) .faq {
    padding: 32px var(--tvl-gutter, 20px) !important;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .faq__item,
  :not(.work-page):not(.capabilities-page):not(.how-page) .faq__trigger,
  :not(.work-page):not(.capabilities-page):not(.how-page) .faq__panel {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
  }

  /* ——— Section spacing ——— */
  :not(.work-page):not(.capabilities-page):not(.how-page) > :is(section, .section-contact-wrap) {
    margin-bottom: 40px;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) > [data-site-footer] {
    margin-top: 0;
  }

  :not(.work-page):not(.capabilities-page):not(.how-page) .page-scaler,
  :not(.work-page):not(.capabilities-page):not(.how-page) .page-shell {
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  :not(.work-page):not(.capabilities-page):not(.how-page) .process__grid {
    grid-template-columns: 1fr;
  }
}
