/* Responsive layer: loaded after the desktop art direction. */

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 1199px) {
  html,
  body {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  .site-shell {
    width: 100%;
    overflow-x: clip;
  }

  .nav,
  .hero-content,
  .section,
  .closing,
  .archive-hero,
  .archive-index,
  .archive-projects,
  .design-capability,
  .capability-detail,
  .drama-hero,
  .drama-overview,
  .episode-section,
  .commercial-showcase,
  .commercial-breakdown,
  .corporate-feature,
  .corporate-method,
  .graphic-real-hero,
  .graphic-category,
  .graphic-portfolio-hero,
  .graphic-case-index,
  .graphic-case-section {
    width: min(100% - 64px, 1180px);
  }

  body.nav-docked .home-nav {
    width: calc(100% - 40px);
  }

  .section-grid,
  .project-grid,
  .film-category-grid,
  .resume-grid,
  .archive-project,
  .drama-hero,
  .graphic-real-project,
  .graphic-real-project.hero-project,
  .graphic-real-project.final-project,
  .graphic-real-project.split-project,
  .graphic-portfolio-hero,
  .graphic-case-header,
  .graphic-section-title {
    grid-template-columns: 1fr;
  }

  .graphic-grid,
  .strength-grid,
  .archive-index-grid,
  .capability-grid,
  .capability-index-grid,
  .capability-columns,
  .graphic-case-index,
  .graphic-case-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .film-category.featured,
  .animation-category {
    grid-row: auto;
    grid-column: auto;
    min-height: 560px;
  }

  .archive-visual,
  .graphic-project-copy,
  .capability-number {
    position: relative;
    top: auto;
  }

  .archive-visual {
    height: 62vh;
    min-height: 520px;
  }

  .capability-detail {
    grid-template-columns: minmax(180px, .28fr) minmax(0, 1fr);
  }

  .commercial-series-head {
    grid-template-columns: 90px minmax(300px, .75fr) minmax(0, 1fr);
  }

  .corporate-video-card div {
    grid-template-columns: 1fr;
  }

  .corporate-video-card h3,
  .corporate-video-card p {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 767px) {
  :root {
    scroll-padding-top: 92px;
  }

  body {
    overflow-x: clip;
    font-size: 15px;
  }

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

  .nav,
  .hero-content,
  .section,
  .closing,
  .archive-hero,
  .archive-index,
  .archive-projects,
  .design-capability,
  .capability-detail,
  .drama-hero,
  .drama-overview,
  .episode-section,
  .commercial-showcase,
  .commercial-breakdown,
  .corporate-feature,
  .corporate-method,
  .graphic-real-hero,
  .graphic-category,
  .graphic-portfolio-hero,
  .graphic-case-index,
  .graphic-case-section,
  .animation-shell {
    width: calc(100% - 30px);
  }

  .opening-curtain span {
    font-size: 88px;
    letter-spacing: 0;
  }

  .opening-curtain strong {
    font-size: 10px;
    letter-spacing: .2em;
  }

  .kinetic-section-title {
    left: 0;
    top: 28px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    font-size: 68px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .nav,
  .detail-nav {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 10000;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 24px;
    background: rgba(8,10,14,.66);
    box-shadow: 0 16px 48px rgba(0,0,0,.34);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
  }

  .hero .home-nav {
    position: absolute;
    left: 15px;
    right: 15px;
    width: auto;
    margin-top: 8px;
  }

  body.nav-docked .home-nav {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: 15px;
    right: 15px;
    width: auto;
    padding: 9px 10px;
    transform: none;
  }

  .brand {
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    font-size: 12px;
    letter-spacing: .04em;
    white-space: nowrap;
  }

  .contact-button {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-nav-toggle {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: #f5f7fb;
    background: rgba(255,255,255,.07);
    cursor: pointer;
  }

  .mobile-nav-toggle span,
  .mobile-nav-toggle::before,
  .mobile-nav-toggle::after {
    position: absolute;
    width: 17px;
    height: 1px;
    content: "";
    background: currentColor;
    transition: transform .3s ease, opacity .3s ease;
  }

  .mobile-nav-toggle::before { transform: translateY(-5px); }
  .mobile-nav-toggle::after { transform: translateY(5px); }

  .nav[data-menu-open="true"] .mobile-nav-toggle span { opacity: 0; }
  .nav[data-menu-open="true"] .mobile-nav-toggle::before { transform: rotate(45deg); }
  .nav[data-menu-open="true"] .mobile-nav-toggle::after { transform: rotate(-45deg); }

  .nav .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: grid;
    grid-column: 1 / -1;
    gap: 4px;
    max-height: 0;
    padding: 0 8px;
    overflow: hidden;
    border-color: transparent;
    border-radius: 18px;
    background: rgba(8,10,14,.88);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height .36s ease, padding .36s ease, opacity .25s ease, transform .36s ease, border-color .36s ease;
  }

  .nav[data-menu-open="true"] .nav-links {
    max-height: 420px;
    padding: 8px;
    border-color: rgba(255,255,255,.18);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .hero {
    min-height: 100svh;
    background: #020204;
  }

  .hero-video {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: saturate(1.12) contrast(1.24) brightness(.88);
    transform: none;
    animation: mobileVideoPulse 16s ease-in-out infinite alternate;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(2,2,4,.62) 0%, rgba(2,2,4,.06) 30%, rgba(2,2,4,.12) 58%, rgba(2,2,4,.94) 100%);
  }

  .hero::after {
    background-size: 48px 48px;
  }

  .hero-content {
    min-height: 100svh;
    justify-content: flex-end;
    padding: 150px 0 26px;
  }

  .hero-marquee {
    top: 96px;
    left: 0;
    right: auto;
    font-size: 88px;
    line-height: .76;
    letter-spacing: 0;
    transform: none;
  }

  .hero-spec {
    left: 0;
    top: 31%;
    gap: 3px;
  }

  .hero-spec strong { font-size: 34px; }
  .hero-spec span { max-width: 150px; font-size: 10px; }

  .hero-statement {
    right: 0;
    bottom: 44%;
    font-size: 15px;
  }

  .hero-statement::before { display: none; }

  .hero-content .eyebrow {
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: .1em;
  }

  h1,
  .hero h1 {
    max-width: 100%;
    margin-bottom: 16px;
    font-size: 48px;
    line-height: .92;
  }

  h2,
  .closing h2 {
    font-size: 40px;
    line-height: 1.04;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-bottom p {
    font-size: 14px;
    line-height: 1.62;
  }

  .watch-link,
  .closing-mail {
    min-height: 48px;
    justify-content: center;
    padding: 13px 18px;
    font-size: 15px;
  }

  .ferrofluid-bg { inset: 100svh 0 0; }
  .ferrofluid-bg > span,
  .ferrofluid-canvas {
    inset: 18px 15px auto;
    width: calc(100% - 30px);
    height: 430px;
    border-radius: 16px;
  }

  .section { padding-top: 88px; }

  .section-grid,
  .project-grid,
  .film-category-grid,
  .graphic-grid,
  .strength-grid,
  .resume-grid,
  .archive-index-grid,
  .archive-project,
  .archive-meta,
  .capability-grid,
  .capability-index-grid,
  .capability-detail,
  .capability-columns,
  .capability-proof,
  .drama-hero,
  .drama-overview,
  .episode-grid,
  .commercial-series-head,
  .graphic-portfolio-hero,
  .graphic-case-index,
  .graphic-section-title,
  .graphic-case-header,
  .graphic-case-notes,
  .graphic-image-grid,
  .graphic-image-grid.equal,
  .micro-film-screening > header,
  .micro-film-result {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .film-category-grid,
  .graphic-grid,
  .strength-grid,
  .resume-grid,
  .episode-grid {
    gap: 16px;
  }

  .section-head,
  .closing {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .section-head h2 { font-size: 42px; }

  .portrait-panel { padding: 9px; }
  .portrait { height: 460px; }

  .profile-copy { padding-top: 14px; }
  .profile-copy > p:not(.eyebrow) { font-size: 16px; }

  .info-row {
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
  }

  .info-row span {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
  }

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

  .metrics strong {
    min-height: 104px;
    padding: 13px 10px;
    font-size: 26px;
  }

  .metrics span { font-size: 11px; }

  .film-category,
  .film-category.featured,
  .animation-category {
    min-height: 540px;
  }

  .film-content,
  .animation-category .film-content {
    right: 18px;
    bottom: 20px;
    left: 18px;
    width: auto;
  }

  .film-content h3,
  .film-category.featured .film-content h3 {
    margin: 9px 0;
    font-size: 34px;
  }

  .film-content p { font-size: 14px; }
  .film-content small { margin-top: 12px; font-size: 13px; }

  .graphic-card {
    min-height: 520px;
    padding: 18px;
  }

  .graphic-card > div {
    margin: 0;
    padding: 18px;
  }

  .graphic-card h3 { font-size: 27px; }
  .graphic-card p { font-size: 14px; }

  .strength-card,
  .resume-card {
    min-height: 0;
    padding: 22px;
  }

  .strength-card span { margin-top: 16px; }
  .resume-card h3 { font-size: 24px; }

  .closing {
    min-height: 86svh;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 70px;
  }

  .closing-mail {
    width: 100%;
  }

  .archive-hero,
  .graphic-portfolio-hero,
  .graphic-real-hero {
    min-height: auto;
    padding: 128px 0 64px;
  }

  .archive-hero h1,
  .graphic-portfolio-hero h1,
  .graphic-real-hero h1,
  .drama-hero h1,
  .commercial-hero h1,
  .corporate-hero h1,
  .capability-hero h1 {
    max-width: 100%;
    font-size: 58px;
    line-height: .92;
  }

  .archive-hero > p:not(.eyebrow),
  .graphic-portfolio-hero > p,
  .graphic-real-hero p:last-child,
  .drama-hero > p {
    font-size: 16px;
  }

  .archive-index,
  .graphic-case-index {
    padding-top: 52px;
  }

  .archive-index-card,
  .graphic-index-card {
    min-height: 230px;
  }

  .archive-index-card h3 { margin-top: 64px; }

  .archive-project {
    min-height: 0;
    gap: 30px;
    padding: 58px 0;
  }

  .archive-visual {
    height: 58svh;
    min-height: 390px;
  }

  .archive-visual span { font-size: 98px; }
  .archive-copy h2 { font-size: 48px; }
  .archive-concept { font-size: 17px; }
  .archive-copy blockquote { margin: 28px 0; font-size: 23px; }

  .archive-meta section,
  .archive-meta section:first-child,
  .archive-meta section:last-child {
    grid-column: auto;
    min-height: 0;
  }

  .design-capability { padding: 72px 0 96px; }
  .capability-grid article { min-height: 250px; }
  .capability-grid h3 { margin-top: 76px; font-size: 27px; }

  .capability-index-grid a { min-height: 190px; }
  .capability-index-grid strong { margin-top: 66px; font-size: 20px; }

  .capability-detail {
    min-height: 0;
    gap: 16px;
    padding: 78px 0;
  }

  .capability-number {
    font-size: 92px;
  }

  .capability-copy h2 { font-size: 46px; }
  .capability-copy .lead { font-size: 18px; }

  .capability-columns article { min-height: 0; }
  .capability-proof li { min-height: 0; }
  .capability-proof li + li {
    border-top: 1px solid rgba(255,255,255,.1);
    border-left: 0;
  }

  .drama-hero {
    min-height: auto;
    gap: 28px;
    padding: 118px 0 52px;
  }

  .drama-overview article { min-height: 0; }
  .episode-section { padding-top: 76px; }
  .series-section { padding-top: 96px; }
  .series-note { text-align: left; }

  .episode-card video,
  .animation-video-card video,
  .commercial-video-card video,
  .corporate-video-card video,
  .micro-film-screening video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
  }

  .episode-card div,
  .animation-video-card > div,
  .corporate-video-card div {
    min-height: 0;
    padding: 20px;
  }

  .episode-card h3,
  .animation-video-card h3 { font-size: 24px; }

  .commercial-showcase,
  .commercial-breakdown,
  .corporate-feature,
  .corporate-method {
    padding-top: 70px;
  }

  .commercial-series-head {
    gap: 12px;
    align-items: start;
  }

  .commercial-series-head h3 { font-size: 34px; }
  .commercial-series-head p { font-size: 15px; }
  .corporate-video-card h3 { font-size: 34px; }
  .corporate-video-card p { font-size: 15px; }

  .graphic-category { padding-top: 72px; }
  .graphic-category-head h2,
  .graphic-section-title h2 { font-size: 48px; }

  .graphic-real-project,
  .graphic-real-project.hero-project,
  .graphic-real-project.final-project,
  .graphic-real-project.split-project,
  .graphic-project-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .graphic-project-copy {
    min-height: 0;
    padding: 22px;
  }

  .graphic-project-copy h3,
  .graphic-case-header h3 { font-size: 42px; }

  .graphic-gallery,
  .graphic-gallery.two-up,
  .graphic-gallery.compact,
  .graphic-gallery.mosaic,
  .graphic-project-row {
    grid-template-columns: 1fr;
  }

  .graphic-gallery.mosaic .large { grid-column: auto; }

  .graphic-full-image img,
  .graphic-image-grid img,
  .graphic-image-link img,
  .graphic-work-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .graphic-case-section { padding-top: 72px; }
  .graphic-case-block { margin-bottom: 60px; padding-bottom: 52px; }
  .graphic-case-notes section { min-height: 0; }

  .animation-hero {
    gap: 42px;
    padding-top: 128px;
  }

  .animation-hero h1,
  .animation-project-head h2,
  .micro-film-result h2 {
    font-size: 50px;
  }

  .animation-overview strong { font-size: 40px; }
  .animation-overview article { padding: 30px 22px; }
  .animation-project { padding: 82px 0; }

  .micro-film-screening {
    padding: 80px 0 96px;
  }

  .micro-film-screening h2 { font-size: 48px; }
  .micro-film-screening figcaption { padding: 18px; }

  .micro-film-key-visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .micro-film-process-grid { grid-template-columns: 1fr; }
  .micro-film-result { gap: 24px; padding: 84px 0; }

  .nancheng-project {
    padding-top: 92px;
  }

  .nancheng-project .animation-project-head {
    margin-bottom: 34px;
  }

  .nancheng-film-card > div {
    display: block;
  }

  .nancheng-film-card h3 {
    margin: 10px 0;
  }

  .motion-item {
    transform: translate3d(0, 38px, 0) scale(.985);
    filter: blur(7px);
  }
}

@media (hover: none), (pointer: coarse) {
  .border-glow-target:hover,
  .film-category.border-glow-target:hover,
  .graphic-card.border-glow-target:hover,
  .archive-index-card.border-glow-target:hover,
  .episode-card.border-glow-target:hover,
  .strength-card.border-glow-target:hover,
  .resume-card.border-glow-target:hover,
  .portrait-panel.border-glow-target:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-item,
  .motion-media,
  .kinetic-section-title,
  .hero-video,
  .hero-motion,
  .hero-noise {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}

@keyframes mobileVideoPulse {
  from { filter: saturate(1.06) contrast(1.2) brightness(.84); }
  to { filter: saturate(1.18) contrast(1.28) brightness(.94); }
}
