/*
 * Final responsive layer
 * Loaded after style.css and subpages.css so mobile behavior stays predictable.
 */

@keyframes heroTopTitleRevealMobile {
  from {
    opacity: 0;
    filter: blur(0.4rem);
    transform: translate3d(0, 1.6rem, 0);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroTopTitleExitMobile {
  from {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }

  to {
    opacity: 0;
    filter: blur(0.8rem);
    transform: none;
  }
}

@keyframes heroLightSweepContained {
  0% {
    opacity: 0;
    background-position: 180% 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    background-position: -80% 0;
  }
}

@media (max-width: 1024px) {
  #fullScreen,
  .model_controls [data-model-fullscreen] {
    display: none;
  }

  html {
    background-color: #2d75ac;
    overscroll-behavior-y: none;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    overscroll-behavior-y: none;
  }

  .container,
  .header_inner {
    width: calc(100% - 4.8rem);
    max-width: calc(100% - 4.8rem);
    min-width: 0;
  }

  .container > *,
  .service_card > *,
  .detail_intro_grid > *,
  .company_message_grid > *,
  .view3d_content > *,
  .footer_inner > * {
    min-width: 0;
  }

  /* Keep decorative frames inside their component instead of extending the page. */
  .detail_intro_image::before {
    right: 0;
    left: 1.2rem;
  }

  .cta_band::after {
    right: 0;
  }

  .policy_intro::after {
    right: 5rem;
  }

  .model_stage::after,
  .view3d_model::after {
    right: 0;
  }

  /* Horizontal reveal offsets and outside arrows were the main iPad overflow source. */
  .service_scroll_reveal .service_body,
  .service_scroll_reveal.reverse .service_body {
    transform: translate3d(0, 2.4rem, 0);
  }

  .service_scroll_reveal.is_revealed .service_body,
  .service_scroll_reveal.reverse.is_revealed .service_body {
    transform: translate3d(0, 0, 0);
  }

  .strengths_prev {
    left: 0;
  }

  .strengths_next {
    right: 0;
  }

  .footer_inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem 3rem;
  }

  .footer_logo {
    grid-column: 1 / -1;
  }

  body:not(.subpage_body) .header_catchphrase {
    display: block;
  }

  /* Preserve the original hero-copy layout on phones and tablets.
     The unified desktop title sizing starts above the iPad breakpoint. */
  .hero_service_copy {
    width: 100%;
    max-width: 82rem;
    height: auto;
    display: block;
  }

  .hero_copy_panel--service .hero_copy_title {
    max-width: 82rem;
    font-size: clamp(2.4rem, 3.2vw, 3.2rem);
    line-height: 1.28;
    white-space: normal;
    text-wrap: balance;
  }

  .hero_service_copy .hero_copy_text {
    margin-top: 2.4rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  body.is_menu_open {
    overflow: hidden;
  }

  body:not(.subpage_body) .header_brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    gap: 1.2rem;
  }

  body:not(.subpage_body) .header_catchphrase {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(1.05rem, 1.3vw, 1.3rem);
    white-space: nowrap;
  }

  body:not(.subpage_body) .header_right {
    flex: 0 0 auto;
  }

  body:not(.subpage_body) .home_menu_button {
    width: 4.6rem;
    height: 4.6rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 0.6rem;
    font-size: 2.5rem;
    line-height: 1;
    touch-action: manipulation;
  }

  body:not(.subpage_body) .header:not(.header_scrolled) .home_menu_button {
    color: #fff;
  }

  body:not(.subpage_body) .header_right > .header_actions {
    display: none;
  }

  body:not(.subpage_body) .header_right .header_nav {
    position: fixed;
    top: 8rem;
    right: 2.4rem;
    left: auto;
    z-index: 9998;
    width: min(32rem, calc(100vw - 4.8rem));
    max-height: calc(100dvh - 9.6rem);
    padding: 0.6rem 1.4rem 0.8rem;
    display: none;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(31, 95, 145, 0.12);
    border-radius: 0.8rem;
    box-shadow: 0 1.2rem 2.8rem rgba(7, 31, 48, 0.18);
    transform-origin: top right;
  }

  body:not(.subpage_body) .header_right .header_nav.is_open {
    display: flex;
    animation: tabletMenuPopoverIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  body:not(.subpage_body) .header_right .header_nav a {
    width: 100%;
    min-height: 4.4rem;
    height: auto;
    padding: 1rem 0.3rem;
    color: var(--color-text-dark);
    border-bottom: 1px solid rgba(23, 34, 43, 0.1);
    font-size: 1.25rem;
  }

  body:not(.subpage_body) .header_right .header_nav a:last-child {
    border-bottom: 0;
  }

  @keyframes tabletMenuPopoverIn {
    from {
      opacity: 0;
      transform: translate3d(0, -0.6rem, 0) scale(0.97);
    }

    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  .footer_inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.2rem 2.4rem;
  }

  .footer_logo {
    grid-column: 1 / -1;
  }

  .footer_service {
    grid-column: 1;
  }

  .footer_nav {
    grid-column: 2;
  }

  .footer_contact {
    grid-column: 3;
  }

  .scroll_top_btn {
    right: calc(2rem + env(safe-area-inset-right));
    bottom: calc(2rem + env(safe-area-inset-bottom));
    width: 4.8rem;
    height: 4.8rem;
    font-size: 2rem;
  }

  .print_estimate_cta {
    left: calc(2rem + env(safe-area-inset-left));
    bottom: calc(2rem + env(safe-area-inset-bottom));
    width: 8.7rem;
    height: 8.7rem;
    font-size: 1.875rem;
  }

  .print_estimate_cta_lead {
    width: 8.7rem;
    height: 8.7rem;
    flex-basis: 8.7rem;
  }

  .print_estimate_cta_icon,
  .print_estimate_cta_arrow {
    font-size: 2.85rem;
  }

  .hero_copy_panel--top .hero_title {
    width: 100%;
    max-width: none;
    overflow: visible;
    font-size: clamp(3.8rem, 5.2vw, 5.2rem);
    letter-spacing: 0.02em;
  }

  .hero_copy_panel--top .hero_title_line {
    width: 100%;
    white-space: nowrap;
    letter-spacing: 0.02em;
    filter: blur(0.4rem);
    transform: translate3d(0, 1.6rem, 0);
    will-change: opacity, filter, transform;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top.is_active
    .hero_title_line_primary {
    animation: heroTopTitleRevealMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s
      forwards;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top.is_active
    .hero_title_line_secondary {
    animation: heroTopTitleRevealMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.22s
      forwards;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top:not(.is_active)
    .hero_title_line {
    letter-spacing: 0.02em;
    filter: blur(0.35rem);
    transform: translate3d(0, 1.2rem, 0);
  }

  .hero.hero_intro_ready .hero_copy_panel--top.is_leaving .hero_title_line {
    animation: heroTopTitleExitMobile 0.75s cubic-bezier(0.4, 0, 0.2, 1)
      forwards !important;
  }
}

@media (max-width: 768px) {
  :root {
    --mobile-gutter: 1.8rem;
    --mobile-header-height: 6.4rem;
  }

  html {
    scroll-padding-top: calc(var(--mobile-header-height) + 1.2rem);
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
  }

  @supports (overflow: clip) {
    html,
    body {
      overflow-x: clip;
    }
  }

  body.is_menu_open {
    overflow: hidden;
  }

  img,
  video,
  model-viewer,
  iframe,
  table {
    max-width: 100%;
  }

  input,
  textarea,
  select {
    font-size: 1.6rem;
  }

  .container,
  .header_inner,
  .subpage_body .header_inner {
    width: calc(100% - (var(--mobile-gutter) * 2));
    max-width: calc(100% - (var(--mobile-gutter) * 2));
  }

  .section {
    padding-block: 4.8rem;
  }

  .header_inner,
  .subpage_body .header_inner {
    height: var(--mobile-header-height);
  }

  .header_brand,
  .logo,
  .logo a {
    min-width: 0;
  }

  body:not(.subpage_body) .header_brand {
    flex: 1 1 auto;
    overflow: hidden;
    gap: clamp(0.6rem, 1.8vw, 1.2rem);
  }

  .logo_img,
  .subpage_body .logo_img {
    width: auto;
    height: 5.4rem;
  }

  .header_right {
    flex: 0 0 auto;
    gap: 0.4rem;
  }

  .home_menu_button,
  .subpage_menu {
    width: 4.4rem;
    height: 4.4rem;
    padding: 0;
    place-items: center;
    border-radius: 0.6rem;
    font-size: 2.5rem;
    line-height: 1;
    touch-action: manipulation;
  }

  .home_menu_button {
    display: grid;
  }

  .subpage_menu {
    display: grid;
    color: var(--color-text-dark);
    background: transparent;
    border: 0;
  }

  .header_right > .header_actions {
    display: none;
  }

  .header_right .header_nav,
  .subpage_body .header_nav {
    position: fixed;
    top: calc(var(--mobile-header-height) + 0.6rem);
    right: var(--mobile-gutter);
    left: auto;
    z-index: 9998;
    width: min(76vw, 25rem);
    max-height: calc(100dvh - var(--mobile-header-height));
    padding: 0.4rem 1.2rem 0.6rem;
    display: none;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(31, 95, 145, 0.12);
    border-radius: 0.8rem;
    box-shadow: 0 1.2rem 2.8rem rgba(7, 31, 48, 0.18);
    transform-origin: top right;
    -webkit-overflow-scrolling: touch;
  }

  .header_right .header_nav.is_open,
  .subpage_body .header_nav.is_open {
    top: calc(var(--mobile-header-height) + 0.6rem);
    right: var(--mobile-gutter);
    left: auto;
    width: min(76vw, 25rem);
    padding: 0.4rem 1.2rem 0.6rem;
    display: flex;
    animation: mobileMenuPopoverIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .header_right .header_nav a,
  .subpage_body .header_nav a {
    width: 100%;
    min-height: 4.2rem;
    height: auto;
    padding: 0.9rem 0.2rem;
    justify-content: space-between;
    color: var(--color-text-dark);
    border-bottom: 1px solid rgba(31, 95, 145, 0.1);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
  }

  .header_right .header_nav a:last-child,
  .subpage_body .header_nav a:last-child {
    border-bottom: 0;
  }

  .header_right .header_nav a::before {
    display: none;
  }

  @keyframes mobileMenuPopoverIn {
    from {
      opacity: 0;
      transform: translate3d(0, -0.6rem, 0) scale(0.97);
    }

    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  body:not(.subpage_body) .header_catchphrase {
    position: static;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: clamp(0.72rem, 2vw, 0.95rem);
    line-height: 1.35;
    text-align: left;
    text-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    transform: translate3d(0, -1.5rem, 0);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body:not(.subpage_body) .header_catchphrase.is_visible {
    transform: none;
  }

  body:not(.subpage_body) .header_catchphrase span {
    margin-left: 0;
  }

  /* Home hero */
  .hero {
    height: 100svh;
    min-height: 64rem;
    padding: 0;
  }

  .hero_inner {
    inset: 0;
    width: calc(100% - (var(--mobile-gutter) * 2));
    height: 100%;
    padding: 12rem 0 15.5rem;
    align-items: center;
    text-align: left;
  }

  .hero_copy_panel--top .hero_title {
    width: 100%;
    max-width: none;
    overflow: visible;
    font-size: clamp(2.2rem, 7.3vw, 3.4rem);
    line-height: 1.35;
    letter-spacing: 0.01em;
  }

  .hero_copy_panel--top .hero_title_line {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    letter-spacing: 0.01em;
    filter: blur(0.4rem);
    transform: translate3d(0, 1.6rem, 0);
    will-change: opacity, filter, transform;
  }

  .hero_copy_panel--top .hero_title::after {
    left: 0;
    width: 100%;
    transform: none;
    background-size: 220% 100%;
    background-position: 180% 0;
  }

  .hero.hero_intro_ready .hero_copy_panel--top.is_active .hero_title::after {
    animation: heroLightSweepContained 1.35s ease 1.02s forwards;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top.is_active
    .hero_title_line_primary {
    animation: heroTopTitleRevealMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s
      forwards;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top.is_active
    .hero_title_line_secondary {
    animation: heroTopTitleRevealMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.22s
      forwards;
  }

  .hero.hero_intro_ready
    .hero_copy_panel--top:not(.is_active)
    .hero_title_line {
    letter-spacing: 0.01em;
    filter: blur(0.35rem);
    transform: translate3d(0, 1.2rem, 0);
  }

  .hero.hero_intro_ready .hero_copy_panel--top.is_leaving .hero_title_line {
    animation: heroTopTitleExitMobile 0.75s cubic-bezier(0.4, 0, 0.2, 1)
      forwards !important;
  }

  .hero_copy_panel--service {
    justify-content: center;
  }

  .hero_service_copy {
    position: static;
    width: auto;
    max-width: 82rem;
    height: auto;
    display: block;
  }

  .hero_service_name {
    top: 2.8rem;
    max-width: calc(100% - 1.4rem);
    gap: 0.8rem;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
  }

  .hero_service_name::after {
    inset: -0.5rem -0.7rem;
  }

  .hero_service_name::before {
    width: 2.4rem;
  }

  .hero_copy_kicker {
    top: 0.5rem;
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .hero_copy_panel--service .hero_copy_title {
    max-width: 100%;
    font-size: clamp(1.85rem, 5vw, 2.1rem);
    line-height: 1.32;
    white-space: normal;
    text-wrap: balance;
  }

  .hero_copy_text {
    max-width: 100%;
    margin-top: 1.4rem;
    font-size: 1.25rem;
    line-height: 1.7;
  }

  .hero_service_copy .hero_copy_text {
    margin-top: 1.4rem;
  }

  .hero_bg_video {
    object-position: 55% center;
  }

  /* The mobile 3D-print clip has a dark unused strip on its right edge.
     Keep the video layer full-bleed and crop that source from its true center. */
  .hero_bg_video[src$="print_mobile.mp4"] {
    object-position: 50% center;
  }

  .hero_video_selector {
    --hero-thumb-size: 4.8rem;
    --hero-item-width: 6.5rem;
    right: auto;
    bottom: calc(1.8rem + env(safe-area-inset-bottom));
    left: 50%;
    width: calc(100% - 1.6rem);
    justify-content: center;
    gap: 0.5rem;
    transform: translateX(-50%);
  }

  .hero_home_item {
    width: var(--hero-item-width);
    flex-basis: var(--hero-item-width);
  }

  .hero_home_item::after {
    right: -0.25rem;
    height: calc(var(--hero-thumb-size) + 2.4rem);
  }

  .hero_service_video_group {
    gap: 0.1rem;
  }

  .hero_video_item {
    gap: 0.6rem;
  }

  .hero_video_label {
    min-height: 3em;
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .hero_video_ring {
    top: -0.45rem;
    width: calc(var(--hero-thumb-size) + 0.9rem);
    height: calc(var(--hero-thumb-size) + 0.9rem);
  }

  .hero_video_thumb:focus-visible,
  .hero_home_button:focus-visible {
    outline-width: 2px;
    outline-offset: 2px;
  }

  /* Home sections */
  .section_title {
    margin-bottom: 3rem;
  }

  .section_title::before,
  .section_title::after {
    display: none;
  }

  .section_title p {
    font-size: 1.2rem;
  }

  .section_title h2 {
    font-size: clamp(2.8rem, 9vw, 3.6rem);
  }

  .service_primary_list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3rem;
  }

  .service_card,
  .service_card.reverse {
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
    flex-direction: column !important;
    border-radius: 0.8rem;
  }

  .service_card .service_img,
  .service_card.reverse .service_img {
    order: 1;
    width: 100%;
    flex: 0 0 auto;
    height: clamp(21rem, 62vw, 29rem);
    margin: 0;
    border-radius: 0.8rem 0.8rem 0 0;
  }

  .service_body,
  .service_card.reverse .service_body {
    order: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 2.8rem 2rem;
    overflow: visible;
    border-radius: 0 0 0.8rem 0.8rem;
  }

  .service_scroll_reveal,
  .service_scroll_reveal.reverse {
    opacity: 0;
    transform: translate3d(0, 2.6rem, 0);
    transition:
      opacity 0.62s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  .service_scroll_reveal .service_img,
  .service_scroll_reveal.reverse .service_img {
    opacity: 0.72;
    filter: saturate(0.86) brightness(0.94);
    transform: scale(0.985);
    transition:
      opacity 0.62s ease,
      filter 0.78s ease,
      transform 0.86s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .service_scroll_reveal .service_body,
  .service_scroll_reveal.reverse .service_body {
    opacity: 0;
    transform: translate3d(0, 1.6rem, 0);
    transition:
      opacity 0.56s ease 0.12s,
      transform 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
      box-shadow 0.5s ease;
  }

  .service_scroll_reveal.is_revealed,
  .service_scroll_reveal.reverse.is_revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .service_scroll_reveal.is_revealed .service_img,
  .service_scroll_reveal.reverse.is_revealed .service_img {
    opacity: 1;
    filter: none;
    transform: scale(1);
  }

  .service_scroll_reveal.is_revealed .service_body,
  .service_scroll_reveal.reverse.is_revealed .service_body {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .service_kicker strong {
    font-size: 4rem;
  }

  .service_body h3 {
    overflow-wrap: anywhere;
    font-size: clamp(2.1rem, 6.6vw, 2.6rem);
  }

  .service_body .service_features li {
    grid-template-columns: 2.8rem minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1.4rem;
  }

  .service_features li > i {
    font-size: 2.2rem;
  }

  .service_body > .service_link {
    margin-top: 1.2rem;
    padding-bottom: 0.4rem;
    min-height: 4.4rem;
    align-items: center;
  }

  .strengths_controls {
    justify-content: center;
  }

  .strengths_arrow {
    width: 4.4rem;
    height: 4.4rem;
  }

  .strengths_progress {
    flex: 1 1 auto;
    width: auto;
    max-width: 20rem;
  }

  .view3d_content {
    gap: 1.8rem;
  }

  .view3d_model,
  .view3d_model model-viewer {
    min-height: 0;
  }

  .view3d_more {
    margin-top: 2rem;
  }

  .viewer_controls {
    right: 1rem;
    bottom: 1rem;
  }

  .view3d_model .viewer_controls {
    display: grid;
    grid-template-columns: 3.8rem;
    grid-auto-flow: row;
    gap: 0.4rem;
    max-width: none;
    padding: 0.4rem;
  }

  .viewer_controls button,
  .view3d_model .viewer_controls button {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.7rem;
  }

  .company_grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 0;
    overflow: visible;
  }

  .company_card {
    width: 100%;
    min-height: 22rem;
    aspect-ratio: 16 / 10;
  }

  .company_overlay {
    padding: 2rem 1.8rem 1.6rem;
  }

  .company_overlay h3 {
    font-size: 2rem;
    line-height: 1.25;
  }

  .company_overlay p {
    padding-right: 3.6rem;
    font-size: 1.1rem;
  }

  .process_step {
    min-height: 5.6rem;
    touch-action: manipulation;
  }

  .process_panel {
    padding: 2.2rem 1.8rem;
  }

  .process_panel_media {
    width: min(58vw, 19rem);
    min-height: 14rem;
  }

  .process_panel_body h3 {
    font-size: 2.2rem;
  }

  .news_grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .news_img {
    height: clamp(20rem, 62vw, 27rem);
  }

  .news_body {
    padding: 2rem;
  }

  .contact_inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.8rem;
    padding: 2.8rem 2rem;
  }

  .contact_text,
  .contact_form {
    width: 100%;
  }

  .contact_text h2 {
    font-size: 3.4rem;
  }

  .contact_form {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .contact_form textarea,
  .contact_form button {
    grid-column: auto;
  }

  .contact_form input,
  .contact_form textarea {
    min-height: 5rem;
    padding: 1.3rem 1.4rem;
  }

  .contact_form textarea {
    min-height: 13rem;
  }

  .contact_form button {
    width: 100%;
    min-height: 5rem;
  }

  /* Shared subpages */
  .subpage_body main {
    padding-top: var(--mobile-header-height);
  }

  .page_hero {
    min-height: 32rem;
  }

  .page_hero::before {
    left: 0;
    opacity: 0.52;
  }

  .page_hero::after {
    background: linear-gradient(
      90deg,
      rgba(8, 43, 66, 0.96),
      rgba(8, 43, 66, 0.68)
    );
  }

  .page_hero_inner {
    min-height: 32rem;
    padding: 4.8rem 0 4.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .page_kicker {
    gap: 0.8rem;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
  }

  .page_kicker::before {
    width: 2.8rem;
  }

  .page_hero h1 {
    max-width: 100%;
    margin-top: 1.5rem;
    overflow-wrap: anywhere;
    font-size: clamp(3rem, 10vw, 4.2rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
  }

  .page_hero_text {
    max-width: 100%;
    margin-top: 1.6rem;
    padding-left: 1.2rem;
    font-size: 1.25rem;
    line-height: 1.8;
  }

  .breadcrumb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .breadcrumb ol {
    width: max-content;
    min-width: calc(100% - (var(--mobile-gutter) * 2));
    min-height: 4.8rem;
    white-space: nowrap;
  }

  .sub_section,
  .page_company .sub_section {
    padding-block: 4.8rem;
  }

  .sub_heading {
    margin-bottom: 2.8rem;
    padding-left: 1.4rem;
  }

  .sub_heading h2,
  #service-2 .sub_heading h2 {
    margin-top: 1rem;
    overflow-wrap: anywhere;
    font-size: clamp(2.4rem, 7.5vw, 3rem);
    line-height: 1.4;
    letter-spacing: -0.025em;
  }

  .sub_heading p {
    margin-top: 1.1rem;
    font-size: 1.25rem;
    line-height: 1.85;
  }

  .service_index_grid,
  .detail_intro_grid,
  #service-2 .detail_intro_grid,
  .strength_grid,
  .listing_grid,
  .company_message_grid,
  .company_values_grid,
  .company_cases_grid,
  .recruit_job_grid,
  .recruit_flow_grid,
  .model_gallery_grid {
    grid-template-columns: 1fr;
  }

  .service_index_card {
    min-height: 31rem;
  }

  .service_index_content {
    padding: 2.5rem 2rem;
  }

  .service_index_content h2 {
    overflow-wrap: anywhere;
    font-size: 2.2rem;
  }

  .detail_intro_grid,
  .company_message_grid {
    gap: 3rem;
  }

  .detail_intro_image,
  #service-2 .detail_intro_image {
    width: 100%;
    margin: 0;
  }

  .detail_intro_image::before {
    top: 1rem;
    right: 0;
    bottom: -0.8rem;
    left: 0.8rem;
  }

  .detail_intro_copy > p,
  .company_message_copy > p,
  .article_detail_body,
  .policy_clause p,
  .policy_clause li {
    overflow-wrap: anywhere;
  }

  .service_accordion_trigger {
    min-height: 5.2rem;
    grid-template-columns: 2.8rem minmax(0, 1fr) 2.2rem;
    padding-block: 1.3rem;
  }

  .service_accordion_panel > p {
    margin-right: 0;
    margin-left: 3.8rem;
  }

  .strength_item img {
    height: clamp(21rem, 62vw, 27rem);
  }

  .strength_item_body {
    min-height: 0;
    padding: 2.2rem 2rem;
  }

  .page_company .company_message_grid figure {
    height: auto;
  }

  .page_company .company_message_grid img {
    width: 100%;
    max-height: 42rem;
    aspect-ratio: 4 / 3;
  }

  .page_company .philosophy_panel,
  .philosophy_panel {
    padding: 3rem 2rem;
    box-shadow: 0.8rem 0.8rem 0 #dbe9f1;
  }

  .philosophy_panel h2 {
    font-size: clamp(2.5rem, 7.5vw, 3.2rem);
  }

  .company_value,
  .recruit_flow_grid article {
    min-height: 0;
    padding: 2.4rem 2rem;
  }

  .company_case,
  .page_company .company_case {
    grid-template-columns: 1fr;
  }

  .company_case img,
  .page_company .company_case img {
    width: 100%;
    height: 21rem;
  }

  .company_case > div,
  .page_company .company_case > div {
    padding: 2.4rem 2rem;
  }

  .profile_table,
  .profile_table tbody,
  .profile_table tr,
  .profile_table th,
  .profile_table td {
    display: block;
    width: 100%;
  }

  .profile_table tr {
    border-bottom: 1px solid var(--color-border);
  }

  .profile_table th,
  .profile_table td {
    padding: 1.4rem 1.6rem;
    border-bottom: 0;
  }

  .profile_contact_link {
    min-height: 4.4rem;
  }

  .recruit_job_card {
    padding: 2.4rem 2rem;
  }

  .recruit_job_tags {
    gap: 0.8rem;
  }

  .recruit_job_apply {
    width: 100%;
    min-height: 4.8rem;
    justify-content: center;
  }

  .model_stage {
    min-height: clamp(28rem, 88vw, 36rem);
  }

  .model_controls {
    right: 1rem;
    bottom: 1rem;
    display: grid;
    grid-template-columns: 3.8rem;
    grid-auto-flow: row;
    gap: 0.4rem;
    max-width: none;
    padding: 0.4rem;
  }

  .model_controls button {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.7rem;
  }

  .model_card_copy {
    padding: 2.2rem 2rem 2.5rem;
  }

  .article_card,
  .article_card:first-child,
  .page_news .news_featured_card.article_card,
  .page_blog .news_featured_card.article_card {
    min-height: 0;
  }

  .article_card img,
  .article_card:first-child img,
  .page_news .news_featured_card.article_card img,
  .page_blog .news_featured_card.article_card img {
    height: clamp(20rem, 62vw, 26rem);
  }

  .article_body,
  .article_detail_header,
  .article_detail_body {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .article_detail h2 {
    overflow-wrap: anywhere;
    font-size: clamp(2.3rem, 7.5vw, 3.2rem);
  }

  .article_detail_image {
    aspect-ratio: 4 / 3;
  }

  .policy_intro {
    padding: 3rem 2rem;
  }

  .policy_intro h2 {
    font-size: clamp(2.3rem, 7vw, 3rem);
  }

  .policy_meta,
  .policy_meta div {
    display: grid;
    gap: 0.5rem;
  }

  .policy_clause {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2.6rem 2rem;
  }

  .policy_related a {
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.6rem;
  }

  .cta_band,
  .page_company .company_contact_cta,
  .page_recruit .recruit_cta {
    min-height: 0;
    padding-block: 4.8rem;
  }

  .cta_band h2,
  .page_company .company_contact_cta h2 {
    overflow-wrap: anywhere;
    font-size: clamp(2.5rem, 7.5vw, 3.2rem);
  }

  .cta_band .contact_btn {
    width: 100%;
    min-height: 5rem;
  }

  /* Footer and floating controls */
  .footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-top: 4.5rem;
    overflow-x: hidden;
  }

  .footer_inner {
    width: calc(100% - (var(--mobile-gutter) * 2));
    max-width: calc(100% - (var(--mobile-gutter) * 2));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.2rem 2rem;
  }

  .footer_inner > *,
  .footer_service,
  .footer_nav,
  .footer_contact,
  .footer_service p,
  .footer_nav p,
  .footer_contact p,
  .footer_service a,
  .footer_nav a,
  .footer_contact a,
  .footer_service span,
  .footer_nav span,
  .footer_contact span {
    min-width: 0;
    max-width: 100%;
  }

  .footer_logo {
    grid-column: 1 / -1;
  }

  .footer_logo_img {
    width: auto;
    height: 6rem;
    margin-bottom: 1.8rem;
  }

  .footer h3 {
    margin-bottom: 1.6rem;
  }

  .footer_service p,
  .footer_contact p,
  .footer_nav p {
    margin-bottom: 1rem;
  }

  .footer_service a,
  .footer_contact a,
  .footer_nav a {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.8rem;
    min-height: 4rem;
    align-items: start;
    overflow-wrap: anywhere;
  }

  .footer_service span,
  .footer_contact span,
  .footer_nav span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .footer_copy {
    margin-top: 3.5rem;
    padding-bottom: calc(1.8rem + env(safe-area-inset-bottom));
  }

  .scroll_top_btn {
    right: 1.4rem;
    bottom: calc(1.4rem + env(safe-area-inset-bottom));
    width: 4.6rem;
    height: 4.6rem;
    font-size: 2rem;
  }

  .print_estimate_cta {
    left: calc(1.4rem + env(safe-area-inset-left));
    bottom: calc(1.4rem + env(safe-area-inset-bottom));
    width: 8.1rem;
    height: 8.1rem;
    font-size: 1.95rem;
  }

  .print_estimate_cta_lead {
    width: 8.1rem;
    height: 8.1rem;
    flex-basis: 8.1rem;
  }

  .print_estimate_cta_icon,
  .print_estimate_cta_arrow {
    font-size: 2.85rem;
  }
}

/* SNS links move into the hamburger popover on tablet and mobile so the
   fixed header keeps its existing width and alignment. */
@media (max-width: 1024px) {
  .header_actions .header_social {
    display: none;
  }

  .header_nav.is_open .header_nav_social {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 0.2rem 0.4rem;
  }

  body:not(.subpage_body) .header_right .header_nav .header_nav_social > a.header_social_link,
  .subpage_body .header_nav .header_nav_social > a.header_social_link {
    width: 4.4rem;
    min-width: 4.4rem;
    max-width: 4.4rem;
    height: 4.4rem;
    min-height: 4.4rem;
    padding: 0;
    flex: 0 0 4.4rem;
    display: grid;
    place-items: center;
    justify-content: center;
    color: var(--color-primary);
    background: transparent;
    border: 0;
    border-radius: 0.6rem;
    box-shadow: none;
    font-size: 2rem;
    letter-spacing: 0;
    line-height: 1;
  }

  body:not(.subpage_body) .header_right .header_nav .header_nav_social > a.header_social_link:hover,
  .subpage_body .header_nav .header_nav_social > a.header_social_link:hover {
    transform: translateY(-2px);
  }
}

.hero_service_content_frame {
  display: contents;
}

/* Apply the glow to the actual service copy instead of the whole panel. This
   keeps the English SERVICE 0X label crisp while the Japanese service name,
   headline and description retain the blue-white glow. */
.hero
  .hero_copy_panel--service
  [data-hero-video-copy-item].hero_video_blur_text.isActive:not(
    .hero_copy_kicker
  ) {
  filter:
    blur(0)
    drop-shadow(0 0 0.16rem rgba(255, 255, 255, 0.38))
    drop-shadow(0 0 0.52rem rgba(155, 211, 246, 0.58))
    drop-shadow(0 0 1rem rgba(98, 183, 234, 0.36));
}

/* Keep service copy left-aligned on tablets and phones. One animated frame
   encloses the complete copy without a second frame around the service name. */
@media (max-width: 1024px) {
  .hero_copy_panel--service {
    align-items: flex-start;
    justify-content: flex-end;
    top: 0;
    padding: 0 0 7rem;
    text-align: left;
  }

  .hero_copy_panel--service .hero_service_copy,
  .hero_copy_panel--service .hero_copy_title,
  .hero_copy_panel--service .hero_copy_text {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
  }

  .hero_copy_panel--service .hero_copy_kicker {
    position: relative;
    top: auto;
    left: auto;
    margin: 0;
  }

  .hero_copy_panel--service .hero_service_name {
    position: relative;
    top: auto;
    left: auto;
    margin: 0.6rem 0 0;
    line-height: 1.45;
  }

  .hero_copy_panel--service .hero_service_copy {
    margin-top: 2rem;
  }

  .hero_copy_panel--service .hero_copy_title {
    font-size: clamp(1.2rem, 4.35vw, 2.4rem);
    line-height: 1.42;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .hero_copy_title_line_group {
    display: block;
    max-width: 100%;
    white-space: nowrap;
  }

  .hero_service_copy .hero_copy_text {
    display: none;
  }

  .hero_service_content_frame {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    width: calc(100% - 2.4rem);
    max-width: none;
    margin-inline: auto;
  }

  /* On tablet/mobile use one frame around the complete copy. */
  .hero_service_name::after {
    display: none;
    animation: none !important;
  }

  .hero_service_content_frame::after {
    content: "";
    position: absolute;
    inset: -1rem -1.2rem;
    pointer-events: none;
    border-radius: 0.5rem;
    background:
      linear-gradient(90deg, #9bd3f6, #62b7ea) left top / 0 1px no-repeat,
      linear-gradient(180deg, #62b7ea, #9bd3f6) right top / 1px 0 no-repeat,
      linear-gradient(270deg, #9bd3f6, #62b7ea) right bottom / 0 1px no-repeat,
      linear-gradient(0deg, #62b7ea, #9bd3f6) left bottom / 1px 0 no-repeat;
    box-shadow: 0 0 1.8rem rgba(98, 183, 234, 0);
    opacity: 0;
  }

  .hero_copy_panel--service.is_active .hero_service_content_frame::after {
    animation: heroServiceTitleFrameDraw 1.1s cubic-bezier(0.22, 1, 0.36, 1) 2.45s both;
  }

}

@media (max-width: 768px) {
  .hero_copy_panel--service {
    top: 0;
    padding: 0 0 2rem;
  }

  /* Service 01 has the longest locked first line. Scale only this headline
     to keep its final characters clear of the animated frame on phones. */
  .hero_copy_panel--service[data-copy-index="0"] .hero_copy_title {
    font-size: clamp(1.15rem, 4vw, 2rem);
    letter-spacing: 0;
  }

  .hero_copy_panel--service .hero_service_copy {
    margin-top: 1.6rem;
  }

  .hero_service_copy .hero_copy_text {
    margin-top: 1.2rem;
    line-height: 1.75;
  }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .hero_service_content_frame::after {
    animation: none !important;
    opacity: 1;
    background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --mobile-gutter: 1.5rem;
  }

  body:not(.subpage_body) .header_catchphrase {
    font-size: clamp(0.72rem, 2vw, 0.88rem);
  }

  .hero {
    min-height: 60rem;
  }

  .hero_inner {
    padding-top: 12.5rem;
    padding-bottom: 14.5rem;
  }

  .hero_video_selector {
    --hero-thumb-size: 4.4rem;
    --hero-item-width: 6rem;
  }

  .hero_video_label {
    font-size: 0.78rem;
  }

  .contact_inner {
    padding-inline: 1.7rem;
  }

  .footer_inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "logo logo"
      "service navigation"
      "contact navigation";
    gap: 3rem 1.2rem;
    align-items: start;
  }

  .footer_logo {
    grid-area: logo;
    grid-column: 1 / -1;
  }

  .footer_service {
    grid-area: service;
    grid-column: 1;
  }

  .footer_nav {
    grid-area: navigation;
    grid-column: 2;
  }

  .footer_contact {
    grid-area: contact;
    grid-column: 1;
    display: block;
    margin-top: -3.5rem;
  }

  .footer_contact h3 {
    grid-column: auto;
  }

  .footer_service,
  .footer_nav,
  .footer_contact {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .footer_service a,
  .footer_nav a,
  .footer_contact a {
    grid-template-columns: 1.8rem minmax(0, 1fr);
    gap: 0.6rem;
  }

  .footer_service i,
  .footer_nav i,
  .footer_contact i {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 1.5rem;
    line-height: 1.8rem;
  }
}

@media (max-width: 768px) and (max-height: 600px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 62rem;
  }

  .hero_inner {
    padding-top: 10rem;
    padding-bottom: 13rem;
  }

  .hero_video_selector {
    bottom: 1.2rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  a,
  button,
  input,
  textarea,
  select {
    touch-action: manipulation;
  }

  .company_card:hover,
  .article_card:hover,
  .service_index_card:hover {
    transform: none;
  }
}

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

.header_nav .mobile_nav_action {
  display: none;
}

/* Tablet uses the same hamburger navigation as mobile, so its action links
   must be present inside the opened popover as well. */
@media (min-width: 769px) and (max-width: 1024px) {
  body:not(.subpage_body) .header_right .header_nav.is_open .mobile_nav_action {
    display: flex;
    min-height: 4.4rem;
    margin-top: 0.45rem;
    padding: 1rem 1.2rem;
    justify-content: space-between;
    color: var(--color-primary-dark);
    background: rgba(37, 111, 168, 0.08);
    border: 1px solid rgba(37, 111, 168, 0.2);
    border-radius: 0.6rem;
    font-weight: 700;
  }

  body:not(.subpage_body) .header_right .header_nav.is_open .mobile_nav_action i {
    flex: 0 0 auto;
    font-size: 1.5rem;
  }
}

/* Primary actions live inside the hamburger menu on mobile. */
@media (max-width: 768px) {
  body:not(.subpage_body) .header .home_menu_button {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body:not(.subpage_body) .header .header_nav.is_open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .header_right > .header_actions,
  .subpage_body .header_right > .header_actions {
    display: none;
  }

  .header_right .header_nav.is_open .mobile_nav_action,
  .subpage_body .header_nav.is_open .mobile_nav_action {
    display: flex;
    min-height: 4.4rem;
    margin-top: 0.45rem;
    padding: 1rem 1.2rem;
    justify-content: space-between;
    color: var(--color-primary-dark);
    background: rgba(37, 111, 168, 0.08);
    border: 1px solid rgba(37, 111, 168, 0.2);
    border-radius: 0.6rem;
    font-weight: 700;
  }

  .header_right .header_nav.is_open .mobile_nav_action i,
  .subpage_body .header_nav.is_open .mobile_nav_action i {
    flex: 0 0 auto;
    font-size: 1.5rem;
  }
}

/* Keep video-copy exits state-based on tablet/mobile as well. Earlier mobile
   title keyframes started from opacity: 1 and could flash old copy on a fast
   thumbnail change. */
.hero.hero_intro_ready
  .hero_copy_panel.is_leaving
  [data-hero-video-copy-item].hero_video_blur_text {
  opacity: 0;
  filter: blur(0.8em);
  scale: 1;
  transform: none;
  animation: none !important;
  transition:
    opacity 0.64s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.72s cubic-bezier(0.4, 0, 0.2, 1);
}
