:root {
  color-scheme: dark;
  --night: #081514;
  --night-soft: #102422;
  --forest: #315f38;
  --moon: #fff2c5;
  --cream: #fffaf0;
  --mist: #b9cbc2;
  --type-caption: .75rem;
  --type-label: .8125rem;
  --type-body: 1rem;
  --type-display: clamp(2.5rem, 5vw, 4rem);
  --leading-long: 1.75;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--night); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 12% 19%, rgb(255 242 197 / 65%) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 12%, rgb(255 255 255 / 44%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 66%, rgb(255 242 197 / 40%) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 82%, rgb(255 255 255 / 42%) 0 1px, transparent 1.5px),
    linear-gradient(160deg, var(--night) 0%, var(--night-soft) 55%, #173029 100%);
  background-size: 17rem 19rem, 23rem 17rem, 29rem 31rem, 37rem 27rem, auto;
}

.shell {
  width: min(100%, 72rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 3rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--cream);
  font-size: var(--type-label);
  letter-spacing: .18em;
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  width: 4rem;
  height: 4rem;
  flex: 0 0 4rem;
  overflow: hidden;
}

.brand-symbol img {
  position: absolute;
  width: 5.25rem;
  height: 5.25rem;
  max-width: none;
  left: 50%;
  top: 50%;
  object-fit: contain;
  filter: saturate(.75) brightness(1.1);
  transform: translate(-50%, -50%) scale(1.55);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 25rem);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 4rem 0;
}

.hero-copy { text-align: left; }

.eyebrow {
  margin: 0 0 1rem;
  color: #b9d5c3;
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: var(--type-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.03em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.hero-title-line { display: block; }

.intro {
  max-width: 32rem;
  margin: 1.7rem 0 0;
  color: var(--mist);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: var(--leading-long);
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.primary,
.secondary {
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.primary { color: #11271c; background: var(--moon); }
.secondary { color: var(--cream); border-color: rgb(255 250 240 / 25%); background: rgb(255 255 255 / 5%); }
.primary:hover, .secondary:hover { transform: translateY(-2px); }
.primary:focus-visible, .secondary:focus-visible, footer a:focus-visible { outline: 3px solid #f3ce67; outline-offset: 3px; }

.moon-stage {
  --pointer-x: 0px;
  --pointer-y: 0px;
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.moon-layer {
  width: 68%;
  display: grid;
  place-items: center;
  transform: translate3d(var(--pointer-x), var(--pointer-y), 0);
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}

.moon-layer .moon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 29%, rgb(164 132 74 / 14%) 0 7%, transparent 8%),
    radial-gradient(circle at 63% 66%, rgb(138 109 62 / 12%) 0 11%, transparent 12%),
    radial-gradient(circle at 72% 32%, rgb(138 109 62 / 10%) 0 5%, transparent 6%),
    var(--moon);
  box-shadow: 0 0 3rem rgb(255 230 155 / 26%), 0 0 8rem rgb(255 230 155 / 12%);
  animation: moon-breathe 11s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: 6%;
  border: 1px solid rgb(255 250 240 / 15%);
  border-radius: 50%;
  transform: rotate(-18deg);
  translate: calc(var(--pointer-x) * .55) calc(var(--pointer-y) * .55);
  transition: translate 1.2s cubic-bezier(.2, .8, .2, 1);
}
.orbit::before, .orbit::after { content: ""; position: absolute; width: .46rem; aspect-ratio: 1; border-radius: 50%; background: var(--moon); box-shadow: 0 0 1rem var(--moon); }
.orbit::before { top: 8%; left: 22%; }
.orbit::after { right: 4%; bottom: 30%; }

.ambient-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-stars i {
  position: absolute;
  width: .2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--moon);
  box-shadow: 0 0 .8rem var(--moon);
  animation: star-shimmer 7s ease-in-out infinite alternate;
}

.ambient-stars i:nth-child(1) { top: 18%; left: 15%; animation-duration: 5.8s; animation-delay: -1s; }
.ambient-stars i:nth-child(2) { top: 9%; left: 53%; animation-duration: 6.6s; animation-delay: -4s; }
.ambient-stars i:nth-child(3) { top: 42%; right: 6%; animation-duration: 7.4s; animation-delay: -2s; }
.ambient-stars i:nth-child(4) { right: 24%; bottom: 16%; animation-duration: 8.2s; animation-delay: -5s; }
.ambient-stars i:nth-child(5) { bottom: 22%; left: 9%; animation-duration: 9s; animation-delay: -3s; }

.motion-ready [data-motion-reveal] {
  animation: content-arrive .72s cubic-bezier(.2, .8, .2, 1) both;
}

.motion-ready [data-motion-order="1"] { animation-delay: .06s; }
.motion-ready [data-motion-order="2"] { animation-delay: .14s; }
.motion-ready [data-motion-order="3"] { animation-delay: .22s; }

[data-motion-paused] [data-motion-reveal],
[data-motion-paused] .moon,
[data-motion-paused] .ambient-stars i {
  animation-play-state: paused;
}

@keyframes moon-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.015); filter: brightness(1.035); }
}

@keyframes star-shimmer {
  from { opacity: .28; }
  to { opacity: .8; }
}

@keyframes content-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
  color: #8fa89d;
  font-size: var(--type-label);
}

footer nav { display: flex; gap: 1rem; }
footer a { color: inherit; text-underline-offset: .25em; }

@media (max-width: 760px) {
  .brand { gap: .5rem; font-size: var(--type-caption); letter-spacing: .13em; }
  .brand-symbol { width: 3.5rem; height: 3.5rem; flex-basis: 3.5rem; }
  .brand-symbol img { width: 4.6rem; height: 4.6rem; }
  .hero { grid-template-columns: 1fr; padding: 3.5rem 0; }
  .moon-stage { width: min(78vw, 24rem); margin: 0 auto; grid-row: 1; }
  .hero-copy { grid-row: 2; }
  h1 { font-size: clamp(2rem, 9.5vw, 3rem); }
  .actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .moon-layer, .orbit, [data-motion-reveal] { transform: none !important; translate: none !important; opacity: 1 !important; }
}
