/* Shared responsive layout. Loaded after styles.css on every page. */
.light-library .site-header { grid-template-columns: minmax(0, 1fr) auto minmax(110px, 1fr); }
.site-header .brand, .nav-links, .cases-results, .cases-layout > *, .detail-head > *,
.case-story > *, .contact-content-layout > * { min-width: 0; }
.site-header .nav-links a, .header-cta { white-space: nowrap; }
.light-library .all-cases .case-card { width: 100%; min-width: 0; }
.light-library .all-cases .media-placeholder,
.adspace-subpage .all-cases .case-card.video .media-placeholder {
  width: 100%; height: auto; max-height: none; aspect-ratio: 1;
}
.light-library .all-cases .case-media img,
.light-library .all-cases .case-media video { width: 100%; height: 100%; object-fit: contain; }
.mobile-filter-toggle { display: none; }
.statement-title-line { white-space: normal; text-wrap: balance; }
.cases-result-head strong, .detail-head h1, .contact-list p { overflow-wrap: anywhere; }
.case-media-modal { overscroll-behavior: contain; }
.case-media-modal-stage { max-width: 100%; max-height: 100%; }
.case-media-modal-stage { position: relative; }
.case-video-status { position: absolute; z-index: 2; top: 12px; left: 12px; right: 12px; margin: 0; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; text-align: center; pointer-events: none; }
.case-video-status[hidden] { display: none; }
.case-media-modal-close { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
a:focus-visible, button:focus-visible { outline: 3px solid #78aa00; outline-offset: 3px; }

@media (min-width: 761px) and (max-width: 1100px) {
  .adspace-subpage .cases-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .adspace-subpage .all-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .light-library .site-header {
    display: grid; position: sticky; grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px; min-height: 0; padding: 8px 16px 6px;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .site-header .brand { grid-column: 1; grid-row: 1; }
  .site-header .brand-logo-mark { width: 130px; height: 38px; }
  .light-library .site-header .header-cta { grid-column: 2; grid-row: 1; min-height: 38px; align-self: center; font-size: 12px; padding: 0 14px; }
  .light-library .site-header .nav-links { display: grid; grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 4px; }
  .light-library .site-header .nav-links a { display: flex; justify-content: center; align-items: center; padding: 8px 2px; min-height: 44px; font-size: 14px; }
  .adspace-subpage .case-filter-sidebar { top: 112px; max-height: calc(100dvh - 128px); }
  .adspace-home .ad-hero { height: auto; min-height: 560px; min-height: min(760px, calc(100svh - 100px)); padding: 64px 24px; }
  .adspace-home .ad-hero-copy { width: 100%; max-width: 760px; padding: 0; }
  .adspace-home .phone-reference-stage { width: 100%; height: 100%; background-size: cover; transform: translate(-50%, -50%); }
  .statement-title-line { white-space: normal; }
}

@media (max-width: 760px) {
  /* Compact mobile chrome; desktop sizing stays unchanged. */
  .light-library .site-header { padding: 5px 14px 4px; padding-top: max(5px, env(safe-area-inset-top)); gap: 2px 10px; }
  .site-header .brand-logo-mark { width: 108px; height: 30px; }
  .light-library .site-header .header-cta { min-height: 32px; padding: 0 12px; font-size: 11px; }
  .light-library .site-header .nav-links a { min-height: 36px; padding: 4px 2px; font-size: 13px; }
  .adspace-home .logo-ribbon { padding: 6px 0; }
  .adspace-home .brand-track { gap: 10px; }
  .adspace-home .brand-wall span { flex-basis: 132px; min-height: 46px; padding: 5px 18px; }
  .adspace-home .brand-wall img { max-height: 36px; max-width: 96px; }
  .adspace-home .section { width: calc(100% - 32px); padding: 44px 0; }
  .adspace-home .ad-hero { min-height: 540px; min-height: max(480px, calc(88svh - 100px)); padding: 48px 20px; gap: 0; }
  .adspace-home .ad-hero h1 { font-size: clamp(26px, 7.2vw, 46px); line-height: 1.25; letter-spacing: 0; margin: 0 0 20px; }
  .hero-brand-lockup img { width: 96px; }
  .adspace-home .ad-hero .hero-lead { font-size: 15px; line-height: 1.85; }
  .hero-lead span { display: inline; }
  .adspace-home .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .button { min-height: 44px; }
  .adspace-home .ad-statement .statement-title { width: 100%; font-size: clamp(22px, 5.7vw, 32px); line-height: 1.5; }
  .statement-title-line { display: block; white-space: normal; }
  .statement-title-line + .statement-title-line { font-size: 16px; line-height: 1.8; margin-top: 14px; }
  .statement-image { aspect-ratio: 16 / 9; }
  .case-story, .case-story.reverse { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
  .case-story .story-art { order: 0; width: 100%; min-height: 0; height: clamp(260px, 78vw, 380px); padding: 18px; }
  .case-story .story-copy { order: 1; }
  .case-story .story-art > div { min-height: 0; height: 100%; }
  .adspace-home .story-art.video-stack .case-card {
    width: min(46%, 210px); height: auto; aspect-ratio: 9 / 13;
  }
  .adspace-home .story-art.video-stack .case-card.is-stack-left { left: 28%; }
  .adspace-home .story-art.video-stack .case-card.is-stack-right { left: 72%; }
  .story-copy h2 { font-size: clamp(28px, 7.4vw, 40px); line-height: 1.25; margin-bottom: 14px; }
  .story-copy p:not(.pill-label) { font-size: 15px; line-height: 1.85; }
  .ad-cta { padding: 48px 20px; }
  .ad-cta h2 { font-size: clamp(28px, 7vw, 40px); line-height: 1.3; }

  /* Keep the page background tied to content rather than a fixed 330px band. */
  .adspace-subpage { background: #f7f7f2; }
  .adspace-subpage .page-hero::before, .adspace-subpage .case-detail::before { display: none; }
  .adspace-subpage .page-hero, .adspace-subpage .case-detail, .adspace-subpage .cases-page { width: calc(100% - 32px); padding: 32px 0 48px; }
  .adspace-subpage h1 { color: #10120d; font-size: clamp(30px, 8vw, 44px); line-height: 1.25; margin: 14px 0; }
  .adspace-subpage .page-hero > .lead, .adspace-subpage .cases-hero-head .lead, .adspace-subpage .detail-head .lead { color: #62675b; font-size: 15px; line-height: 1.8; }
  .adspace-subpage .page-hero > .eyebrow, .adspace-subpage .cases-hero-head .eyebrow,
  .adspace-subpage .case-detail > .text-link + .detail-head .eyebrow,
  .adspace-subpage .case-detail > .text-link { color: #405b0b; border-color: #a2b77e; }
  .adspace-subpage .cases-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 24px; }
  .adspace-subpage .case-filter-sidebar { position: static; width: 100%; max-height: none; padding: 14px; box-shadow: none; overflow: visible; }
  .case-filter-search { margin-bottom: 10px; }
  .case-filter-search input { font-size: 16px; }
  .mobile-filter-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; border: 1px solid #404637; border-radius: 8px; background: transparent; color: #f8f8f2; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
  .mobile-filter-toggle::after { content: '+'; font-size: 22px; }
  .mobile-filter-toggle[aria-expanded='true']::after { content: '−'; }
  .case-filter-sidebar .case-filter-list { display: none; }
  .case-filter-sidebar.filters-expanded .case-filter-list { display: grid; margin-top: 12px; max-height: min(48svh, 380px); overflow-y: auto; overscroll-behavior: contain; }
  .adspace-subpage .cases-result-head { align-items: flex-start; flex-direction: column; gap: 6px; margin-bottom: 14px; padding-bottom: 12px; }
  .adspace-subpage .cases-result-head strong { font-size: 20px; line-height: 1.45; }
  .adspace-subpage .cases-result-head span { font-size: 13px; }
  .adspace-subpage .all-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .light-library .all-cases .case-card small { left: 10px; right: 10px; bottom: 10px; font-size: 11px; line-height: 1.4; }
  .all-cases .video-play-button { width: 44px; height: 44px; }
  .adspace-subpage .all-cases .case-card { box-shadow: none; border-radius: 10px; }
  .adspace-subpage .info-grid { margin-top: 28px; }
  .about-info-grid article { padding: 24px 20px; }
  .adspace-subpage .contact-content-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; }
  .adspace-subpage .contact-list { padding: 20px; }
  .adspace-subpage .qr-card { width: min(280px, 100%); justify-self: center; }
  .detail-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
  .adspace-subpage .detail-head .button.ghost { color: #10120d; border-color: #a2b77e; }
  .adspace-subpage .detail-section { padding: 20px 16px; margin-top: 28px; }
  .adspace-subpage .footer, .adspace-subpage .ad-footer { flex-direction: row; gap: 16px; flex-wrap: wrap; padding: 28px 20px; }
  .case-media-modal { padding: max(64px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom)); }
  .case-media-modal-close { width: 44px; height: 44px; }
}

@media (hover: none), (pointer: coarse) {
  .light-library .case-card:hover img, .light-library .case-card:hover video { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-track, .hero-bg-layer { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
