/* Materials page */
.materials-page {
  --materials-ink: #0b2a1f;
  --materials-muted: #51665d;
  --materials-soft: #f7f3ea;
  --materials-line: rgba(15, 35, 24, .12);
  --materials-card: #ffffff;
  --materials-gold: var(--color-gold-600);
  background: var(--materials-soft);
  color: var(--materials-ink);
  overflow-x: clip;
}

.materials-page .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.materials-page .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.materials-page .reveal-delay-2 { transition-delay: .06s; }
.materials-page .reveal-delay-3 { transition-delay: .12s; }
.materials-page .reveal-delay-4 { transition-delay: .18s; }

.materials-page #hero.materials-hero {
  position: relative;
  height: 600px;
  min-height: 600px;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background: #061b13;
}

.materials-hero__image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(62vw, 1120px);
  min-width: 780px;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: .98;
  filter: saturate(.95) contrast(1.05);
  z-index: -2;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
}

.materials-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 27, 19, .98) 0%, rgba(6, 27, 19, .94) 37%, rgba(6, 27, 19, .68) 61%, rgba(6, 27, 19, .38) 100%),
    linear-gradient(180deg, rgba(2, 11, 7, .16) 0%, rgba(2, 11, 7, .58) 100%);
}

.materials-hero__inner {
  width: 100%;
  max-width: none;
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  padding: calc(var(--site-header-height, 65px) + 58px) clamp(32px, 5vw, 96px) 44px clamp(190px, 10vw, 230px);
}

.materials-hero__content {
  max-width: 680px;
}

.materials-hero .hero-label {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-gold-500);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.materials-hero h1 {
  max-width: 680px;
  margin: 0 0 18px;
  color: #fff;
  font-family: inherit;
  font-size: clamp(2.35rem, 3.15vw, 3.75rem);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: 0;
}

.materials-hero p {
  max-width: 640px;
  margin: 0;
  color: rgba(239, 247, 241, .86);
  font-size: clamp(.98rem, 1.08vw, 1.08rem);
  line-height: 1.62;
  font-weight: 500;
}

.materials-hero__features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 660px;
  margin-top: 30px;
}

.materials-hero__feature {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: rgba(216, 180, 90, .9);
}

.materials-hero__feature + .materials-hero__feature {
  padding-left: 16px;
  border-left: 1px solid rgba(216, 180, 90, .2);
}

.materials-hero__feature-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-500);
}

.materials-hero__feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.materials-hero__feature b {
  display: block;
  margin-bottom: 2px;
  color: var(--color-gold-500);
  font-size: .74rem;
  font-weight: 850;
  line-height: 1.15;
}

.materials-hero__feature span:last-child {
  display: block;
  color: rgba(216, 180, 90, .88);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.25;
}

.materials-anchor-nav {
  display: none;
}

.materials-anchor-nav__inner {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.materials-anchor-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(15, 35, 24, .12);
  border-radius: 999px;
  background: #fff;
  color: #173323;
  font-size: .84rem;
  font-weight: 750;
  white-space: nowrap;
}

.materials-chooser,
.materials-comparison,
.materials-cta {
  padding: clamp(4.25rem, 7vw, 6.8rem) 0;
}

.materials-chooser {
  display: none;
}

.materials-catalog {
  padding: clamp(3.8rem, 6vw, 6rem) 0 clamp(4.5rem, 7vw, 7rem);
  background: #fffdf8;
}

.materials-catalog__layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(1.8rem, 3.4vw, 3.8rem);
  align-items: start;
}

.materials-sidebar-stack {
  position: sticky;
  top: calc(var(--site-header-height, 65px) + 18px);
  display: grid;
  gap: 14px;
}

.materials-sidebar {
  padding: 18px 14px;
  border: 1px solid rgba(15, 35, 24, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 55px rgba(15, 35, 24, .08);
}

.materials-sidebar__nav {
  display: grid;
  gap: 10px;
}

.materials-sidebar__link {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--materials-ink);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.materials-sidebar__link.is-active,
.materials-sidebar__link:hover {
  background: linear-gradient(90deg, #f7efe2 0%, #f8f4ed 100%);
  border-color: rgba(196, 154, 60, .22);
}

.materials-sidebar__link.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--materials-gold);
}

.materials-sidebar__link:hover {
  transform: translateX(2px);
}

.materials-sidebar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #1d2c27;
}

.materials-sidebar__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.materials-sidebar__link.is-active .materials-sidebar__icon {
  color: #6d4c13;
}

.materials-sidebar__text {
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.18;
}

.materials-sidebar-cta {
  padding: 20px 18px 18px;
  border: 1px solid rgba(15, 35, 24, .08);
  border-radius: 8px;
  background: rgba(255, 253, 248, .98);
  box-shadow: 0 16px 45px rgba(15, 35, 24, .07);
}

.materials-sidebar-cta h3 {
  margin: 0 0 10px;
  color: var(--materials-ink);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.18;
}

.materials-sidebar-cta p {
  margin: 0 0 16px;
  color: var(--materials-muted);
  font-size: .86rem;
  line-height: 1.52;
}

.materials-sidebar-cta__button {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  border-radius: 8px;
  background: linear-gradient(135deg, #082f23 0%, #064830 100%);
  color: #fff;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: 0 16px 34px rgba(8, 47, 35, .18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.materials-sidebar-cta__button:hover,
.materials-sidebar-cta__button:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(8, 47, 35, .22);
}

.materials-sidebar-cta__button span:last-child {
  color: var(--materials-gold);
  font-size: 1.18rem;
  line-height: 1;
}

.materials-sidebar-cta__button span:first-child {
  white-space: nowrap;
}

.materials-catalog__content {
  min-width: 0;
}

.materials-catalog .materials-section {
  scroll-margin-top: calc(var(--site-header-height, 65px) + 24px);
  padding: 0 0 clamp(4rem, 6vw, 6.5rem);
}

.material-card h3[id] {
  scroll-margin-top: calc(var(--site-header-height, 65px) + 260px);
}

.material-card[id] {
  scroll-margin-top: calc(var(--site-header-height, 65px) + 18px);
}

.material-card.is-material-target,
.material-card:target,
.material-card:has(h3:target) {
  border-color: #c49a3c;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf4e5 100%);
  box-shadow: 0 0 0 4px rgba(196, 154, 60, .28), 0 22px 52px rgba(8, 47, 35, .18);
  animation: material-target-highlight 1.1s ease-out 1;
}

.material-card.is-material-target::after,
.material-card:target::after,
.material-card:has(h3:target)::after {
  content: "Selected Material";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: .45rem .72rem;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 999px;
  background: #c49a3c;
  box-shadow: 0 8px 20px rgba(8, 47, 35, .18);
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.material-card.is-material-target h3,
.material-card:target h3,
.material-card h3:target {
  color: #9a7018;
}

@keyframes material-target-highlight {
  0% {
    box-shadow: 0 0 0 2px rgba(196, 154, 60, .8), 0 0 0 18px rgba(196, 154, 60, .22), 0 22px 52px rgba(8, 47, 35, .16);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(196, 154, 60, .28), 0 22px 52px rgba(8, 47, 35, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .material-card.is-material-target,
  .material-card:target,
  .material-card:has(h3:target) {
    animation: none;
  }
}

.materials-catalog .materials-section:last-child {
  padding-bottom: 0;
}

.materials-section__head {
  max-width: 1040px;
  margin: 0 auto clamp(2.1rem, 4vw, 3.2rem);
  text-align: center;
}

.materials-section__head h2 {
  margin: 0;
  color: var(--materials-ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
}

.materials-section__head p {
  max-width: 980px;
  margin: 16px auto 0;
  color: var(--materials-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.75;
}

.materials-catalog .materials-section__head {
  max-width: 920px;
  margin: 0 0 24px;
  text-align: left;
}

.materials-catalog .materials-section__head h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
}

.materials-catalog .materials-section__head p {
  max-width: none;
  margin: 12px 0 0;
  text-align: left;
  font-size: 1rem;
  line-height: 1.7;
}

.materials-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.materials-category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--materials-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 35, 24, .07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.materials-category-card span {
  color: var(--materials-ink);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.2;
}

.materials-category-card p {
  margin-top: 16px;
  color: var(--materials-muted);
  font-size: .96rem;
  line-height: 1.58;
}

.materials-category-card::after {
  content: 'View materials';
  margin-top: 18px;
  color: var(--materials-gold);
  font-size: .82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (hover: hover) {
  .materials-category-card:hover,
  .material-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 154, 60, .38);
    box-shadow: 0 24px 60px rgba(15, 35, 24, .12);
  }
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 540px;
  gap: 22px;
  align-items: stretch;
}

.material-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--materials-line);
  border-radius: 8px;
  background: var(--materials-card);
  box-shadow: 0 16px 45px rgba(15, 35, 24, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.material-card__image {
  flex: 0 0 220px;
  height: 220px;
  background: #f3efe5;
  overflow: hidden;
}

.material-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.material-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 22px;
}

.materials-page .material-card h3 {
  min-height: 0;
  margin: 0 0 8px;
  color: var(--materials-ink);
  font-size: 22px !important;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0;
}

.material-card__desc {
  min-height: 0;
  margin: 0;
  color: var(--materials-muted);
  font-size: .94rem;
  line-height: 1.55;
  display: block;
  overflow: visible;
}

.material-card__tags {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 10px;
}

.material-card__tags span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: baseline;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 35, 24, .09);
  border-radius: 8px;
  background: #f8f5ee;
  color: #2f453d;
  font-size: .82rem;
  line-height: 1.4;
}

.material-card__tags span:last-child {
  min-height: 58px;
}

.material-card__tags b {
  color: var(--materials-gold);
  font-size: .68rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.material-card__details {
  margin-top: 14px;
  border-top: 1px solid rgba(15, 35, 24, .1);
  color: var(--materials-muted);
}

.material-card__details summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #173323;
  font-size: .84rem;
  font-weight: 800;
  list-style: none;
}

.material-card__details summary::-webkit-details-marker {
  display: none;
}

.material-card__details summary::after {
  content: '+';
  margin-left: auto;
  color: var(--materials-gold);
  font-size: 1.05rem;
  font-weight: 850;
}

.material-card__details[open] summary::after {
  content: '-';
}

.material-card__details p {
  margin: 0;
  padding: 10px 0 2px;
  color: var(--materials-muted);
  font-size: .86rem;
  line-height: 1.58;
}

.materials-comparison {
  background: #0b2a1f;
}

.materials-comparison .section-label,
.materials-cta .section-label {
  color: var(--color-gold-500);
}

.materials-comparison .materials-section__head h2,
.materials-cta h2 {
  color: #fff;
}

.materials-comparison .materials-section__head p,
.materials-cta p {
  color: rgba(239, 247, 241, .72);
}

.materials-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .24);
}

.materials-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.materials-table th,
.materials-table td {
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  border-right: 1px solid rgba(255, 255, 255, .08);
  color: rgba(239, 247, 241, .8);
  font-size: .92rem;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.materials-table thead th {
  position: sticky;
  top: 0;
  background: rgba(11, 42, 31, .98);
  color: #fff;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.materials-table tbody th {
  color: var(--color-gold-500);
  font-weight: 850;
  white-space: nowrap;
}

.materials-table tbody tr:last-child th,
.materials-table tbody tr:last-child td {
  border-bottom: 0;
}

.materials-cta {
  position: relative;
  background:
    linear-gradient(90deg, rgba(6, 19, 13, .94), rgba(11, 42, 31, .84)),
    url('/assets/images/custom-service/materials-white-paperboard.webp') center / cover;
}

.materials-cta__content {
  max-width: 820px;
}

.materials-cta h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 850;
  line-height: 1.08;
}

.materials-cta p {
  max-width: 780px;
  margin: 18px 0 30px;
  font-size: 1.08rem;
  line-height: 1.74;
}

.materials-cta .btn {
  min-height: 54px;
  border-radius: 8px;
  font-weight: 850;
}

.materials-note {
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid var(--materials-line);
}

.materials-note p {
  max-width: 1160px;
  margin: 0 auto;
  color: var(--materials-muted);
  font-size: .98rem;
  line-height: 1.68;
  text-align: center;
}

@media (max-width: 1180px) {
  .materials-hero__image {
    width: 66vw;
    min-width: 680px;
  }

  .materials-catalog__layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
  }

  .materials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .materials-hero__inner {
    padding: calc(var(--site-header-height, 65px) + 44px) clamp(28px, 6vw, 56px) 36px;
  }

  .materials-hero__image {
    width: 100%;
    min-width: 0;
    opacity: .52;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .materials-hero__overlay {
    background:
      linear-gradient(90deg, rgba(6, 27, 19, .96) 0%, rgba(6, 27, 19, .84) 100%),
      linear-gradient(180deg, rgba(2, 11, 7, .18) 0%, rgba(2, 11, 7, .66) 100%);
  }

  .materials-hero__features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
  }

  .materials-hero__feature + .materials-hero__feature {
    padding-left: 0;
    border-left: 0;
  }

  .materials-anchor-nav {
    position: sticky;
    top: var(--site-header-height, 65px);
    z-index: 20;
    display: block;
    background: rgba(251, 248, 241, .94);
    border-bottom: 1px solid var(--materials-line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .materials-chooser {
    display: block;
  }

  .materials-catalog__layout {
    display: block;
  }

  .materials-sidebar-stack {
    display: none;
  }

  .materials-category-grid,
  .materials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .materials-page #hero.materials-hero {
    min-height: 600px;
  }

  .materials-hero__inner {
    padding: calc(var(--site-header-height, 65px) + 32px) 18px 30px;
  }

  .materials-hero .hero-label {
    min-height: 0;
    margin-bottom: 12px;
    padding: 0;
    font-size: .68rem;
  }

  .materials-hero h1 {
    margin-bottom: 14px;
    font-size: clamp(1.95rem, 8.5vw, 2.35rem);
    line-height: 1.04;
  }

  .materials-hero p {
    font-size: .92rem;
    line-height: 1.54;
  }

  .materials-hero__features {
    gap: 14px 12px;
    margin-top: 22px;
  }

  .materials-hero__feature {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
  }

  .materials-hero__feature-icon {
    width: 24px;
    height: 24px;
  }

  .materials-hero__feature-icon svg {
    width: 21px;
    height: 21px;
  }

  .materials-hero__feature b {
    font-size: .68rem;
  }

  .materials-hero__feature span:last-child {
    font-size: .66rem;
  }

  .materials-anchor-nav__inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .materials-page .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .materials-category-grid,
  .materials-grid {
    grid-template-columns: 1fr;
  }

  .materials-category-card {
    min-height: auto;
  }

  .material-card h3,
  .material-card__desc {
    min-height: auto;
  }
}
