/* Site-wide tablet + phone layout */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}
.hero[data-astro-cid-bbe6dxrz] {
  max-width: 100%;
}
.cta-section,
.cta-section[data-astro-cid-ne56ttnc] {
  overflow: hidden;
}
.cta-vortex-wrap,
.cta-vortex-img,
.cta-heading-blur,
.cta-oversized-svg {
  max-width: none;
}

/* ── Tablet (iPad portrait + landscape) ── */
@media (max-width: 1024px) {
  :root {
    --page-x: 1.5rem;
    --section-pad-x: 1.5rem;
  }

  .hero[data-astro-cid-bbe6dxrz] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-height: auto;
  }
  .lay-creative-hero,
  .lay-perf-hero,
  .lay-video-hero,
  .lay-geo-hero,
  .lay-about-hero,
  .lay-blog-hero,
  .lay-contact {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    min-height: auto;
  }
  .lay-contact-form {
    padding: 1.5rem;
  }
  .site-nav[data-astro-cid-3ef6ksr2] {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero[data-astro-cid-bbe6dxrz] h1[data-astro-cid-bbe6dxrz],
  .hero h1 {
    font-size: clamp(2.6rem, 7vw, 4.4rem) !important;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .hero-actions,
  .hero-actions[data-astro-cid-bbe6dxrz] {
    flex-wrap: wrap;
    width: 100%;
  }
  .hero-actions .btn-chamfer,
  .hero-actions[data-astro-cid-bbe6dxrz] .btn-chamfer[data-astro-cid-bbe6dxrz] {
    flex: 1 1 220px;
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 100%;
  }
  .svc-card {
    min-height: 0;
    padding: 2rem 1.5rem 1.75rem;
  }
  .svc-card h3 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    letter-spacing: .04em;
  }
  .svc-card p {
    font-size: 1rem;
    max-width: none;
  }

  .process-track {
    grid-template-columns: 1fr 1fr;
  }
  .process-step:nth-child(2) { border-right: none; }
  .process-step:nth-child(1),
  .process-step:nth-child(2) { border-bottom: 1px solid rgba(240, 237, 230, .1); }
  .process-step-line { display: none; }

  .home-blog-grid {
    grid-template-columns: 1fr;
  }

  .illust-grid[data-astro-cid-l5aavh2a] {
    grid-template-columns: 1fr 1fr !important;
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .cta-section[data-astro-cid-ne56ttnc] h2[data-astro-cid-ne56ttnc],
  .cta-section h2 {
    font-size: clamp(1.2rem, 6vw, 3.6rem) !important;
    padding: 0 .5rem;
  }
  .cta-btn,
  .cta-btn[data-astro-cid-ne56ttnc] {
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
  }

  .sp-wrap,
  .sp-narrow {
    width: calc(100% - 2.5rem);
    max-width: 100%;
  }

  .lay-video-hero h1 {
    font-size: clamp(2.4rem, 7vw, 4rem);
  }
  .lay-article h1,
  .lay-legal h1,
  .lay-contact h1,
  .lay-about-hero h1,
  .lay-blog-hero h1 {
    overflow-wrap: break-word;
    word-break: normal;
  }
  .about-partner .process-title {
    overflow-wrap: break-word;
    word-break: normal;
    font-size: clamp(1.7rem, 5vw, 2.4rem);
  }
}

/* ── Phone ── */
@media (max-width: 768px) {
  :root {
    --page-x: 1.25rem;
  }

  .hero[data-astro-cid-bbe6dxrz] h1[data-astro-cid-bbe6dxrz],
  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem) !important;
    line-height: .95 !important;
  }
  .hero-sub[data-astro-cid-bbe6dxrz],
  .hero-sub {
    font-size: 1rem;
  }
  .hero-actions .btn-chamfer,
  .hero-actions[data-astro-cid-bbe6dxrz] .btn-chamfer[data-astro-cid-bbe6dxrz] {
    flex: 1 1 100%;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
  .illust-grid[data-astro-cid-l5aavh2a] {
    grid-template-columns: 1fr !important;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  footer.site-footer,
  footer.site-footer[data-astro-cid-sz7xmlte] {
    padding: 2.5rem 1.25rem 0 !important;
  }

  .lay-article-table-wrap {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }
  .lay-article .prose table {
    min-width: 520px;
  }

  .cta-section[data-astro-cid-ne56ttnc],
  .cta-section {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .problem-headline[data-astro-cid-oo6sugl5],
  .intro-title[data-astro-cid-vn4tu6jo],
  .section-title,
  .process-title,
  .faq-title {
    overflow-wrap: break-word;
    word-break: normal;
  }
  .lay-about-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem) !important;
    max-width: none;
  }
  .lay-about-values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .process-track {
    grid-template-columns: 1fr;
  }
  .process-step {
    border-right: none;
    border-bottom: 1px solid rgba(240, 237, 230, .1);
  }
  .process-step:last-child { border-bottom: none; }

  .site-logo img {
    max-width: 128px !important;
    height: 30px !important;
  }
}
