/* =========================================================================
   SKP — TWO-TIER PRODUCT DESIGN LANGUAGE
   v1 (2026-08-25)

   THE PROBLEM
   Product pages had no shared rule. Measured live before this file:
     pvc-tarpaulin  (material)     dark photo hero, white H1
     pvc-mesh       (material)     light blue hero, dark H1
     industrial-curtains (material) light blue hero, dark H1
     car-wash       (application)  dark photo hero, white H1
     mesh-banner    (application)  light hero, dark H1
   Material and application pages were visually indistinguishable, and two
   pages in the same tier looked like different sites.

   THE RULE — one glance tells you where you are
     TIER 1  MATERIAL HUB     DARK hero · yellow "MATERIAL" eyebrow ·
                              applications grid at the foot
     TIER 2  APPLICATION      LIGHT hero · blue lineage chip naming its
                              parent material · route back up

   Dark = the material itself. Light = something made from it. Learnable in
   one visit, and it makes the catalogue's shape visible.

   Content is never touched: the lineage chip and applications grid are
   injected at render time by skp-product-tiers.php.
   ========================================================================= */

/* =========================================================================
   TIER 1 — MATERIAL HUB
   ========================================================================= */

.skp-tier-material .skp-hero,
.skp-tier-material .skp-mesh-hero,
.skp-tier-material .skp-section.skp-hero {
  background:
    radial-gradient(circle at 18% 15%, rgba(0, 86, 167, 0.45) 0%, transparent 60%),
    linear-gradient(155deg, #0b1a2b 0%, #102033 48%, #0f4c81 100%) !important;
  position: relative;
  overflow: hidden;
}

/* a fine rule of signal yellow across the top — the material "spine" */
.skp-tier-material .skp-hero::before,
.skp-tier-material .skp-section.skp-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--skp-signal) 0%, rgba(255, 205, 87, 0) 62%);
  z-index: 2;
}

.skp-tier-material .skp-hero h1,
.skp-tier-material .skp-section.skp-hero h1,
.skp-tier-material .skp-hero h2,
.skp-tier-material .skp-hero p,
.skp-tier-material .skp-section.skp-hero p,
.skp-tier-material .skp-hero li,
.skp-tier-material .skp-hero .skp-lede {
  color: #ffffff !important;
}
.skp-tier-material .skp-hero p,
.skp-tier-material .skp-section.skp-hero p {
  color: rgba(234, 241, 248, 0.86) !important;
}

/* material pages carry the largest heading on the site — they are the parent */
.skp-tier-material .skp-hero h1,
.skp-tier-material .skp-section.skp-hero h1,
.skp-tier-material .entry-content h1 {
  font-size: clamp(2.9rem, 5.2vw, 4.5rem) !important;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

/* eyebrow reads MATERIAL in signal yellow */
.skp-tier-material .skp-hero .skp-kicker,
.skp-tier-material .skp-section.skp-hero .skp-kicker {
  color: var(--skp-signal) !important;
  background: transparent !important;
  border: 1px solid rgba(255, 205, 87, 0.42);
  border-radius: 999px;
  padding: 6px 15px;
  letter-spacing: 0.2em;
}

/* buttons invert onto the dark band */
.skp-tier-material .skp-hero a.skp-btn-secondary,
.skp-tier-material .skp-section.skp-hero a.skp-btn-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}
.skp-tier-material .skp-hero a.skp-btn-primary,
.skp-tier-material .skp-section.skp-hero a.skp-btn-primary {
  background: var(--skp-signal) !important;
  color: #102033 !important;
  border-color: var(--skp-signal) !important;
}

/* section headings get a yellow left rule — editorial, parent-level */
.skp-tier-material .skp-section:not(.skp-hero) > .skp-inner > h2 {
  padding-left: 16px;
  border-left: 4px solid var(--skp-signal);
}

/* ---- applications grid (injected) ---- */

.skp-applications {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(52px, 6vw, 88px) var(--skp-gutter);
  background: var(--skp-ink);
  position: relative;
}
.skp-applications::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(234, 241, 248, 0.055) 1.6px, transparent 2.2px);
  background-size: 22px 22px;
  pointer-events: none;
}
.skp-applications__inner { position: relative; max-width: min(94%, 1600px); margin: 0 auto; }

.skp-applications__eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--skp-signal);
}
.skp-applications__title {
  margin: 0 0 30px;
  color: #ffffff;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.skp-applications__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
}

.skp-applications__card {
  display: block;
  padding: 22px 22px 24px;
  border-radius: var(--skp-radius-card);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(234, 241, 248, 0.16);
  border-left: 3px solid var(--skp-signal);
  text-decoration: none !important;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.skp-applications__card:hover,
.skp-applications__card:focus-visible {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 205, 87, 0.55);
}
.skp-applications__name {
  display: block;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.skp-applications__desc {
  display: block;
  color: rgba(234, 241, 248, 0.7);
  font-size: 0.94rem;
  line-height: 1.5;
}

/* =========================================================================
   TIER 2 — APPLICATION PAGE
   ========================================================================= */

.skp-tier-application .skp-hero,
.skp-tier-application .skp-section.skp-hero,
.skp-tier-application .skp-mbm-hero {
  background: linear-gradient(135deg, rgba(0, 86, 167, 0.10), rgba(16, 32, 51, 0.06)) !important;
  position: relative;
}
/* a thin blue rule — the child's marker, quieter than the material's yellow */
.skp-tier-application .skp-hero::before,
.skp-tier-application .skp-section.skp-hero::before,
.skp-tier-application .skp-mbm-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--skp-accent) 0%, rgba(0, 86, 167, 0) 52%);
  z-index: 2;
}

.skp-tier-application .skp-hero h1,
.skp-tier-application .skp-section.skp-hero h1,
.skp-tier-application .skp-mbm-hero h1 {
  color: var(--skp-ink) !important;
  font-size: clamp(2.3rem, 4.1vw, 3.6rem) !important;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.skp-tier-application .skp-hero p,
.skp-tier-application .skp-section.skp-hero p,
.skp-tier-application .skp-mbm-hero p,
.skp-tier-application .skp-hero li {
  color: var(--skp-muted) !important;
}

.skp-tier-application .skp-hero .skp-kicker,
.skp-tier-application .skp-section.skp-hero .skp-kicker {
  background: var(--skp-accent-wash) !important;
  color: var(--skp-accent-dark) !important;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  letter-spacing: 0.16em;
}

.skp-tier-application .skp-hero a.skp-btn-primary,
.skp-tier-application .skp-section.skp-hero a.skp-btn-primary {
  background: var(--skp-accent) !important;
  color: #ffffff !important;
  border-color: var(--skp-accent) !important;
}
.skp-tier-application .skp-hero a.skp-btn-secondary,
.skp-tier-application .skp-section.skp-hero a.skp-btn-secondary {
  background: #ffffff !important;
  color: var(--skp-accent-dark) !important;
  border: 1px solid var(--skp-line) !important;
}

/* application section headings get a blue left rule, thinner than material's */
.skp-tier-application .skp-section:not(.skp-hero) > .skp-inner > h2 {
  padding-left: 14px;
  border-left: 3px solid var(--skp-accent);
}

/* ---- lineage breadcrumb (injected) ---- */

.skp-lineage {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 14px var(--skp-gutter);
  background: var(--skp-surface);
  border-bottom: 1px solid var(--skp-line);
  font-size: 0.92rem;
}

.skp-lineage__material {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  background: var(--skp-card);
  border: 1px solid var(--skp-line);
  border-left: 3px solid var(--skp-accent);
  text-decoration: none !important;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.skp-lineage__material:hover,
.skp-lineage__material:focus-visible {
  border-color: var(--skp-accent);
  transform: translateY(-1px);
}
.skp-lineage__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--skp-muted);
}
.skp-lineage__name {
  font-weight: 700;
  color: var(--skp-accent-dark);
}
.skp-lineage__sep {
  width: 18px;
  height: 1px;
  background: var(--skp-line);
}
.skp-lineage__current {
  font-weight: 600;
  color: var(--skp-ink);
}

@media (max-width: 900px) {
  .skp-lineage { gap: 10px; font-size: 0.86rem; }
  .skp-lineage__sep { display: none; }
  .skp-applications__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .skp-applications__card,
  .skp-lineage__material { transition: none; }
  .skp-applications__card:hover,
  .skp-lineage__material:hover { transform: none; }
}


/* =========================================================================
   TIER 2 — pages whose hero is a raw UAGB container with no .skp-hero hook
   trailer-tarp (1738) and truck-side-curtain (1472) kept dark photo heroes,
   which read as material pages under the new rule. Scoped by page id because
   their markup offers no shared class.
   ========================================================================= */

body.page-id-1738 .entry-content > .wp-block-uagb-container:first-of-type,
body.page-id-1472 .entry-content > .wp-block-uagb-container:first-of-type,
body.page-id-1738 .skp-product-page > .wp-block-uagb-container:first-of-type,
body.page-id-1472 .skp-product-page > .wp-block-uagb-container:first-of-type {
  background-image: linear-gradient(135deg, rgba(0, 86, 167, 0.10), rgba(16, 32, 51, 0.06)) !important;
  background-color: #eef2f6 !important;
  position: relative;
}
body.page-id-1738 .entry-content > .wp-block-uagb-container:first-of-type h1,
body.page-id-1472 .entry-content > .wp-block-uagb-container:first-of-type h1,
body.page-id-1738 .skp-product-page > .wp-block-uagb-container:first-of-type h1,
body.page-id-1472 .skp-product-page > .wp-block-uagb-container:first-of-type h1,
body.page-id-1738 .skp-product-page > .wp-block-uagb-container:first-of-type h2,
body.page-id-1472 .skp-product-page > .wp-block-uagb-container:first-of-type h2 {
  color: var(--skp-ink) !important;
}
body.page-id-1738 .skp-product-page > .wp-block-uagb-container:first-of-type p,
body.page-id-1472 .skp-product-page > .wp-block-uagb-container:first-of-type p,
body.page-id-1738 .skp-product-page > .wp-block-uagb-container:first-of-type li,
body.page-id-1472 .skp-product-page > .wp-block-uagb-container:first-of-type li {
  color: var(--skp-muted) !important;
}

/* =========================================================================
   MATERIAL H1 CONSISTENCY
   pvc-tarpaulin's H1 is a UAGB info-box title (.uagb-ifb-title) and kept its
   own size, rendering 63px against the other two materials at 75px. A parent
   page should not be the smallest of its tier.
   ========================================================================= */

.skp-tier-material .entry-content h1,
.skp-tier-material h1.uagb-ifb-title,
.skp-tier-material .uagb-ifb-title-wrap h1 {
  font-size: clamp(2.9rem, 5.2vw, 4.5rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.02em !important;
}


/* =========================================================================
   SPECIFICITY ESCALATION — required, not stylistic
   The per-page stylesheets use selectors like
     .page-id-133 main.skp-product-page > section.skp-section.skp-hero
   which is (0,4,2) WITH !important. The tier rules above are (0,3,0) and lose
   every time. Matching that shape plus a `body` element selector takes this to
   (0,4,3) so the tier language actually governs.
   ========================================================================= */

body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero,
body.skp-tier-material main.skp-product-page > section.skp-hero {
  background:
    radial-gradient(circle at 18% 15%, rgba(0, 86, 167, 0.45) 0%, transparent 60%),
    linear-gradient(155deg, #0b1a2b 0%, #102033 48%, #0f4c81 100%) !important;
  border-bottom: none !important;
}

body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero h1,
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero h2,
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero .skp-lede {
  color: #ffffff !important;
}
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero p,
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero li {
  color: rgba(234, 241, 248, 0.86) !important;
}
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero .skp-kicker {
  color: var(--skp-signal) !important;
  background: transparent !important;
  border: 1px solid rgba(255, 205, 87, 0.42) !important;
}
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero a.skp-btn-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero a.skp-btn-primary {
  background: var(--skp-signal) !important;
  color: #102033 !important;
}
/* figure captions inside the dark hero */
body.skp-tier-material main.skp-product-page > section.skp-section.skp-hero figcaption {
  color: rgba(234, 241, 248, 0.62) !important;
}

/* Tier 2 at the same weight, so an application page can never inherit a
   material-style dark hero from its own page stylesheet. */
body.skp-tier-application main.skp-product-page > section.skp-section.skp-hero {
  background: linear-gradient(135deg, rgba(0, 86, 167, 0.10), rgba(16, 32, 51, 0.06)) !important;
}
body.skp-tier-application main.skp-product-page > section.skp-section.skp-hero h1,
body.skp-tier-application main.skp-product-page > section.skp-section.skp-hero h2 {
  color: var(--skp-ink) !important;
}
body.skp-tier-application main.skp-product-page > section.skp-section.skp-hero p,
body.skp-tier-application main.skp-product-page > section.skp-section.skp-hero li {
  color: var(--skp-muted) !important;
}


/* =========================================================================
   APPLICATIONS GRID — escalate over theme + page rules
   Measured after first deploy: the section rendered 1200px wide (theme cap,
   not full-bleed) and its heading inherited the page's dark ink on the dark
   band — eyebrow rgb(51,65,85) and title rgb(30,41,59), effectively invisible.
   ========================================================================= */

body .entry-content > section.skp-applications,
body .skp-product-page section.skp-applications {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

body section.skp-applications .skp-applications__title,
body .skp-applications .skp-applications__title,
body .entry-content .skp-applications h2 {
  color: #ffffff !important;
}
body section.skp-applications .skp-applications__eyebrow,
body .skp-applications .skp-applications__eyebrow,
body .entry-content .skp-applications p.skp-applications__eyebrow {
  color: var(--skp-signal) !important;
}
body section.skp-applications .skp-applications__name {
  color: #ffffff !important;
}
body section.skp-applications .skp-applications__desc {
  color: rgba(234, 241, 248, 0.7) !important;
}
/* the material's own yellow left-rule must not leak onto this grid heading */
body section.skp-applications .skp-applications__title {
  padding-left: 0 !important;
  border-left: none !important;
}


/* =========================================================================
   PRODUCT MEGA-MENU — show the hierarchy, hide nothing
   Nesting applications under their material made them second-level flyouts:
   `visibility: hidden` until you hover the material as well. That buried 10
   of 13 products behind an extra interaction. The hierarchy should be
   VISIBLE, not merely encoded — so the PRODUCT dropdown becomes three
   columns with every child on screen at once.
   ========================================================================= */

@media (min-width: 922px) {

  /* Astra's menu CSS is more specific than a bare #menu-item-10 selector, so
     these are prefixed with body + the nav's own id to win. */
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 6px;
    width: max-content !important;
    max-width: min(94vw, 1180px) !important;
    padding: 24px 26px !important;
    background: var(--skp-card);
    border-top: 3px solid var(--skp-accent);
    box-shadow: 0 26px 60px rgba(16, 32, 51, 0.18);
    border-radius: 0 0 var(--skp-radius-card) var(--skp-radius-card);
  }

  /* each material becomes a column, not a hover target */
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li {
    position: static !important;
    width: auto !important;
    min-width: 214px;
    border: none !important;
    padding: 0 14px;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li + li {
    border-left: 1px solid var(--skp-line) !important;
  }

  /* the material label = column heading */
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > a {
    display: block !important;
    padding: 2px 0 10px !important;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--skp-signal);
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--skp-ink) !important;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > a:hover {
    color: var(--skp-accent) !important;
  }

  /* the children: always on screen, never a flyout */
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .sub-menu {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    left: auto !important;
    top: auto !important;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .sub-menu > li {
    width: auto !important;
    border: none !important;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .sub-menu > li > a {
    padding: 7px 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--skp-text) !important;
    border: none !important;
    transition: color 0.15s ease, padding-left 0.15s ease;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .sub-menu > li > a:hover,
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .sub-menu > li > a:focus-visible {
    color: var(--skp-accent) !important;
    padding-left: 5px !important;
  }

  /* Astra draws a caret on parents that now have no flyout */
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > a .ast-icon,
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > a > .sub-arrow,
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > .ast-menu-toggle {
    display: none !important;
  }
}

/* Mobile keeps Astra's accordion, but children are expanded rather than
   collapsed behind a second tap. */
@media (max-width: 921px) {
  #menu-item-10 .sub-menu .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #menu-item-10 .sub-menu .sub-menu > li > a {
    padding-left: 34px !important;
    font-size: 0.92rem !important;
  }
  body #ast-hf-menu-1 #menu-item-10 > .sub-menu > li > a {
    font-weight: 700 !important;
    letter-spacing: 0.06em;
  }
}
