html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.footer-expert__words-h2,
.title-rich h2,
.accordion-css__item-h3 {
  text-wrap: balance;
}

p,
li,
blockquote,
figcaption,
.p-xs,
.p-s,
.p-l,
.polaroid__p,
.quote-card__p,
.footer-info__p,
.compare__p,
.timeline-year__year-span,
.eyebrow__p {
  text-wrap: pretty;
}

.case__stat-number,
.card-results__result .h5,
.timeline-year__year-span,
[data-current-year],
.footer-info__p.is--copyright {
  font-variant-numeric: tabular-nums;
}

.cover-image,
.logo__img,
.team-card-bold__img,
.transition-logo,
.eyebrow__img {
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.btn,
.social-link,
.card-results,
.team-card-bold,
.footer-expert__link,
.form-submit-btn,
.modal__btn-close {
  transition-property: transform, opacity, box-shadow, background-color, color, border-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.btn:active,
.social-link:active,
.card-results:active,
.team-card-bold:active,
.footer-expert__link:active,
.form-submit-btn:active,
.modal__btn-close:active {
  transform: scale(0.96);
}

.card-results,
.quote-card,
.marquee-logo,
.case__stat,
.compare__item,
.footer-info__tile,
.team-card-bold,
.growing-tile {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 1px 2px -1px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-results__start,
.quote-card__bottom,
.footer-info__row-bottom,
.footer-info__single-contact-text,
.footer-info__single-sitemap-links {
  min-width: 0;
}

html[data-wf-item-slug="ecc-boardroom-furnishing"],
html[data-wf-item-slug="ecc-boardroom-furnishing"] body {
  overflow-x: clip;
}

html[data-wf-item-slug="ecc-boardroom-furnishing"] main :is(img, video) {
  display: block;
  max-width: 100%;
  height: auto;
}

html[data-wf-item-slug="ecc-boardroom-furnishing"] main video {
  width: 100%;
  object-fit: cover;
}

html[data-wf-item-slug="ecc-boardroom-furnishing"] main :is(
  [class*="media"],
  [class*="image"],
  [class*="video"],
  [class*="gallery"],
  [class*="slider"],
  [class*="card"],
  [class*="content"],
  .w-richtext,
  figure
) {
  max-width: 100%;
  min-width: 0;
}

html[data-wf-item-slug="ecc-boardroom-furnishing"] main :is(
  [class*="media"],
  [class*="image"],
  [class*="video"],
  [class*="gallery"],
  [class*="slider"],
  figure
) {
  overflow: hidden;
}

html[data-wf-collection],
html[data-wf-collection] body {
  overflow-x: clip;
}

html[data-wf-collection] main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

html[data-wf-collection] main :is(img, video, iframe) {
  max-width: 100%;
}

html[data-wf-collection] main :is(
  [class*="media"],
  [class*="image"],
  [class*="video"],
  [class*="gallery"],
  [class*="slider"],
  [class*="content"],
  .w-richtext,
  figure
) {
  min-width: 0;
  max-width: 100%;
}

@media (prefers-color-scheme: dark) {
  .cover-image,
  .logo__img,
  .team-card-bold__img,
  .transition-logo,
  .eyebrow__img {
    outline-color: rgba(255, 255, 255, 0.1);
  }

  .card-results,
  .quote-card,
  .marquee-logo,
  .case__stat,
  .compare__item,
  .footer-info__tile,
  .team-card-bold,
  .growing-tile {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* Enhanced Global Grain Effect (Framer-inspired) */
body .screen-grain,
body::before {
  content: "";
  position: fixed;
  inset: -100% !important;
  width: 300% !important;
  height: 300% !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  opacity: 0.045 !important;
  mix-blend-mode: overlay !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E") !important;
  background-repeat: repeat !important;
  animation: grain-shift 0.8s steps(4) infinite !important;
  display: block !important;
  visibility: visible !important;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1%, 0.5%); }
  50% { transform: translate(0.5%, -1%); }
  75% { transform: translate(-0.5%, -0.5%); }
  100% { transform: translate(0, 0); }
}

/* Ensure grain doesn't hide content in high-contrast modes */
@media (prefers-contrast: more) {
  .screen-grain,
  body::before {
    opacity: 0.02;
  }
}
