:root {
  --blue: #2036c8;
  --blue-deep: #18299a;
  --navy: #141b54;
  --paper: #f4f5fa;
  --mist: #e4e8f7;
  --yellow: #ffc933;

  --bg: var(--paper);
  --bg-alt: var(--mist);
  --fg: var(--navy);
  --fg-muted: #4a5285;
  --rule: #c3c9e6;
  --accent-text: var(--blue);
  --how-bg: var(--navy);
  --button-bg: var(--blue);
  --button-fg: var(--paper);
  --button-bg-hover: var(--blue-deep);

  --display: "Bagel Fat One", "Pretendard Variable", system-ui, sans-serif;
  --body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10164a;
    --bg-alt: #171e5c;
    --fg: #eef0fa;
    --fg-muted: #b4bae0;
    --rule: #323b7c;
    --accent-text: var(--yellow);
    --how-bg: var(--blue-deep);
    --button-bg: var(--yellow);
    --button-fg: var(--navy);
    --button-bg-hover: #ffd866;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header :focus-visible,
.hero :focus-visible,
.how :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}

main:focus {
  outline: none;
}

/* Header */

.site-header {
  background: var(--blue);
  color: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  color: var(--paper);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.site-nav a {
  padding-block: 4px;
  border-bottom: 2px solid transparent;
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  border-bottom-color: var(--yellow);
}

/* Hero */

.hero {
  overflow: hidden;
  padding-block: clamp(20px, 4vw, 48px) clamp(56px, 8vw, 96px);
  background: var(--blue);
  color: var(--paper);
}

.wordmark {
  margin-left: -0.035em;
  font-family: var(--display);
  font-size: clamp(72px, 21.4vw, 276px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.015em;
}

.route-wrap {
  position: relative;
  height: clamp(140px, 19vw, 230px);
  margin-top: clamp(4px, 1.5vw, 16px);
}

.route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-start-dot {
  fill: var(--blue);
  stroke: var(--yellow);
  stroke-width: 4;
}

.route-label {
  fill: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
}

.route-end-dot {
  fill: var(--yellow);
}

.route-end-label {
  fill: var(--yellow);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 800;
}

.route-end {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: 100% 100%;
  transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.route-end.arrived {
  transform: scale(1);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px clamp(24px, 5vw, 64px);
  align-items: end;
  margin-top: clamp(20px, 3vw, 36px);
}

.lead {
  max-width: 16em;
  font-size: clamp(24px, 3.1vw, 34px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sub {
  max-width: 28em;
  color: #dde1fb;
}

.redraw {
  margin-top: 18px;
  padding: 10px 18px;
  border: 2px solid var(--yellow);
  border-radius: 999px;
  background: transparent;
  color: var(--yellow);
  font: 700 15px/1.2 var(--body);
  cursor: pointer;
}

.redraw:hover {
  background: var(--yellow);
  color: var(--navy);
}

/* Sections */

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 12px clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}

h2 {
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 56px);
  font-weight: 400;
  line-height: 1.1;
}

.section-lead {
  max-width: 28em;
  color: var(--fg-muted);
}

.text-link {
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-thickness: 3px;
}

/* Team */

.members {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 48px);
  padding: 0;
  list-style: none;
}

.member {
  padding-top: 28px;
  border-top: 3px solid var(--fg);
}

.avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.member h3 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

.role {
  margin: 4px 0 14px;
  color: var(--accent-text);
  font-weight: 700;
}

.member p:not(.role) {
  max-width: 24em;
  margin-bottom: 16px;
}

.member-pending {
  border-top: 3px dashed var(--rule);
}

.member-pending .avatar {
  border: 2px dashed var(--rule);
  background: transparent;
  color: var(--fg-muted);
}

.member-pending h3 {
  margin-bottom: 14px;
  color: var(--fg-muted);
}

.member-pending p:not(.role) {
  color: var(--fg-muted);
}

/* Games */

.games {
  background: var(--bg-alt);
}

.game-list {
  padding: 0;
  border-top: 3px solid var(--fg);
  list-style: none;
}

.game {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(200px, 250px);
  gap: 16px clamp(20px, 3vw, 40px);
  align-items: start;
  padding-block: 32px;
  border-bottom: 1px solid var(--rule);
}

.app-icon {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  background: var(--rule);
}

.game h3 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.game-en {
  color: var(--fg-muted);
  font-size: 15px;
}

.game-desc {
  max-width: 34em;
  margin-top: 10px;
}

.facts {
  display: grid;
  gap: 6px;
  font-size: 15px;
}

.facts div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}

.facts dt {
  color: var(--fg-muted);
}

.facts dd {
  font-weight: 700;
}

.play-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.play-link:hover {
  background: var(--button-bg-hover);
}

.wip-head {
  margin-top: clamp(72px, 9vw, 112px);
}

.wip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px);
  padding: 0;
  list-style: none;
}

.wip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
  background: var(--rule);
}

.wip .img-survival {
  object-position: 50% 62%;
}

.wip figcaption {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 14px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

.status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.wip h3 {
  margin: 4px 0 10px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
}

.wip p:not(.status):not(.wip-meta) {
  max-width: 32em;
}

.wip-meta {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 15px;
}

/* How */

.how {
  background: var(--how-bg);
  color: var(--paper);
}

.how .section-lead {
  color: #c9cef0;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--yellow);
}

.steps li {
  position: relative;
  padding-top: 60px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 4px solid var(--yellow);
  border-radius: 50%;
  background: var(--how-bg);
  color: var(--yellow);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.steps h3 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
}

.steps p {
  max-width: 22em;
  color: #d9ddf7;
}

.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px clamp(24px, 3vw, 40px);
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 24px;
  border-top: 1px solid rgb(244 245 250 / 0.25);
}

.tools dt {
  color: #c9cef0;
  font-size: 15px;
}

.tools dd {
  font-size: 19px;
  font-weight: 700;
}

/* Footer */

.site-footer {
  padding-block: clamp(40px, 6vw, 64px);
  background: var(--blue);
  color: var(--paper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-mark {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.95;
}

.footer-note {
  color: #dde1fb;
  font-size: 15px;
  text-align: right;
}

/* Responsive */

@media (max-width: 900px) {
  .game {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }

  .game-side {
    grid-column: 2;
  }

  .members {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .member {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 20px;
    padding-block: 24px;
  }

  .member > * {
    grid-column: 2;
  }

  .member .avatar {
    grid-column: 1;
    grid-row: 1 / span 4;
    width: 72px;
    height: 72px;
    margin: 0;
    font-size: 22px;
  }

  .member h3 {
    font-size: 28px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }

  .steps::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-foot,
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-nav a {
    font-size: 14px;
  }

  .brand {
    font-size: 21px;
  }

  .game {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 16px;
  }

  .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }

  .game-side {
    grid-column: 1 / -1;
  }

  .wip-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
    padding-left: 0;
  }

  .steps::before {
    display: block;
    top: 8px;
    bottom: 8px;
    left: 16px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .steps li {
    padding-top: 2px;
    padding-left: 60px;
  }

  .tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-note {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .route-end {
    transition: none;
  }
}
