/* ==========================================================================
   Mobile (<= 768px) pixel pass against the Figma mobile frames
   (LP Mobile 704:8736, Case Study 561:7286, Contact 561:7148, Services 561:3828)
   Loaded last on every page. Desktop is untouched.
   ========================================================================== */
@media (max-width: 768px) {
  /* ---------- Header: 64px bar inside the 20px rails ---------- */
  .header-wrapper:not(.is-scrolled) .navbar {
    width: calc(100% - 40px) !important;
    max-width: none !important;
    margin: 0 20px !important;
    height: 64px;
    padding: 18px 20px !important;
    box-sizing: border-box;
    border-left: 1px solid #E6E6E6 !important;
    border-right: 1px solid #E6E6E6 !important;
    border-bottom: 1px solid #E6E6E6 !important;
    align-items: center;
  }

  .brand-icon.brand-icon-full {
    width: 75.75px;
    height: 28px;
  }

  /* ---------- Landing hero: 768px, rails at 20px ---------- */
  .hero-section {
    height: 768px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 120px 20px 0 !important;
    justify-content: flex-start !important;
    align-items: center;
  }

  .hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    right: 20px;
    border-left: 1px solid #E6E6E6;
    border-right: 1px solid #E6E6E6;
    pointer-events: none;
    z-index: 3;
  }

  .hero-content {
    gap: 0 !important;
  }

  .hero-mobile-heading {
    font-size: 40px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.04em !important;
  }

  .hero-subtitle {
    margin-top: 8px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    max-width: 348px !important;
  }

  .hero-actions {
    margin-top: 40px !important;
  }

  .hero-actions .btn-primary-large,
  .hero-actions button {
    height: 56px !important;
    padding: 8px 24px 8px 8px !important;
    font-size: 16px !important;
  }

  .hero-actions .btn-icon-circle {
    width: 40px !important;
    height: 40px !important;
  }

  .trusted-strip {
    margin-top: 64px !important;
    gap: 16px !important;
  }

  .trusted-title {
    font-size: 16px !important;
    line-height: 24px !important;
  }

  /* ---------- Shared section frame: 80px / 20px padding, 40px between header and body ---------- */
  .services-section,
  .work-section,
  .why-us-section,
  .process-section,
  .testimonials-section,
  .faqs-section {
    padding: 80px 20px !important;
    gap: 40px !important;
  }

  .services-header,
  .work-header,
  .why-us-header,
  .process-header,
  .testimonials-header,
  .faqs-header {
    gap: 24px !important;
    width: 100%;
  }

  .services-headline-row,
  .work-headline-row,
  .process-headline-row,
  .faqs-headline-row {
    gap: 8px !important;
  }

  .services-headline-title,
  .work-headline-title,
  .why-us-title,
  .process-title,
  .testimonials-title,
  .faqs-title {
    font-size: 30px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.04em !important;
  }

  .services-headline-desc,
  .work-headline-desc,
  .process-headline-desc,
  .faqs-headline-desc {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  /* paragraph copy wraps naturally on mobile (the manual line breaks are desktop-only) */
  .services-headline-desc br,
  .work-headline-desc br,
  .process-headline-desc br,
  .faqs-headline-desc br,
  .hero-subtitle br {
    display: none;
  }

  /* ---------- Why Us: the comparison table keeps its 1280px layout and scrolls sideways (Figma 704:13720) ---------- */
  .comparison-table-wrapper {
    overflow-x: auto !important;
  }

  .comparison-row {
    grid-template-columns: 180px 550px 550px !important;
    width: 1280px !important;
    min-width: 1280px !important;
  }

  .comparison-row .comp-feature-cell,
  .comparison-row .comp-qts-cell,
  .comparison-row .comp-trad-cell {
    padding: 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .comparison-row.comparison-head {
    min-height: 81px !important;
    height: 81px !important;
  }

  /* ---------- Stats: 2x2 grid, 40px padding ---------- */
  .metrics-section {
    padding: 40px 20px !important;
  }

  .metrics-container {
    gap: 40px 0 !important;
  }

  .metric-card {
    gap: 4px !important;
  }

  .metric-number {
    font-size: 48px !important;
    line-height: 1.1 !important;
  }

  .metric-label {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* ---------- Process: fixed 400px cards (500px for Development), Figma 704:13799 ---------- */
  .process-card {
    min-height: 400px;
  }

  .process-row-2 .process-card:first-child {
    min-height: 500px;
  }

  /* ---------- Founders note: 374px card, photo bottom-right, footer row (Figma 704:14002) ---------- */
  .founder-note-section {
    padding: 48px 20px !important;
    height: auto !important;
  }

  .founder-note-panel {
    width: 100% !important;
    max-width: none !important;
    padding: 8px 8px 16px !important;
  }

  .founder-note-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .founder-note-copy {
    padding: 24px 24px 24px !important;
  }

  .founder-note-title {
    font-size: 32px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.04em !important;
    white-space: normal !important;
  }

  .founder-note-body {
    font-size: 14px !important;
    line-height: 1.6 !important;
    text-align: justify !important;
  }

  .founder-note-photo {
    width: 84% !important;
    height: auto !important;
    flex: none !important;
    align-self: flex-end;
    aspect-ratio: 488 / 355;
  }

  .founder-note-footer {
    padding: 0 16px !important;
  }

  .founder-note-label {
    font-size: 16px !important;
  }

  /* ---------- FAQs: 20px item padding, 16px between items (Figma 704:14017) ---------- */
  .faqs-grid-wrapper {
    gap: 40px !important;
  }

  .faqs-accordion-list {
    gap: 16px !important;
  }

  .faq-item {
    padding: 20px !important;
  }

  .faq-header {
    font-size: 16px !important;
    line-height: 1.5 !important;
    min-height: 24px;
    padding: 0 !important;
  }

  .faq-answer-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 0 !important;
  }

  .faq-item.active {
    gap: 16px !important;
  }

  .faq-sidebar-card {
    padding: 20px !important;
  }

  /* ---------- Footer: rails at 20px, 60px between blocks, 96px "Project In Mind?" (Figma 704:14104) ---------- */
  .site-footer {
    position: relative;
    padding: 0 20px !important;
  }

  .site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    right: 20px;
    border-left: 1px solid #E6E6E6;
    border-right: 1px solid #E6E6E6;
    pointer-events: none;
    z-index: 3;
  }

  .footer-inner-container {
    padding: 40px 21px 0 !important;
    gap: 60px !important;
  }

  .footer-top-row {
    gap: 60px !important;
  }

  .footer-logo-box.footer-logo-full {
    width: 75.75px;
    height: 28px;
  }

  .footer-giant-statement {
    margin: 60px 0 -20px !important;
    font-size: 96px !important;
    line-height: 1 !important;
    height: auto !important;
    text-align: center;
  }

  .footer-giant-statement .giant-mobile {
    display: block;
  }

  .footer-bottom-bar {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 24px 0 24px !important;
    margin: 0 -21px !important;
    width: auto !important;
    text-align: center;
  }

  .footer-legal-text {
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center;
  }

  .footer-nav-columns {
    grid-template-columns: 220px 1fr !important;
    gap: 32px 0 !important;
  }

  .footer-nav-col {
    gap: 16px !important;
  }

  .footer-col-heading {
    font-size: 14px !important;
    line-height: 16px !important;
  }

  .footer-links-list {
    gap: 0 !important;
  }

  .footer-links-list li,
  .footer-links-list a {
    font-size: 16px !important;
    line-height: 25px !important;
  }

  .footer-credentials-row {
    margin-top: 8px;
  }

  /* ---------- Final CTA banner: 382px card, 80px section padding (Figma 704:14087) ---------- */
  .cta-banner-section {
    padding: 80px 24px !important;
  }

  .cta-banner-card {
    min-height: 747px;
    padding: 48px 20px 20px !important;
    gap: 40px !important;
    border-radius: 32px !important;
  }

  .cta-banner-content {
    padding: 0 28px !important;
    gap: 24px !important;
  }

  .cta-banner-title {
    font-size: 30px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.04em !important;
    text-align: center !important;
  }

  .cta-banner-desc {
    font-size: 14px !important;
    line-height: 1.6 !important;
    text-align: center !important;
  }

  .cta-banner-actions {
    gap: 8px !important;
  }

  .cta-banner-actions .btn-white,
  .cta-banner-actions .btn-outline-white {
    height: 45px !important;
  }

  .cta-cal-glass-container,
  .cta-cal-glass-container #my-cal-inline-15min,
  .cta-cal-glass-container #my-cal-inline-15min iframe {
    height: 333px;
    min-height: 333px;
    max-height: 333px;
  }

  /* ---------- Case study: hero starts right under the 64px header ---------- */
  .cs-hero-section {
    margin-top: 64px !important;
  }

  /* ---------- Contact: 64px header, hero rails, compact calendar card (Figma 561:7148) ---------- */
  .contact-page-wrapper {
    padding-top: 64px !important;
  }

  .contact-hero-frame {
    margin: 0 20px;
    border-left: 1px solid #E6E6E6;
    border-right: 1px solid #E6E6E6;
    width: auto !important;
  }

  .contact-intro-group {
    padding: 20px !important;
  }

  .contact-hero-right {
    padding: 24px !important;
    height: auto !important;
    margin: 0 -1px;
  }

  .contact-calendar-frame {
    height: auto !important;
    max-width: none !important;
    width: 100% !important;
  }

  .contact-calendar-box {
    min-height: 0 !important;
    height: auto !important;
    background: #FFFFFF;
  }

  .contact-calendar-box .product-item {
    padding: 0 !important;
    background: transparent !important;
  }

  .contact-calendar-box #my-cal-inline-15min,
  .contact-calendar-box #my-cal-inline-15min iframe {
    height: 400px !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  .contact-testimonial-card-wrap {
    padding: 0 20px 20px !important;
  }

  /* ---------- Service page (Figma 561:3828) ---------- */
  .service-page-wrapper {
    padding-top: 64px !important;
  }

  .service-hero-section {
    padding: 0 20px !important;
    min-height: 0 !important;
  }

  .service-hero-frame {
    border-left: 1px solid #E6E6E6 !important;
    border-right: 1px solid #E6E6E6 !important;
    min-height: 0 !important;
  }

  .service-hero-content {
    padding: 80px 20px !important;
    min-height: 0 !important;
  }

  .service-hero-main-content {
    gap: 24px !important;
  }

  .service-hero-text-block {
    gap: 16px !important;
  }

  .service-hero-title {
    font-size: 36px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.04em !important;
  }

  .service-hero-desc {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  .service-hero-inner {
    gap: 40px !important;
  }

  .service-capabilities-section,
  .service-tech-ecosystem-section,
  .service-case-study-section,
  .service-faqs-section {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
    gap: 40px !important;
  }

  .service-section-header {
    gap: 24px !important;
  }

  .service-section-top-bar {
    gap: 8px !important;
  }

  .service-section-title {
    font-size: 30px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.04em !important;
  }

  .service-section-subtitle {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .faq-card-item {
    padding: 20px !important;
    gap: 0 !important;
  }

  .faq-card-item.active {
    gap: 16px !important;
  }

  .faq-question-row {
    min-height: 24px;
  }

  .faq-question-text {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* ---------- About / case studies page: same 64px header + 80px top spacing as the other pages ---------- */
  .about-hero {
    padding: 144px 0 80px !important;
    position: relative;
  }

  .about-hero::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    right: 20px;
    border-left: 1px solid #E6E6E6;
    border-right: 1px solid #E6E6E6;
    pointer-events: none;
    z-index: 3;
  }

  /* ---------- Smooth header on scroll: same geometry in both states, only colour/blur fade ---------- */
  .header-wrapper {
    padding: 0 !important;
    background-color: rgba(250, 250, 250, 0);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0) !important;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease,
                box-shadow 0.3s ease, border-color 0.3s ease !important;
    will-change: background-color, backdrop-filter;
  }

  .header-wrapper.is-scrolled {
    background-color: rgba(250, 250, 250, 0.94) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  }

  .header-wrapper .navbar,
  .header-wrapper.is-scrolled .navbar {
    width: calc(100% - 40px) !important;
    max-width: none !important;
    margin: 0 20px !important;
    height: 64px;
    padding: 18px 20px !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    border-left: 1px solid #E6E6E6 !important;
    border-right: 1px solid #E6E6E6 !important;
    border-bottom: 1px solid #E6E6E6 !important;
    border-top: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease !important;
  }

  /* the rails/rule fade out once the frosted bar takes over */
  .header-wrapper.is-scrolled .navbar {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-bottom-color: transparent !important;
  }
}
