@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500&family=Shippori+Mincho:wght@400;500&display=swap");

:root {
  color-scheme: dark;
  --night: #080c13;
  --night-deep: #03050a;
  --ink: #e7e3d8;
  --ink-soft: #a9adba;
  --silver: #bbb7ad;
  --line: rgba(218, 222, 230, 0.25);
  --serif: "Shippori Mincho", "Noto Serif JP", serif;
  --body: "Noto Serif JP", serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night-deep);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 9%, rgba(101, 124, 161, 0.18), transparent 24rem),
    radial-gradient(circle at 18% 68%, rgba(55, 70, 98, 0.12), transparent 32rem),
    var(--night-deep);
  font-family: var(--body);
  font-weight: 300;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    radial-gradient(circle, rgba(230, 232, 238, 0.28) 0 0.6px, transparent 0.8px),
    radial-gradient(circle, rgba(230, 232, 238, 0.12) 0 0.5px, transparent 0.7px);
  background-position: 0 0, 31px 17px;
  background-size: 83px 83px, 127px 127px;
  pointer-events: none;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.06;
  pointer-events: none;
  filter: url("#noise");
}

.frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  padding: clamp(74px, 11vw, 132px) clamp(26px, 8vw, 104px) 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 14%, rgba(99, 118, 150, 0.11), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.012), transparent 42%),
    var(--night);
  border: 1px solid rgba(218, 222, 230, 0.4);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.56),
    inset 0 0 0 8px var(--night),
    inset 0 0 0 9px rgba(218, 222, 230, 0.14);
}

.frame::before,
.frame::after {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

.frame::before {
  top: 38px;
}

.frame::after {
  bottom: 38px;
}

.corner {
  position: absolute;
  width: 138px;
  height: 138px;
  color: var(--ink);
  pointer-events: none;
}

.corner::before,
.corner::after {
  position: absolute;
  content: "";
  background: var(--line);
}

.corner::before {
  width: 104px;
  height: 1px;
}

.corner::after {
  width: 1px;
  height: 104px;
}

.corner--top-left {
  top: 30px;
  left: 30px;
}

.corner--top-left::before,
.corner--top-right::before {
  top: 0;
}

.corner--top-left::after,
.corner--top-right::after {
  top: 0;
}

.corner--top-left::after {
  left: 0;
}

.corner--top-right {
  top: 30px;
  right: 30px;
  transform: scaleX(-1);
}

.corner--top-right::after {
  left: 0;
}

.corner--bottom-left {
  bottom: 30px;
  left: 30px;
  transform: scaleY(-1);
}

.corner--bottom-left::after,
.corner--bottom-right::after {
  top: 0;
  left: 0;
}

.corner--bottom-right {
  right: 30px;
  bottom: 30px;
  transform: scale(-1);
}

.spark {
  position: absolute;
  display: block;
  line-height: 1;
}

.spark--large {
  top: -8px;
  left: -9px;
  font-size: 22px;
}

.spark--small {
  top: 26px;
  left: 119px;
  font-size: 14px;
}

.moon {
  position: absolute;
  top: 12px;
  left: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.moon::after {
  position: absolute;
  top: -5px;
  left: 10px;
  width: 42px;
  height: 42px;
  content: "";
  background: #0a0f18;
  border-radius: 50%;
}

.masthead {
  text-align: center;
  animation: reveal 900ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.eyebrow {
  margin: 0 0 19px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.34em;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-indent: 0.16em;
}

.title-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 184px;
  margin: 25px auto 30px;
  color: var(--silver);
}

.title-rule span {
  width: 68px;
  height: 1px;
  background: var(--line);
}

.title-rule b {
  font-size: 9px;
  font-weight: 400;
}

.introduction {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(13px, 2vw, 15px);
  letter-spacing: 0.14em;
  line-height: 2.25;
}

.entrance {
  width: min(580px, 100%);
  margin: clamp(60px, 10vw, 92px) auto 80px;
  animation: reveal 900ms 160ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.entrance h2 {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-align: center;
}

.links {
  display: grid;
  gap: 9px;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 24px;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 14px 21px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  transition:
    color 240ms ease,
    border-color 240ms ease,
    transform 240ms ease;
}

.link-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 320ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.link-card:hover,
.link-card:focus-visible {
  color: var(--night);
  border-color: var(--ink);
  outline: none;
  transform: translateY(-2px);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  transform: translateX(0);
}

.link-card__number {
  color: var(--silver);
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}

.link-card__body {
  display: grid;
  gap: 4px;
}

.link-card__body strong {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.link-card__body small {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
  transition: color 240ms ease;
}

.link-card:hover .link-card__body small,
.link-card:focus-visible .link-card__body small {
  color: rgba(8, 12, 19, 0.68);
}

.link-card__arrow {
  font-size: 16px;
}

.preparing {
  margin: 0;
  padding: 30px 20px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

footer {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  color: var(--ink-soft);
}

footer p {
  margin: 0;
  font-family: Georgia, var(--body);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.footer-star {
  color: var(--silver);
  font-size: 7px;
}

[hidden] {
  display: none !important;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .frame {
    width: calc(100% - 16px);
    min-height: calc(100vh - 16px);
    margin: 8px;
    padding: 82px 25px 35px;
    box-shadow:
      inset 0 0 0 5px var(--night),
      inset 0 0 0 6px rgba(218, 222, 230, 0.14);
  }

  .frame::before {
    top: 26px;
  }

  .frame::after {
    bottom: 26px;
  }

  .corner {
    width: 88px;
    height: 88px;
  }

  .corner::before {
    width: 70px;
  }

  .corner::after {
    height: 70px;
  }

  .corner--top-left,
  .corner--top-right {
    top: 20px;
  }

  .corner--bottom-left,
  .corner--bottom-right {
    bottom: 20px;
  }

  .corner--top-left,
  .corner--bottom-left {
    left: 20px;
  }

  .corner--top-right,
  .corner--bottom-right {
    right: 20px;
  }

  .spark--small {
    left: 72px;
  }

  .moon {
    width: 29px;
    height: 29px;
  }

  .moon::after {
    width: 29px;
    height: 29px;
  }

  h1 {
    font-size: clamp(31px, 11vw, 44px);
    letter-spacing: 0.11em;
    text-indent: 0.11em;
  }

  .link-card {
    grid-template-columns: 28px 1fr 20px;
    gap: 10px;
    padding-inline: 15px;
  }
}

@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;
  }
}
