/*
Theme Name: Wil Theme
Theme URI: https://wilthephotographer.com/
Author: Wil the Photographer
Author URI: https://wilthephotographer.com/
Description: Bespoke, lightweight WordPress theme foundation for Wil the Photographer. Integrates with Wil plugins and WooCommerce without replacing their business logic or shortcodes.
Version: 0.1.22
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wil-theme
Tags: custom-logo, custom-menu, e-commerce, featured-images, full-width-template
*/

:root {
  color-scheme: dark;
  --wil-bg: #0d0d10;
  --wil-surface: #131317;
  --wil-surface-raised: #19191f;
  --wil-ink: #f7f7f9;
  --wil-muted: #a5a5af;
  --wil-accent: #1687ff;
  --wil-edge: rgba(255,255,255,.105);
  --wil-edge-strong: rgba(255,255,255,.20);
  --wil-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --wil-container: 1500px;
  --wil-radius: 16px;
}

/* Base color and typography only. Plugin templates retain their own styles. */
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }
body.wil-theme { margin: 0; background: var(--wil-bg); color: var(--wil-ink); font-family: var(--wil-font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* Zero specificity: plugin image crops/sizing must win over this fallback. */
:where(body.wil-theme img) { max-width: 100%; height: auto; }
body.wil-theme :focus-visible { outline: 2px solid var(--wil-accent); outline-offset: 3px; }
body.wil-theme ::selection { color: #fff; background: #1269c5; }
.wil-site { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.wil-skip-link { position: fixed; inset-block-start: -110px; inset-inline-start: 18px; z-index: 2147483647; padding: 12px 20px; border-radius: 10px; background: #fff; color: #08090c; font-weight: 750; }
.wil-skip-link:focus { inset-block-start: 14px; }

/* Header: a refined custom shell, not Astra CSS. */
.wil-header { position: sticky; top: 0; z-index: 1000; width: 100%; isolation: isolate; background: rgba(13,13,16,.88); backdrop-filter: blur(22px) saturate(1.14); -webkit-backdrop-filter: blur(22px) saturate(1.14); border-bottom: 1px solid var(--wil-edge); }
.admin-bar .wil-header { top: 32px; }
.wil-header__inner { width: min(100%, var(--wil-container)); min-height: 78px; margin: 0 auto; padding-inline: clamp(18px,2.15vw,44px); display: flex; align-items: center; gap: clamp(18px,2vw,38px); }
.wil-brand { display: inline-flex; align-items: center; flex: 0 0 auto; max-width: 240px; min-height: 46px; color: #fff!important; text-decoration: none!important; }
.wil-brand__image { display: block; max-width: min(210px,26vw); max-height: 57px; width: auto; height: auto; object-fit: contain; }
.wil-brand__wordmark { font-size: 25px; line-height: 1; letter-spacing: -.072em; font-weight: 850; white-space: nowrap; }
.wil-brand__wordmark span { display: block; margin-top: 5px; letter-spacing: -.015em; font-size: 9px; line-height: 1.4; font-weight: 650; text-transform: uppercase; color: #b0b0bd; }
.wil-desktop-nav { min-width: 0; flex: 1 1 auto; display: flex; justify-content: center; }
.wil-primary-menu, .wil-primary-menu ul, .wil-mobile-nav__list, .wil-mobile-nav__list ul, .wil-footer-menu { list-style: none; padding: 0; margin: 0; }
.wil-primary-menu { display: flex; align-items: center; justify-content: center; gap: clamp(8px,1.3vw,23px); min-height: 76px; }
.wil-primary-menu > li { position: relative; flex: 0 0 auto; }
.wil-primary-menu a { display: inline-flex; align-items: center; min-height: 42px; padding: 7px 2px; font-size: clamp(12px,.9vw,14px); letter-spacing: -.007em; font-weight: 550; line-height: 1.3; color: rgba(255,255,255,.75)!important; text-decoration: none!important; white-space: nowrap; transition: color .18s ease; }
.wil-primary-menu a:hover, .wil-primary-menu a:focus-visible, .wil-primary-menu .current-menu-item > a, .wil-primary-menu .current-menu-ancestor > a { color: #fff!important; }
.wil-primary-menu .current-menu-item > a::after { content: ''; display: block; position: absolute; height: 2px; bottom: 7px; left: 1px; right: 1px; border-radius: 3px; background: var(--wil-accent); }
.wil-primary-menu .sub-menu { display: block; position: absolute; top: calc(100% + 3px); left: -18px; z-index: 100; min-width: 216px; padding: 8px; border-radius: 15px; background: #1b1b23; border: 1px solid var(--wil-edge-strong); box-shadow: 0 18px 50px rgba(0,0,0,.5); visibility: hidden; opacity: 0; transform: translateY(7px); pointer-events: none; transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.wil-primary-menu .sub-menu .sub-menu { top: -8px; left: calc(100% + 8px); }
.wil-primary-menu li:hover > .sub-menu, .wil-primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.wil-primary-menu .sub-menu > li { position: relative; }
.wil-primary-menu .sub-menu a { display: block; min-height: 0; padding: 11px 12px; border-radius: 9px; font-size: 13px; color: #dbdbe2!important; white-space: normal; }
.wil-primary-menu .sub-menu a:hover, .wil-primary-menu .sub-menu a:focus-visible { background: rgba(255,255,255,.07); }
.wil-header__right { display: flex; align-items: center; justify-content: flex-end; gap: 11px; flex: 0 0 auto; margin-left: auto; }
.wil-header-cart, .wil-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 43px; height: 43px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #f5f5f7!important; padding: 9px; text-decoration: none!important; cursor: pointer; position: relative; transition: background .18s ease, border-color .18s ease; }
.wil-header-cart:hover, .wil-menu-toggle:hover { background: rgba(255,255,255,.07); border-color: var(--wil-edge); }
.wil-header-cart svg, .wil-menu-toggle svg { width: 23px; height: 23px; display: block; }
.wil-header-cart__count { position: absolute; right: 0px; top: 0px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--wil-accent); color: #fff; font-size: 10px; font-weight: 800; line-height: 1; }
.wil-account-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 14px; border: 1px solid var(--wil-edge-strong); border-radius: 999px; background: rgba(255,255,255,.055); color: #f5f5f7!important; text-decoration: none!important; font-size: 12px; font-weight: 670; line-height: 1.2; white-space: nowrap; }
.wil-account-link:hover { background: rgba(255,255,255,.11); }
/* Existing WILMMM plugin creates its own account controls. */
.wil-primary-menu > .wmmm-desktop-auth-item { display: none; }
.wil-header .wmmm-desktop-auth-cluster { gap: 6px!important; }
.wil-header .wmmm-desktop-auth-cluster a { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 620; padding: 7px 12px; text-decoration: none!important; color: #fff!important; }
.wil-menu-toggle, .wil-mobile-nav { display: none; }

/* Pages with bespoke Wil plugin UI remain plugin-sized, never force a title. */
.wil-main { min-width: 0; width: 100%; flex: 1 0 auto; }
.wil-main--home { overflow-x: clip; }
.wil-main--home > .wil-home-content { width: 100%; max-width: none; margin: 0; }
.wil-main--page > .wil-page-content { width: 100%; max-width: var(--wil-container); margin-inline: auto; min-width: 0; padding: clamp(12px,1.6vw,24px) clamp(12px,2.2vw,44px) clamp(64px,7vw,120px); }
.wil-main--page > .wil-page-content > .alignfull { max-width: 100%; width: 100%; position: static; left: auto; transform: none; }
.wil-main--page > .wil-page-content > .alignwide { max-width: var(--wil-container); margin-inline: auto; }

/* Editorial templates only; Wil Events and Photo Store retain plugin templates. */
.wil-main--editorial { padding: clamp(52px,8vw,140px) clamp(18px,3vw,44px); }
.wil-editorial-wrap { width: min(100%,var(--wil-container)); margin: 0 auto; }
.wil-article-wrap { width: min(100%,920px); margin: 0 auto; }
.wil-editorial-heading, .wil-article__header { padding-bottom: 32px; border-bottom: 1px solid var(--wil-edge); margin-bottom: 34px; }
.wil-eyebrow { font-size: 12px; line-height: 1.6; letter-spacing: .19em; text-transform: uppercase; font-weight: 750; color: var(--wil-accent); margin: 0 0 13px; }
.wil-editorial-heading h1, .wil-article__header h1, .wil-error-page h1 { margin: 0; font-size: clamp(38px,5.5vw,78px); font-weight: 750; line-height: 1.05; letter-spacing: -.055em; color: #fff; }
.wil-muted { color: var(--wil-muted); }
.wil-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.wil-post-card { border: 1px solid var(--wil-edge); background: var(--wil-surface); border-radius: 18px; overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
.wil-post-card:hover { border-color: var(--wil-edge-strong); transform: translateY(-3px); }
.wil-post-card__link { display: block; height: 100%; text-decoration: none!important; color: var(--wil-ink)!important; }
.wil-post-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: #1d1d22; }
.wil-post-card__media img { width: 100%; height: 100%!important; object-fit: cover; transition: transform .32s ease; }
.wil-post-card:hover .wil-post-card__media img { transform: scale(1.04); }
.wil-post-card__media--empty { display: grid; place-items: center; color: rgba(255,255,255,.09); font-size: 70px; font-weight: 900; letter-spacing: -.1em; }
.wil-post-card__body { padding: 24px; }
.wil-post-card time { font-size: 12px; color: var(--wil-muted); font-weight: 630; }
.wil-post-card h2 { font-size: clamp(19px,1.5vw,27px); font-weight: 680; letter-spacing: -.035em; line-height: 1.2; margin: 9px 0 12px; }
.wil-post-card p { color: var(--wil-muted); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.wil-post-card__more { font-size: 13px; font-weight: 700; color: #fff; }
.wil-post-card__more span { color: var(--wil-accent); margin-left: 5px; }
.wil-article__header h1 { margin-top: 5px; }
.wil-article__image { border-radius: 22px; overflow: hidden; margin-bottom: 36px; }
.wil-article__image img { display: block; width: 100%; }
.wil-article__content { font-size: 18px; line-height: 1.85; color: #c8c8d0; overflow-wrap: break-word; }
.wil-article__content h2, .wil-article__content h3 { color: #fff; letter-spacing: -.04em; line-height: 1.2; }
.wil-article__content a, .wil-text-link { color: #83bbff!important; }
.wil-error-page { max-width: 700px; margin: 8vw auto; text-align: center; }
.wil-error-page > p:not(.wil-eyebrow) { color: var(--wil-muted); margin: 24px 0 32px; }
.wil-button { display: inline-flex; align-items: center; gap: 22px; min-height: 49px; border-radius: 9px; padding: 10px 21px; font-size: 14px; font-weight: 700; background: var(--wil-accent); color: #fff!important; text-decoration: none!important; }
.wil-button:hover { filter: brightness(1.13); }
.wil-search-form { margin-top: 25px; max-width: 550px; }
.wil-search-form label { display: block; color: var(--wil-muted); font-size: 13px; font-weight: 630; margin-bottom: 10px; }
.wil-search-form > div { display: flex; gap: 8px; }
.wil-search-form input { min-width: 0; flex: 1; background: #202027; border: 1px solid var(--wil-edge-strong); padding: 12px 16px; border-radius: 9px; color: #fff; font: inherit; }
.wil-search-form button { background: var(--wil-accent); border: 0; border-radius: 9px; color: #fff; padding: 0 18px; cursor: pointer; font-weight: 700; }
.wil-main nav.navigation.pagination { margin: 36px 0 0; }
.wil-main nav.navigation.pagination a, .wil-main nav.navigation.pagination span { display: inline-block; padding: 9px 14px; border: 1px solid var(--wil-edge-strong); border-radius: 9px; margin-right: 5px; color: #fff; text-decoration: none; }
.wil-main nav.navigation.pagination .current { background: var(--wil-accent); border-color: var(--wil-accent); }

/* Footer content survives as a theme part, with WordPress menu control. */
.wil-footer { flex-shrink: 0; border-top: 1px solid var(--wil-edge); background: #111114; }
.wil-footer__inner { width: min(100%, var(--wil-container)); padding: 62px clamp(18px,2.15vw,44px) 28px; margin-inline: auto; }
.wil-footer__top { display: grid; grid-template-columns: minmax(240px,1fr) minmax(240px,2fr); gap: 28px; padding-bottom: 55px; }
.wil-footer__name { color: #fff; font-size: 21px; font-weight: 770; letter-spacing: -.045em; }
.wil-footer__identity p { color: var(--wil-muted); max-width: 310px; font-size: 13px; margin: 10px 0 0; }
.wil-footer__links, .wil-footer-menu { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 10px 24px; }
.wil-footer__links a, .wil-footer-menu a { color: #c5c5cd!important; text-decoration: none!important; font-size: 13px; font-weight: 560; }
.wil-footer__links a:hover { color: #fff!important; }
.wil-footer__bottom { padding-top: 24px; border-top: 1px solid var(--wil-edge); display: flex; justify-content: space-between; gap: 20px; color: #83838d; font-size: 11px; line-height: 1.6; }

/* WooCommerce receives a safe shell, not bespoke overrides of checkout flows. */
body.wil-theme.woocommerce-page .wil-main { padding-block: clamp(25px,3.5vw,54px) clamp(70px,7vw,120px); }
body.wil-theme .woocommerce .woocommerce-notices-wrapper { max-width: var(--wil-container); margin-inline: auto; }
body.wil-theme .woocommerce .woocommerce-breadcrumb { color: var(--wil-muted); }
body.wil-theme .woocommerce .woocommerce-breadcrumb a { color: #d8d8df; }

@media (max-width: 1300px) {
  .wil-header__inner { gap: 13px; padding-inline: 19px; }
  .wil-brand__image { max-width: 175px; }
  .wil-primary-menu { gap: 10px; }
  .wil-primary-menu a { font-size: 12px; }
  .wil-header__right { gap: 5px; }
}
@media (max-width: 1050px) and (min-width: 922px) {
  .wil-brand__image { max-width: 145px; }
  .wil-primary-menu { gap: 7px; }
  .wil-primary-menu a { font-size: 11.5px; }
  .wil-header__inner { padding-inline: 14px; gap: 7px; }
}
@media (max-width: 921px) {
  .wil-header__inner { min-height: 69px; padding-inline: 18px; gap: 10px; }
  .wil-desktop-nav { display: none; }
  .wil-header__right { margin-left: auto; gap: 3px; }
  .wil-menu-toggle { display: inline-flex; }
  .wil-header .wmmm-desktop-auth-cluster { display: none!important; }
  /* The existing WILMMM script replaces this trigger with its own tools. */
  html.wmmm-mobile-active .wil-header-cart { display: none!important; }
  .wil-mobile-nav:not([hidden]) { display: block; position: relative; z-index: 45; padding: 10px 18px 22px; border-top: 1px solid var(--wil-edge); background: #141418; box-shadow: 0 24px 48px rgba(0,0,0,.4); }
  .wil-mobile-nav__list a { display: block; color: #f6f6f8!important; text-decoration: none!important; padding: 12px 4px; font-size: 15px; font-weight: 600; }
  .wil-mobile-nav__list > li + li { border-top: 1px solid rgba(255,255,255,.07); }
  .wil-mobile-nav__list .sub-menu { padding-left: 16px; border-left: 1px solid var(--wil-edge-strong); margin: 3px 0 12px; }
  .wil-mobile-nav__list .sub-menu a { color: #babac5!important; font-size: 14px; padding: 7px 4px; }
  .wil-mobile-nav__account { display: block; margin-top: 20px; padding: 13px 17px; border-radius: 10px; background: var(--wil-accent); text-decoration: none!important; color: #fff!important; text-align: center; font-weight: 750; }
  .wil-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wil-footer__top { grid-template-columns: 1fr; }
  .wil-footer__links, .wil-footer-menu { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .admin-bar .wil-header { top: 46px; }
  .wil-brand__image { max-width: 186px; max-height: 47px; }
  .wil-header__inner { min-height: 65px; padding-inline: 14px; }
  .wil-brand__wordmark { font-size: 21px; }
  .wil-header-cart, .wil-menu-toggle { width: 40px; height: 40px; padding: 8px; }
  .wil-main--page > .wil-page-content { padding: 12px 14px 70px; }
  .wil-main--editorial { padding: 52px 18px 80px; }
  .wil-post-grid { grid-template-columns: 1fr; gap: 16px; }
  .wil-article__content { font-size: 16px; }
  .wil-footer__inner { padding: 45px 20px 24px; }
  .wil-footer__top { padding-bottom: 30px; }
  .wil-footer__bottom { flex-direction: column; gap: 6px; }
  .wil-search-form > div { flex-wrap: wrap; }
  .wil-search-form button { padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wil-post-card, .wil-post-card__media img, .wil-primary-menu a, .wil-menu-toggle, .wil-header-cart { transition: none!important; }
}


/* ── Wil Theme 0.1.1: Screenshot-matched navigation + 1500px canvas ──
 * This block is scoped to the theme, not the installed Wil plugins. The menu
 * styling intentionally excludes plugin cart/account injections on desktop.
 */
body.wil-theme { --wil-header-background: var(--wil-bg, #0D0D10); }
body.wil-theme #masthead.wil-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--wil-header-background);
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.admin-bar.wil-theme #masthead.wil-header { top: 32px; }
body.wil-theme .wil-header__inner {
  width: 100%;
  max-width: var(--wil-header-width, var(--wil-container));
  min-height: 96px;
  margin-inline: auto;
  padding-inline: clamp(18px, 1.8vw, 28px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.4vw, 25px);
}
body.wil-theme .wil-brand {
  max-width: 132px;
  min-height: 65px;
  flex: 0 0 auto;
}
body.wil-theme .wil-brand__image {
  width: auto;
  height: auto;
  max-height: 66px;
  max-width: 123px;
  object-fit: contain;
}
body.wil-theme .wil-desktop-nav {
  justify-content: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}
body.wil-theme .wil-primary-menu {
  justify-content: flex-start;
  min-height: 96px;
  gap: clamp(10px, 1.12vw, 18px);
}
body.wil-theme .wil-primary-menu > li > a {
  font-size: 15px;
  font-weight: 400;
  color: #f0f0f2 !important;
  line-height: 1.3;
  letter-spacing: -.012em;
  min-height: 40px;
  padding: 8px 0;
}
body.wil-theme .wil-desktop-nav .wil-primary-menu .sub-menu a { font-size: 15px; }
body.wil-theme .wil-primary-menu > li > a:hover,
body.wil-theme .wil-primary-menu > li > a:focus-visible { color: #fff !important; }
body.wil-theme .wil-primary-menu .current-menu-item > a::after { display: none !important; }
body.wil-theme .wil-primary-menu > .wil-menu-cart-item,
body.wil-theme .wil-primary-menu > .wmmm-desktop-auth-item,
body.wil-theme .wil-primary-menu > .wmmm-desktop-login-item,
body.wil-theme .wil-primary-menu > .wmmm-desktop-account-item,
body.wil-theme .wil-primary-menu > .wmmm-desktop-logout-item { display: none !important; }
body.wil-theme .wil-header__right { margin-left: auto; gap: 0; flex: 0 0 auto; }
body.wil-theme .wil-header__auth { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
body.wil-theme .wil-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  min-height: 35px;
  max-height: 35px;
  border-radius: 10px;
  padding: 0 16px;
  line-height: 1.5;
  font-size: 15px;
  font-weight: 400;
  color: #f5f5f7 !important;
  background: #131317;
  border: 1px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: none;
  transition: background .18s ease;
}
body.wil-theme .wil-auth-button:hover,
body.wil-theme .wil-auth-button:focus-visible { background: #222226; }
body.wil-theme .wil-auth-button--logout,
body.wil-theme .wil-auth-button--login { background: #f8f8fa; color: #111115 !important; border-color: #e0e0e4; }
body.wil-theme .wil-auth-button--logout:hover,
body.wil-theme .wil-auth-button--login:hover { background: #e7e7ec; }
/* Existing WILMMM owns mobile tools, but not the theme's desktop auth controls. */
html.wmmm-desktop-header-active body.wil-theme #masthead.wil-header .wmmm-desktop-auth-cluster,
body.wil-theme #masthead.wil-header .wmmm-desktop-auth-cluster { display: none !important; }
/* v0.1.2: Homepage now restores the natural fullscreen hero + plugin slider breakout.
   Body content stays 1500px; component-specific full-bleed areas do not. */
@media (max-width: 1240px) {
  body.wil-theme .wil-header__inner { min-height: 74px; padding-inline: 20px; gap: 12px; }
  body.wil-theme .wil-desktop-nav { display: none; }
  body.wil-theme .wil-header__auth { display: none; }
  body.wil-theme .wil-brand__image { max-width: 114px; max-height: 56px; }
  body.wil-theme .wil-brand { min-height: 56px; }
  body.wil-theme .wil-menu-toggle { display: inline-flex; }
  body.wil-theme .wil-header__right { margin-left: auto; }
  body.wil-theme .wil-mobile-nav:not([hidden]) { max-width: var(--wil-header-width, var(--wil-container)); margin-inline: auto; }
  body.wil-theme .wil-mobile-nav__tools { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 17px; border-top: 1px solid var(--wil-edge); }
  body.wil-theme .wil-mobile-nav__tools a { color: #fff !important; background: #212127; border-radius: 9px; padding: 10px 14px; text-decoration: none !important; font-size: 14px; font-weight: 650; }
}
@media (max-width: 782px) {
  body.admin-bar.wil-theme #masthead.wil-header { top: 46px; }
  html.wmmm-desktop-header-active body.admin-bar.wil-theme.home #masthead.site-header.wil-header,
  html.wmmm-desktop-header-active body.admin-bar.wil-theme.front-page #masthead.site-header.wil-header { top: 46px !important; }
}
@media (max-width: 600px) {
  body.wil-theme .wil-header__inner { min-height: 68px; padding-inline: 16px; }
  body.wil-theme .wil-brand { min-height: 48px; }
  body.wil-theme .wil-brand__image { max-height: 48px; max-width: 108px; }
}

/* ================================================================
 * Wil Theme 0.1.2 — FULL-BLEED HOMEPAGE + ORIGINAL WIL FOOTER
 *
 * Keep all plugin animations, slide crops, links, and shortcode markup.
 * Theme 1500px max-width applies to normal editorial content only.
 * ================================================================ */

/* Homepage header overlays the hero rather than pushing it down. The native
 * Wil Modern Mobile Menu already uses this pattern for its desktop header;
 * the theme also implements it independently for its mobile fallback. */
body.wil-theme.home #masthead.wil-header,
body.wil-theme.front-page #masthead.wil-header,
html.wmmm-desktop-header-active body.wil-theme.home #masthead.site-header.wil-header,
html.wmmm-desktop-header-active body.wil-theme.front-page #masthead.site-header.wil-header {
  position: absolute !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.admin-bar.wil-theme.home #masthead.wil-header,
body.admin-bar.wil-theme.front-page #masthead.wil-header,
html.wmmm-desktop-header-active body.admin-bar.wil-theme.home #masthead.site-header.wil-header,
html.wmmm-desktop-header-active body.admin-bar.wil-theme.front-page #masthead.site-header.wil-header {
  top: 32px !important;
}
/* Scrolled header becomes readable against subsequent dark sections. The
 * independent scroll class is a fallback when WMMM is not managing it. */
body.wil-theme.home #masthead.wil-header.wil-header--scrolled,
body.wil-theme.front-page #masthead.wil-header.wil-header--scrolled,
html.wmmm-desktop-header-active body.wil-theme.home #masthead.site-header.wil-header.wil-header--scrolled,
html.wmmm-desktop-header-active body.wil-theme.front-page #masthead.site-header.wil-header.wil-header--scrolled,
html.wmmm-desktop-header-active.wmmm-header-scrolled body.wil-theme.home #masthead.site-header.wil-header,
html.wmmm-desktop-header-active.wmmm-header-scrolled body.wil-theme.front-page #masthead.site-header.wil-header {
  position: fixed !important;
  top: 0 !important;
  background: var(--wil-header-background) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.1) !important;
}
body.admin-bar.wil-theme.home #masthead.wil-header.wil-header--scrolled,
body.admin-bar.wil-theme.front-page #masthead.wil-header.wil-header--scrolled,
html.wmmm-desktop-header-active.wmmm-header-scrolled body.admin-bar.wil-theme.home #masthead.site-header.wil-header,
html.wmmm-desktop-header-active.wmmm-header-scrolled body.admin-bar.wil-theme.front-page #masthead.site-header.wil-header {
  top: 32px !important;
}
body.wil-theme.home #masthead.wil-header.wil-header--mobile-open,
body.wil-theme.front-page #masthead.wil-header.wil-header--mobile-open {
  background: var(--wil-header-background) !important;
}
/* Reference footer: centered logo, compact centered menu rows, and copyright.
 * The original Wil Dynamic Footer continues to own its logo URL, links, ordering
 * and shortcode output. Only presentation is changed; no menu/data migration.
 * The fallback in footer.php uses the same classes when the plugin is absent. */
body.wil-theme .wil-ft {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 48px 20px 18px;
  box-sizing: border-box;
  background: #0D0D10 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #d7d7dc;
  font-family: var(--wil-font);
  text-align: center;
}
/* An existing [wil_footer] may live inside homepage content instead of the
 * template footer. Open only its ancestor chain; do not duplicate the shortcode.
 * Ordinary sibling content retains the same 1500px frame. */
body.wil-theme #wil-main.wil-main--home .wil-home-content :is(div,section,article,main,figure):has(.wil-ft) {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  overflow: visible !important;
  clip-path: none !important;
  contain: none !important;
  grid-column: 1 / -1 !important;
  flex: 0 0 100% !important;
}
body.wil-theme #wil-main.wil-main--home .wil-home-content :is(div,section,article,main,figure):has(.wil-ft) > :where(:not(style):not(script):not(link):not(.wil-ft)) {
  max-width: 1500px;
  margin-inline: auto;
}
body.wil-theme #wil-main.wil-main--home .wil-home-content .wil-ft {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
}
body.wil-theme .wil-ft .wil-ft-help {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100% !important;
  max-width: var(--wil-footer-width, 1500px) !important;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}
body.wil-theme .wil-ft .wil-ft-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  line-height: 1;
}
body.wil-theme .wil-ft .wil-ft-logo > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #f5f5f7;
  text-decoration: none;
}
body.wil-theme .wil-ft .wil-ft-logo img {
  display: block;
  width: 100px;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: contain;
  border: 0;
  box-shadow: none;
}
body.wil-theme .wil-ft .wil-ft-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}
body.wil-theme .wil-ft nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
body.wil-theme .wil-ft nav ul {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.wil-theme .wil-ft nav li {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
}
body.wil-theme .wil-ft nav li::marker { content: ''; }
body.wil-theme .wil-ft nav a {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: #d7d7dc;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--wil-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}
body.wil-theme .wil-ft nav a:hover { color: #fff; }
body.wil-theme .wil-ft a:focus-visible {
  outline: 2px solid var(--wil-accent);
  outline-offset: 4px;
  border-radius: 2px;
}
body.wil-theme .wil-ft .wil-ft-copyright {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  color: #94949e;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}
/* The read-only fallback may output published legal-page links without a UL. */
body.wil-theme .wil-ft .wil-ft-fallback-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  width: 100%;
}
@media (max-width: 782px) {
  body.wil-theme .wil-ft { padding: 32px 20px 28px; }
  body.wil-theme .wil-ft .wil-ft-logo { margin-bottom: 20px; }
  body.wil-theme .wil-ft nav { gap: 12px; }
  body.wil-theme .wil-ft nav ul,
  body.wil-theme .wil-ft .wil-ft-fallback-links { gap: 12px 18px; }
  body.wil-theme .wil-ft nav a { font-size: 13px; line-height: 1.5; }
  body.wil-theme .wil-ft .wil-ft-copyright { margin-top: 24px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.wil-theme .wil-ft nav a { transition: none; }
}
@media (max-width: 782px) {
  body.admin-bar.wil-theme.home #masthead.wil-header,
  body.admin-bar.wil-theme.front-page #masthead.wil-header,
  body.admin-bar.wil-theme.home #masthead.wil-header.wil-header--scrolled,
  body.admin-bar.wil-theme.front-page #masthead.wil-header.wil-header--scrolled,
  html.wmmm-desktop-header-active body.admin-bar.wil-theme.home #masthead.site-header.wil-header,
  html.wmmm-desktop-header-active body.admin-bar.wil-theme.front-page #masthead.site-header.wil-header,
  html.wmmm-desktop-header-active.wmmm-header-scrolled body.admin-bar.wil-theme.home #masthead.site-header.wil-header,
  html.wmmm-desktop-header-active.wmmm-header-scrolled body.admin-bar.wil-theme.front-page #masthead.site-header.wil-header {
    top: 46px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.wil-theme.home #masthead.wil-header,
  body.wil-theme.front-page #masthead.wil-header { transition: none !important; }
}



/* Wil Theme 0.1.22 — native Apple/system typography. No downloadable font files.
   Keep controls aligned with text without touching plugin icon-font glyphs. */
body.wil-theme :where(button, input, select, textarea, optgroup) {
  font-family: var(--wil-font);
}
/* Event, trip and photo-album slider headings get their Semibold weight from
   Wil Events (0.7.8.322+) and Wil Photo Store (2.93.230+) themselves. */

/* Wil Theme 0.1.22 — adjustable widths (Customize > Wil Theme Layout Width).
   The header and page containers share one 20px gutter, so with equal widths
   the cart and checkout cards line up with the logo and the Login button. */
body.wil-theme {
  --wil-header-width: var(--wil-container);
  --wil-footer-width: var(--wil-container);
  --wil-page-width: var(--wil-container);
  --wil-gutter: 20px;
}
body.wil-theme .wil-main--page > .wil-page-content { max-width: var(--wil-page-width); }
body.wil-theme .wil-main--page > .wil-page-content > .alignwide { max-width: var(--wil-page-width); }
body.wil-theme .woocommerce .woocommerce-notices-wrapper { max-width: var(--wil-page-width); }
/* Every standard page (photo galleries, cart, checkout…) uses the header's
   20px side gutter, so content edges line up with the logo and Logout. */
body.wil-theme .wil-main--page > .wil-page-content {
  padding-inline: var(--wil-gutter);
}
/* Wil Event Cart caps its card at 1600px; let the page width decide instead. */
body.wil-theme .wil-event-cart .wil-cart-shell,
body.wil-theme .wil-event-cart .wil-cart-shell.wil-cart-page-modern {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  box-sizing: border-box !important;
}
