/* ============================================================
   Mobile layout reset - Imperial Craft Studio
   Loaded after styles.css. Desktop remains driven by the main
   stylesheet; these rules rebuild tablet and phone layout only
   for the trimmed homepage blocks.
   ============================================================ */

@media (max-width: 1160px) {
  .desktop-nav,
  .phone-pill,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 5rem;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    top: 0.7rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
    height: 3.75rem;
    padding: 0.45rem 0.55rem 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    transform: none;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 2.35rem;
    height: 2.35rem;
  }

  .brand span {
    max-width: min(48vw, 16rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 0.45rem;
  }

  .header-actions .theme-toggle {
    display: flex !important;
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 2.55rem;
    border-radius: 8px;
  }

  .menu-toggle {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 8px;
  }

  .mobile-nav {
    z-index: 72;
    display: grid;
    place-items: stretch;
    padding: 5.4rem 0.75rem 0.75rem;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, transparent), color-mix(in srgb, var(--surface-solid) 92%, transparent)),
      radial-gradient(circle at 84% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 18rem);
    transform: translateY(-1rem);
  }

  .mobile-nav.is-open {
    display: grid;
    transform: translateY(0);
  }

  .mobile-nav-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.25rem;
    width: 100%;
    max-height: calc(100svh - 6.2rem);
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
    box-shadow: var(--shadow);
  }

  .mobile-nav-panel > a {
    width: 100%;
    padding: 0.45rem 0;
    color: var(--text);
    font-size: clamp(2rem, 10vw, 3.65rem);
    line-height: 0.98;
  }

  .mobile-menu-contact {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
  }

  main {
    overflow: hidden;
  }

  .section,
  .reference-about-section,
  .reference-services-section,
  .editorial-grid-section,
  .panorama-section,
  .reference-process-section,
  .contact-section {
    padding: clamp(2.65rem, 8vw, 3.75rem) 1rem;
  }

  .hero {
    min-height: 0;
    padding: 5.4rem 0.75rem 1.5rem;
  }

  .hero-frame {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: 100%;
    min-height: 0;
    border-radius: 8px;
  }

  .hero-side-panel {
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.85rem;
    min-height: 0;
    padding: 1rem;
  }

  [data-theme="obsidian"] .hero-side-panel::before {
    top: auto;
    bottom: -0.08em;
    left: auto;
    right: -0.05em;
    font-size: clamp(7rem, 32vw, 13rem);
  }

  .hero-team-widget {
    grid-column: 1 / -1;
  }

  .hero-agency-note {
    max-width: 18rem;
  }

  .hero-agency-note p {
    -webkit-line-clamp: initial;
  }

  .hero-read-more {
    align-self: end;
    white-space: nowrap;
  }

  .hero-main-panel {
    order: 1;
    padding: 1.2rem 1rem 0;
  }

  .hero-main-panel h1 {
    max-width: 13ch;
    font-size: clamp(2.35rem, 9.4vw, 4.25rem);
  }

  .hero-showcase,
  [data-theme="obsidian"] .hero-showcase {
    height: clamp(13.5rem, 52vw, 24rem);
    margin-inline: -1rem;
  }

  .hero-feature-panel {
    order: 3;
    grid-column: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-feature-panel a {
    min-width: 0;
    min-height: 3.35rem;
    padding: 0.75rem 0.55rem;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
  }

  .reference-split,
  .reference-split.reverse,
  .editorial-grid-section,
  .panorama-shell,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .reference-copy h2,
  .section-heading h2,
  .editorial-sticky h2,
  .consultation-band h2,
  .contact-copy h2,
  .panorama-copy h2,
  .process-header h2 {
    max-width: 18ch;
    font-size: clamp(2rem, 7.4vw, 3.25rem);
    line-height: 1;
  }

  .reference-copy p:not(.eyebrow),
  .contact-copy p,
  .panorama-copy p:not(.eyebrow),
  .process-header > p:not(.eyebrow) {
    max-width: 38rem;
    font-size: 0.95rem;
    line-height: 1.58;
  }

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

  .reference-checklist span {
    display: block;
    -webkit-line-clamp: initial;
  }

  .layered-image-stack {
    display: block;
    position: relative;
    min-height: clamp(22rem, 72vw, 36rem);
  }

  .layered-image,
  .layered-image-main,
  .layered-image-float {
    position: absolute;
  }

  .layered-image-main {
    inset: 0 13% 0 0;
    width: auto;
    height: auto;
    aspect-ratio: auto;
  }

  .layered-image-float {
    inset: auto 0 7% auto;
    width: min(48%, 18rem);
    height: 46%;
    margin-top: 0;
    aspect-ratio: auto;
  }

  .reference-services-section {
    padding-right: 0;
  }

  .reference-services-section .section-heading {
    padding-right: 1rem;
  }

  .service-carousel {
    gap: 1rem;
    margin-left: 0;
    padding: 0.4rem 1rem 0.9rem 0;
    scroll-padding-left: 1rem;
  }

  .reference-service-card {
    flex: 0 0 min(18.5rem, calc(86vw - 1rem));
  }

  .reference-service-card img {
    height: auto;
    min-height: 16rem;
    aspect-ratio: 4 / 5;
  }

  .reference-service-card p {
    display: block;
  }

  .editorial-sticky {
    position: relative;
    top: auto;
  }

  .editorial-post-column {
    gap: 1rem;
  }

  .editorial-filters {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .editorial-filters::-webkit-scrollbar {
    display: none;
  }

  .project-filter {
    flex: 0 0 auto;
    min-height: 2.45rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .reference-post-card img {
    height: clamp(15rem, 58vw, 24rem);
  }

  .reference-post-card strong {
    font-size: clamp(1.35rem, 5.4vw, 2rem);
  }

  .panorama-shell {
    gap: 1.4rem;
  }

  .panorama-actions {
    align-items: stretch;
  }

  .panorama-section .btn {
    justify-content: center;
    width: 100%;
  }

  .panorama-demo-panel {
    grid-template-columns: 1fr;
  }

  .panorama-demo-card {
    min-height: 15.5rem;
  }

  .consultation-band {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-top: 0;
    padding: clamp(2rem, 8vw, 3rem) 1rem;
  }

  .reference-process-section {
    overflow: hidden;
  }

  .process-header {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .process-header > p:not(.eyebrow) {
    grid-column: auto;
    padding-left: 0;
    border-left: 0;
  }

  .process-atelier {
    grid-template-columns: 1fr;
  }

  .process-rail {
    left: 1.2rem;
    right: auto;
    top: 1.25rem;
    bottom: 1.25rem;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, rgba(215, 176, 112, 0), rgba(215, 176, 112, 0.82), rgba(215, 176, 112, 0));
  }

  .process-stage {
    min-height: 0;
    padding: 1rem 1rem 1rem 2.65rem;
    border-right: 0;
    border-bottom: 1px solid rgba(215, 176, 112, 0.2);
  }

  .process-stage:last-child {
    border-bottom: 0;
  }

  .process-stage::before {
    left: 0.83rem;
    top: 1.3rem;
  }

  .process-index {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .process-phase {
    margin: 0 0 0.55rem;
  }

  .process-stage h3 {
    max-width: 13rem;
  }

  .process-output {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
  }

  .contact-shell {
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .contact-form {
    gap: 0.75rem;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    min-height: 2.85rem;
    font-size: 1rem;
  }

  .map-panel {
    height: clamp(16rem, 58vw, 23rem);
  }

  .site-footer {
    gap: 1.5rem;
    padding: 2.25rem 1rem 1.25rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  .section,
  .reference-about-section,
  .reference-services-section,
  .editorial-grid-section,
  .panorama-section,
  .reference-process-section,
  .contact-section {
    padding: 2.55rem 0.85rem;
  }

  .site-header {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    height: 3.45rem;
  }

  .brand span {
    max-width: 44vw;
    font-size: 0.88rem;
  }

  .hero {
    padding: 4.85rem 0.55rem 1.25rem;
  }

  .hero-main-panel {
    padding: 1rem 0.85rem 0;
  }

  .hero-main-panel h1 {
    font-size: clamp(2.1rem, 10.4vw, 3rem);
  }

  .hero-showcase,
  [data-theme="obsidian"] .hero-showcase {
    height: clamp(13rem, 62vw, 18rem);
    margin-inline: -0.85rem;
  }

  .hero-side-panel {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .hero-read-more {
    align-self: start;
  }

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

  .hero-feature-panel a {
    min-height: 3rem;
  }

  .reference-copy h2,
  .section-heading h2,
  .editorial-sticky h2,
  .consultation-band h2,
  .contact-copy h2,
  .panorama-copy h2,
  .process-header h2 {
    max-width: 100%;
    font-size: clamp(1.8rem, 8.4vw, 2.45rem);
  }

  .reference-facts {
    grid-template-columns: 1fr;
  }

  .layered-image-stack {
    min-height: clamp(21rem, 94vw, 31rem);
  }

  .layered-image-main {
    inset: 0 8% 0 0;
  }

  .layered-image-float {
    width: 54%;
    height: 42%;
  }

  .service-carousel {
    margin-right: -0.85rem;
  }

  .reference-service-card {
    flex-basis: min(17rem, calc(88vw - 0.75rem));
  }

  .reference-service-card img {
    min-height: 14.5rem;
  }

  .panorama-actions {
    flex-direction: column;
  }

  .contact-shell {
    padding: 1rem;
  }

  .contact-list {
    gap: 0.55rem;
  }
}

@media (max-width: 380px) {
  .brand span {
    max-width: 38vw;
  }

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

  .reference-service-card {
    flex-basis: calc(92vw - 0.75rem);
  }
}

@media (max-width: 767px) {
  :root {
    --mobile-header-clearance: 4.85rem;
    --mobile-panel-padding: 0.75rem;
  }

  html {
    scroll-padding-top: var(--mobile-header-clearance);
  }

  main {
    overflow: visible;
  }

  main > section,
  main > section:not(.hero) {
    contain: none;
    content-visibility: visible;
    contain-intrinsic-size: none;
  }

  main > section:not(#portfolio) {
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
  }

  .section,
  .reference-about-section,
  .reference-services-section,
  .panorama-section,
  .reference-process-section,
  .contact-section {
    padding: var(--mobile-header-clearance) var(--mobile-panel-padding) 0.65rem;
  }

  .hero {
    min-height: 100svh;
    height: 100svh;
    padding: var(--mobile-header-clearance) 0.55rem 0.65rem;
    overflow: hidden;
  }

  .hero-frame {
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }

  .hero-main-panel {
    align-content: start;
    padding: 0.8rem 0.85rem 0;
  }

  .hero-main-panel .eyebrow {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
  }

  .hero-main-panel h1 {
    max-width: 12.5ch;
    margin-bottom: 0.8rem;
    font-size: clamp(1.95rem, 9vw, 2.55rem);
    line-height: 0.94;
  }

  .hero-showcase,
  [data-theme="obsidian"] .hero-showcase {
    height: clamp(10.3rem, 38svh, 17.5rem);
  }

  .hero-side-panel {
    gap: 0.55rem;
    padding: 0.72rem 0.85rem;
  }

  .hero-agency-note strong {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
  }

  .hero-agency-note p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .team-avatar {
    flex-basis: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
  }

  .hero-feature-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-feature-panel a {
    min-height: 2.55rem;
    padding: 0.45rem 0.38rem;
    font-size: 0.58rem;
  }

  .hero-feature-panel span {
    font-size: 0.56rem;
  }

  .reference-about-section {
    display: grid;
  }

  .reference-split {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 0.75rem;
    height: 100%;
  }

  .reference-copy h2,
  .section-heading h2,
  .editorial-sticky h2,
  .consultation-band h2,
  .contact-copy h2,
  .panorama-copy h2,
  .process-header h2 {
    font-size: clamp(1.45rem, 7.2vw, 2rem);
    line-height: 1;
  }

  .reference-copy p:not(.eyebrow),
  .contact-copy p,
  .panorama-copy p:not(.eyebrow),
  .process-header > p:not(.eyebrow) {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .eyebrow {
    margin-bottom: 0.38rem;
    font-size: 0.66rem;
  }

  .reference-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
  }

  .reference-facts div {
    padding: 0.48rem 0.35rem;
  }

  .reference-facts strong {
    font-size: 1.05rem;
  }

  .reference-facts span {
    margin-top: 0.2rem;
    font-size: 0.48rem;
  }

  .reference-checklist {
    margin-top: 0.55rem;
  }

  .reference-checklist li {
    gap: 0.45rem;
    padding-block: 0.38rem;
  }

  .reference-checklist strong {
    font-size: 0.78rem;
  }

  .reference-checklist span {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .layered-image-stack {
    min-height: 0;
    height: clamp(14rem, 35svh, 18rem);
    max-height: 18rem;
    overflow: hidden;
    transform: none !important;
  }

  .layered-image {
    transform: none !important;
  }

  .layered-image-main {
    inset: 0 11% 0 0;
    transform: none !important;
  }

  .layered-image-float {
    inset: auto 0 7% auto;
    width: 48%;
    height: 43%;
    transform: none !important;
  }

  .reference-services-section {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    min-height: auto;
    height: auto;
    padding-bottom: 1.15rem;
  }

  main > #services.reference-services-section {
    min-height: auto;
    height: auto;
    overflow: hidden;
  }

  .reference-services-section .section-heading {
    display: block;
    margin-bottom: 0.85rem;
  }

  .reference-services-section .section-heading .eyebrow {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .reference-services-section .section-heading h2 {
    display: none;
  }

  .service-carousel {
    align-self: start;
    gap: 0.65rem;
    height: auto;
    max-height: none;
    margin: 0 -0.75rem 0 0;
    padding: 0.35rem 0.75rem 0.35rem 0;
    scroll-padding-left: 0;
  }

  .reference-service-card {
    display: grid;
    flex: 0 0 clamp(4.4rem, 21.5vw, 5.25rem);
    grid-template-rows: auto auto;
    gap: 0.35rem;
    height: auto;
    max-width: 5.25rem;
  }

  .reference-service-card img {
    width: 100%;
    min-height: 0;
    height: clamp(7.2rem, 33.5vw, 8.35rem);
    aspect-ratio: 3 / 4.75;
    border-radius: 8px;
    object-fit: cover;
  }

  .reference-service-card div {
    min-width: 0;
    padding-top: 0;
  }

  .reference-service-card h3 {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .reference-service-card span,
  .reference-service-card p {
    display: none;
  }

  .reference-service-card h3::after {
    display: none;
  }

  #portfolio {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0.7rem;
    height: auto;
    min-height: auto;
    padding: var(--mobile-header-clearance) 0.75rem 1.05rem;
    overflow: hidden;
  }

  #portfolio .editorial-sticky {
    position: relative;
    top: auto;
    margin-bottom: 0;
  }

  #portfolio .editorial-sticky h2 {
    max-width: 14ch;
    font-size: clamp(1.36rem, 6.8vw, 1.9rem);
    line-height: 0.98;
  }

  #portfolio .reference-arrow-link {
    min-height: 2.1rem;
    margin-top: 0.45rem;
    padding-inline: 0.75rem;
    font-size: 0.72rem;
  }

  #portfolio .editorial-filters {
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #portfolio .editorial-filters::-webkit-scrollbar {
    display: none;
  }

  #portfolio .project-filter {
    flex: 0 0 auto;
    min-height: 2.15rem;
    padding-inline: 0.78rem;
    font-size: 0.66rem;
  }

  #portfolioGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    overflow: hidden;
  }

  #portfolioGrid .project-tile {
    display: grid;
    grid-template-rows: auto auto auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  #portfolioGrid .project-tile.is-hidden {
    display: none;
  }

  #portfolioGrid .project-tile img {
    width: 100%;
    height: clamp(6.8rem, 22svh, 8.8rem);
    min-height: 0;
    max-height: none;
    border-radius: 8px;
    object-fit: cover;
  }

  #portfolioGrid .project-tile strong {
    display: -webkit-box;
    margin: 0.38rem 0 0.16rem;
    padding-inline: 0.05rem;
    overflow: hidden;
    font-size: clamp(0.82rem, 3.8vw, 1rem);
    line-height: 1.05;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #portfolioGrid .project-card-meta {
    padding-inline: 0.05rem;
    overflow: hidden;
    font-size: 0.54rem;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #portfolioGrid .project-tile.stack-card {
    position: relative;
    top: auto;
    transform: none !important;
    z-index: auto;
  }

  #portfolio .portfolio-actions {
    display: none;
  }

  .panorama-section {
    display: grid;
  }

  .panorama-shell {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.8rem;
    height: 100%;
  }

  .panorama-copy {
    gap: 0.42rem;
  }

  .panorama-badges {
    gap: 0.35rem;
  }

  .panorama-badges span {
    min-height: 1.65rem;
    padding-inline: 0.55rem;
    font-size: 0.58rem;
  }

  .panorama-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .panorama-section .btn {
    min-height: 2.45rem;
    padding-inline: 0.55rem;
    font-size: 0.78rem;
  }

  .panorama-demo-stack {
    min-height: 0;
  }

  .panorama-demo-panel {
    display: flex;
    height: 100%;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .panorama-demo-panel::-webkit-scrollbar {
    display: none;
  }

  .panorama-demo-card {
    flex: 0 0 min(19rem, 82vw);
    min-height: 0;
    height: 100%;
    scroll-snap-align: start;
  }

  .panorama-demo-card strong {
    font-size: 1.2rem;
  }

  .panorama-demo-card small {
    -webkit-line-clamp: 2;
  }

  .consultation-band {
    align-content: center;
    min-height: 100svh;
    height: 100svh;
    padding: var(--mobile-header-clearance) 1rem 1rem;
  }

  .reference-process-section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .process-header {
    gap: 0.45rem;
    margin-bottom: 0.65rem;
  }

  .process-atelier {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .process-atelier::-webkit-scrollbar {
    display: none;
  }

  .process-rail {
    display: none;
  }

  .process-stage {
    flex: 0 0 calc(100vw - 1.5rem);
    min-height: 0;
    height: 100%;
    padding: 0.95rem;
    border-right: 1px solid rgba(215, 176, 112, 0.2);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .process-stage::before {
    display: none;
  }

  .process-index {
    font-size: clamp(2.4rem, 15vw, 4.2rem);
  }

  .process-stage h3 {
    max-width: 10rem;
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .process-stage > p:not(.process-phase) {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .contact-section {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(7.6rem, 18svh);
    gap: 0.55rem;
  }

  .contact-section .reveal {
    transform: none !important;
  }

  .contact-shell {
    min-height: 0;
    height: 100%;
    gap: 0.45rem;
    padding: 0.62rem;
  }

  .contact-shell::before {
    inset: 0.45rem;
  }

  .contact-copy h2 {
    font-size: clamp(1.3rem, 6.6vw, 1.9rem);
  }

  .contact-copy p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .contact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
    margin-top: 0.4rem;
  }

  .contact-list a,
  .contact-list address {
    min-width: 0;
    font-size: 0.68rem;
    line-height: 1.24;
    overflow-wrap: anywhere;
  }

  .contact-list address {
    grid-column: 1 / -1;
  }

  .contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.42rem;
  }

  .contact-form label {
    gap: 0.18rem;
    font-size: 0.56rem;
  }

  .contact-form label:nth-of-type(5),
  .contact-form .btn,
  .form-status {
    grid-column: 1 / -1;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    min-height: 2.18rem;
    padding: 0.48rem 0.58rem;
    font-size: 0.78rem;
  }

  .contact-form textarea {
    min-height: 3.1rem;
    height: 3.35rem;
    resize: none;
  }

  .contact-form .btn {
    min-height: 2.3rem;
  }

  .form-status {
    min-height: 0.95rem;
    margin: 0;
    font-size: 0.72rem;
  }

  .map-panel {
    height: auto;
    min-height: 0;
    margin-top: 0;
  }

  .map-panel iframe {
    display: block;
  }

  .site-footer {
    min-height: 100svh;
    padding: var(--mobile-header-clearance) 1rem 1rem;
    align-content: center;
  }
}

@media (min-width: 981px) {
  #services .service-carousel {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(0.42rem, 0.72vw, 0.68rem);
  }

  #services .reference-service-card {
    grid-template-rows: auto minmax(3.35rem, auto);
  }

  #services .reference-service-card img {
    height: clamp(9rem, 12.2vw, 12.6rem);
  }

  #services .reference-service-card div {
    min-height: 3.35rem;
    padding-right: 0.35rem;
  }

  #services .reference-service-card h3 {
    font-size: clamp(0.84rem, 0.9vw, 1.06rem);
    line-height: 1.05;
  }
}

@media (max-width: 390px) and (max-height: 760px) {
  :root {
    --mobile-header-clearance: 4.4rem;
  }

  .hero-main-panel h1 {
    font-size: clamp(1.72rem, 8.4vw, 2.2rem);
  }

  .hero-showcase,
  [data-theme="obsidian"] .hero-showcase {
    height: clamp(8.8rem, 31svh, 13rem);
  }

  .reference-copy h2,
  .section-heading h2,
  .editorial-sticky h2,
  .consultation-band h2,
  .contact-copy h2,
  .panorama-copy h2,
  .process-header h2 {
    font-size: clamp(1.32rem, 6.4vw, 1.78rem);
  }

  .layered-image-stack {
    display: none;
  }

  .contact-section {
    grid-template-rows: minmax(0, 1fr) 6rem;
  }

  .contact-copy p,
  .contact-list address {
    display: none;
  }
}

/* ============================================================
   Phones: minimalist trim of section subtitles / descriptions.
   Keeps every section, heading, key facts and interactive parts,
   but removes the descriptive paragraphs for a shorter, cleaner
   page. The 3D-view (panorama) section is intentionally NOT
   trimmed (it is the studio's main feature).
   ============================================================ */
@media (max-width: 767px) {
  .reference-about-section .reference-copy > p:not(.eyebrow) { display: none; }
  .reference-about-section .reference-checklist li span { display: none; }

  .reference-process-section .process-header > p:not(.eyebrow) { display: none; }

  .contact-section .contact-copy > p:not(.eyebrow) { display: none; }
}

/* ============================================================
   Desktop-on-mobile mode. The viewport meta is pinned to a fixed
   desktop width (width=1366) so phones render the full desktop
   layout, zoomed to fit. On the tall phone aspect ratio the desktop
   full-height (100svh) hero sections balloon and leave large empty
   vertical bands, so collapse them to content height on touch
   devices only. Mouse/desktop is untouched (it reports pointer:fine
   / hover:hover, so this block does not apply there).
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .hero,
  .blog-article-hero {
    min-height: auto;
  }
}
