/* ========== MOBILE OPTIMIZATIONS ========== */
@media (max-width: 767px) {
  :root {
    --header-height: 64px;
    --section-pad: 2.75rem;
  }

  body {
    font-size: 1rem;
  }

  .container {
    width: min(100% - 1.5rem, var(--container));
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  .section-header p,
  .stage-header p,
  .services-intro,
  .reviews-intro,
  .why-copy {
    font-size: 1rem;
    line-height: 1.65;
  }

  h1 {
    font-size: clamp(1.875rem, 8vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.625rem, 6.5vw, 2.125rem);
  }

  /* Header */
  .logo img {
    height: 30px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .mobile-nav {
    padding: 1rem 0.875rem 2rem;
  }

  .mobile-nav a,
  .mobile-nav-toggle {
    padding: 0.75rem 0.875rem;
    font-size: 1rem;
  }

  .mobile-nav-sub a {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
  }

  .mobile-nav .btn {
    margin-top: 1rem;
  }

  /* Hero stacked cards */
  .hero--cards-only {
    padding-bottom: 0.5rem;
  }

  .hero--cards-only .hero-stacked {
    padding: 0.5rem 0.5rem 0;
  }

  .hero-stacked-card.is-active {
    min-height: auto;
  }

  .hero-stacked-spine {
    padding: 0 0.875rem;
  }

  .hero-stacked-spine-text {
    font-size: 0.8125rem;
  }

  .hero-stacked-grid {
    padding: 0.875rem 0.75rem 1rem;
    gap: 0.625rem;
  }

  .hero-stacked-copy h3 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
  }

  .hero-stacked-copy > p {
    font-size: 0.8125rem;
    margin-bottom: 0.625rem;
    max-width: none;
  }

  .hero-stacked-features {
    margin-bottom: 0.75rem;
  }

  .hero-stacked-features li {
    font-size: 0.75rem;
    padding: 0.25rem 0 0.25rem 1rem;
  }

  .hero-stacked-stats {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }

  .hero-stacked-stat {
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
  }

  .hero-stacked-stat strong {
    font-size: 0.8125rem;
  }

  .hero-stacked-cta {
    font-size: 0.8125rem;
    padding: 0.5625rem 1rem;
    width: 100%;
    justify-content: center;
  }

  .hero-stacked-visual {
    display: none;
  }

  .hero-stacked-panel {
    overflow: hidden;
  }

  /* Trust strip */
  .trust-strip {
    overflow: hidden;
  }

  .trust-marquee-inner {
    padding: 0.5rem 0.75rem;
  }

  .trust-item {
    font-size: 0.8125rem;
    padding: 0 0.875rem;
  }

  /* Stage slider */
  .stage-section {
    padding-block: 2.75rem;
  }

  .stage-header {
    margin-bottom: 1.5rem;
  }

  .stage-card {
    border-radius: var(--radius-lg);
  }

  .stage-pills-wrap {
    padding: 0.5rem 0.5rem 0;
  }

  .stage-pill {
    flex: 0 0 min(76vw, 10rem);
    min-height: 3.25rem;
    padding: 0.625rem 0.75rem;
    gap: 0.25rem;
  }

  .stage-pill-title {
    font-size: 0.75rem;
  }

  .stage-slide {
    padding: 1.125rem 0.875rem;
    gap: 1rem;
  }

  .stage-slide-visual {
    order: -1;
    max-width: 280px;
    margin-inline: auto;
    width: 100%;
  }

  .stage-slide-content h3 {
    font-size: 1.375rem;
  }

  .stage-slide-content > p,
  .stage-lead {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    max-width: none;
  }

  .stage-points {
    gap: 0.625rem;
    margin-bottom: 1rem;
  }

  .stage-point-icon {
    width: 2.125rem;
    height: 2.125rem;
  }

  .stage-highlight-row {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .stage-highlight-row > div {
    flex: 1 1 calc(50% - 0.25rem);
    padding: 0.625rem 0.75rem;
  }

  .stage-highlight-row strong {
    font-size: 1.125rem;
  }

  .stage-feature-grid {
    margin-bottom: 1rem;
  }

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

  .stage-controls {
    margin-top: 1.125rem;
    gap: 0.875rem;
  }

  .stage-showcase {
    max-width: 100%;
  }

  .ss-brand-lockup {
    padding: 1rem 0.875rem 0.625rem;
    gap: 0.75rem;
  }

  /* Services — let sections.css handle mobile tab bar */
  .services-section {
    padding-block: 2.75rem;
  }

  #services .section-header {
    margin-bottom: 1.5rem;
  }

  .services-categories {
    gap: 2rem;
  }

  .services-category-header {
    padding: 1rem 0.875rem 0.875rem;
  }

  .services-category-lead {
    font-size: 0.875rem;
  }

  .services-cards {
    padding: 0.875rem;
    gap: 0.625rem;
  }

  .service-card {
    padding: 0.875rem 1rem;
  }

  .service-card h4 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.875rem;
  }

  /* Website showcase — devices above copy (sections.css handles order) */
  .showcase-copy {
    text-align: left;
  }

  .device-showcase {
    margin-inline: 0;
    padding: 1rem 0.5rem 0.875rem;
  }

  .showcase-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  /* Why section */
  .why-copy {
    margin-bottom: 2rem;
  }

  .why-card {
    padding: 1.5rem 1.25rem;
  }

  .why-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  /* Client stories */
  .client-stories-list {
    gap: 1.5rem;
  }

  .client-story {
    padding: 1rem;
    gap: 1.125rem;
    border-radius: var(--radius-lg);
  }

  .client-story-copy h3 {
    font-size: 1.25rem;
  }

  .client-story-text {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .client-video-embed {
    border-radius: var(--radius-md);
  }

  /* Reviews */
  .reviews-section .section-header {
    margin-bottom: 1.5rem;
  }

  .reviews-showcase {
    gap: 1rem;
  }

  .reviews-trust-panel {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .reviews-score-num {
    font-size: 2.75rem;
  }

  .reviews-stat-list {
    gap: 0.75rem;
  }

  .reviews-carousel-panel {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .review-card {
    min-height: 0;
    padding: 1.5rem 1.125rem 1.125rem;
  }

  .review-quote-mark {
    font-size: 2.25rem;
    top: 0.125rem;
    left: 0.875rem;
  }

  .review-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    max-width: none;
  }

  .carousel-nav {
    margin-top: 1rem;
    gap: 0.75rem;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Stats & process */
  .stats-grid {
    gap: 0.875rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
  }

  .stat-value {
    font-size: 1.625rem;
  }

  .process-steps {
    gap: 1rem;
  }

  .process-step {
    padding: 1.25rem 1rem;
  }

  /* Portfolio (inner pages) */
  .portfolio-grid {
    gap: 1rem;
  }

  .portfolio-card .portfolio-body {
    padding: 1rem;
  }

  /* Contact */
  .contact-section-inner {
    padding-top: 0;
  }

  .contact-form-wrap,
  .contact-info-block {
    padding: 0;
  }

  .contact-form-title {
    font-size: 1.375rem;
  }

  /* Footer */
  .footer-top {
    padding: 1.25rem 0;
  }

  .footer-top-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
  }

  .footer-top-inner .btn {
    width: 100%;
  }

  .footer-top-headline {
    font-size: 1.25rem;
  }

  .footer-main {
    padding: 2.25rem 0 1.75rem;
  }

  .footer-grid {
    gap: 1.75rem;
  }

  .footer-about {
    font-size: 0.9375rem;
  }

  /* Buttons */
  .btn {
    white-space: normal;
    text-align: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }

  .btn-sm {
    padding: 0.5625rem 1rem;
    font-size: 0.875rem;
  }
}

/* Very small phones */
@media (max-width: 479px) {
  :root {
    --section-pad: 2.25rem;
  }

  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .hero-stacked-card.is-active {
    min-height: auto;
  }

  .stage-pill {
    flex: 0 0 min(82vw, 9.5rem);
  }

  .stage-highlight-row > div {
    flex: 1 1 100%;
  }

  .device-monitor {
    max-width: 100%;
  }

  .reviews-score-block {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .stat-card {
    padding: 1rem 0.875rem;
  }
}

/* Tablet portrait refinements */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-stacked-card.is-active {
    min-height: clamp(18rem, 45vh, 24rem);
  }

  .services-layout {
    gap: 1.75rem;
  }

  .services-sidebar {
    padding: 1.5rem 1.25rem;
  }

  .showcase-grid {
    gap: 2rem;
  }
}
