:root {
  --color-nav-surface: #e9e3dd;
  --color-ink: #242424;
  --color-navy: #29468f;
  --color-rose: #d95f7f;
  --color-blush-rgb: 223, 156, 156;
  --color-teal: #4aaabd;
  --color-powder-blue-rgb: 166, 196, 203;
  --color-pegboard-dot: rgba(102, 102, 102, 0.4);
  --color-star: #777;
}

html {
  font-size: 15px; 
}

/* Navigation container */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background-color: var(--color-nav-surface);
  border-bottom: 1px solid rgba(36, 36, 36, 0.12);
  padding: 0.85rem 2rem;
}

/* Navigation links */
.main-nav a {
  justify-self: center;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  transform: translateY(3px);
  color: var(--color-ink);
  text-decoration: none;
  text-align: center;

  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 22px;
  font-weight: 300;
  text-transform: uppercase;
}

.main-nav a::after {
  display: block;
  width: 0;
  height: 2px;
  margin: 0 auto;
  background-color: var(--color-navy);
  content: "";
  transition: width 250ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

body {
  margin: 0;
  position: relative;
  background-color: #F9F6F2;
  background-image: radial-gradient(var(--color-pegboard-dot) 1px, transparent 1.25px);
  background-size: 28px 28px;
}

.twinkle-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

body > main,
body > footer {
  position: relative;
  z-index: 1;
}

.twinkle-star {
  position: absolute;
  color: var(--color-star);
  font-size: 1.5rem;
  line-height: 1;
  animation: twinkle-star 4s ease-in-out infinite alternate;
}

.twinkle-star:nth-child(1) { top: 12%; left: 8%; }
.twinkle-star:nth-child(2) { top: 27%; left: 83%; font-size: 1.1rem; animation-delay: -1.3s; }
.twinkle-star:nth-child(3) { top: 44%; left: 19%; font-size: 0.9rem; animation-delay: -2.6s; }
.twinkle-star:nth-child(4) { top: 62%; left: 91%; animation-delay: -0.8s; }
.twinkle-star:nth-child(5) { top: 79%; left: 12%; font-size: 1.2rem; animation-delay: -2s; }
.twinkle-star:nth-child(6) { top: 89%; left: 72%; font-size: 0.9rem; animation-delay: -3.1s; }
.twinkle-star:nth-child(7) { top: 18%; left: 58%; font-size: 0.9rem; animation-delay: -1.7s; }
.twinkle-star:nth-child(8) { top: 35%; left: 42%; font-size: 1.2rem; animation-delay: -2.9s; }
.twinkle-star:nth-child(9) { top: 51%; left: 71%; font-size: 0.8rem; animation-delay: -0.5s; }
.twinkle-star:nth-child(10) { top: 69%; left: 35%; font-size: 1rem; animation-delay: -3.4s; }
.twinkle-star:nth-child(11) { top: 83%; left: 55%; font-size: 0.8rem; animation-delay: -1.1s; }
.twinkle-star:nth-child(12) { top: 96%; left: 25%; font-size: 1.1rem; animation-delay: -2.3s; }

@keyframes twinkle-star {
  0% {
    opacity: 0.1;
    transform: scale(0.7) rotate(0deg);
  }

  100% {
    opacity: 0.7;
    transform: scale(1.2) rotate(25deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .twinkle-star {
    animation: none;
    opacity: 0.35;
  }
}

@media (max-width: 700px) {
  .main-nav {
    padding: 0.6rem 0.5rem;
  }

  .main-nav a {
    font-size: clamp(0.65rem, 3vw, 0.95rem);
  }
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 1.5rem 1.75rem;
  border-top: 1px solid rgba(41, 70, 143, 0.2);
  text-align: center;
}

.site-footer__ornament {
  display: block;
  width: min(32rem, 75vw);
  max-height: 7.5rem;
  object-fit: contain;
  opacity: 0.38;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
}

.site-footer__nav a {
  color: #333;
  font-family: Helvetica, sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer__nav a::after {
  display: block;
  width: 0;
  height: 2px;
  margin: 0 auto;
  background-color: var(--color-navy);
  content: "";
  transition: width 250ms ease;
}

.site-footer__nav a:hover::after,
.site-footer__nav a:focus-visible::after {
  width: 100%;
}

.site-footer__copyright {
  margin: 0;
  color: #666;
  font-size: 0.8rem;
}


