@import url("tokens.css");

/* ---------- buttons (signature wedge radius) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.85rem 1.5rem; border-radius: var(--wedge-radius);
  border: 0; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn-primary { background: var(--ul-red); color: #fff; }
.btn-primary:hover { background: var(--ul-red-800); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-heading); border: 1px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--ul-red); color: var(--ul-red-800); }
.section--red .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.section--red .btn-ghost:hover { border-color: #fff; }
/* A red button on a red section background has no visible edge — a thin
   white border makes it read as a button rather than a plain text label. */
.section--red .btn-primary { border: 2px solid #fff; }
.btn-ink { background: var(--ul-ink); color: #fff; }
.btn-ink:hover { background: #000; }

/* ---------- header / primary nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.85rem; }
.site-header__logo { margin-right: auto; display: flex; align-items: center; }
.site-header__logo img { height: 40px; width: auto; }

/* Overlay variant — sits transparent on top of a photo hero (homepage) and
   turns solid once the visitor scrolls past it, matching the live site. */
.site-header--overlay {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
}
/* No nav logo until the header goes solid on scroll — the hero already
   carries its own large logo, so showing it twice at the top is redundant. */
.site-header--overlay .site-header__logo { visibility: hidden; }
.site-header--overlay.is-scrolled .site-header__logo { visibility: visible; }
.site-header--overlay .primary-nav__link,
.site-header--overlay .nav-toggle { color: #fff; border-color: rgba(255,255,255,.5); }
.site-header--overlay .primary-nav__link:hover { color: #fff; opacity: .8; }
.site-header--overlay.is-scrolled {
  position: fixed;
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
}
.site-header--overlay.is-scrolled .primary-nav__link,
.site-header--overlay.is-scrolled .nav-toggle { color: var(--color-heading); border-color: var(--color-border); }
.site-header--overlay.is-scrolled .primary-nav__link:hover { color: var(--ul-red-800); opacity: 1; }

.primary-nav { display: none; }
@media (min-width: 1025px) {
  .primary-nav { display: flex; align-items: center; gap: 0.25rem; }
}
.primary-nav__item { position: relative; }
.primary-nav__link {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-heading);
  text-decoration: none; padding: 0.6rem 0.85rem;
}
.primary-nav__link:hover, .primary-nav__item:focus-within .primary-nav__link { color: var(--ul-red-800); }
.primary-nav__link .chev { border: solid currentColor; border-width: 0 2px 2px 0; padding: 3px; transform: rotate(45deg); transition: transform .15s var(--ease); }
.primary-nav__item:focus-within .chev, .primary-nav__item:hover .chev { transform: rotate(225deg); }

.mega-menu {
  position: absolute; top: 100%; left: 0; min-width: 280px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 0 0 8px 8px;
  box-shadow: 0 16px 32px rgba(22,21,21,.12);
  padding: 0.6rem; display: none; flex-direction: column;
}
.primary-nav__item:hover .mega-menu,
.primary-nav__item:focus-within .mega-menu { display: flex; }
.mega-menu a {
  padding: 0.55rem 0.75rem; border-radius: 4px; color: var(--color-text);
  text-decoration: none; font-size: 0.9rem;
}
.mega-menu a:hover { background: var(--color-surface-alt); color: var(--ul-red-800); }

.mega-menu--grouped { flex-direction: row; min-width: auto; padding: 0.85rem 0.5rem; left: auto; right: 0; }
.mega-menu__group { display: flex; flex-direction: column; min-width: 190px; padding: 0 1rem; }
.mega-menu__group:not(:first-child) { border-left: 1px solid var(--color-border); }
.mega-menu__group-heading {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ul-red-800);
  text-decoration: none; padding: 0.4rem 0.75rem; margin-bottom: 0.25rem;
}
.mega-menu__group-heading:hover { opacity: 0.75; background: none; }

/* ---------- simple dropdown item with a nested flyout submenu (e.g.
   Polyurea Science > Polyurea Coatings > Pure/Hybrid/Polyaspartic) —
   matches the live site's single-column dropdown + flyout behavior,
   as opposed to the side-by-side .mega-menu--grouped layout above ---------- */
.mega-menu__item { position: relative; }
.mega-menu__item > a { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.mega-menu__caret { border: solid currentColor; border-width: 0 2px 2px 0; padding: 3px; transform: rotate(-45deg); flex-shrink: 0; }
.mega-menu__flyout {
  position: absolute; top: -0.6rem; left: 100%; min-width: 240px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 8px;
  box-shadow: 0 16px 32px rgba(22,21,21,.12);
  padding: 0.6rem; display: none; flex-direction: column;
}
.mega-menu__item:hover > .mega-menu__flyout,
.mega-menu__item:focus-within > .mega-menu__flyout { display: flex; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--color-border); border-radius: var(--wedge-radius-sm);
  background: none; cursor: pointer;
}
@media (min-width: 1025px) { .nav-toggle { display: none; } }

.mobile-nav { display: none; background: var(--color-bg); border-top: 1px solid var(--color-border); box-shadow: 0 12px 24px rgba(22,21,21,.15); }
.mobile-nav.is-open { display: block; }
@media (min-width: 1025px) { .mobile-nav { display: none !important; } }
.mobile-nav details { border-bottom: 1px solid var(--color-border); }
.mobile-nav summary { padding: 0.9rem var(--col-pad); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.mobile-nav a { display: block; padding: 0.6rem calc(var(--col-pad) + 1rem); text-decoration: none; color: var(--color-text); }
.mobile-nav > a { display: block; padding: 0.9rem var(--col-pad); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--color-heading); border-bottom: 1px solid var(--color-border); }
.mobile-nav__subgroup { border-bottom: 0; }
.mobile-nav__subgroup summary { padding: 0.6rem calc(var(--col-pad) + 1rem); font-size: 0.8rem; font-weight: 600; text-transform: none; letter-spacing: normal; }
.mobile-nav__subgroup a { padding-left: calc(var(--col-pad) + 2rem); }

/* ---------- hero ---------- */
.hero { background: var(--ul-ink); color: #F5F2F2; padding: clamp(3rem, 8vw, 5.5rem) 0; }
.hero .rule { height: 6px; width: 88px; background: var(--ul-red); margin-bottom: 1.6rem; }
.hero h1 { color: #fff; }
.hero__sub { color: #A9A2A2; max-width: 58ch; margin-top: 1.1rem; font-size: 1.05rem; }
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- interior page hero (title band with photo + dark overlay) ---------- */
.page-hero {
  position: relative; min-height: 300px; display: flex; align-items: center;
  background-size: cover; background-position: center; overflow: hidden;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.46); }
.page-hero__inner { position: relative; z-index: 1; padding-block: 2.5rem; text-align: center; }
.page-hero h1, .page-hero p { color: #fff; }
.page-hero__inner .lede { margin-inline: auto; }

/* ---------- mid-page CTA banner (background photo + dark overlay, used for
   accreditation/quote callouts inside a section rather than as a full hero) ---------- */
.cta-banner {
  position: relative; min-height: 260px; display: flex; align-items: center;
  background-size: cover; background-position: center; overflow: hidden; border-radius: var(--wedge-radius);
}
.cta-banner::before { content: ""; position: absolute; inset: 0; background: rgba(10,10,10,.66); }
.cta-banner__inner { position: relative; z-index: 1; padding: 2.5rem; max-width: 62ch; }
.cta-banner h2, .cta-banner p, .cta-banner li { color: #fff; }

/* ---------- photo hero (homepage) ---------- */
.photo-hero {
  position: relative; min-height: min(70vh, 640px); display: flex; align-items: flex-end;
  background-size: cover; background-position: center; overflow: hidden;
}
.photo-hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
@media (max-width: 640px) { .photo-hero__video { display: none; } } /* matches live site: video is desktop-only, static bg shows on mobile */
.photo-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,21,21,.55) 0%, rgba(22,21,21,.15) 38%, rgba(255,255,255,.72) 78%, rgba(255,255,255,.9) 100%);
}
.photo-hero__inner { position: relative; z-index: 2; padding-block: 5.5rem 3.5rem; }
.photo-hero__logo { width: 180px; height: auto; margin-bottom: 1.75rem; }
.photo-hero h1 { color: var(--ul-ink); }

/* ---------- interior page hero slideshow variant (crossfading background images) ---------- */
.page-hero--slideshow { background-image: none; }
.page-hero__slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; animation-name: page-hero-fade; animation-timing-function: ease; animation-iteration-count: infinite;
  /* animation-duration/-delay are set inline per slide (5s per image in the
     set), so this same component works for a hero with any number of
     slideshow images, not just a fixed count. */
}
@keyframes page-hero-fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  20% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero__slide { animation: none; opacity: 0; }
  .page-hero__slide:first-child { opacity: 1; }
}

/* ---------- sticky split (left column pins while right column scrolls) ---------- */
.sticky-split { display: flex; flex-direction: column; gap: 2.5rem; align-items: flex-start; }
@media (min-width: 900px) {
  .sticky-split { flex-direction: row; gap: clamp(2rem, 5vw, 4rem); }
  .sticky-split__aside {
    position: sticky; top: calc(var(--header-h, 76px) + 1.5rem);
    flex: 0 0 40%; max-width: 460px;
  }
  .sticky-split__content { flex: 1 1 60%; min-width: 0; }
}
.sticky-split__aside .lede { margin-top: 1rem; }
.interest-picker { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 1rem; }
.interest-picker h3 { font-size: 0.95rem; }
.interest-picker__row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.interest-picker select {
  font: inherit; font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.8rem 1rem; border-radius: var(--wedge-radius-sm); border: 1px solid var(--color-border); background: var(--color-surface-alt); color: var(--color-heading);
}

/* ---------- alternating feature rows (facility tour, quality, tech support...) ---------- */
.feature-row {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch;
  grid-template-columns: 1fr; padding-block: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--color-border);
}
.feature-row:last-child { border-bottom: 0; }
@media (min-width: 800px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row--reverse .feature-row__media { order: 2; }
}
/* Sharp corners, full-bleed to the row's height — matches the live site's
   documentary-photography treatment (no rounding, no card styling on photos). */
.feature-row__media { min-height: 280px; overflow: hidden; background: var(--color-surface-alt); }
.feature-row__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-row__body { padding: 1.5rem 0; display: flex; flex-direction: column; justify-content: center; }
.feature-row__body h3 { font-size: 1.3rem; letter-spacing: 0.02em; margin-bottom: .9rem; }
.feature-row__body p { color: var(--ul-warm-gray); }
.feature-row__body .btn { align-self: flex-start; } /* without this, the flex
  column's default align-items:stretch forces the button to fill the row's
  full width instead of sizing to its own content */

/* ---------- layer stack (build-up diagram, ported from the Codex-built
   coating-system component) — each layer image is stacked directly on top
   of the last at the same position and fades/slides in on its own
   --layer-delay, staggered, the first time it scrolls into view. ---------- */
.layer-stack { position: relative; width: 100%; max-width: 340px; margin-inline: auto; aspect-ratio: 1514 / 1875; }
.layer-stack__img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain;
  background: none; /* override the sitewide img{background:var(--color-surface-alt)}
    lazy-load placeholder — these PNGs are genuinely transparent and stack on
    top of one another, so a solid placeholder fill would paint over every
    layer beneath it */
  opacity: 0; transform: translate3d(-2rem, 0, 0);
  filter: drop-shadow(0 1rem 1.4rem rgba(2, 28, 45, .12));
  transition: opacity 700ms cubic-bezier(.22, 1, .36, 1) var(--layer-delay, 0ms),
    transform 900ms cubic-bezier(.22, 1, .36, 1) var(--layer-delay, 0ms);
  will-change: opacity, transform;
}
.layer-stack.is-visible .layer-stack__img { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
  .layer-stack__img { transition: none; opacity: 1; transform: none; }
}

/* ---------- diagram placeholder (stand-in for a layer-stack build-up
   graphic that hasn't been produced yet — same footprint as .layer-stack so
   swapping in the real artwork later is a drop-in replacement) ---------- */
.diagram-placeholder {
  position: relative; width: 100%; max-width: 340px; margin-inline: auto; aspect-ratio: 1514 / 1875;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .85rem;
  border: 2px dashed var(--color-border); border-radius: var(--wedge-radius);
  background: var(--color-surface-alt); color: var(--ul-warm-gray); text-align: center; padding: 1.5rem;
}
.diagram-placeholder svg { width: 48px; height: 48px; opacity: .5; }
.diagram-placeholder__label {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.5;
}

/* ---------- red sticky-split variant (Industry Sectors) ---------- */
.sticky-split--red .sticky-split__aside h2,
.sticky-split--red .sticky-split__aside .lede { color: rgba(255,255,255,.85); }

/* Stacked card — photo on top, text underneath — used for every row inside
   a sticky-split right column (both the white and red sections). */
.stack-card { padding-block: clamp(1.75rem, 4vw, 2.5rem); border-bottom: 1px solid var(--color-border); }
.stack-card:last-child { border-bottom: 0; }
.stack-card__media { border-radius: var(--wedge-radius); overflow: hidden; aspect-ratio: 16/9; background: var(--color-surface-alt); }
.stack-card__media img { width: 100%; height: 100%; object-fit: cover; }
.stack-card h3 { margin-top: 1.25rem; }
.stack-card p { color: var(--ul-warm-gray); margin-top: .6rem; }
.stack-card a.btn-ghost { margin-top: 1rem; }

.sticky-split--red .stack-card { border-bottom-color: rgba(255,255,255,.22); }
.sticky-split--red .stack-card__media { background: rgba(255,255,255,.1); }
.sticky-split--red .stack-card h3 { color: #fff; }
.sticky-split--red .stack-card p { color: rgba(255,255,255,.85); }
.sticky-split--red .stack-card a.btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.sticky-split--red .stack-card a.btn-ghost:hover { border-color: #fff; }

/* ---------- carousel (horizontal scroll-snap, no JS library) ---------- */
.carousel__track {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  margin: 0 -.25rem; padding-inline: .25rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { flex: 0 0 clamp(220px, 30vw, 280px); scroll-snap-align: start; }
.carousel__track--badges > * { flex: 0 0 auto; }
.carousel__nav { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }
.carousel__btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--color-border);
  background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-heading); transition: border-color .15s var(--ease), color .15s var(--ease);
}
.carousel__btn:hover { border-color: var(--ul-red); color: var(--ul-red-800); }
.carousel__btn:disabled { opacity: .35; cursor: default; pointer-events: none; }

/* ---------- badge row ("Why Ultimate Linings?" trust strip) ---------- */
.badge-row__item {
  background: #fff; border: 1px solid var(--color-border); border-radius: 999px;
  padding: .6rem 1.1rem; font-size: .85rem; color: var(--color-text);
}

/* ---------- "Why Ultimate Linings?" two-column variant (trust-strip points
   as a red-tick list + a "Find Out More" icon-link list) — used instead of
   the badge carousel when the including page sets `relatedLinks` ---------- */
.why-ul-columns { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 800px) {
  .why-ul-columns { grid-template-columns: 1.3fr 1fr; }
}
.why-ul-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.why-ul-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: .95rem; }
.why-ul-list li svg { flex-shrink: 0; width: 1.15rem; height: 1.15rem; color: var(--ul-red); margin-top: .15rem; }

.find-out-more h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.find-out-more__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.find-out-more__list a {
  display: flex; align-items: center; gap: .85rem; padding: .85rem 1.1rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--wedge-radius-sm);
  color: var(--color-heading); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.find-out-more__list a:hover { border-color: var(--ul-red); color: var(--ul-red-800); }
.find-out-more__list svg { flex-shrink: 0; width: 1.5rem; height: 1.5rem; color: var(--ul-red); }

/* ---------- logo strip (certification/partner logos in a row) ---------- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem 2.5rem; }
.logo-strip img { max-height: 56px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .15s var(--ease), opacity .15s var(--ease); }
.logo-strip img:hover { filter: grayscale(0); opacity: 1; }

/* ---------- stat strip (a few large-number highlights in a row) ---------- */
.stat-strip { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stat-strip__number { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--ul-red); line-height: 1; }
.stat-strip__label { margin-top: .5rem; font-size: .88rem; color: var(--ul-warm-gray); }

/* ---------- benefit grid (short heading + one-line description cards) ---------- */
.benefit-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.benefit-grid__item { padding: 1.25rem 1.4rem; background: #fff; border-left: 3px solid var(--ul-red); border-radius: 2px 8px 8px 2px; }
.benefit-grid__item h3 { font-size: .92rem; letter-spacing: .04em; margin-bottom: .5rem; }
.benefit-grid__item p { font-size: .88rem; color: var(--ul-warm-gray); }
.benefit-grid__icon { color: var(--ul-red); margin-bottom: .75rem; }
.benefit-grid__icon svg { width: 1.9rem; height: 1.9rem; }

/* ---------- spec tags (short pill callouts under a card excerpt, e.g. a
   quick temperature range or cure-time stat) ---------- */
.spec-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.spec-tag { display: inline-block; padding: .25rem .55rem; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: 4px; font-family: monospace; font-size: .72rem; color: var(--ul-warm-gray); }

/* ---------- benefit list (bulleted items, from short labels to wrapped
   multi-line paragraphs — li stays a plain block with a hanging indent so a
   <strong> lead-in and its trailing text still flow as one paragraph instead
   of splitting into separate flex columns once it wraps) ---------- */
.benefit-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; list-style: none; }
.benefit-list li { position: relative; padding-left: 1.15rem; font-size: .95rem; line-height: 1.6; }
.benefit-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--ul-red); border-radius: 50%; }

/* ---------- portfolio archive (filter buttons + card grid) ---------- */
.portfolio-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.portfolio-filters__btn {
  font-family: var(--font-display); font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; color: var(--color-text);
  cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.portfolio-filters__btn:hover { border-color: var(--ul-red); color: var(--ul-red-800); }
.portfolio-filters__btn.is-active { background: var(--ul-red); border-color: var(--ul-red); color: #fff; }

/* Fixed column counts (not auto-fit) so a filtered-down result — e.g. the
   single Case Study post — stays card-sized instead of stretching to fill
   the row. */
.portfolio-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .portfolio-grid { grid-template-columns: repeat(4, 1fr); } }
.portfolio-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--wedge-radius); overflow: hidden;
  box-shadow: 0 10px 24px rgba(22,21,21,.12); text-decoration: none; color: inherit;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.portfolio-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(22,21,21,.18); }
.portfolio-card[hidden] { display: none; }
.portfolio-card__media { aspect-ratio: 4 / 3; background: var(--color-surface-alt); overflow: hidden; }
.portfolio-card__media img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.portfolio-card__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.portfolio-tag {
  display: inline-block; font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ul-red-800); background: var(--color-surface-alt); padding: .25rem .6rem; border-radius: 999px;
}
.portfolio-card__title { font-size: 1.02rem; }
.portfolio-card__excerpt { font-size: .88rem; color: var(--ul-warm-gray); }
.portfolio-empty { color: var(--ul-warm-gray); text-align: center; padding: 2rem 0; }

/* ---------- chemistry capabilities card-grid (contract manufacturing —
   3 system-blend cards on top with an icon "advantages" row, 2 compact
   cards below: a plain list and an A-Side/B-Side split) ---------- */
.chem-grid { display: grid; gap: 1.5rem; }
.chem-grid__row { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .chem-grid__row--top { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .chem-grid__row--bottom { grid-template-columns: repeat(2, 1fr); } }
.chem-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--wedge-radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.chem-card__header {
  background: var(--ul-red); color: #fff; font-family: var(--font-display); font-weight: 700;
  letter-spacing: .03em; font-size: .95rem; padding: .9rem 1.25rem;
}
.chem-card__body { padding: 1.25rem 1.25rem 0; flex: 1; }
.chem-card--compact .chem-card__body { padding-bottom: 1.25rem; }
.chem-card__body ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.chem-card__body li { position: relative; padding-left: 1.1rem; font-size: .9rem; line-height: 1.5; }
.chem-card__body li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; background: var(--ul-red); border-radius: 50%; }
.chem-card__advantages {
  display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: 1.1rem 1.25rem 1.25rem;
  margin-top: 1rem; border-top: 1px solid var(--color-border);
}
.chem-adv { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ul-warm-gray); font-weight: 600; }
.chem-adv svg { width: 16px; height: 16px; color: var(--ul-red); flex-shrink: 0; }
.chem-card__split { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--color-border); flex: 1; }
@media (min-width: 480px) { .chem-card__split { grid-template-columns: 1fr 1fr; } }
.chem-pane { background: #fff; padding: 1.25rem; }
.chem-pane__title { display: block; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ul-red); margin-bottom: .4rem; }
.chem-pane p { font-size: .88rem; color: var(--ul-warm-gray); margin: 0; }

/* ---------- solution index cards (two-column, image zoom + red title on hover) ---------- */
.solution-grid { display: grid; gap: 3.5rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .solution-grid { grid-template-columns: 1fr 1fr; } }
.solution-card { display: block; text-decoration: none; }
.solution-card__media { aspect-ratio: 550 / 300; overflow: hidden; background: var(--color-surface-alt); }
.solution-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease-in; }
.solution-card:hover .solution-card__media img { transform: scale(1.05); }
/* White card overlapping the bottom of the photo, inset from its edges, with a soft shadow to lift it off the page. */
.solution-card__body {
  position: relative; z-index: 1; margin: -60px 20px 0; padding: 15px 20px;
  background: #fff; box-shadow: 0 10px 20px 5px rgba(0,0,0,.1);
}
.solution-card__title { font-size: 1.3rem; color: var(--ul-warm-gray); transition: color .2s ease-in; margin-bottom: .5rem; }
.solution-card:hover .solution-card__title { color: var(--ul-red); }
.solution-card__excerpt { color: var(--ul-warm-gray); font-size: .92rem; }

/* ---------- white-card-on-red module (core repeating pattern) ---------- */
.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: #fff; border-radius: var(--wedge-radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(22,21,21,.06);
}
.card__media { aspect-ratio: 4 / 3; background: var(--color-surface-alt); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; flex: 1; }
.card__title { font-size: 1.05rem; letter-spacing: 0.06em; }

/* post cards (/updates/ archive) — same elevated drop shadow as the
   portfolio cards, so the two card grids share a look and feel */
.post-card {
  box-shadow: 0 10px 24px rgba(22,21,21,.12);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(22,21,21,.18); }
.post-card[hidden] { display: none; }
.card__text { color: var(--ul-warm-gray); font-size: 0.92rem; }

/* news/updates archive filter bar + category tags — same mechanism as the
   portfolio filters (.portfolio-filters__btn), duplicated with its own
   prefix since it filters a different content type. */
.news-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.news-filters__btn {
  font-family: var(--font-display); font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; color: var(--color-text);
  cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.news-filters__btn:hover { border-color: var(--ul-red); color: var(--ul-red-800); }
.news-filters__btn.is-active { background: var(--ul-red); border-color: var(--ul-red); color: #fff; }
.news-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.news-tag {
  display: inline-block; font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ul-red-800); background: var(--color-surface-alt); padding: .25rem .6rem; border-radius: 999px;
}
.news-empty { color: var(--ul-warm-gray); text-align: center; padding: 2rem 0; }

/* Fixed column counts on the filterable news grid specifically (not the
   shared .card-grid used elsewhere), so a filtered-down result — e.g. the
   single Case Study post — stays card-sized instead of stretching. */
.news-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- post older/newer navigation (blog post detail pages) ---------- */
.post-pagination { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
@media (min-width: 640px) { .post-pagination { grid-template-columns: 1fr 1fr; } }
.post-pagination__link {
  display: flex; flex-direction: column; gap: .35rem; text-decoration: none;
  padding: 1rem 1.25rem; border: 1px solid var(--color-border); border-radius: var(--wedge-radius-sm);
  transition: border-color .15s var(--ease);
}
.post-pagination__link:hover { border-color: var(--ul-red); }
.post-pagination__link--next { grid-column: 1; text-align: left; align-items: flex-start; }
@media (min-width: 640px) { .post-pagination__link--next { grid-column: 2; text-align: right; align-items: flex-end; } }
.post-pagination__label { font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ul-red-800); }
.post-pagination__title { font-size: .92rem; color: var(--color-heading); }

/* card used as a plain clickable lightbox trigger (gallery grids) */
.card.lightbox-trigger {
  width: 100%; padding: 0; border: 0; font: inherit; text-align: left; cursor: zoom-in;
  transition: transform .15s var(--ease);
}
.card.lightbox-trigger:hover { transform: translateY(-2px); }

/* ---------- lightbox (dependency-free image viewer for gallery grids —
   any [data-lightbox-gallery] wrapping [data-lightbox-src] triggers) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, .92); padding: 2.5rem;
}
.lightbox[hidden] { display: none !important; }
.lightbox__stage { max-width: 90vw; max-height: 85vh; }
.lightbox__img { display: block; max-width: 90vw; max-height: 85vh; width: auto; height: auto; margin-inline: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox__prev, .lightbox__next { width: 36px; height: 36px; font-size: 1.3rem; }
}

/* ---------- info cards (industries / solutions grids) ---------- */
.info-card {
  background: #fff; border: 1px solid var(--color-border); border-left: 3px solid var(--ul-red);
  border-radius: 2px 14px 14px 2px; padding: 1.25rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.info-card h3 { font-size: 0.92rem; letter-spacing: 0.07em; }
.info-card p { font-size: 0.92rem; color: var(--ul-warm-gray); }

/* ---------- certification strip ---------- */

/* ---------- forms ---------- */
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-field label { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ul-warm-gray); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; padding: 0.75rem 0.9rem; border: 1px solid var(--color-border);
  border-radius: 4px; background: var(--color-surface-alt); color: var(--color-text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--ul-red); outline-offset: 1px; background: #fff; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-status { margin-top: 1rem; font-size: 0.92rem; font-weight: 600; }
.form-status[data-state="success"] { color: var(--ul-good); }
.form-status[data-state="error"] { color: var(--ul-bad); }

/* ---------- multi-step form (e.g. tour request) ---------- */
.form-steps { display: flex; align-items: center; max-width: 420px; margin-bottom: 2rem; }
.form-steps__step {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--color-border);
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--ul-steel);
  background: #fff; transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.form-steps__step.is-active { border-color: var(--ul-red); color: var(--ul-red-800); }
.form-steps__step.is-done { background: var(--ul-red); border-color: var(--ul-red); color: #fff; }
.form-steps__line { flex: 1; height: 2px; background: var(--color-border); margin-inline: 0.35rem; }
.form-steps__line.is-done { background: var(--ul-red); }
.form-step__legend { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ul-warm-gray); margin-bottom: 1rem; }
.form-radio-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.1rem; }
.form-radio-row label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; }
.form-radio-row input[type="radio"] { width: auto; }
.form-step-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; }

/* ---------- footer: certification/partner logo marquee ---------- */
.logo-marquee { background: #fff; overflow: hidden; padding-block: 2rem; }
.logo-marquee__track {
  display: flex; align-items: center; gap: 3.5rem; width: max-content;
  animation: logo-marquee 28s linear infinite;
}
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }
.logo-marquee img { height: 56px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: .8; }
@keyframes logo-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- footer ---------- */
/* Band 1 — pure black CTA strip: "Contact Us / Get Our Free Consultation" + phone/hours/address */
.footer-cta { background: #000; color: #fff; padding-block: 2.5rem; }
.footer-cta h3 { color: #fff; }
.footer-cta__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 760px) { .footer-cta__grid { grid-template-columns: 1fr; } }
.footer-cta__icon { color: var(--ul-red); margin-bottom: .75rem; }
.footer-cta__item p { color: #B3ABAB; font-size: .92rem; margin-top: .25rem; }
.footer-cta__lead {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: #fff; text-decoration: none; letter-spacing: .01em;
}
a.footer-cta__lead:hover { color: var(--ul-red-400); }

/* Band 3 — ink main footer: logo, blurb, Quick Link / Services / Follow us */
.site-footer { background: var(--ul-ink); color: #A9A2A2; padding-block: 3rem; }
/* footer-logo.png is the dark-ground variant of the mark — red "UL" plus the
   "ULTIMATE LININGS" wordmark rendered in white, meant to sit on --ul-ink. */
.site-footer img.footer-logo { width: 150px; height: auto; margin-bottom: 1.4rem; }
.site-footer h4 { color: #F5F2F2; }
/* Explicit 4 columns: brand (logo + blurb) / Quick Link / Services / Follow Us */
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col-brand { grid-column: span 1; }
.footer-col-brand p { font-size: .9rem; line-height: 1.6; }
.footer-grid a { color: #A9A2A2; text-decoration: none; display: block; padding: 0.3rem 0; font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-social { display: flex; gap: .75rem; margin-top: .3rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: var(--ul-red); border-radius: 50%; color: #fff; text-decoration: none;
}
.footer-social a:hover { background: var(--ul-red-800); }

/* ---------- MX landing page footer (deliberately its own thing, not the
   full sitewide sitemap footer — these pages have no site header either) ---------- */
.mx-footer { background: var(--ul-ink); color: #A9A2A2; padding-block: 2.5rem; }
.mx-footer h4 { color: #F5F2F2; margin-bottom: .75rem; }
.mx-footer p { font-size: .88rem; line-height: 1.6; }
.mx-footer a { color: #A9A2A2; }
.mx-footer a:hover { color: #fff; }
.mx-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.mx-footer__grid a { display: block; padding: .2rem 0; }

/* Band 4 — pure black copyright/legal strip */
.footer-legal-band { background: #000; padding-block: 1.25rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.82rem; color: #867E7E; align-items: center; }
.footer-legal a { color: #867E7E; text-decoration: none; }
.footer-legal a:hover { color: #fff; }

/* ---------- breadcrumbs ---------- */
.breadcrumb-band { background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
.breadcrumbs { font-size: 0.78rem; color: var(--ul-steel); padding-block: 0.9rem; margin-block: 0; }
.breadcrumbs a { color: var(--ul-steel); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ul-red-800); }

/* ---------- CTA card trio (e.g. "What is polyurea? / Portfolio / vs Traditional") ----------
   White card on red: photo on top, white box with title + button below, drop shadow to pop. */
.cta-trio { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cta-trio__card {
  background: #fff; border-radius: var(--wedge-radius); overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.cta-trio__card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,.34); }
.cta-trio__media { aspect-ratio: 4 / 3; background: var(--color-surface-alt); }
.cta-trio__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-trio__body { padding: 1.5rem 1.5rem 1.75rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cta-trio__card .cta-trio__title { font-size: 1.05rem; letter-spacing: .02em; color: var(--color-heading); }

/* ---------- chatbot launcher wrapper (Professor Poly) ---------- */
#pp-launcher { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; width: 300px; max-width: calc(100vw - 2.5rem); }
.open-chatbot {
  display: inline-flex; align-items: center; gap: 0.5rem; background: var(--ul-red); color: #fff;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.8rem 1.1rem; border-radius: 999px; border: 0; cursor: pointer; box-shadow: 0 8px 20px rgba(228,5,35,.35);
}

/* ---------- Professor Poly launcher panel + collapsed pill ---------- */
#pp-panel { transition: opacity .2s var(--ease), transform .2s var(--ease); }
#pp-panel.pp-hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.pp-panel__photo-row { display: flex; justify-content: flex-end; margin-bottom: -1px; }
.pp-panel__photo { width: 110px; height: 110px; object-fit: contain; border-radius: 12px 12px 0 0; display: block; }
.pp-panel__body { background: var(--ul-red); border-radius: 16px 4px 16px 16px; padding: 1.25rem 1.25rem 1.25rem; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.pp-panel__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.875rem; gap: 0.75rem; }
.pp-panel__greeting { color: #fff; font-size: 1.05rem; font-weight: 500; margin: 0 0 4px; }
.pp-panel__desc { color: rgba(255,255,255,.85); font-size: 0.78rem; margin: 0; line-height: 1.5; }
.pp-panel__close { background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pp-panel__close svg { display: block; }
.pp-panel__chat-btn {
  width: 100%; background: #fff; border: none; border-radius: 10px; padding: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.pp-panel__chat-btn span { color: var(--ul-red); font-size: 0.9rem; font-weight: 500; font-family: var(--font-display); }
.pp-panel__powered-by { color: #fff; font-size: 0.68rem; text-align: center; margin: 0.875rem 0 0; }

#pp-pill {
  display: none; align-items: center; gap: 0.625rem; background: var(--ul-red); border-radius: 50px;
  padding: 0.625rem 1.25rem 0.625rem 0.625rem; cursor: pointer; border: none; box-shadow: 0 8px 20px rgba(228,5,35,.35);
}
#pp-pill.pp-visible { display: inline-flex; }
#pp-launcher.pp-launcher--hidden { display: none; }

/* Chatbase's own default round launcher bubble duplicates our custom
   Professor Poly widget above (which is the only intended chat CTA).
   #chatbase-bubble-button is Chatbase's own stable id for just the
   launcher button (confirmed via its rendered DOM) — the actual chat
   window it controls is a separate element (#chatbase-bubble-window),
   so hiding this never affects the opened conversation. */
#chatbase-bubble-button { display: none !important; }

/* Chatbase's own "proactive message" popup (e.g. "Ask me about
   Polyurea!") — duplicates the greeting already built into our custom
   Professor Poly panel, so it's suppressed the same way. */
#chatbase-message-bubbles { display: none !important; }
.pp-pill__photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #fff; }
.pp-pill__label { color: #fff; font-size: 0.9rem; font-weight: 500; font-family: var(--font-display); }
#pp-launcher button:hover { opacity: 0.9; }

/* ---------- cookie consent banner ---------- */
.cookie-consent {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90; padding: 1rem;
  display: flex; justify-content: center; pointer-events: none;
}
.cookie-consent__panel {
  background: #fff; border-radius: var(--wedge-radius); box-shadow: 0 -8px 30px rgba(0,0,0,.22);
  padding: 1.25rem 1.5rem; max-width: 760px; width: 100%; pointer-events: auto;
}
.cookie-consent__title { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.4rem; }
.cookie-consent__text { font-size: 0.85rem; color: var(--ul-warm-gray); margin: 0; line-height: 1.5; }
.cookie-consent__text a { color: var(--ul-red-800); }
.cookie-consent__categories { display: grid; gap: 0.6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.cookie-consent__category { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; color: var(--ul-warm-gray); }
.cookie-consent__category input { margin-top: 0.2rem; width: auto; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.cookie-consent__actions .btn { font-size: 0.78rem; padding: 0.6rem 1rem; }
