:root {
  --snow: #F6F8F7;
  --pine: #1F3A32;
  --granite: #5E6B70;
  --lake: #7FA1AE;
  --bark: #7A5C46;
  --rule: rgba(127, 161, 174, 0.5);
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --display: "Josefin Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--snow);
  color: var(--pine);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--pine);
  text-decoration: underline;
  text-decoration-color: var(--lake);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--pine);
}

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  padding: 0.5rem 0.75rem;
  background: var(--pine);
  color: var(--snow);
  transform: translateY(-120%);
}

.skip:focus {
  transform: translateY(0);
}

/* Hero */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.top {
  padding-block: 1.5rem;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
}

.nav a {
  color: var(--granite);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--pine);
}

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem 2.5rem;
}

.names {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.25rem, 12vw, 9rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.when {
  margin: 2rem 0 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.2;
}

.where {
  margin: 0.35rem 0 0;
  color: var(--granite);
}

.countdown {
  margin: 1.25rem 0 0;
  min-height: 1.65em;
  color: var(--bark);
  font-size: 0.95rem;
}

/* Watercolor mountains with painted pines in front, and the lake surface beneath */

.horizon {
  --u: clamp(64px, 7.6vw, 120px);
  position: relative;
  border-bottom: 1px solid var(--lake);
}

.painted {
  position: relative;
  height: clamp(130px, 19vw, 270px);
}

.painted img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
}

/* Watercolor pines. Size each with --s (1 is the base height). */

.wtree {
  position: absolute;
  bottom: -2px;
  width: auto;
  height: calc(var(--u) * var(--s, 1));
  pointer-events: none;
  user-select: none;
}

.wtree--flip {
  transform: scaleX(-1);
}

@media (max-width: 520px) {
  .wtree--extra {
    display: none;
  }
}

/* The one moment of motion: the far range paints on, then the middle range, then the pines grow up
   one at a time in a fixed, mixed-up order (each tree's --d sets its turn) */

@media (prefers-reduced-motion: no-preference) {
  .painted img {
    -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
    mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
    animation: paint 2.4s cubic-bezier(0.3, 0.1, 0.3, 1) calc(var(--i) * 0.9s) both;
  }

  .wtree {
    transform-origin: 50% 100%;
    animation: appear 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) calc(2.4s + var(--d, 0s)) both;
  }
}

@keyframes paint {
  from {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
  to {
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
  }
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.75;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* Sections */

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.col {
  max-width: 38rem;
}

.section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.section p {
  margin: 0 0 1rem;
}

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

/* Questions */

.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--bark);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 1.25rem;
  color: var(--granite);
}

/* Footer */

.footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule);
  color: var(--granite);
}

.footer p {
  margin: 0;
}
