:root {
  color-scheme: light;
  --ink: #171819;
  --muted: #5e656b;
  --paper: #f5f4ef;
  --panel: #ffffff;
  --line: rgba(23, 24, 25, 0.12);
  --graphite: #101214;
  --rose: #15803d;
  --red-glow: #86efac;
  --teal: #15803d;
  --teal-light: #86efac;
  --blue: #4267d6;
  --yellow: #f3bd3f;
  --shadow: 0 26px 70px rgba(16, 18, 20, 0.16);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

body::selection {
  color: #fff;
  background: var(--rose);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.scroll-meter {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--rose), var(--yellow));
  transform-origin: left;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: auto;
  padding: clamp(28px, 4vw, 52px) clamp(20px, 5vw, 72px) clamp(34px, 5vw, 60px);
  color: #fff;
  background: #090a0b;
  isolation: isolate;
}

.hero::before,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero::before {
  content: "";
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.18), transparent 38%),
    linear-gradient(315deg, rgba(21, 128, 61, 0.18), transparent 44%),
    linear-gradient(rgba(21, 128, 61, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(134, 239, 172, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #070809 0%, #171b1d 48%, #090a0b 100%);
  background-size: auto, auto, 68px 68px, 68px 68px, auto;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.92), rgba(8, 9, 10, 0.58) 45%, rgba(8, 9, 10, 0.18)),
    linear-gradient(0deg, rgba(8, 9, 10, 0.76), rgba(8, 9, 10, 0.06) 58%);
}

.hero-content {
  width: 100%;
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.panel-kicker,
.certificate-copy span {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.panel-kicker {
  color: var(--teal-light);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: clamp(3.15rem, 8vw, 7.3rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-byline {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.4;
}

.featured-showcase {
  justify-self: end;
  width: min(100%, 780px);
  color: #fff;
  filter: drop-shadow(0 42px 54px rgba(0, 0, 0, 0.45));
  transform: perspective(1200px) rotateX(calc((var(--tilt-y, 0) * -1deg))) rotateY(calc(var(--tilt-x, 0) * 1deg));
  transition: transform 180ms ease;
}

.featured-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(10px, 1.6vw, 16px);
}

.featured-toolbar h2 {
  max-width: 520px;
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.7vw, 1.45rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.featured-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  color: #fff;
  background: rgba(10, 10, 10, 0.52);
  font-size: 1.25rem;
  font-weight: 820;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: #fff;
  background: rgba(10, 10, 10, 0.82);
  transform: translateY(-2px);
}

.icon-button:focus-visible,
.featured-frame:focus-visible,
.filter-button:focus-visible,
.card-actions button:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.72);
  outline-offset: 3px;
}

.featured-frame {
  position: relative;
  display: grid;
  min-height: clamp(280px, 40vw, 520px);
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.22), transparent 34%),
    linear-gradient(315deg, rgba(21, 128, 61, 0.2), transparent 38%),
    #151719;
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.34);
}

.featured-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.68), transparent 82%);
  pointer-events: none;
}

.featured-frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(91%, 680px);
  max-height: clamp(240px, 36vw, 460px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.38);
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 720;
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(72px, 9vw, 118px) 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}

.section-copy h2,
.collection-heading h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-copy p:not(.section-kicker) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.stats-panel div {
  min-height: 170px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--panel);
  transition: transform 220ms ease, background 220ms ease;
}

.stats-panel div:hover {
  background: #fbfbf8;
  transform: translateY(-3px);
}

.stats-panel span {
  display: block;
  min-height: 1em;
  margin-bottom: 34px;
  font-size: clamp(1.75rem, 4vw, 3.55rem);
  font-weight: 820;
  line-height: 0.94;
}

.stats-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
  text-transform: uppercase;
}

.materials-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.materials-panel p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.5;
}

.materials-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  line-height: 1.55;
}

.sticky-copy {
  position: sticky;
  top: 88px;
}

.collection-section {
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(72px, 9vw, 118px) 0;
}

.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vw, 58px);
}

.collection-heading .section-copy {
  max-width: 720px;
}

.collection-heading h2 {
  margin-bottom: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 780;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: rgba(21, 128, 61, 0.5);
  background: #fff;
  transform: translateY(-2px);
}

.filter-button.is-active {
  color: #fff;
  background: var(--graphite);
}

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

.certificate-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(16, 18, 20, 0.06);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, opacity 180ms ease;
}

.certificate-card:hover,
.certificate-card.is-selected {
  border-color: rgba(21, 128, 61, 0.48);
  box-shadow: 0 26px 70px rgba(16, 18, 20, 0.12);
  transform: translateY(-5px);
}

.certificate-card.is-hidden {
  display: none;
}

.certificate-image {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 24, 25, 0.08);
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(21, 128, 61, 0.14), transparent 38%),
    #f0f1ed;
}

.certificate-image img {
  display: block;
  width: 92%;
  max-height: 86%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 14px 30px rgba(16, 18, 20, 0.12);
}

.certificate-copy {
  padding: 20px 20px 14px;
}

.certificate-copy span {
  display: block;
  margin-bottom: 14px;
  color: var(--teal);
}

.certificate-copy h3 {
  margin-bottom: 14px;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.certificate-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.certificate-copy p + p {
  margin-top: 6px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(23, 24, 25, 0.08);
}

.card-actions button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font-size: 0.84rem;
  font-weight: 780;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease;
}

.card-actions button:hover {
  color: #fff;
  background: var(--graphite);
}

body.is-preview-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.5vw, 28px);
}

.preview-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(5, 7, 8, 0.78);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  color: #fff;
  background: #101214;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
}

.modal-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 2.5vw, 24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-toolbar h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.modal-close,
.modal-arrow {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  color: #fff;
  background: rgba(10, 10, 10, 0.58);
  font-weight: 820;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.modal-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.modal-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
  transform: translateY(-50%);
}

.modal-arrow.previous {
  left: 16px;
}

.modal-arrow.next {
  right: 16px;
}

.modal-close:hover,
.modal-close:focus-visible,
.modal-arrow:hover,
.modal-arrow:focus-visible {
  border-color: #fff;
  background: rgba(10, 10, 10, 0.86);
}

.modal-close:focus-visible,
.modal-arrow:focus-visible {
  outline: 3px solid rgba(134, 239, 172, 0.72);
  outline-offset: 3px;
}

.modal-body {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: clamp(18px, 3vw, 34px) clamp(68px, 8vw, 92px);
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.2), transparent 36%),
    linear-gradient(315deg, rgba(21, 128, 61, 0.16), transparent 40%),
    #151719;
}

.modal-body img {
  display: block;
  width: 100%;
  max-width: 980px;
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.36);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 14px clamp(16px, 2.5vw, 24px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 720;
}

.site-footer {
  display: flex;
  width: min(1160px, calc(100% - 32px));
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  font-weight: 760;
}

.site-footer a {
  font-weight: 760;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--ink);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    max-width: 820px;
  }

  .featured-showcase {
    justify-self: center;
    width: min(100%, 760px);
  }

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

@media (max-width: 900px) {
  .hero {
    padding: 32px 20px 44px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .sticky-copy {
    position: static;
  }

  .collection-heading {
    display: grid;
    align-items: start;
  }

  .filter-bar {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 10px 44px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5.3rem);
  }

  .featured-toolbar,
  .featured-meta {
    display: grid;
    justify-content: stretch;
  }

  .featured-controls {
    justify-content: start;
  }

  .featured-frame {
    min-height: 290px;
  }

  .featured-frame img {
    width: 94%;
    max-height: 250px;
  }

  .stats-panel,
  .certificate-grid {
    grid-template-columns: 1fr;
  }

  .stats-panel div {
    min-height: 128px;
  }

  .section,
  .collection-section {
    width: min(100% - 24px, 1240px);
  }

  .preview-modal {
    padding: 10px;
  }

  .modal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-toolbar {
    align-items: start;
    padding: 14px;
  }

  .modal-close {
    width: 40px;
    height: 40px;
  }

  .modal-body {
    padding: 14px 12px 66px;
  }

  .modal-arrow {
    width: 40px;
    height: 40px;
    top: auto;
    bottom: 14px;
    transform: none;
  }

  .modal-arrow.previous {
    left: calc(50% - 48px);
  }

  .modal-arrow.next {
    right: calc(50% - 48px);
  }

  .modal-body img {
    max-height: 56vh;
  }
}

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

  .featured-showcase {
    transform: none !important;
  }
}
