/* A dedicated mobile composition, using the same public URLs and content. */
.header-mobile-actions, .mobile-dock, .mobile-reference-summary, .mobile-filter-toggle, .mobile-gallery-caption { display: none; }
.header-references { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.header-references > span { margin: 0; }
.home-scene { position: absolute; inset: 0; overflow: hidden; }
.home-intro { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mobile-menu { margin: auto; padding: 24px; }
.mobile-menu::backdrop { background: rgba(12,34,25,.6); backdrop-filter: blur(7px); }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu-main-link { display: flex; align-items: center; justify-content: space-between; font-family: Geomanist,Arial,sans-serif; font-size: 32px; padding: 22px 0 28px; }
.mobile-menu nav { margin-top: 12px; }
.mobile-menu nav a { display: grid; grid-template-columns: 22px 1fr 18px; gap: 12px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.35; }
.mobile-menu-number { color: var(--green); font-size: 11px; }
.mobile-menu-contact { margin-top: 24px; padding: 22px; background: #e9eee3; }
.mobile-menu-contact > span { font-family: Geomanist,Arial,sans-serif; font-size: 25px; }
.mobile-menu-contact a { display: flex; align-items: center; justify-content: space-between; color: var(--green); padding: 18px 0 10px; font-size: 22px; }
.mobile-menu-contact button { min-height: 44px; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
.mobile-icon-button { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #1a73402b; border-radius: 50%; background: transparent; color: var(--forest); }
.mobile-icon-button:focus-visible, .mobile-dock a:focus-visible, .mobile-dock button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
body:has(.mobile-menu[open]) { overflow: hidden; }
@media(max-width:820px) {
  :root { --header: 80px; --footer: 0px; }
  html { scroll-padding-top: 94px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .site-header { height: var(--header); position: sticky; top: 0; z-index: 20; padding: 10px 20px; grid-template-columns: 1fr auto; background: rgba(247,247,248,.97); backdrop-filter: blur(12px); gap: 12px; }
  .header-contact, .header-references { display: none; }
  .site-header .brand { justify-self: start; width: auto; }
  .site-header .brand img { width: 126px; height: auto; }
  .site-header .brand span { font-size: 8px; letter-spacing: .3em; margin-top: 5px; padding-left: .3em; }
  .header-mobile-actions { display: flex; align-items: center; gap: 9px; }
  .mobile-dock { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; z-index: 25; bottom: 0; left: 0; right: 0; padding: 6px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); background: rgba(247,247,248,.97); border-top: 1px solid #234f3426; box-shadow: 0 -8px 24px #213c2810; backdrop-filter: blur(14px); }
  .mobile-dock a, .mobile-dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 52px; min-width: 0; font-size: 10px; color: #647066; letter-spacing: .015em; border-radius: 10px; }
  .mobile-dock [aria-current="page"] { color: #12834d; background: #e7eee1; }
  .mobile-dock svg { flex-shrink: 0; }
  .mobile-menu { width: calc(100% - 24px); max-width: 500px; max-height: calc(100dvh - 40px); padding: 18px 22px 24px; border-radius: 18px; }
  .home { height: auto; min-height: 0; background: var(--paper); }
  .home-scene { position: relative; inset: auto; width: 100%; height: clamp(340px,57svh,560px); isolation: isolate; }
  .home-scene::after { content: ''; position: absolute; z-index: 2; inset: 35% 0 0; pointer-events: none; background: linear-gradient(transparent,rgba(10,35,24,.73)); }
  .home-scene .scene-photo, .home-scene .scene-sketch { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
  .home-intro { clip: auto; width: calc(100% - 44px); height: auto; overflow: visible; white-space: normal; padding: 0; position: absolute; z-index: 3; left: 22px; bottom: 29px; color: white; }
  .home-intro .eyebrow { display: block; font-size: 10px; letter-spacing: .16em; margin-bottom: 14px; color: #e6efe3; }
  .home-intro h1 { font-family: Geomanist,Arial,sans-serif; font-size: clamp(45px,12.7vw,72px); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
  .home-intro h1 span { display: block; }
  .home-intro > a { display: inline-flex; align-items: center; gap: 18px; margin-top: 20px; min-height: 44px; padding: 0 0 2px; border-bottom: 1px solid #ffffff80; font-size: 13px; }
  .home-motion-toggle { top: 16px; right: 18px; z-index: 4; min-height: 44px; padding: 8px 12px; background: rgba(247,247,248,.88); font-size: 11px; }
  .home-index { position: relative; inset: auto; width: 100%; display: block; padding: 27px 22px 30px; background: var(--paper); border: 0; backdrop-filter: none; }
  .home-index > .eyebrow { position: static; display: block; width: auto; transform: none; margin: 0 0 15px; padding: 0; font-size: 10px; color: #687769; letter-spacing: .13em; }
  .home-index .theme-entry::before, .home-index .theme-entry::after { display: none; }
  .home-index .theme-entry { clip-path: none; }
  .home-index .theme-entry { display: grid; grid-template-columns: 25px minmax(0,1fr) 24px; grid-template-rows: auto auto; column-gap: 12px; row-gap: 5px; margin: 0; min-height: 93px; padding: 17px 0; border: 0; border-top: 1px solid #2d563628; box-shadow: none; background: transparent; }
  .home-index .theme-entry:last-child { border-bottom: 1px solid #2d563628; }
  .home-index .theme-entry .index { grid-column: 1; grid-row: 1/3; align-self: center; font-size: 11px; color: var(--green); }
  .home-index .theme-entry .theme-short { grid-column: 2; grid-row: 1; font-family: Geomanist,Arial,sans-serif; font-size: 29px; line-height: 1.02; letter-spacing: -.02em; }
  .home-index .theme-entry .label { grid-column: 2; grid-row: 2; font-family: "IBM Plex Sans",Arial,sans-serif; font-size: 12px; line-height: 1.4; color: #647066; }
  .home-index .theme-entry .arrow { position: static; grid-column: 3; grid-row: 1/3; align-self: center; justify-self: end; }
  .theme-page { display: block; min-height: 0; padding: 0 0 30px; background: var(--paper); }
  .theme-background { position: relative; inset: auto; width: 100%; height: clamp(230px,35svh,380px); min-height: 0; object-fit: cover; opacity: 1; }
  .theme-page::before, .theme-page::after { display: none; }
  .theme-story { position: relative; width: 100%; min-height: 0; padding: 28px 22px 26px; background: var(--paper); color: var(--ink); }
  .theme-story > .eyebrow { color: #53715d; font-size: 10px; }
  .theme-story h1 { margin: 20px 0 25px; font-size: clamp(36px,9.6vw,58px); line-height: 1.03; color: var(--forest); letter-spacing: -.03em; overflow-wrap: break-word; }
  .theme-body { max-width: none; font-size: 17px; line-height: 1.6; color: #526259; }
  .theme-body p + p { margin-top: 18px; }
  .theme-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 25px; padding-top: 0; font-size: 18px; color: var(--forest); }
  .theme-explore { position: static; display: flex; align-items: center; justify-content: space-between; width: calc(100% - 44px); min-height: 52px; margin: 0 22px; padding: 14px 18px; background: var(--forest); color: white; font-size: 18px; border: 0; backdrop-filter: none; }
  .references { padding: 27px 20px 35px; min-height: 60svh; }
  .references-head { display: block; }
  .references h1 { font-size: clamp(42px,11vw,65px); line-height: 1; max-width: 500px; letter-spacing: -.04em; }
  .references-tools { display: flex; flex-wrap: wrap; flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; width: 100%; }
  .search { flex: 1 1 100%; width: 100%; min-height: 49px; padding: 10px 12px; border: 1px solid #23533933; background: #ffffff69; }
  .search input { font-size: 16px; min-width: 0; }
  .view-toggle { gap: 12px; font-size: 13px; }
  .view-toggle button { min-height: 44px; padding: 8px 0; }
  .filters { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; gap: 8px; margin: 18px 0 20px; padding-bottom: 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .filters::-webkit-scrollbar { display: none; }
  .filters > button { flex: 0 0 auto; min-height: 44px; padding: 9px 14px; border: 1px solid #1b68322b; border-radius: 24px; font-size: 13px; }
  .filters > button[aria-pressed=true] { background: var(--forest); color: white; border-color: var(--forest); }
  .filters .results-count { display: none; }
  .mobile-reference-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; font-size: 12px; color: #596a5e; }
  .mobile-filter-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid #23533933; font-size: 12px; }
  .filters-tags { display: none; margin-top: -5px; padding-bottom: 13px; }
  .filters-tags.is-open { display: flex; flex-wrap: wrap; overflow: visible; }
  .filters-tags > button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
  .filters-tags > .eyebrow { display: none; }
  .project-grid, .project-grid.is-filtered { display: grid; grid-template-columns: minmax(0,1fr); gap: 29px; }
  .project-grid .project-card, .project-grid .project-card:first-child { grid-column: auto; grid-row: auto; }
  .project-grid .project-card .image-wrap, .project-grid .project-card:first-child .image-wrap { aspect-ratio: 1.38; border-radius: 2px; }
  .project-card .reference-index { top: 13px; left: 13px; }
  .project-card .open-arrow { transform: none; display: grid; place-content: center; width: 44px; height: 44px; padding: 0; font-size: 0; }
  .project-card .open-arrow .arrow { margin: 0; position: static; }
  .project-card .open-arrow .arrow { font-size: 22px; }
  .project-card h2 { font-size: 31px; margin: 13px 0 8px; line-height: 1.07; }
  .project-card .project-meta { font-size: 12px; line-height: 1.4; }
  .references-bottom { flex-direction: column; align-items: flex-start; gap: 14px; line-height: 1.6; margin-top: 28px; }
  .clear-filter { min-height: 44px; padding: 8px 0; }
  .project-table { min-width: 0; font-size: 12px; }
  .project-table th, .project-table td { padding: 15px 6px; }
  .project-table td:first-child { width: 30px; }
  .project-table a { font-size: 23px; line-height: 1.1; }
  .project-table th:nth-child(3), .project-table td:nth-child(3) { display: none; }
  .project-page { display: flex; flex-direction: column; min-height: 0; }
  .project-visual { position: relative; height: clamp(300px,47svh,500px); min-height: 0; touch-action: pan-y; }
  .gallery-bar { left: 16px; right: 16px; bottom: 16px; padding: 3px 7px; border-radius: 30px; display: flex; justify-content: space-between; gap: 8px; background: #f7f7f8ed; color: var(--forest); box-shadow: 0 3px 18px #12352424; backdrop-filter: blur(8px); }
  .gallery-bar > button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 24px; }
  .gallery-count { font-size: 11px; letter-spacing: .12em; }
  .gallery-caption, .thumbnails { display: none; }
  .mobile-gallery-caption { display: block; margin: 0; padding: 13px 22px; color: #617165; font-size: 12px; line-height: 1.5; border-bottom: 1px solid #1b542328; }
  .project-story { padding: 24px 22px 38px; }
  .back-link { min-height: 44px; padding-bottom: 0; font-size: 12px; margin-bottom: 23px; }
  .project-story > .eyebrow { margin-bottom: 18px; font-size: 9px; }
  .project-story h1 { font-size: clamp(40px,11vw,64px); line-height: 1; margin-bottom: 22px; overflow-wrap: break-word; }
  .project-tags { gap: 8px; }
  .project-tags > button { min-height: 44px; padding: 8px 12px; border: 1px solid #245c3030; border-radius: 24px; font-family: "IBM Plex Sans",Arial,sans-serif; font-size: 12px; }
  .project-intro { font-size: 25px; line-height: 1.25; margin: 25px 0; }
  .project-body h2 { font-size: 28px; margin-bottom: 9px; }
  .project-body p { font-size: 16px; line-height: 1.65; }
  .project-location { font-size: 11px; line-height: 1.7; }
  .project-related { display: flex; align-items: center; min-height: 48px; font-size: 18px; margin-top: 24px; }
  .site-footer { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; padding: 30px 22px 28px; font-size: 11px; height: auto; min-height: 0; border-top: 1px solid #27523240; }
  .site-footer > nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; width: 100%; order: -1; }
  .site-footer nav button { text-align: left; min-height: 44px; font-size: 12px; }
  .site-footer nav button + button::before { display: none; }
  .footer-right { width: 100%; justify-content: flex-start; align-items: flex-start; gap: 10px; flex-direction: column; margin: 0; }
  .footer-right > a { min-height: 44px; font-size: 11px; }
  .footer-right > span { display: block; font-size: 10px; }
  #dialog { width: calc(100% - 24px); max-height: calc(100dvh - 36px); border-radius: 18px; }
  .dialog-content { padding: 49px 23px 27px; }
  .dialog-content h2 { font-size: 36px; }
  .dialog-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .dialog-content p { font-size: 15px; line-height: 1.65; }
  .contact-number { font-size: clamp(29px,8vw,40px); min-height: 44px; }
  .admin-shell { padding: 24px 16px 35px; }
  .manager { padding: 0; }
  .admin-toolbar h1 { font-size: 31px!important; }
  .manager-list { max-width: 100%; }
  .manager-form .form-grid { grid-template-columns: 1fr; }
  .manager-form input, .manager-form textarea, .manager-form select { font-size: 16px; min-height: 44px; }
  .manager-actions > button, .admin-toolbar button { min-height: 44px; }
  .tag-chips button, .media-item button { min-width: 36px; min-height: 36px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
}

@media(max-width:820px) { .dialog-content > .eyebrow { white-space: normal; font-size: 10px; letter-spacing: .14em; line-height: 1.6; } .solid-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; } }
