/* Motionmate mobile responsiveness patch
   Loaded after site.css so the approved desktop design remains unchanged. */

@media (max-width: 980px) {
  :root { --shell: min(100% - 32px, 900px); }

  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .site-header {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }

  .nav-wrap,
  .mobile-menu {
    width: min(100%, 900px);
    max-width: 100%;
  }

  .nav-wrap {
    position: relative;
    z-index: 2;
  }

  .menu-button {
    display: block;
    margin-left: auto;
    flex: 0 0 46px;
    touch-action: manipulation;
  }

  .mobile-menu {
    position: relative;
    z-index: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: 0 22px 65px rgba(31, 39, 65, .18), inset 0 1px 0 rgba(255,255,255,.95);
  }

  .mobile-menu a {
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero,
  .contact-hero {
    min-width: 0;
  }

  .hero-copy,
  .hero-stage,
  .section-head > *,
  .format-card > *,
  .dimension-wrap > *,
  .contact-hero > * {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --shell: calc(100% - 24px);
    --radius: 24px;
  }

  html,
  body {
    width: 100%;
    overflow-x: clip;
  }

  body {
    font-size: 15px;
  }

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

  .section-shell {
    width: var(--shell);
    max-width: var(--shell);
  }

  /* Mobile navigation */
  .site-header {
    top: max(8px, env(safe-area-inset-top));
    padding-inline: 10px;
  }

  .nav-wrap {
    width: 100%;
    height: 60px;
    padding: 7px 8px 7px 11px;
    border-radius: 19px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
    font-size: 17px;
  }

  .brand img {
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
  }

  .desktop-nav,
  .nav-wrap > .apple-button {
    display: none;
  }

  .menu-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .menu-button:active {
    background: rgba(255,255,255,.52);
  }

  .mobile-menu {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 20px;
    max-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    transition: max-height .34s var(--spring), padding .28s var(--spring), margin .28s var(--spring), opacity .22s ease, visibility .22s, transform .34s var(--spring);
  }

  .mobile-menu.is-open {
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
    padding: 9px;
    overflow-y: auto;
  }

  .mobile-menu a,
  .mobile-menu a:last-child {
    grid-column: auto;
    min-height: 50px;
    padding: 0 14px;
    justify-content: space-between;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255,255,255,.22);
  }

  .mobile-menu a::after {
    content: "↗";
    color: #697184;
    font-size: 13px;
  }

  .mobile-menu a:active,
  .mobile-menu a:focus-visible {
    border-color: rgba(49,84,244,.18);
    background: rgba(255,255,255,.68);
    outline: none;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 104px 0 64px;
    gap: 18px;
    overflow: visible;
  }

  .hero-copy {
    width: 100%;
    padding: 0;
  }

  .eyebrow {
    max-width: 100%;
    align-items: flex-start;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: .09em;
  }

  .eyebrow > span {
    flex: 0 0 22px;
    margin-top: .65em;
  }

  .hero-title {
    width: 100%;
    max-width: 100%;
    margin: 22px 0 18px;
    font-size: clamp(42px, 12.7vw, 58px);
    line-height: .96;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }

  .hero-line {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
  }

  .hero-line--memory {
    margin-top: .08em;
    font-size: .87em;
  }

  .hero-word-accent::after {
    bottom: -.02em;
  }

  .mobile-hero-orb {
    right: -48px;
    top: 116px;
    width: 150px;
    opacity: .34;
  }

  .hero-quick-grid {
    width: 100%;
    max-width: 100%;
    margin: 4px 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 11px;
    overflow: visible;
  }

  .hero-quick-card,
  .hero-quick-card--service {
    width: 100%;
    min-height: 132px;
    grid-column: auto;
    scroll-snap-align: none;
  }

  .hero-quick-card strong {
    max-width: calc(100% - 58px);
    font-size: 21px;
  }

  .hero-quick-card span {
    max-width: calc(100% - 42px);
    font-size: 10.5px;
  }

  .hero-lede {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-switcher {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hero-switcher strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .apple-button {
    width: 100%;
  }

  .hero-proof {
    width: 100%;
    align-items: center;
  }

  .hero-proof p {
    min-width: 0;
  }

  .hero-stage {
    width: 100%;
    min-height: 455px;
    margin: 8px 0 0;
  }

  .motion-lab {
    left: 0;
    width: 100%;
    transform-origin: top center;
  }

  .floating-stat-a,
  .floating-memoji {
    display: none;
  }

  .floating-stat-b {
    left: 8px;
    bottom: 8px;
  }

  /* General mobile section rhythm */
  .showreel,
  .services,
  .formats,
  .impact,
  .work,
  .dimension {
    padding: 64px 0 82px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 20px 0 32px;
  }

  .section-head > p {
    max-width: 100%;
    justify-self: stretch;
    font-size: 15px;
  }

  .display-title {
    max-width: 100%;
    font-size: clamp(42px, 12vw, 60px);
    line-height: .96;
    overflow-wrap: anywhere;
  }

  .blur-divider {
    height: 72px;
  }

  /* Video and service cards */
  .showreel-card {
    aspect-ratio: 4 / 5;
    border-radius: 26px;
  }

  .showreel-meta {
    left: 22px;
    right: 22px;
    bottom: 24px;
  }

  .showreel-meta strong {
    max-width: calc(100% - 4px);
    font-size: clamp(33px, 10vw, 42px);
  }

  .play-disc {
    top: 20px;
    right: 20px;
    bottom: auto;
    width: 58px;
    height: 58px;
  }

  .service-grid,
  .project-grid,
  .impact-grid,
  .format-stage {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 470px;
    padding: 21px;
    border-radius: 26px;
  }

  .service-art {
    max-width: 100%;
    transform: scale(.84);
  }

  .service-card h3 {
    font-size: clamp(33px, 10vw, 40px);
  }

  .service-card p {
    font-size: 15px;
  }

  /* Formats and short-form preview */
  .format-card,
  .format-card--long {
    min-height: auto;
    padding: 27px 20px;
    grid-template-columns: 1fr;
    gap: 32px;
    border-radius: 28px;
  }

  .format-copy h3 {
    max-width: 100%;
    font-size: clamp(40px, 11.5vw, 51px);
    overflow-wrap: anywhere;
  }

  .format-copy p {
    font-size: 15px;
  }

  .format-specs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .format-specs span,
  .format-specs span:first-child {
    min-width: 0;
    grid-column: auto;
  }

  .phone-frame {
    width: min(270px, 88%);
  }

  .screen-frame {
    width: 100%;
  }

  .screen-ui {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .screen-ui strong {
    max-width: calc(100% - 50px);
    padding-right: 0;
    font-size: clamp(27px, 8vw, 34px);
  }

  .format-mini-grid {
    grid-template-columns: 1fr;
  }

  .short-preview-rail {
    padding: 21px 17px;
    grid-template-columns: 1fr;
    gap: 20px;
    border-radius: 27px;
  }

  .short-preview-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 12px;
    padding: 0;
    overflow: visible;
  }

  .short-preview-card,
  .short-preview-card:nth-child(1),
  .short-preview-card:nth-child(2),
  .short-preview-card:nth-child(3) {
    width: 100%;
    transform: none;
    border-radius: 22px;
  }

  .short-preview-card:nth-child(3) {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    justify-self: center;
  }

  .short-preview-card strong {
    font-size: 18px;
  }

  /* Impact metrics */
  .impact-intro {
    min-height: 440px;
    padding: 27px 23px;
    border-radius: 28px;
  }

  .impact-intro h2 {
    font-size: clamp(42px, 12vw, 52px);
  }

  .percentage-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .percentage-card {
    min-height: 260px;
    padding: 20px;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    border-radius: 24px;
  }

  .percentage-ring {
    width: 94px;
    height: 94px;
  }

  /* Work: remove mobile horizontal overflow */
  .work-format-head,
  .work-format-head--long {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 28px;
  }

  .work-format-head--long {
    margin-top: 64px;
  }

  .work-format-head p {
    max-width: 100%;
    justify-self: stretch;
  }

  .portrait-project-grid {
    width: 100%;
    margin-left: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 22px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .portrait-project {
    width: 100%;
    transform: none;
    scroll-snap-align: none;
  }

  .portrait-project-media {
    width: 100%;
    border-radius: 27px;
  }

  .portrait-overlay {
    left: 21px;
    right: 21px;
    bottom: 23px;
  }

  .portrait-overlay strong {
    font-size: clamp(30px, 9vw, 38px);
  }

  .project-card,
  .project-card--wide {
    width: 100%;
    grid-column: auto;
  }

  .project-media,
  .project-card--wide .project-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  /* 3D, quote and CTA */
  .dimension-wrap {
    min-height: auto;
    padding: 28px 20px;
    grid-template-columns: 1fr;
    gap: 24px;
    border-radius: 29px;
  }

  .dimension-copy .display-title {
    font-size: clamp(42px, 12vw, 52px);
  }

  .dimension-scene {
    width: 100%;
    min-height: 390px;
  }

  .scene-card-a {
    left: 0;
    max-width: 58%;
  }

  .scene-card-b {
    right: 0;
  }

  .testimonial {
    padding: 16px 0 70px;
  }

  .quote-card {
    padding: 24px 20px;
    grid-template-columns: 1fr;
    gap: 17px;
    border-radius: 26px;
  }

  .quote-avatar {
    width: 70px;
    height: 70px;
  }

  .quote-rating {
    display: block;
  }

  .quote-card blockquote {
    margin-top: 10px;
    font-size: clamp(23px, 7vw, 29px);
  }

  .quote-score {
    grid-column: auto;
    padding: 16px 0 0;
    border-top: 1px solid rgba(25,30,43,.09);
    border-left: 0;
  }

  .final-cta {
    padding: 20px 0 65px;
  }

  .cta-card {
    min-height: 540px;
    padding: 32px 22px;
    border-radius: 29px;
  }

  .cta-card h2 {
    max-width: 100%;
    font-size: clamp(48px, 13vw, 64px);
    line-height: .92;
    overflow-wrap: anywhere;
  }

  .cta-card > p {
    font-size: 15px;
  }

  .cta-card .apple-button {
    width: 100%;
  }

  .cta-mark {
    width: 82vw;
    right: -30%;
    opacity: .1;
  }

  /* Footer */
  .site-footer {
    padding-top: 42px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 30px 0 38px;
  }

  .footer-top p br {
    display: none;
  }

  .footer-links {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .footer-links a {
    min-height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.3);
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  /* Contact page */
  .contact-main {
    padding-top: 96px;
  }

  .contact-hero {
    padding: 24px 0 62px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-intro {
    position: static;
  }

  .contact-title {
    max-width: 100%;
    margin: 22px 0 20px;
    font-size: clamp(47px, 13vw, 62px);
    line-height: .92;
    letter-spacing: -.06em;
    overflow-wrap: anywhere;
  }

  .contact-title .title-line {
    overflow: visible;
  }

  .contact-intro > p {
    font-size: 16px;
  }

  .contact-direct {
    grid-template-columns: 1fr;
  }

  .contact-direct strong {
    padding-right: 20px;
    overflow-wrap: anywhere;
  }

  .contact-form-card {
    width: 100%;
    padding: 19px;
    border-radius: 25px;
  }

  .form-top {
    align-items: flex-start;
    gap: 12px;
  }

  .form-top strong {
    font-size: 17px;
  }

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

  .form-full {
    grid-column: auto;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    min-width: 0;
    font-size: 16px;
  }

  .form-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-submit-row .apple-button {
    width: 100%;
  }

  .contact-next {
    padding: 52px 0 78px;
  }

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

  .contact-faq {
    padding-bottom: 82px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .faq-title h2 {
    font-size: clamp(40px, 11vw, 48px);
  }

  .faq-list details {
    padding: 0 17px;
  }

  .faq-list summary {
    min-height: 66px;
    gap: 14px;
  }

  /* Modals */
  .video-modal,
  .service-modal {
    padding: 8px;
  }

  .video-modal-shell,
  .service-modal-shell {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 420px) {
  :root { --shell: calc(100% - 20px); }

  .site-header { padding-inline: 8px; }

  .brand { font-size: 16px; }
  .brand img { width: 31px; height: 31px; flex-basis: 31px; }

  .hero-title { font-size: clamp(39px, 12vw, 50px); }
  .mobile-hero-orb { display: none; }
  .hero-stage { min-height: 430px; }

  .hero-quick-card {
    min-height: 126px;
    padding: 15px;
  }

  .short-preview-track {
    grid-template-columns: 1fr;
  }

  .short-preview-card:nth-child(3) {
    grid-column: auto;
    width: 100%;
  }

  .percentage-card {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 17px;
  }

  .percentage-ring {
    width: 84px;
    height: 84px;
  }

  .dimension-scene {
    min-height: 360px;
    transform: scale(.94);
    transform-origin: center;
  }
}

@media (max-width: 980px) and (hover: none) {
  .hero-quick-card:hover,
  .short-preview-card:hover,
  .service-card:hover,
  .format-card:hover,
  .impact-intro:hover,
  .percentage-card:hover,
  .quote-card:hover,
  .cta-card:hover {
    transform: none;
  }
}

/* Mobile typography readability fix
   Loosens the desktop display tracking only for the capability heading
   and service-card titles shown on narrow Android/iOS screens. */
@media (max-width: 720px) {
  .services .display-title {
    font-size: clamp(38px, 10.5vw, 50px);
    line-height: 1.02;
    letter-spacing: -.022em;
    word-spacing: .06em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
  }

  .services .display-title .split-word {
    white-space: nowrap;
  }

  .service-card h3 {
    font-size: clamp(30px, 8.7vw, 37px);
    line-height: 1.05;
    letter-spacing: -.02em;
    word-spacing: .045em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
  }
}

@media (max-width: 420px) {
  .services .display-title {
    font-size: clamp(36px, 10.2vw, 43px);
    letter-spacing: -.018em;
    word-spacing: .055em;
  }

  .service-card h3 {
    font-size: clamp(29px, 8.4vw, 35px);
  }
}
