:root {
  color-scheme: dark;
  --ink: #eef7ff;
  --muted: #b6c7d6;
  --soft: rgba(238, 247, 255, 0.72);
  --panel: rgba(7, 18, 25, 0.72);
  --panel-border: rgba(190, 226, 239, 0.18);
  --blue-black: #03070d;
  --pine: #081b17;
  --moss: #6e936f;
  --moon: #e7f4ff;
  --silver: #92bfd2;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  min-width: 320px;
  background: var(--blue-black);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.moonlit-page {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(135, 178, 199, 0.24), transparent 34rem),
    linear-gradient(180deg, #04101d 0%, #061513 58%, #020504 100%);
}

.forest-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: start;
  justify-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.5rem, 8vh, 5rem) 1.25rem clamp(4rem, 9vh, 7rem);
}

.forest-hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 36%;
  content: "";
  background:
    radial-gradient(ellipse at 50% 100%, rgba(86, 121, 86, 0.24), transparent 54%),
    linear-gradient(180deg, transparent, rgba(1, 5, 4, 0.92) 70%);
}

.sky,
.trees,
.mist,
.star {
  position: absolute;
  inset: 0;
  z-index: -4;
  pointer-events: none;
}

.moon {
  position: absolute;
  inset: 9vh auto auto 50%;
  z-index: -1;
  width: clamp(7rem, 14vw, 11rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  outline-offset: 0.75rem;
  pointer-events: auto;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95), transparent 0.9rem),
    radial-gradient(circle at 62% 66%, rgba(181, 207, 220, 0.38), transparent 1.25rem),
    var(--moon);
  box-shadow:
    0 0 2.5rem rgba(229, 246, 255, 0.82),
    0 0 7rem rgba(113, 171, 197, 0.48),
    0 0 16rem rgba(76, 129, 158, 0.28);
  transition: filter 180ms ease, transform 180ms ease;
}

.moon:hover,
.moon:focus-visible {
  filter: brightness(1.12);
  transform: translateX(-50%) scale(1.04);
}

.mist {
  width: 46rem;
  height: 8rem;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.22;
  background: rgba(181, 215, 226, 0.55);
  animation: drift 18s ease-in-out infinite alternate;
}

.mist-one {
  inset: 38vh auto auto -12rem;
}

.mist-two {
  inset: 49vh -18rem auto auto;
  animation-duration: 22s;
}

.mist-three {
  inset: 70vh auto auto 12vw;
  width: 58rem;
  opacity: 0.16;
  animation-duration: 26s;
}

.star {
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0.75rem #cfeaff;
  animation: pulse 3.8s ease-in-out infinite;
}

.star-one {
  inset: 20vh auto auto 18vw;
}

.star-two {
  inset: 16vh 22vw auto auto;
  animation-delay: 1s;
}

.star-three {
  inset: 34vh 12vw auto auto;
  animation-delay: 2.1s;
}

.star-four {
  inset: 12vh auto auto 34vw;
  width: 0.18rem;
  height: 0.18rem;
  animation-delay: 0.7s;
}

.star-five {
  inset: 27vh auto auto 72vw;
  width: 0.16rem;
  height: 0.16rem;
  animation-delay: 1.4s;
}

.star-six {
  inset: 44vh auto auto 9vw;
  width: 0.14rem;
  height: 0.14rem;
  animation-delay: 2.5s;
}

.star-seven {
  inset: 48vh 31vw auto auto;
  width: 0.2rem;
  height: 0.2rem;
  animation-delay: 3.1s;
}

.star-eight {
  inset: 15vh 42vw auto auto;
  width: 0.12rem;
  height: 0.12rem;
  animation-delay: 1.9s;
}

.trees {
  z-index: -2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0 1vw;
}

.trees span {
  position: relative;
  display: block;
  width: clamp(2.1rem, 5.4vw, 5.6rem);
  height: var(--tree-height, 48vh);
  transform: translateY(var(--tree-offset, 0));
}

.trees span::before,
.trees span::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.trees span::before {
  bottom: 0;
  width: 16%;
  height: 64%;
  border-radius: 999px 999px 0 0;
  background: #020504;
}

.trees span::after {
  bottom: 16%;
  width: 112%;
  height: 86%;
  clip-path: polygon(50% 0, 91% 35%, 74% 35%, 99% 64%, 78% 64%, 100% 100%, 0 100%, 22% 64%, 1% 64%, 26% 35%, 9% 35%);
  background: var(--tree-color, #04110e);
  transform-origin: 50% 94%;
  animation: branch-tremble var(--tree-speed, 7.6s) ease-in-out infinite alternate;
  animation-delay: var(--tree-delay, 0s);
}

.trees-back {
  opacity: 0.68;
  filter: blur(1px);
}

.trees-front {
  z-index: -1;
  opacity: 0.96;
}

.trees-back span:nth-child(2n) { --tree-height: 55vh; --tree-offset: 3vh; --tree-speed: 8.8s; --tree-delay: -1.6s; --branch-angle: 0.65deg; }
.trees-back span:nth-child(3n) { --tree-height: 44vh; --tree-offset: 8vh; --tree-speed: 10s; --tree-delay: -5.2s; --branch-angle: -0.8deg; }
.trees-back span:nth-child(4n) { --tree-height: 62vh; --tree-offset: 2vh; --tree-speed: 7.4s; --tree-delay: -3.7s; --branch-angle: 0.95deg; }
.trees-back span:nth-child(5n) { --tree-speed: 11s; --tree-delay: -8.1s; --branch-angle: -0.55deg; }
.trees-front span:nth-child(2n) { --tree-height: 66vh; --tree-offset: 6vh; --tree-color: #010403; --tree-speed: 6.7s; --tree-delay: -4.4s; --branch-angle: -0.9deg; }
.trees-front span:nth-child(3n) { --tree-height: 58vh; --tree-offset: 12vh; --tree-speed: 8.5s; --tree-delay: -2.8s; --branch-angle: 0.75deg; }
.trees-front span:nth-child(4n) { --tree-speed: 7.9s; --tree-delay: -6.6s; --branch-angle: -0.6deg; }
.trees-front span:nth-child(5n) { --tree-height: 73vh; --tree-offset: 1vh; --tree-speed: 9.5s; --tree-delay: -1.2s; --branch-angle: 1deg; }

.hero-content {
  width: min(47rem, 100%);
  margin-top: clamp(17rem, 35vh, 24rem);
  text-align: center;
  text-shadow: 0 0.25rem 1.75rem rgba(0, 0, 0, 0.72);
}

.kicker {
  margin: 0 0 0.85rem;
  color: var(--silver);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 13vw, 9.5rem);
  line-height: 0.9;
  font-weight: 700;
}

.intro {
  width: min(39rem, 100%);
  margin: 1.3rem auto 0;
  color: var(--soft);
  font-size: clamp(1rem, 2.3vw, 1.18rem);
  line-height: 1.75;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.social-button {
  min-height: 3rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.5rem;
  padding: 0.85rem 1.05rem;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: rgba(7, 18, 25, 0.62);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  border-color: rgba(231, 244, 255, 0.55);
  transform: translateY(-2px);
}

.social-button {
  min-width: 7.25rem;
  backdrop-filter: blur(10px);
}

.social-button:hover,
.social-button:focus-visible {
  background: rgba(19, 43, 50, 0.82);
}

.message-box {
  width: min(36rem, 100%);
  margin: 1.25rem auto 0;
  border: 1px solid rgba(190, 226, 239, 0.2);
  border-radius: 0.5rem;
  padding: 0.8rem;
  background: rgba(4, 13, 17, 0.68);
  backdrop-filter: blur(12px);
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.26);
}

.message-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--silver);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.message-box textarea {
  width: 100%;
  min-height: 7rem;
  max-height: 28vh;
  resize: vertical;
  border: 1px solid rgba(190, 226, 239, 0.16);
  border-radius: 0.45rem;
  padding: 0.8rem;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  background: rgba(1, 7, 10, 0.62);
  outline: none;
}

.message-box textarea:focus {
  border-color: rgba(231, 244, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(146, 191, 210, 0.14);
}

.message-website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.message-count,
.message-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.send-button {
  min-height: 2.55rem;
  border: 1px solid rgba(231, 244, 255, 0.44);
  border-radius: 0.45rem;
  padding: 0.65rem 1rem;
  color: #031018;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #eef8ff, #9fcad8);
  transition: transform 180ms ease, filter 180ms ease;
}

.send-button:hover,
.send-button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: wait;
  filter: grayscale(0.45) brightness(0.75);
  transform: none;
}

.message-status {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  text-align: left;
}

.click-spark {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: var(--spark-size, 0.55rem);
  height: var(--spark-size, 0.55rem);
  border-radius: 50%;
  pointer-events: none;
  background: var(--spark-color, rgba(235, 248, 255, 0.95));
  box-shadow:
    0 0 1rem var(--spark-glow, rgba(219, 242, 255, 0.9)),
    0 0 2.4rem var(--spark-halo, rgba(118, 184, 207, 0.72));
  animation: spark var(--spark-duration, 720ms) ease-out forwards;
}

.click-spark::before,
.click-spark::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: var(--spark-line, 2.4rem);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--spark-glow, rgba(238, 247, 255, 0.92)), transparent);
  transform: translate(-50%, -50%);
}

.click-spark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.click-spark.is-orb::before,
.click-spark.is-orb::after {
  width: 1.4rem;
  border-radius: 999px;
  opacity: 0.72;
}

.click-spark.is-ring {
  background: transparent;
  border: 1px solid var(--spark-color, rgba(235, 248, 255, 0.95));
}

.click-spark.is-ring::before,
.click-spark.is-ring::after {
  width: 1.7rem;
}

.click-spark.is-cross {
  border-radius: 0.2rem;
}
@keyframes drift {
  from {
    transform: translateX(-3vw);
  }
  to {
    transform: translateX(8vw);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 1;
  }
}

@keyframes branch-tremble {
  0% {
    transform: translateX(-50%) rotate(calc(var(--branch-angle, 0.7deg) * -1)) skewX(-0.45deg);
  }
  45% {
    transform: translateX(-50%) rotate(calc(var(--branch-angle, 0.7deg) * 0.35)) skewX(0.15deg);
  }
  100% {
    transform: translateX(-50%) rotate(var(--branch-angle, 0.7deg)) skewX(0.45deg);
  }
}

@keyframes spark {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.2) rotate(45deg);
  }
}

@media (max-width: 760px) {
  .forest-hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 4rem;
  }

  .hero-content {
    margin-top: clamp(14rem, 32vh, 18rem);
  }

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

  .social-button {
    width: 100%;
  }

  .message-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .send-button {
    width: 100%;
  }
}

@media (max-height: 780px) {
  .forest-hero {
    overflow-y: auto;
  }

  .moon {
    inset-block-start: 5vh;
    width: clamp(5.7rem, 12vh, 8rem);
  }

  .hero-content {
    margin-top: clamp(11.5rem, 29vh, 15rem);
  }

  h1 {
    font-size: clamp(3.5rem, 11vh, 6rem);
  }

  .intro {
    margin-top: 0.8rem;
  }

  .social-links {
    margin-top: 1.1rem;
  }

  .message-box {
    margin-top: 0.85rem;
  }

  .message-box textarea {
    min-height: 5.5rem;
  }
}

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