/* ============================================
   responsive.css — full device support
   Phones · Tablets · Laptops · Desktops · XL
   ============================================ */

/* ---------- Global foundations ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img,
video,
canvas {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

svg {
  max-width: 100%;
}

table {
  max-width: 100%;
}

.container,
.header-inner,
.site-header .container.header-inner {
  max-width: 100%;
}

[class*="-grid"],
[class*="-layout"],
[class*="-shell"] {
  min-width: 0;
}

.hero-grid > *,
.service-layout > *,
.contact-shell > *,
.quote-layout > *,
.about-home-grid > *,
.faq-clients-grid > *,
.cta-banner > * {
  min-width: 0;
}

/* Readable base: 16px. Never shrink below that. */
html {
  font-size: 16px;
}

h1 {
  font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3.25rem);
}

h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.35rem);
}

.page-hero h1,
.hero h1 {
  font-size: clamp(1.9rem, 1.15rem + 2.6vw, 3.4rem);
}

.page-hero p,
.hero .lead,
.section-head .lead {
  font-size: clamp(0.98rem, 0.92rem + 0.35vw, 1.125rem);
}

/* Safe areas (notched phones) */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .float-actions {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(5rem, calc(4.5rem + env(safe-area-inset-bottom)));
  }

  .back-top {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1.15rem, calc(1rem + env(safe-area-inset-bottom)));
  }

  .mobile-nav {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ---------- Extra-large desktops (1600px+) ---------- */
@media (min-width: 1600px) {
  :root {
    --max: 1360px;
  }

  .site-header .container.header-inner,
  .header-inner.container,
  .header-inner {
    max-width: min(100% - 2rem, 1480px);
  }
}

@media (min-width: 1400px) {
  :root {
    --max: 1280px;
  }
}

/* ---------- Standard laptop (1366–1440) ---------- */
@media (max-width: 1440px) {
  .logo img {
    height: 72px;
    max-width: min(300px, 28vw);
  }

  .nav-link,
  .nav .nav-trigger {
    padding: 0.5rem 0.55rem;
    font-size: 0.92rem;
  }

  .header-actions .btn-sm {
    padding-inline: 1rem;
  }
}

@media (max-width: 1366px) {
  :root {
    --header-h: 88px;
  }

  .logo img {
    height: 64px;
    max-width: min(260px, 24vw);
  }

  .nav {
    gap: 0;
  }

  .nav-link,
  .nav .nav-trigger {
    padding: 0.45rem 0.42rem;
    font-size: 0.86rem;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .header-actions .btn-call {
    padding-inline: 0.85rem;
  }

  .quote-faq-grid,
  .careers-perk-grid,
  .about-modern-team-grid,
  .about-modern-steps,
  .about-facts-grid,
  .about-hero-stats,
  .about-why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-modern-steps::before {
    display: none;
  }
}

/* ---------- Laptop and below: hamburger (desktop nav no longer fits) ---------- */
@media (max-width: 1400px) {
  :root {
    --header-h: 84px;
  }

  .site-header {
    height: var(--header-h);
  }

  .nav,
  .header-actions .btn-call {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .mega-menu {
    display: none !important;
  }

  .logo img {
    height: 64px;
    max-width: min(280px, 48vw);
  }

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

  .section {
    padding: clamp(3.25rem, 6vw, 5.5rem) 0;
  }
}

@media (max-width: 1200px) {
  .mega-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.25rem 1rem;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-col {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0.85rem 1rem;
    margin-bottom: 0.35rem;
  }

  .mega-col:nth-child(4),
  .mega-col:nth-child(5),
  .mega-col:nth-child(6) {
    border-bottom: none;
  }

  .service-subgrid.cols-2,
  .service-subgrid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Laptop / small desktop ---------- */
@media (max-width: 1100px) {
  .services-grid,
  .services-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 720px;
  }

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

  .work-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-section .work-card--feature {
    min-height: 0;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-team8-grid,
  .about-team-grid,
  .about-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-rail {
    border-right: none;
    border-bottom: 1px solid rgba(20, 23, 31, 0.08);
  }

  .contact-map {
    min-height: 340px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .why-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-home-grid,
  .faq-clients-grid {
    grid-template-columns: 1fr;
  }

  .about-home-aside {
    position: static;
  }
}

/* ---------- Tablet landscape / iPad ---------- */
@media (max-width: 1024px) {
  .pricing-include-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .price-card.featured {
    transform: none;
  }

  .logo img {
    height: 60px;
    max-width: min(260px, 52vw);
  }

  .section {
    padding: 3.75rem 0;
  }

  .pricing-table {
    min-width: 640px;
  }

  .pricing-table-wrap {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-devices {
    min-height: 400px;
  }
}

/* ---------- Tablet portrait / large phones landscape ---------- */
@media (max-width: 900px) {
  .header-actions .btn-primary {
    display: none;
  }

  .hero-grid,
  .why-grid,
  .trust-grid,
  .about-grid,
  .about-home-grid,
  .contact-layout,
  .cta-banner,
  .service-layout,
  .contact-shell,
  .faq-clients-grid,
  .blog-showcase {
    grid-template-columns: 1fr;
  }

  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-aside {
    position: static;
    order: 2;
  }

  .quote-form-panel {
    order: 1;
  }

  .quote-faq-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-map {
    min-height: 280px;
  }

  .contact-form-footer,
  .contact-map-band-head,
  .contact-rail-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-map-band-head .btn,
  .contact-submit,
  .service-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .service-sidebar {
    position: static;
  }

  .trust-copy h2 {
    max-width: none;
  }

  .trust-stats {
    max-width: 520px;
    margin-inline: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 2.75rem;
  }

  .hero-content {
    max-width: none;
  }

  .hero h1,
  .page-hero h1,
  .quote-hero h1,
  .about-modern-hero h1,
  .pricing-hero h1,
  .careers-hero h1 {
    max-width: none;
  }

  .hero-visual {
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }

  .hero-devices {
    min-height: 390px;
    aspect-ratio: 1.04 / 1;
  }

  .hero-slide-ui {
    left: auto;
    right: 0;
    top: 4%;
    max-width: 48%;
    padding: 0.7rem 0.85rem;
  }

  .work-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-head-aside {
    width: 100%;
    justify-content: space-between;
  }

  .work-section .work-card--feature {
    grid-template-columns: 1fr;
  }

  .work-card--feature .work-card-media {
    min-height: 280px;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .timeline::before {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }

  .price-card.featured {
    transform: none;
  }

  .price-card.featured:hover {
    transform: translateY(-4px);
  }

  .pricing-include-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-faq-layout {
    grid-template-columns: 1fr;
  }

  .careers-perk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .careers-values-grid,
  .careers-role {
    grid-template-columns: 1fr;
  }

  .careers-role-cta {
    justify-self: start;
  }

  .about-hero-stats,
  .about-facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-team8-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-careers-card {
    grid-template-columns: 1fr;
  }

  .about-careers-actions {
    width: 100%;
  }

  .about-careers-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .about-page-jump {
    gap: 0.35rem;
  }

  .about-team8-more {
    width: 100%;
  }

  .about-team8-more .btn {
    width: 100%;
    justify-content: center;
  }

  .about-modern-story-grid,
  .about-mv-grid {
    grid-template-columns: 1fr;
  }

  .about-modern-team-grid,
  .about-modern-steps,
  .about-modern-link-grid,
  .about-why-grid,
  .about-focus-list {
    grid-template-columns: 1fr 1fr;
  }

  .about-modern-steps::before {
    display: none;
  }

  .about-process-improve {
    grid-template-columns: auto 1fr;
  }

  .about-process-improve .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .about-hub-intro-grid,
  .about-story-grid,
  .about-culture-grid,
  .about-proof-grid,
  .about-value-grid {
    grid-template-columns: 1fr;
  }

  .about-team-grid,
  .about-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-hub-row {
    grid-template-columns: auto auto 1fr;
  }

  .about-hub-cta {
    grid-column: 3;
    justify-self: start;
  }

  .industry-row {
    grid-template-columns: auto auto 1fr;
  }

  .industry-row-cta {
    grid-column: 3;
    justify-self: start;
  }

  .blog-page-feature {
    grid-template-columns: 1fr;
  }

  .blog-page-feature-body h2 {
    max-width: none;
  }

  .blog-page-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .cta-visual {
    justify-content: flex-start;
  }

  .cta-stat-stack {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cta-stat-stack div {
    flex: 1 1 140px;
  }

  .why-visual {
    min-height: 320px;
  }

  .why-metrics {
    grid-template-columns: 1fr;
  }

  .service-subgrid,
  .service-subgrid.cols-2,
  .service-subgrid.cols-3 {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding-top: 2.25rem;
    padding-bottom: 2.75rem;
  }

  .page-hero .hero-ctas {
    flex-wrap: wrap;
  }

  .price {
    font-size: clamp(2rem, 6vw, 2.75rem);
  }

  .footer-band {
    padding: 1.1rem 1.1rem 1.2rem;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Portrait tablets keep 2-col service/portfolio */
@media (min-width: 641px) and (max-width: 900px) and (orientation: portrait) {
  .services-grid,
  .services-grid-home,
  .portfolio-grid,
  .work-showcase {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-subgrid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .site-header .container.header-inner,
  .header-inner.container,
  .header-inner {
    width: min(100% - 1.5rem, 1400px);
  }

  .hero-metrics {
    max-width: none;
  }

  .about-home-stats {
    grid-template-columns: 1fr;
  }

  .about-modern-step p,
  .about-mv-card h3,
  .about-mv-card > p:not(.about-mv-label) {
    max-width: none;
  }
}

/* ---------- Mobile phones ---------- */
@media (max-width: 640px) {
  :root {
    --header-h: 72px;
    --radius: 14px;
    --radius-lg: 18px;
  }

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

  .site-header .container.header-inner,
  .header-inner.container,
  .header-inner {
    width: min(100% - 1.25rem, 1400px);
    gap: 0.65rem;
  }

  .logo img {
    height: 52px;
    max-width: min(200px, 58vw);
  }

  .mobile-nav-head .logo img {
    height: 52px;
    max-width: 200px;
  }

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

  .section {
    padding: 2.75rem 0;
  }

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

  .page-hero p {
    max-width: none;
    font-size: 1rem;
  }

  .page-hero .hero-ctas,
  .hero-ctas,
  .cta-banner .cta-actions,
  .about-modern-ctas,
  .pricing-hero .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .work-head-aside {
    flex-direction: column;
    align-items: stretch;
  }

  .work-count {
    align-items: flex-start;
  }

  .work-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  .work-zoom {
    opacity: 1;
    transform: none;
  }

  .page-hero .hero-ctas .btn,
  .hero-ctas .btn,
  .cta-banner .cta-actions .btn,
  .about-modern-ctas .btn,
  .pricing-hero .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }

  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .careers-perk-grid {
    grid-template-columns: 1fr;
  }

  .careers-apply-banner,
  .about-page-banner,
  .industries-hub-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .about-page-actions,
  .about-page-actions .btn {
    width: 100%;
  }

  .about-page-actions .btn {
    justify-content: center;
  }

  .careers-apply-actions {
    width: 100%;
  }

  .careers-apply-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pricing-include-grid {
    grid-template-columns: 1fr;
  }

  .pricing-cta-banner {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .pricing-cta-actions {
    width: 100%;
  }

  .pricing-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .price-card {
    padding: 1.65rem 1.25rem 1.5rem;
  }

  .blog-topics-grid {
    grid-template-columns: 1fr;
  }

  .about-modern-story-grid,
  .about-mv-grid,
  .about-modern-team-grid,
  .about-modern-steps,
  .about-modern-link-grid,
  .about-modern-metrics,
  .about-hero-stats,
  .about-facts-grid,
  .about-team-grid,
  .about-team8-grid,
  .about-why-grid,
  .about-focus-list,
  .about-hub-highlights,
  .about-stat-row {
    grid-template-columns: 1fr;
  }

  .about-process-improve {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .about-process-improve p {
    max-width: none;
  }

  .about-process-improve .btn {
    width: 100%;
    justify-content: center;
  }

  .quote-faq-grid {
    grid-template-columns: 1fr;
  }

  .quote-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-form-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .about-hub-row {
    grid-template-columns: auto 1fr;
  }

  .about-hub-index {
    display: none;
  }

  .about-hub-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }

  .about-page-actions {
    width: 100%;
  }

  .about-page-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .industry-row {
    grid-template-columns: auto 1fr;
    gap: 0.85rem 1rem;
  }

  .industry-row-index {
    display: none;
  }

  .industry-row-copy {
    grid-column: 2;
  }

  .industry-row-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }

  .industry-row-icon {
    width: 48px;
    height: 48px;
  }

  .industries-hub-actions,
  .blog-page-cta-actions {
    width: 100%;
  }

  .industries-hub-actions .btn,
  .blog-page-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .blog-page-filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .blog-page-filters .filter-btn {
    flex-shrink: 0;
  }

  .services-grid,
  .services-grid-home,
  .why-features,
  .why-metrics,
  .portfolio-grid,
  .work-showcase,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 0.65rem;
    padding: 0.65rem;
  }

  .stat-item {
    padding: 0.8rem 0.75rem;
    gap: 0.65rem;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .hero-devices {
    min-height: 320px;
    aspect-ratio: 1 / 1;
  }

  .hero-desk {
    width: 80%;
    left: 8%;
  }

  .hero-lap {
    width: 60%;
    left: 0;
    bottom: 12%;
  }

  .hero-mob {
    width: 24%;
    right: 1%;
    bottom: 10%;
  }

  .hero-slide-ui {
    left: 50%;
    right: auto;
    top: 0;
    transform: translateX(-50%);
    max-width: 92%;
    width: max-content;
    text-align: center;
    padding: 0.55rem 0.75rem;
  }

  .hero-slide-kicker {
    display: none;
  }

  .hero-slide-name,
  .hero-slide-tag {
    margin: 0;
  }

  .hero-slide-dots {
    justify-content: center;
    margin-top: 0.4rem;
  }

  .hero-desk figcaption,
  .hero-lap figcaption,
  .hero-mob figcaption {
    clip: rect(0, 0, 0, 0);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .site-footer {
    padding-top: 3rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-cloud {
    gap: 0.45rem;
  }

  .footer-cloud a {
    white-space: normal;
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.85rem;
  }

  .footer-bottom-meta {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }

  .float-actions {
    right: 0.75rem;
    bottom: 5rem;
    gap: 0.55rem;
  }

  .float-btn {
    width: 48px;
    height: 48px;
  }

  .back-top {
    bottom: 1.15rem;
    right: 1.15rem;
    width: 44px;
    height: 44px;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .service-main,
  .service-block,
  .service-subcard {
    min-width: 0;
  }

  .sidebar-services {
    max-height: none;
  }

  .btn {
    min-height: 44px;
  }

  .pricing-table {
    min-width: 560px;
    font-size: 0.86rem;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 0.85rem 0.75rem;
  }

  .check-list li {
    font-size: 0.92rem;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .mobile-nav-links > a,
  .mobile-acc-trigger {
    min-height: 44px;
  }

  main {
    padding-bottom: 0.5rem;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container {
    width: min(100% - 1rem, var(--max));
  }

  .site-header .container.header-inner,
  .header-inner.container,
  .header-inner {
    width: min(100% - 1rem, 1400px);
  }

  .logo img {
    height: 46px;
    max-width: min(176px, 54vw);
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .hero-visual {
    min-height: 0;
    max-width: 420px;
  }

  .hero-devices {
    min-height: 280px;
  }

  .hero-desk-frame {
    padding: 6px 6px 10px;
    border-radius: 12px 12px 10px 10px;
  }

  .hero-mob-frame {
    border-width: 2px;
    border-radius: 16px;
    padding: 8px 5px 6px;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .price-card .price-desc {
    min-height: 0;
  }

  .footer-social {
    gap: 0.45rem;
  }

  .soc {
    width: 40px;
    height: 40px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-item {
    justify-content: flex-start;
  }

  .our-clients-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .logo img {
    height: 42px;
    max-width: 150px;
  }

  .footer-cloud a {
    width: 100%;
    justify-content: center;
  }

  h1,
  .hero h1,
  .page-hero h1 {
    font-size: 1.7rem;
  }
}

/* ---------- Landscape phones / short viewports ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-visual {
    min-height: 0;
    max-width: 380px;
  }

  .hero-devices {
    min-height: 240px;
    aspect-ratio: 1.15 / 1;
  }

  .loader-mark {
    width: 40px;
    height: 40px;
  }

  .mobile-nav-links {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .site-header {
    height: 64px;
  }

  :root {
    --header-h: 64px;
  }
}

/* ---------- Hover only on fine pointers ---------- */
@media (hover: none) and (pointer: coarse) {
  .portfolio-item .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(7, 17, 31, 0.82) 0%, transparent 70%);
  }

  .work-section .portfolio-item .portfolio-overlay {
    display: none;
  }

  .work-zoom {
    opacity: 1;
    transform: none;
  }

  .price-card.featured {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ---------- All screens: stop overflow, stack safely ---------- */
@media (max-width: 1920px) {
  .hero-orb-a,
  .hero-orb-b,
  .hero-orb-c {
    max-width: 100vw;
  }
}

@media (min-width: 1920px) {
  :root {
    --max: 1440px;
  }
}

@media (max-width: 1024px) {
  .about-modern-story-grid,
  .about-mv-grid,
  .service-layout,
  .trust-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .about-modern-media {
    max-width: 720px;
  }

  .section-head,
  .section-head .lead,
  .about-page-banner p:not(.eyebrow) {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .about-why-grid,
  .about-focus-list,
  .about-modern-steps,
  .timeline,
  .pricing-include-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-meta a {
    overflow-wrap: anywhere;
  }
}

pre,
code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Content type stays at least 16px for reading and SEO */
main p,
main li,
main .lead,
main label,
.about-why-card p,
.about-modern-step p,
.about-mv-card > p:not(.about-mv-label),
.service-card p,
.check-list li {
  font-size: 1rem;
  line-height: 1.75;
}

h1, h2, h3, h4, h5 {
  line-height: 1.28;
  text-wrap: balance;
}

/* ---------- Prefer reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .back-top,
  .scroll-progress,
  .loader,
  .mobile-nav,
  .float-actions,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a[href]::after {
    content: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
  }
}
