/* A touch-first, normal-flow composition. Desktop keeps its scroll scenes. */
@media (max-width: 767px), (max-width: 1023px) and (pointer: coarse) {
  :root {
    --page-gutter: clamp(20px, 5.4vw, 32px);
    --section-space: 64px;
    --panel-space: calc(var(--section-space) / 2);
    --landing-space: 24px;
    --mobile-heading-size: clamp(32px, 8.5vw, 44px);
  }

  html { scroll-padding-block-start: 24px; }
  body { overflow-x: clip; }
  body.is-loading { overflow-y: auto; }
  .site-loader, .aurora-canvas, .aurora-shade { display: none; }
  .site-background::after {
    background:
      radial-gradient(ellipse at 0% 12%, rgba(230, 57, 70, .2), transparent 54%),
      radial-gradient(ellipse at 100% 62%, rgba(88, 127, 229, .19), transparent 58%),
      #0d0d0d;
  }
  .guide-aligned { margin-inline-start: 0; }
  .heading-reveal-pending .heading-word, .heading-reveal-active .heading-word {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  /* Keep the handwritten accent and a direct, always visible action. */
  .hero {
    min-height: 0;
    padding: 28px var(--page-gutter) var(--section-space);
  }
  .logo { height: auto; margin: 0; }
  .logo a { display: inline-flex; align-items: center; min-height: 44px; }
  .logo img { width: 145px; height: auto; }
  .hero h1 {
    margin-block-start: 36px;
    font-size: clamp(40px, 10.5vw, 64px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.065em;
  }
  .handwritten { font-size: .94em; }
  .hero-subcopy { margin-block-start: 28px; }
  .primary-line { font-size: clamp(21px, 5.4vw, 28px); line-height: 1.4; letter-spacing: -.035em; }
  .underline { height: 1.5em; width: calc(100% + 12px); top: 0; }
  .secondary-line {
    max-width: 430px;
    margin-block-start: 20px;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -.025em;
    color: #bcb9bd;
  }
  .hero-actions { margin-block-start: 32px; gap: 16px; align-items: stretch; }
  .cta, .cta:hover {
    width: 100%;
    min-height: 62px;
    padding: 18px 24px;
    background: #fff;
    color: #111;
    box-shadow: none;
    transition: background-color 150ms ease-out;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .hero .cta { max-width: 390px; }
  .cta::before { display: none; }
  .cta .cta-inner, .cta:hover .cta-inner, .cta:focus-visible .cta-inner {
    gap: 12px;
    transform: none;
    will-change: auto;
    transition: none;
  }
  .cta img, .cta:hover img, .cta:focus-visible img {
    position: static;
    width: 15px;
    height: 15px;
    opacity: 1;
    transform: none;
    filter: none;
    will-change: auto;
    transition: none;
  }
  .cta-label { font-size: 19px; line-height: 1.25; letter-spacing: -.04em; }
  .cta:active { background: #eee; }
  .action-note { max-width: 370px; font-size: 15px; line-height: 1.4; color: #f5f5f5; }
  .action-note br { display: none; }

  /* Case studies read as complete cards rather than flying layers. */
  .projects, .projects.has-flight {
    height: auto;
    max-width: none;
    min-height: 0;
    padding: 0 var(--page-gutter) var(--section-space);
    overflow: visible;
    text-align: start;
  }
  .projects-stage, .has-flight .projects-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }
  .projects .section-title, .formats .section-title, .process-title, .team h2, .faq h2, .contact h2 {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 580px;
    margin: 0;
    padding: 0;
    font-size: var(--mobile-heading-size);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.055em;
    text-align: start;
    text-wrap: balance;
    white-space: normal;
    transform: none;
    will-change: auto;
  }
  .projects-cards, .has-flight .projects-cards {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-block-start: 32px;
  }
  .project-card, .has-flight .project-card {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 24px;
    transform: none;
    will-change: auto;
  }
  .project-media { aspect-ratio: 4 / 3; border-radius: 24px 24px 0 0; }
  .project-link, .project-link:hover {
    width: 48px;
    height: 48px;
    inset-inline-end: 14px;
    bottom: 14px;
    background: #fff;
    transform: none;
    transition: background-color 150ms ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .project-link:active { background: #e63946; }
  .project-caption {
    min-height: 0;
    padding: 24px;
    border-radius: 0 0 24px 24px;
    background: rgba(35, 35, 39, .96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .project-caption h3 { font-size: clamp(25px, 6.7vw, 30px); line-height: 1.12; letter-spacing: -.045em; }
  .project-category { margin-block-start: 10px; font-size: 14px; line-height: 1.4; letter-spacing: -.02em; color: #c4c1c8; }
  .project-description { margin-block-start: 16px; font-size: 17px; line-height: 1.45; letter-spacing: -.025em; color: #c4c1c8; }

  .formats { padding: 0 var(--page-gutter) var(--section-space); }
  .formats-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-block-start: 32px; }
  .format-card { height: auto; min-height: 0; border-radius: 24px; background: rgba(35, 35, 39, .96); }
  .format-copy { padding: 24px; }
  .format-copy h3 { font-size: 27px; line-height: 1.15; letter-spacing: -.045em; }
  .format-copy p { margin-block-start: 12px; font-size: 17px; line-height: 1.45; letter-spacing: -.025em; color: #ccc9cf; }
  .landing-gallery { position: relative; inset: auto; width: 100%; height: calc(min(29cqw, 145px) + min(50cqw, 255px) + var(--landing-space)); margin: 0; }
  .landing-track { position: relative; display: block; height: 100%; transform: none; will-change: auto; }
  .landing-preview {
    position: absolute;
    inset: 0 auto auto 6%;
    width: 82%;
    height: min(50cqw, 255px);
    border-radius: 12px;
    outline: 1px solid rgba(255,255,255,.1);
    outline-offset: -1px;
  }
  .landing-preview.preview-2 { inset: min(29cqw, 145px) auto auto 25%; }
  .landing-preview.preview-3, .landing-preview.preview-4 { display: none; }
  .landing-preview img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .format-phones { height: min(108cqw, 506px); margin: 0; }
  .format-phone { transform: none; will-change: auto; }
  .phone-back { left: 4%; top: 0; width: 52%; }
  .phone-front { left: 47%; top: 13.8cqw; width: 49.5%; }

  /* The numbered steps preserve the desktop cards without a pinned scene. */
  .process { overflow: visible; }
  .process-stage, .has-stack .process-stage { height: auto; padding: 0 var(--page-gutter) var(--panel-space); }
  .process-stack, .has-stack .process-stack {
    position: relative;
    inset: auto;
    display: grid;
    gap: 16px;
    width: 100%;
    margin: 32px 0 0;
    transform: none;
    counter-reset: process-step;
  }
  .process-card, .has-stack .process-card {
    position: relative;
    inset: auto;
    width: 100%;
    padding: 24px;
    border-radius: 24px;
    border: 0;
    text-align: start;
    box-shadow: none;
    transform: none;
    will-change: auto;
    counter-increment: process-step;
  }
  .process-card::before {
    content: "0" counter(process-step);
    display: block;
    margin-block-end: 28px;
    color: #bd2331;
    font: 400 14px/1 Inter, sans-serif;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
  }
  .process-card h3 { max-width: 360px; font-size: 27px; line-height: 1.15; letter-spacing: -.045em; }
  .process-card p { margin-block-start: 16px; font-size: 18px; line-height: 1.45; letter-spacing: -.025em; color: #494949; }

  /* Names and roles are content on touch: no hover or moving targets. */
  .team, .team.has-motion, .team.has-faq-cover, .process.has-stack + .team {
    margin: 0;
    padding: 0;
    clip-path: none;
    transform: none;
    box-shadow: none;
    overflow: visible;
  }
  .team-canvas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 32px;
    height: auto;
    aspect-ratio: auto;
    padding: var(--panel-space) var(--page-gutter);
    background-size: 40px 40px;
    border: 0;
  }
  .team h2 { grid-column: 1 / -1; margin-block-end: 4px; color: #141414; }
  .team-portrait {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
    transform: none;
  }
  .team-orbit, .team-portrait:hover .team-orbit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: auto;
    transform: none;
    box-shadow: none;
    transition: none;
    border-radius: 0;
  }
  .team-orbit img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1;
    outline: 1px solid rgba(0,0,0,.08);
    outline-offset: -1px;
  }
  .team-portrait .team-caption, .team-portrait:hover .team-caption, .team-portrait:focus .team-caption {
    position: static;
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
  }
  .team-name { font-size: 20px; line-height: 1.15; letter-spacing: -.04em; }
  .team-role { max-width: 180px; font-size: 13px; line-height: 1.4; letter-spacing: -.025em; color: #555; overflow-wrap: anywhere; }

  .faq, .team.has-faq-cover + .faq { margin-block-start: 0; }
  .faq-inner { padding: var(--panel-space) var(--page-gutter); }
  .faq-list { margin-block-start: 32px; gap: 12px; }
  .faq-item { border-radius: 20px; background: rgba(24,24,28,.96); backdrop-filter: none; -webkit-backdrop-filter: none; transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
  .faq-question { padding: 22px 20px; min-height: 72px; font-size: 18px; line-height: 1.3; letter-spacing: -.035em; touch-action: manipulation; }
  .faq-chevron { width: 20px; height: 20px; margin-inline-start: auto; transition-duration: 250ms; }
  .faq-answer { transition-duration: 250ms; }
  .faq-answer p { padding: 0 20px 24px; font-size: 17px; line-height: 1.45; letter-spacing: -.025em; }

  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: var(--panel-space) var(--page-gutter); }
  .contact-heading-boundary { height: auto; }
  .contact-heading { position: relative; inset: auto; padding: 0; }
  .contact-form { gap: 24px; }
  .contact-field label { flex-wrap: wrap; gap: 4px 12px; font-size: 15px; letter-spacing: -.02em; }
  .contact-field input, .contact-field textarea {
    padding: 16px;
    font-size: 16px;
    line-height: 1.45;
    border-color: #888;
    border-radius: 14px;
  }
  .contact-field input { min-height: 58px; }
  .contact-field textarea { min-height: 168px; }
  .contact-field input::placeholder, .contact-field textarea::placeholder { color: #707070; }
  .consent-label { align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; }
  .consent-label input { flex-basis: 24px; width: 24px; height: 24px; border-color: #888; }
  .contact-submit, .contact-submit:hover { min-height: 64px; border-color: #888; border-radius: 14px; }
  .contact-submit .cta-label { font-size: 18px; font-weight: 400; line-height: 1.3; }

  .site-footer { padding: var(--panel-space) var(--page-gutter) 32px; }
  .footer-logo-link { padding-block: 8px; }
  .footer-logo { width: 190px; }
  .footer-main { margin-block-start: 24px; font-size: clamp(25px,6.6vw,34px); line-height: 1.23; letter-spacing: -.045em; }
  .footer-main br { display: none; }
  .footer-contacts { flex-direction: column; gap: 20px; margin-block-start: 32px; }
  .footer-contact { min-height: 44px; font-size: 22px; letter-spacing: -.035em; }
  .footer-contact svg { width: 22px; height: 22px; }
  .footer-contact::after { display: none; }
  .footer-socials { order: 0; flex-basis: auto; gap: 14px; }
  .footer-social { width: 54px; height: 54px; border-radius: 19px; }
  .footer-social::before { display: none; }
  .footer-social, .footer-social:hover, .footer-social:focus-visible, .footer-social:nth-child(even):hover, .footer-social:nth-child(even):focus-visible {
    transform: none;
    transition: opacity 150ms ease;
    box-shadow: none;
  }
  .footer-social:active { opacity: .7; }
  .footer-legal { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-block-start: 40px; }
  .footer-legal p {
    padding: 20px;
    border-radius: 20px;
    background: rgba(30,30,35,.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #bcb9c1;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
  }
  .footer-watermark { bottom: 0; }
}

@media (max-width: 359px) {
  :root {--landing-space:20px}
  .hero h1 { font-size: 38px; }
  .primary-line { font-size: 20px; }
  .project-caption, .format-copy, .process-card { padding: 20px; }
  .team-canvas { column-gap: 16px; }
  .team-name { font-size: 18px; }
  .team-role { font-size: 12px; }
  .contact-field input { font-size: 16px; letter-spacing: -.04em; }
  .footer-socials { gap: 12px; }
  .footer-social { width: 52px; height: 52px; }
}

@media (min-width: 480px) and (max-width: 767px) {
  .hero { min-height: 0; }
  .team-canvas { column-gap: 32px; row-gap: 40px; }
  .team-role { max-width: 220px; font-size: 14px; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .faq-item, .faq-answer, .faq-chevron, .cta, .footer-social { transition: none; }
}

/* A single lightweight scroll scene for the mobile landing-page previews. */
@media (max-width:767px), (max-width:1023px) and (pointer:coarse) {
  .landing-gallery.has-mobile-scroll {height:calc(min(52cqw,280px) + var(--landing-space));overflow:hidden}
  .has-mobile-scroll .landing-track {display:flex;gap:12px;width:100%;height:100%;padding-inline:20px;transform:translate3d(var(--mobile-gallery-x,0px),0,0)}
  .has-mobile-scroll .landing-preview {display:block;position:relative;inset:auto;flex:0 0 auto;width:auto;height:min(52cqw,280px)}
  .has-mobile-scroll .landing-preview {margin-block:0}
  .has-mobile-scroll .landing-preview picture {display:block;height:100%}
  .has-mobile-scroll .landing-preview img {position:static;display:block;width:auto;max-width:none;height:100%;object-fit:contain}
}

@media (max-width:767px), (max-width:1023px) and (pointer:coarse) {
  .hero .cta img, .contact-submit img {display:none}
}
