/* ============================================================
   APEX CREATIVE — Mobile Responsive Overrides
   Covers: 768px, 640px, 480px, 380px breakpoints
   Applied site-wide via <link> in every HTML page
============================================================ */

/* ────────────────────────────────────────────────────────────
   0. BASE SAFETY — prevent all horizontal scroll
──────────────────────────────────────────────────────────── */
html, body {
  overflow-x: hidden;
  width: 100%;
}
*, *::before, *::after {
  max-width: 100%;
}

/* ────────────────────────────────────────────────────────────
   1. NAVBAR
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 16px 0; }
  .navbar.scrolled { padding: 12px 0; }

  .nav-inner {
    padding: 0 18px;
    gap: 0;
  }

  /* Logo never shrinks awkwardly */
  .nav-logo-img {
    height: 36px;
  }

  /* Desktop links and CTA hidden — already in style.css,
     reinforced here to be certain */
  .nav-links, .nav-cta { display: none !important; }
  .hamburger { display: flex !important; margin-left: auto; }

  /* Mobile drawer */
  .mobile-menu {
    padding: 24px 20px;
    gap: 4px;
  }
  .mobile-menu a {
    font-size: 1.15rem;
    padding: 13px 28px;
    width: 100%;
    max-width: 320px;
  }
  .mobile-menu .btn {
    margin-top: 20px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ────────────────────────────────────────────────────────────
   2. GLOBAL TYPOGRAPHY & SPACING
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section   { padding: 64px 0; }

  /* Global heading scale-down */
  h1 { font-size: clamp(1.55rem, 6.5vw, 2rem);   line-height: 1.18; letter-spacing: -0.02em; }
  h2 { font-size: clamp(1.35rem, 5.8vw, 1.75rem); line-height: 1.22; }
  h3 { font-size: clamp(0.95rem, 4.2vw, 1.15rem); }
  h4 { font-size: 0.95rem; }

  p  { font-size: 0.92rem; }

  /* Inner page heroes */
  .page-hero h1 {
    font-size: clamp(1.5rem, 6.2vw, 1.95rem);
    margin: 8px 0 12px;
  }

  /* Section headers */
  .section-header       { margin-bottom: 40px; }
  .section-header h2    { margin: 6px 0 10px; }
  .section-sub          { font-size: 0.88rem; }

  /* CTA section */
  .cta-section h2 { font-size: clamp(1.35rem, 5.8vw, 1.75rem); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section   { padding: 52px 0; }

  h1 { font-size: clamp(1.4rem, 7vw, 1.75rem);  line-height: 1.2; }
  h2 { font-size: clamp(1.25rem, 6.5vw, 1.55rem); }
  h3 { font-size: clamp(0.9rem, 4vw, 1.05rem); }

  .page-hero h1 {
    font-size: clamp(1.35rem, 7vw, 1.7rem);
  }

  .section-header { margin-bottom: 32px; }
}

/* ────────────────────────────────────────────────────────────
   3. PAGE HERO (inner pages)
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-hero {
    padding: 120px 0 60px;
  }
  .page-hero h1 {
    margin: 10px 0 14px;
  }
  .page-hero p {
    font-size: 0.95rem;
    max-width: 100%;
    padding: 0 4px;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 108px 0 48px;
  }
}

/* ────────────────────────────────────────────────────────────
   4. BUTTONS
──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Large buttons go full-width inside .cta-actions and .hero-btns */
  .cta-actions .btn-lg,
  .hero-btns .btn-lg {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
  }

  .btn-lg { font-size: 0.9rem; padding: 14px 26px; }
  .btn    { font-size: 0.85rem; padding: 12px 22px; }
}

/* ────────────────────────────────────────────────────────────
   5. CTA SECTION (shared)
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cta-section { padding: 72px 0; }
  .cta-section h2 { margin: 10px 0 14px; }
  .cta-section p  { font-size: 0.95rem; margin-bottom: 28px; }
  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .cta-section { padding: 56px 0; }
  .cta-actions .btn { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────────────────────
   6. FOOTER
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-top { padding: 56px 0 40px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1; /* full width on top */
  }
  .footer-brand p { max-width: 100%; }
  .footer-social  { flex-wrap: wrap; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-logo-img { height: 32px; }
  .footer-col h4  { margin-bottom: 14px; }
}

/* ────────────────────────────────────────────────────────────
   6b. FOOTER — DROPDOWN ACCORDION (mobile only)
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Toggle button styling */
  .footer-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0 !important;
    padding: 4px 0;
    width: 100%;
  }

  /* Chevron icon */
  .footer-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                color    0.25s ease;
    flex-shrink: 0;
  }

  /* Rotate chevron when open */
  .footer-dropdown.is-open .footer-chevron {
    transform: rotate(180deg);
    color: var(--cyan);
  }

  /* List hidden by default */
  .footer-dropdown-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
  }

  /* Spacing once list is open */
  .footer-dropdown.is-open .footer-dropdown-list {
    margin-top: 14px;
  }

  /* Divider line under the toggle heading */
  .footer-dropdown-toggle::after {
    display: none;
  }

  /* Add a subtle separator below each dropdown col */
  .footer-dropdown {
    border-bottom: 1px solid var(--border-faint);
    padding-bottom: 16px;
  }
}

/* ────────────────────────────────────────────────────────────
   7. HOME — HERO
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .home-hero {
    display: block !important;      /* stop flex from squeezing mobile rows */
    padding: 118px 0 0;
    min-height: auto;
    overflow: visible !important;
  }
  .home-hero .container {
    display: block !important;
    text-align: center;
    overflow: visible !important;
    position: relative;
  }

  /* Hero Text block — force visible on Safari */
  .hero-text {
    display: block !important;
    visibility: visible !important;
    opacity: 1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Hide the desktop scrolling columns */
  .hero-cols-outer { display: none !important; }

  /* Mobile scrolling rows — direct child of section, full width naturally */
  .hero-mobile-rows {
    display: block !important;
    width: 100%;
    margin-top: 36px;
    padding-bottom: 52px;
  }

  /* Badge */
  .hero-badge {
    font-size: 0.72rem;
    padding: 6px 14px;
    margin-bottom: 18px;
  }

  /* Hero H1 — fits in 2 lines */
  .hero-h1 {
    white-space: normal !important;
    font-size: clamp(1.55rem, 6vw, 2rem) !important;
    line-height: 1.18 !important;
    margin-bottom: 14px;
  }

  /* Paragraph */
  .hero-text p {
    font-size: 0.93rem;
    max-width: 100%;
    margin-bottom: 26px;
  }

  /* Buttons */
  .hero-btns {
    -webkit-flex-direction: column !important;
    flex-direction: column !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    gap: 12px;
    margin-bottom: 32px;
  }
  .hero-btns .btn {
    width: 100%;
    max-width: 320px;
    -webkit-box-pack: center;
    justify-content: center;
  }

  /* Stats row */
  .hero-mini-stats {
    -webkit-justify-content: center;
    justify-content: center;
    gap: 20px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 0;
  }
  .hero-stat-num  { font-size: 1.35rem; }
  .stat-sep       { height: 28px; }

  /* Scroll indicator */
  .hero-scroll { display: none !important; }
}

@media (max-width: 480px) {
  .home-hero { padding: 108px 0 0; }
  .hero-h1   { font-size: clamp(1.4rem, 6.5vw, 1.75rem) !important; }
  .hero-mini-stats { gap: 14px; }
  .stat-sep { display: none; }
  .hero-mini-stats > div { text-align: center; }
}

@media (max-width: 380px) {
  .hero-h1 { font-size: clamp(1.3rem, 6.8vw, 1.6rem) !important; }
}

/* ────────────────────────────────────────────────────────────
   8. HOME — OUR WORK
──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
  /* Hide desktop grid entirely */
  .work-grid { display: none !important; }

  /* Show slider + all slider styles */
  .work-slider-wrap {
    display: block !important;
    position: relative;
    margin: 0 -20px;
  }

  .work-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 0;
    padding: 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .work-slider::-webkit-scrollbar { display: none; }

  /* Each slide */
  .work-slide {
    flex: 0 0 calc(100% - 40px);
    scroll-snap-align: center;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    margin-right: 14px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
    will-change: transform;
    cursor: grab;
  }
  .work-slide:last-child { margin-right: 0; }

  /* Slide image */
  .work-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
  }

  /* Slide overlay */
  .work-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(6, 8, 20, 0.90) 0%,
      rgba(6, 8, 20, 0.50) 38%,
      rgba(6, 8, 20, 0.12) 70%,
      transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 20px;
  }
  .work-slide-overlay .work-cat {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 5px;
    display: block;
  }
  .work-slide-overlay h4 {
    font-size: 1.05rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
  }

  /* Active slide */
  .work-slide.is-active {
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  }

  /* Dot indicators */
  .work-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
  }
  .work-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
    flex-shrink: 0;
  }
  .work-slider-dot.is-active {
    background: var(--cyan);
    width: 24px;
    border-radius: 4px;
    transform: none;
  }

  /* Slide counter */
  .work-slider-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
  }
  #workSliderCurrent { color: var(--cyan); }
}

@media (max-width: 640px) {
  .work-footer { margin-top: 28px; }
  .work-footer .btn { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────────────────────
   9. HOME — SERVICES PREVIEW (4-card grid)
──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-preview-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 640px) {
  .services-preview-grid { grid-template-columns: 1fr; gap: 14px; }
  .svc-card { padding: 26px 22px; }
  .services-preview-footer { margin-top: 0; }
  .services-preview-footer .btn { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────────────────────
   10. HOME — TESTIMONIALS (scrolling)
──────────────────────────────────────────────────────────── */

/* ── WHO WE ARE — Trust Strip ── */
@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 768px) {
  .home-trust { padding: 64px 0; }
  .trust-grid { gap: 32px; }
  .trust-identity p { font-size: 0.88rem; }
  .trust-founder { padding: 14px 16px; }
}
@media (max-width: 480px) {
  .home-trust { padding: 52px 0; }
  .trust-pillar { gap: 14px; padding: 18px 0; }
  .trust-pillar-icon { width: 38px; height: 38px; font-size: 0.9rem; }
  .trust-pillar-body h4 { font-size: 0.87rem; }
}

@media (max-width: 768px) {
  .home-testimonials { padding: 64px 0 72px; }
  .tl-header { margin-bottom: 40px; }
  .tl-header h2 { margin: 8px 0 10px; }

  /* Hide second row — show only 1 row on mobile */
  .tl-row-2 { display: none !important; }

  .tl-platform-badges {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }
  .tl-badge { padding: 0 14px; }
  .tl-badge-divider { display: none; }

  .tl-card {
    width: 290px;
    padding: 20px 18px;
  }
  .tl-card-quote { font-size: 0.87rem; }
}

@media (max-width: 480px) {
  .home-testimonials { padding: 52px 0 60px; }
  .tl-platform-badges { flex-direction: column; align-items: center; gap: 16px; }
  .tl-card { width: 270px; }
}

/* ────────────────────────────────────────────────────────────
   11. MARQUEE STRIP
──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .marquee-strip { padding: 18px 0; }
  .marquee-strip-label { font-size: 0.62rem; letter-spacing: 0.1em; }
  .marquee-inner { gap: 24px; }
  .marquee-inner span { font-size: 0.75rem; }
}

/* ────────────────────────────────────────────────────────────
   12. PORTFOLIO PAGE
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .portfolio-filters {
    gap: 6px;
    margin-bottom: 32px;
  }
  .pf-btn {
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 540px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Make card titles always visible on mobile (no hover needed) */
  .port-overlay {
    opacity: 1 !important;
  }
  .port-cat,
  .port-overlay h4 {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Hide view btn on mobile — tap opens modal */
  .port-view-btn {
    opacity: 0.85 !important;
    transform: none !important;
    pointer-events: auto;
  }

  /* Modal */
  .port-modal {
    max-height: 92vh;
    border-radius: var(--radius);
  }
  .modal-hero-visual { height: 200px; }
  .modal-body { padding: 22px 18px 28px; }
  .modal-body h3 { font-size: 1.3rem; }
  .modal-meta {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .modal-meta-item:last-child {
    grid-column: 1 / -1;
  }
  .modal-tags { gap: 6px; }
}

/* ────────────────────────────────────────────────────────────
   13. SERVICES PAGE
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 56px;
  }
  .service-big-card {
    flex-direction: column;
    gap: 18px;
    padding: 28px 22px;
  }
  .svc-big-icon {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
  .svc-deliverables { gap: 6px; }
  .svc-tag { font-size: 0.68rem; padding: 4px 10px; }

  .addons-section { padding: 56px 0; }
  .addons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .addon-card { padding: 22px 18px; }

  /* ── Hide desktop grid on mobile, show slider ── */
  .addons-grid { display: none !important; }

  .pricing-section { padding: 64px 0; }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 18px;
  }
  .pricing-card { padding: 34px 26px; }
  .pricing-card.featured { transform: none; }
  .pricing-price { font-size: 2.2rem; }

  /* ── How It Works: compact vertical timeline on mobile ── */
  .process-strip { padding: 48px 0; }

  /* Switch from grid to flex column */
  .process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  /* Remove horizontal connector line */
  .process-steps::before { display: none; }

  /* Each step: horizontal row layout */
  .proc-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    position: relative;
    padding-bottom: 28px;
  }
  .proc-step:last-child { padding-bottom: 0; }

  /* Vertical connector line between steps */
  .proc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    bottom: 0;
    width: 1.5px;
    background: linear-gradient(to bottom, var(--cyan-border), transparent);
  }

  /* Number circle — smaller, stays left */
  .proc-num {
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0;
    flex-shrink: 0;
    z-index: 1;
  }

  /* Text content next to number */
  .proc-step-content {
    display: block;
    padding-top: 8px;
  }
  .proc-step h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--white);
  }
  .proc-step p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
  }
}

/* ════════════════════════════════════════════════════════════
   SERVICES PAGE — ADDON MOBILE SLIDESHOW
════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Show slider, bleed to edges for peek effect */
  .addon-slider-wrap {
    display: block !important;
    position: relative;
    margin: 0 -20px;
  }

  /* Scrollable track */
  .addon-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 0;
    padding: 4px 20px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .addon-slider::-webkit-scrollbar { display: none; }

  /* Each slide card */
  .addon-slide {
    flex: 0 0 calc(100% - 48px);
    scroll-snap-align: center;
    margin-right: 14px;
    background: rgba(9, 11, 23, 0.7);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 26px;
    text-align: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
    cursor: grab;
    will-change: transform;
  }
  .addon-slide:last-child { margin-right: 0; }

  /* Active slide glow */
  .addon-slide.is-active {
    border-color: var(--cyan-border);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.10), 0 12px 40px rgba(0,0,0,0.45);
  }

  /* Icon */
  .addon-slide-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
  }
  .addon-slide-icon i {
    font-size: 1.7rem;
    color: var(--cyan);
  }

  /* Text */
  .addon-slide h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
    line-height: 1.3;
  }
  .addon-slide p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
  }

  /* Dot indicators */
  .addon-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
  }
  .addon-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
    flex-shrink: 0;
  }
  .addon-slider-dot.is-active {
    background: var(--cyan);
    width: 24px;
    border-radius: 4px;
  }

  /* Slide counter */
  .addon-slider-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.06em;
  }
  #addonSliderCurrent { color: var(--cyan); }
}

@media (max-width: 480px) {
  .addon-slide { flex: 0 0 calc(100% - 40px); padding: 28px 22px; }
}

@media (max-width: 380px) {
  .addon-slide { flex: 0 0 calc(100% - 32px); padding: 24px 18px; }
}

@media (max-width: 480px) {
  .addons-grid { grid-template-columns: 1fr; }
  .service-big-card { padding: 24px 18px; }
  .pricing-card { padding: 28px 20px; }
  .proc-num { width: 40px; height: 40px; min-width: 40px; font-size: 0.76rem; }
  .proc-step:not(:last-child)::after { left: 20px; top: 44px; }
  .proc-step { gap: 14px; padding-bottom: 24px; }
}

/* ────────────────────────────────────────────────────────────
   14. ABOUT PAGE
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about-mission { padding: 64px 0; }
  .about-mission-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  /* Hide the decorative animated rings on small screens */
  .about-visual-stack { display: none; }

  .about-text-content h2 { margin: 10px 0 16px; }
  .about-checks li { font-size: 0.88rem; }

  .about-dna { padding: 64px 0; }
  .dna-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dna-card { padding: 28px 22px; }

  .about-story { padding: 64px 0; }
  .story-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  /* story-visual is now shown on mobile as image grid */
  .story-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 24px;
  }
  .story-stat { padding: 18px 16px; }
  .story-stat-num { font-size: 1.7rem; }

  /* Team marquee — reduce card size on mobile */
  .about-team { padding: 64px 0 0; }
  .about-team .section-header { margin-bottom: 36px; }
  .team-mc { width: 160px; flex-shrink: 0; }
  .team-track { gap: 12px; }
  .team-track-wrap { padding-bottom: 64px; overflow: hidden; }
  /* 6 cards × (160px + 12px gap) = 1032px per set */
  .team-track--left { animation: teamScrollLeftMobile 18s linear infinite !important; }
}

@media (max-width: 480px) {
  .dna-grid { grid-template-columns: 1fr; }
  .story-stats { grid-template-columns: 1fr 1fr; }
  .story-stat-num { font-size: 1.5rem; }
  .about-checks { gap: 10px; }

  /* Team marquee — even smaller cards */
  .about-team { padding: 52px 0 0; }
  .team-mc { width: 140px; flex-shrink: 0; }
  .team-track { gap: 10px; }
  .team-mc-body strong { font-size: 0.85rem; }
  .team-mc-body span { font-size: 0.68rem; }
  /* 6 cards × (140px + 10px gap) = 900px per set */
  .team-track--left { animation: teamScrollLeftSmall 15s linear infinite !important; }
}

/* ────────────────────────────────────────────────────────────
   15. CONTACT PAGE
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .contact-section { padding: 64px 0; }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-info h2 { margin: 10px 0 12px; }
  .contact-info > p { margin-bottom: 28px; font-size: 0.93rem; }

  .c-item { padding: 14px 16px; }
  .c-item strong { font-size: 0.83rem; }
  .c-item span   { font-size: 0.79rem; }

  .contact-form-wrap { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-title { font-size: 1.15rem; }

  .contact-faq { padding: 56px 0; }
  .faq-grid { grid-template-columns: 1fr; gap: 12px; }
  .faq-item { padding: 20px 20px; }
  .faq-q    { font-size: 0.88rem; }
  .faq-a    { font-size: 0.84rem; }
}

@media (max-width: 480px) {
  .contact-form-wrap { padding: 24px 16px; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  .c-social-btn { width: 40px; height: 40px; font-size: 0.9rem; }
}

/* ────────────────────────────────────────────────────────────
   16. GENERIC GRID UTILITIES (mobile stack)
──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  /* Cards */
  .card { padding: 26px 20px; }
  .card-icon { width: 46px; height: 46px; font-size: 1.1rem; }
}

/* ────────────────────────────────────────────────────────────
   17. TOUCH DEVICE — hover state resets
   On touch screens, :hover is sticky. Prevent cards from
   being "locked" in hover state after tap.
──────────────────────────────────────────────────────────── */
@media (hover: none) {
  /* Portfolio cards — always show title on touch */
  .port-overlay { opacity: 1 !important; }
  .port-cat,
  .port-overlay h4 { opacity: 1 !important; transform: none !important; }
  .port-view-btn   { opacity: 1 !important; transform: none !important; }

  /* Work grid cards */
  .work-overlay         { opacity: 1 !important; }
  .work-overlay-text    { opacity: 1 !important; transform: none !important; }

  /* Disable lift/scale transforms on tap */
  .card:hover,
  .svc-card:hover,
  .dna-card:hover,
  .addon-card:hover,
  .pricing-card:hover,
  .port-item:hover,
  .work-item:hover,
  .sv-block:hover       { transform: none !important; }

  /* Prevent image over-scale on tap */
  .port-item:hover .port-visual,
  .work-item:hover .work-img,
  .sv-block:hover .sv-img { transform: none !important; }

  /* Keep sv-overlay always visible on touch */
  .sv-block .sv-overlay { opacity: 1 !important; }
  .sv-block .sv-label   { opacity: 1 !important; transform: none !important; }
}

/* ────────────────────────────────────────────────────────────
   18. VERY SMALL SCREENS (< 380px — iPhone SE, Galaxy A03)
──────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .container { padding: 0 14px; }

  h1 { font-size: 1.3rem; line-height: 1.22; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 0.9rem; }

  .hero-h1 { font-size: 1.35rem !important; line-height: 1.22 !important; }
  .page-hero h1 { font-size: 1.3rem; }

  .hero-badge { font-size: 0.66rem; padding: 5px 11px; }

  .mobile-menu a { font-size: 1rem; padding: 11px 20px; }

  .pf-btn { padding: 7px 12px; font-size: 0.72rem; }

  .pricing-price { font-size: 1.9rem; }

  .contact-form-wrap { padding: 20px 14px; }

  .footer-social a { width: 34px; height: 34px; }
}
