/* Shared responsive rules. Keep this after page-specific styles. */
.wn-logo > span:last-child { min-width: 0; }
.wn-logo > span:last-child > small { display: block; margin-top: 4px; }
.wn-logo-mark-img { width: 42px; height: 42px; flex-shrink: 0; object-fit: contain; }
.wn-main img, .wn-footer img { max-width: 100%; }

@media (max-width: 1100px) and (min-width: 901px) {
  .wn-nav-row, .wn-home .wn-header .wn-nav-row { grid-template-columns: minmax(150px, 1fr) auto; gap: 12px; }
  .wn-nav-right, .wn-mobile-call { display: none; }
}

@media (max-width: 900px) {
  :root { --tb-type-h2: clamp(1.85rem, 6vw, 2.5rem); }
  .wn-header, .wn-home .wn-header { top: 10px; }
  .wn-header.is-scrolled, .wn-home .wn-header.is-scrolled { top: 8px; }
  .wn-header .wn-nav-row, .wn-home .wn-header .wn-nav-row,
  .wn-header.is-scrolled .wn-nav-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 24px); height: auto; min-height: 64px;
    margin-inline: auto; padding: 8px 12px; gap: 12px; border-radius: 18px;
    background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .wn-header .wn-logo, .wn-home .wn-header .wn-logo { color: #251814; gap: 8px; font-size: 1rem; }
  .wn-header .wn-logo small { color: #594c4a; font: 600 10px/1.3 var(--tb-font-body); letter-spacing: .08em; }
  .wn-logo-mark, .wn-logo-mark-img { width: 36px; height: 36px; flex: 0 0 36px; }
  .wn-header .wn-nav-right, .wn-header .wn-mobile-call { display: none; }
  .wn-header .wn-menu-toggle, .wn-home .wn-menu-toggle {
    display: flex; align-items: center; justify-content: center;
    min-width: 80px; width: auto; height: 44px; margin: 0; padding: 0 12px;
    gap: 8px; border: 1px solid #ded7d0; border-radius: 12px;
    background: #f5f1e9; color: #251814; font: 600 14px/1 var(--tb-font-body);
  }
  .wn-header .wn-menu, .wn-home .wn-menu {
    position: absolute; inset: calc(100% + 8px) 0 auto;
    display: none; width: 100%; height: auto;
    max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 12px; border: 1px solid #ded7d0; border-radius: 16px;
    background: #fff; box-shadow: 0 12px 30px #1a0d0829;
    visibility: hidden; transform: none;
  }
  .wn-header .wn-menu.is-open { display: block; visibility: visible; }
  .wn-header .wn-menu > ul, .wn-header .wn-menu > div > ul { display: grid; gap: 4px; margin: 0; padding: 0; }
  .wn-header .wn-menu li { padding: 0; border-bottom: 1px solid #eee6de; }
  .wn-header .wn-menu a, .wn-home .wn-header .wn-menu a,
  .wn-home .wn-header--transparent:not(.is-scrolled) .wn-menu a {
    width: 100%; min-height: 48px; padding: 12px; white-space: normal;
    color: #251814; background: transparent; font-size: 16px; line-height: 1.4; border-radius: 8px;
  }
  .wn-header .wn-menu .current-menu-item > a,
  .wn-home .wn-header .wn-menu .current-menu-item > a { color: #8e2118; background: #f5f1e9; }
  .wn-home .wn-header.wn-header--transparent:not(.is-scrolled) .wn-menu > ul > li:first-child > a,
  .wn-home .wn-header.wn-header--transparent:not(.is-scrolled) .wn-menu .current-menu-item > a {
    color: #8e2118; background: #f5f1e9; padding: 12px;
  }
  .wn-header .wn-menu .sub-menu { padding-left: 12px; }
  .wn-submenu-toggle { min-width: 44px; min-height: 44px; }
  .wn-menu-backdrop { z-index: 90; }
  .wn-header { z-index: 100; }
  .wn-main :is(.wn-detail-layout, .wn-contact-grid, .wn-faq-grid) { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .wn-detail-aside { position: static; }
  .wn-main :is(.wn-detail-layout, .wn-contact-grid, .wn-grid) > * { min-width: 0; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 110px; scroll-padding-bottom: 100px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .wn-container { width: calc(100% - 36px); }
  .wn-main { overflow-wrap: break-word; }
  .wn-main :is(p, li), .wn-footer :is(p, li) { font-size: 16px; line-height: 1.65; }
  .wn-main :is(label, small), .wn-footer small { font-size: 14px; }
  .wn-main :is(input, select, textarea), .wn-quote-form :is(input, select, textarea) {
    min-width: 0; max-width: 100%; font-size: 16px; line-height: 1.4;
  }
  .wn-quote-modal .wn-quote-form input:not([type='checkbox']),
  .wn-quote-modal .wn-quote-form select, .wn-quote-modal .wn-quote-form textarea { font-size: 16px; }
  .wn-main :is(input:not([type=checkbox]):not([type=radio]), select),
  .wn-quote-form :is(input:not([type=checkbox]), select) { min-height: 48px; }
  .wn-main :is(button, .wn-button, .wn-filter a, .wn-filter button) { min-height: 44px; }
  .wn-section { padding: 56px 0; }
  .wn-section-head { display: block; }
  .wn-section-head > div:last-child { max-width: none; }
  .wn-main :is(.wn-inner-hero, .wn-inner-banner) { padding-top: 125px; padding-bottom: 48px; }
  .wn-inner-hero h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
  .wn-main :is(.wn-review-grid, .wn-blog-grid, .wn-blog-cards, .wn-pricing-grid, .wn-team-grid, .wn-services-grid, .wn-gallery-grid) {
    grid-template-columns: minmax(0, 1fr); gap: 24px;
  }
  .wn-main :is(.wn-form, .wn-contact-row, .wn-quote-form) { grid-template-columns: minmax(0, 1fr); }
  .wn-main .wn-form { padding: 22px; }
  .wn-form > *, .wn-form label:nth-child(6), .wn-form .wn-consent, .wn-form button { grid-column: 1 / -1; }
  .wn-main .wn-contact-info__card-value, .wn-footer a { overflow-wrap: anywhere; }
  .wn-main :is(.wn-filter, .wn-filter-pills, .wn-actions, .wn-blog-search) { display: flex; flex-wrap: wrap; gap: 10px; }
  .wn-blog-search input { flex: 1 1 180px; }
  .wn-project-meta { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wn-project-meta :is(b, span) { font-size: 14px; }
  .wn-contact-shell { width: calc(100% - 36px); padding: 0; }
  .wn-contact-main .wn-contact-banner { min-height: 300px; }
  .wn-contact-main .wn-contact-banner__inner { padding-top: 70px; }
  .wn-contact-photo img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .wn-main .wn-contact-section { padding-top: 32px; }
  .wn-main .wn-contact-form label { font-size: 14px; }

  /* Home: let content determine section height and preserve readable spacing. */
  .wn-home .wn-home-hero { min-height: 0; height: auto; }
  .wn-home .wn-home-hero > .wn-hero-inner {
    grid-template-columns: minmax(0, 1fr); width: calc(100% - 36px);
    min-height: 0; padding: 120px 0 40px; gap: 24px;
  }
  .wn-home #hero .wn-hero-copy h1 { font-size: clamp(2.25rem, 10vw, 3.2rem); line-height: 1.15; letter-spacing: -.03em; }
  .wn-home-hero .wn-hero-copy > p { margin: 24px 0 0; padding: 0; font-size: 16px; }
  .wn-home-hero .wn-actions { width: 100%; }
  .wn-home-hero .wn-actions .wn-button { flex: 1 1 145px; min-width: 0; min-height: 48px; font-size: 14px; }
  .wn-home-hero .wn-home-rating { position: relative; inset: auto; width: 100%; max-width: none; margin: 0; }
  .wn-home-hero .wn-home-play { position: relative; inset: auto; width: 84px; height: 84px; }
  .wn-home .wn-main > section { min-height: 0; }
  .wn-home .wn-main :is(.wn-ab-intro, .wn-exp, .wn-faq-source, .wn-testi-source) { padding-block: 56px; }
  .wn-main :is(.wn-ab-h2, .wn-wc-title, .wn-exp__title h2, .wn-faq-source__intro h2, .wn-journal__head h2, .wn-testi-source__title) {
    font-size: clamp(1.85rem, 7.5vw, 2.5rem); line-height: 1.2; white-space: normal;
  }
  .wn-exp__head, .wn-exp__body { flex-direction: column; gap: 24px; }
  .wn-exp__container { width: calc(100% - 36px); }
  .wn-exp__eyebrow, .wn-exp__title, .wn-exp__copy { padding: 0; }
  .wn-exp__body { margin-top: 28px; }
  .wn-exp__visual { width: 100%; max-width: 100%; }
  .wn-home .wn-main .wn-video-banner { height: auto; min-height: 420px; padding: 56px 18px; }
  .wn-video-banner__copy { position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; gap: 20px; }
  .wn-video-banner__play { position: relative; inset: auto; margin: 0 auto 30px; transform: none; }
  .wn-journal__inner { padding-bottom: 0; }
  .wn-journal__head { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 20px; margin-bottom: 28px; }
  .wn-journal .wn-blog-grid { grid-template-columns: minmax(0, 1fr); }
  .wn-testi-source__shell { padding-bottom: 0; }
  .wn-testi-source__head { padding-top: 0; }
  .wn-testi-source__card { min-height: 340px; padding: 24px; }
  .wn-testi-source__person { left: 24px; bottom: 24px; }
  .wn-testi-source__actions { margin-top: 24px; gap: 12px; }
  .wn-faq-source__accordion .tb-faq-item summary { font-size: 17px; }
  .wn-card-content p { display: block; }
  .wn-card-image { height: auto; aspect-ratio: 4 / 3; }

  .wn-footer .wn-cta-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wn-footer-cta { padding: 48px 0; }
  .wn-footer .wn-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 36px; }
  .wn-footer-grid > * { grid-column: 1; min-width: 0; }
  .wn-footer-grid h3 { font-size: 19px; margin-bottom: 14px; }
  .wn-footer-links a { display: inline-flex; min-height: 44px; align-items: center; }
  .wn-footer-grid ul { gap: 0; }
  .wn-footer-contact-links { flex-wrap: wrap; gap: 12px; }
  .wn-footer-contact-divider { display: none; }
  .wn-footer-bottom .wn-container { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; }
  .wn-mobile-action-bar {
    position: fixed; inset: auto 0 0; z-index: 80; display: grid;
    grid-template-columns: 1fr 1.2fr; gap: 10px;
    padding: 9px max(16px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: #1a0d08f5; border-top: 1px solid #ffffff1f;
  }
  .wn-mobile-action-bar a { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; border-radius: 999px; }
  .wn-mobile-action-call { border: 1px solid #ffffff26; color: #fff; }
  .wn-mobile-action-call svg { width: 18px; height: 18px; }
  .wn-mobile-action-quote { background: #f6b800; color: #251814; }
  .wn-to-top { bottom: calc(90px + env(safe-area-inset-bottom)); right: 16px; width: 44px; height: 44px; }
  .wn-modal { padding: 12px; }
  .wn-modal-dialog { min-width: 0; max-width: 100%; }
  .wn-quote-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 24px 18px; }
  .wn-quote-form { grid-template-columns: minmax(0, 1fr); }
  .wn-quote-form > * { grid-column: 1 / -1; }
  .wn-modal-close { min-width: 44px; min-height: 44px; }
}
