* {
  box-sizing: border-box;
}

:root {
  --bg: #080713;
  --text: #f8f2ff;
  --muted: #c9bfe4;
  --purple: #b69cff;
  --purple2: #7d64c8;
  --line: rgba(255, 255, 255, 0.22);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 50% 15%, rgba(157, 124, 255, 0.23), transparent 34%),
    linear-gradient(180deg, #070611 0%, #111025 100%);
  color: var(--text);
  font-family: "Noto Serif JP", serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Loading */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(166, 128, 255, 0.26), transparent 35%),
    #06050f;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__box {
  width: min(360px, 82vw);
  text-align: center;
  letter-spacing: 0.16em;
}

.loader__moon {
  font-size: 42px;
  color: var(--purple);
  filter: drop-shadow(0 0 18px rgba(182, 156, 255, 0.8));
  animation: float 2.4s ease-in-out infinite;
}

.loader__title {
  margin: 16px 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 44px;
  letter-spacing: 0.28em;
}

.loader__text,
.loader__percent {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.loader__bar {
  width: 100%;
  height: 12px;
  margin: 24px 0 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.loader__bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, var(--purple), var(--purple2));
  transition: width 0.08s linear;
}

/* Rain */
.rain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.rain::before {
  content: "";
  position: absolute;
  inset: -200px;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.14) 0px,
      rgba(255, 255, 255, 0.14) 2px,
      transparent 2px,
      transparent 26px
    );
  background-size: 2px 26px;
  opacity: 0.22;
  animation: rainFall 0.42s linear infinite;
}

/* Main */
.main {
  position: relative;
  z-index: 3;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px),
    radial-gradient(circle, rgba(187,156,255,0.75) 1px, transparent 1px);
  background-size: 94px 94px, 142px 142px;
  opacity: 0.42;
  animation: twinkle 5s ease-in-out infinite alternate;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.58), transparent 30%, transparent 70%, rgba(0,0,0,0.58)),
    radial-gradient(circle at 50% 52%, rgba(255,255,255,0.07), transparent 26%);
}

.hero__light {
  position: absolute;
  width: min(560px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(182, 156, 255, 0.16);
  filter: blur(45px);
}

.hero__content {
  position: relative;
  z-index: 4;
  text-align: center;
  text-shadow: 0 0 26px rgba(0, 0, 0, 0.8);
}

.hero__symbol {
  margin: 0 0 22px;
  color: var(--purple);
  letter-spacing: 0.38em;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(54px, 10vw, 104px);
  font-weight: 500;
  letter-spacing: 0.3em;
}

.hero__sub {
  margin: 10px 0 34px;
  color: var(--muted);
  letter-spacing: 0.32em;
  font-size: 14px;
}

.hero__catch {
  margin: 0 0 58px;
  letter-spacing: 0.16em;
  line-height: 1.9;
}

.portfolio-button {
  width: min(340px, 86vw);
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)),
    rgba(22, 18, 45, 0.62);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.38),
    0 0 35px rgba(182,156,255,0.22);
  backdrop-filter: blur(12px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-button span {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.portfolio-button small {
  color: var(--muted);
  letter-spacing: 0.15em;
}

.portfolio-button:hover {
  transform: translateY(-7px);
  border-color: rgba(255,255,255,0.55);
  box-shadow:
    0 28px 72px rgba(0,0,0,0.45),
    0 0 50px rgba(182,156,255,0.38);
}

@keyframes rainFall {
  from {
    transform: translateY(-24px);
  }

  to {
    transform: translateY(24px);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.28;
    transform: translateY(0);
  }

  to {
    opacity: 0.72;
    transform: translateY(-12px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 620px) {
  h1 {
    letter-spacing: 0.16em;
  }

  .hero__sub,
  .hero__catch {
    letter-spacing: 0.11em;
  }

  .loader__title {
    letter-spacing: 0.18em;
  }
}
