/* Final cross-page refinement layer. Keep this small and theme-token based. */
:root {
  --refresh-radius: 28px;
  --refresh-pill-radius: 999px;
  --refresh-ease: cubic-bezier(.22, .8, .24, 1);
  --refresh-shadow: 0 18px 50px color-mix(in srgb, var(--ink) 7%, transparent);
}

html { scroll-padding-top: 96px; }
body { min-width: 320px; overflow-x: clip; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--copper) 6%, transparent), transparent 28rem), radial-gradient(circle at 92% 64%, color-mix(in srgb, var(--olive) 5%, transparent), transparent 30rem);
}

.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 80; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; width: 0; height: 100%; background: var(--copper); transition: width .12s linear; }

.site-header { padding-block: 9px; transition: background-color .35s var(--refresh-ease), padding .35s var(--refresh-ease), border-color .35s var(--refresh-ease); }
.site-header .header-container { border: 1px solid color-mix(in srgb, var(--line) 88%, transparent); border-radius: var(--refresh-radius); box-shadow: 0 10px 28px color-mix(in srgb, var(--paper) 22%, transparent); }
.site-header.is-scrolled { padding-block: 6px; }
.site-header.is-scrolled .header-container { box-shadow: 0 14px 34px color-mix(in srgb, var(--paper) 38%, transparent); }
.desktop-nav .nav-link { letter-spacing: .08em; text-transform: uppercase; }
.desktop-nav .nav-link,
.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.is-active,
.desktop-nav .nav-link.text-reveal-delay-1.is-visible { border-radius: var(--refresh-pill-radius); }
.desktop-nav .nav-link::after { height: 1px; }
.brand img { transition: transform .35s var(--refresh-ease); }
.brand:hover img, .brand:focus-visible img { transform: rotate(-3deg) scale(1.04); }

.icon-button { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 50%; transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease; }
.icon-button:hover, .icon-button:focus-visible { border-color: var(--line); background: color-mix(in srgb, var(--copper) 9%, transparent); transform: translateY(-1px); }

.page-hero:not(.home-hero) { min-height: clamp(510px, 58svh, 650px); isolation: isolate; }
.page-hero:not(.home-hero) .shell { position: relative; z-index: 1; }
.page-hero:not(.home-hero) h1 { text-wrap: balance; }
.page-hero:not(.home-hero) .page-hero-copy { max-width: 42ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 1px; background: currentColor; opacity: .75; }

.button { min-height: 52px; border-radius: var(--refresh-pill-radius); font-weight: 600; transition: transform .28s var(--refresh-ease), background-color .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease; }
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] { border-radius: var(--refresh-pill-radius); }
.search-field,
.search-page-form { border-radius: var(--refresh-pill-radius); }
.button:hover, .button:focus-visible { box-shadow: 0 12px 26px color-mix(in srgb, var(--copper) 15%, transparent); }
.button:active { transform: translateY(1px) scale(.99); }
.site-body h2[data-half-accent-ready] > span[aria-hidden="true"] { color: inherit; }
.site-body h2[data-half-accent-ready] > span[aria-hidden="true"] > .h2-accent { color: var(--copper) !important; }
.section-heading { align-items: start; padding-bottom: 20px; border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); }
.section-heading .heading-copy { padding-top: 15px; }

.home-product-grid, .product-grid-wide { container-type: inline-size; }
.home-product-card, .products-page .products-card, .related-card, .news-card, .certificate-card, .contact-panel { border-radius: var(--refresh-radius); transition: transform .38s var(--refresh-ease), border-color .3s ease, box-shadow .38s var(--refresh-ease), background-color .3s ease; }
.home-product-card:hover, .home-product-card:focus-within, .products-page .products-card:hover, .products-page .products-card:focus-within, .related-card:hover, .related-card:focus-visible, .news-card:hover, .news-card:focus-within, .certificate-card:hover, .certificate-card:focus-within { transform: translateY(-5px); box-shadow: var(--refresh-shadow); }
.home-product-image, .product-image, .detail-gallery a, .news-card-image, .related-card > img { background: color-mix(in srgb, var(--paper-2) 82%, var(--copper) 2%); }
.home-product-image img, .product-image img, .detail-gallery img, .related-card img, .news-card img { transition: transform .55s var(--refresh-ease), filter .35s ease; }
.home-product-card:hover img, .home-product-card:focus-within img, .products-page .products-card:hover img, .products-page .products-card:focus-within img, .related-card:hover img, .news-card:hover img { transform: scale(1.035); }
.home-product-body p, .product-card-body > p:not(.eyebrow), .news-card-excerpt { max-width: 38ch; line-height: 1.7; }
.text-link { font-weight: 650; letter-spacing: .02em; }
.home-process-image, .home-story-image, .quality-lab-media, .editorial-image, .detail-hero-image { box-shadow: var(--refresh-shadow); }

/* Certificate documents need a quiet lift so the page reads as a proof
 * library, not a stack of floating cards. Keep the interactive hover state,
 * but avoid the heavier dark-theme shadows inherited from older palette rules. */
.certificates-page .editorial-image,
.page-certificates .quality-certificates-section .quality-certificate-preview {
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 11%, transparent);
}

.page-certificates .quality-certificates-section .quality-certificate-preview:hover,
.page-certificates .quality-certificates-section .quality-certificate-preview:focus-within {
  box-shadow: 0 12px 30px color-mix(in srgb, var(--copper) 15%, transparent);
}

html:not([data-theme="light"]) .certificates-page .editorial-image,
html:not([data-theme="light"]) .page-certificates .quality-certificates-section .quality-certificate-preview {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

html:not([data-theme="light"]) .page-certificates .quality-certificates-section .quality-certificate-preview:hover,
html:not([data-theme="light"]) .page-certificates .quality-certificates-section .quality-certificate-preview:focus-within {
  box-shadow: 0 12px 30px color-mix(in srgb, var(--copper) 16%, transparent);
}

.search-field:focus-within, .search-page-form:focus-within { border-color: var(--copper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 17%, transparent); }
.inquiry-form input, .inquiry-form textarea { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: 0; border-color: var(--copper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 17%, transparent); }
.footer-grid { row-gap: 58px; }
.footer-inquiry-link { justify-content: space-between; gap: 16px; max-width: 340px; }
.footer-grid > div:not(:first-child) a { position: relative; width: fit-content; }
.footer-grid > div:not(:first-child) a::after { content: ""; position: absolute; inset: auto 0 -3px; height: 1px; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--refresh-ease); }
.footer-grid > div:not(:first-child) a:hover::after, .footer-grid > div:not(:first-child) a:focus-visible::after { transform: scaleX(1); }
.mobile-bottom-nav { border-radius: var(--refresh-radius); box-shadow: 0 16px 40px color-mix(in srgb, var(--paper) 45%, transparent); }
.mobile-bottom-nav__link { min-height: 58px; }
.mobile-bottom-nav__link.is-active { color: var(--copper); }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
.no-js .reveal { opacity: 1 !important; transform: none !important; }
html.no-js, html.no-js body { height: auto !important; overflow: auto !important; }
html.no-js .site-preloader { display: none !important; }
.home-hero-capabilities .capability-item h2 { font-size: clamp(.82rem, 1.35vw, 1.05rem); line-height: 1.12; }
.home-hero-capabilities .capability-item p { font-size: clamp(.72rem, .95vw, .86rem); line-height: 1.4; }
:where([id]) { scroll-margin-top: 104px; }

@container (max-width: 700px) {
  .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-product-card.is-featured { grid-column: span 2; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 80px; }
  .site-header { padding-block: 7px; }
  .section-heading { gap: 20px; }
  .section-heading .heading-copy { padding-top: 0; }
  .home-hero-capabilities .capability-item h2 { font-size: clamp(.75rem, 2.1vw, .92rem) !important; }
  .home-hero-capabilities .capability-item p { font-size: clamp(.68rem, 1.55vw, .78rem) !important; }
}

@media (max-width: 560px) {
  .eyebrow::before { width: 16px; }
  .button { min-height: 50px; }
  .section-heading { padding-bottom: 14px; }
  .home-product-grid { gap: 12px; }
  .home-product-card.is-featured { grid-column: span 2; }
  .home-hero-capabilities .capability-item h2 { font-size: .76rem !important; }
  .home-hero-capabilities .capability-item p { font-size: .68rem !important; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .scroll-progress span { transition: none; }
}
