@font-face {
  font-family: 'Work Sans';
  src: url('fonts/Work_Sans/WorkSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Work Sans';
  src: url('fonts/Work_Sans/WorkSans-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: #7C3AED;
  color: #F5F5F4;
  font-size: 1vw;
  font-family: 'Work Sans', sans-serif;
  overscroll-behavior: none;
}

.section-resource {
  width: 100%;
  height: 100svh;
  display: flex;
  position: relative;
  transition: filter 0.3s ease;
}

body.modal-open .section-resource {
  filter: blur(8px);
}

.dots-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.dots-container {
  grid-column-gap: 2em;
  grid-row-gap: 2em;
  pointer-events: none;
  flex-flow: wrap;
  grid-template-rows: auto;
  grid-template-columns: 1fr;
  grid-auto-columns: 1fr;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

.dot {
  will-change: transform, font-weight;
  transform-origin: center;
  color: #2E1065;
  font-size: 1.5em;
  width: calc(1em / 1.5);
  height: calc(1em / 1.5);
  position: relative;
  transform: translate(0);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  font-weight: 300;
}

body.modal-open .dot {
  font-weight: 300 !important;
  transition: font-weight 0.3s ease;
}

.icon-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.site-icon {
  width: 10em;
  display: block;
  transition: filter 0.3s ease;
}

.icon-btn:hover .site-icon {
  filter: blur(6px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-box {
  background: #F5F5F4;
  color: #1C1917;
  max-width: 540px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
}

.modal-title {
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  margin: 0 0 1.25em;
  line-height: 1.2;
  font-feature-settings:
    "kern" 1, "liga" 1, "calt" 1, "dlig" 1, "swsh" 1,
    "cpsp" 1, "titl" 1, "case" 1,
    "ss01" 1, "ss02" 1, "ss03" 1, "ss04" 1, "ss05" 1,
    "ss06" 1, "ss07" 1, "ss08" 1, "ss09" 1, "ss10" 1,
    "ss11" 1, "ss12" 1, "ss13" 1, "ss14" 1, "ss15" 1,
    "ss16" 1, "ss17" 1, "ss18" 1, "ss19" 1, "ss20" 1,
    "hlig" 1, "hist" 1, "salt" 1;
}

.modal-box p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1em;
  font-weight: 400;
}

.modal-box p:last-child {
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #D1D5DB;
  border: none;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  line-height: 1;
  color: #374151;
  cursor: pointer;
  padding: 0;
  font-family: 'Work Sans', sans-serif;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: #9CA3AF;
  color: #111827;
}

@media (max-width: 768px) {
  body {
    font-size: 3.5vw;
  }

  .site-icon {
    width: 7.5em;
  }

  .modal-box {
    padding: 2rem 1.5rem 1.5rem;
  }
}
