:root {
  --purple: #7450d9;
  --purple-dark: #4e31a8;
  --purple-soft: #f3efff;
  --purple-pale: #faf8ff;
  --ink: #211d2b;
  --muted: #777181;
  --line: #ebe7f2;
  --white: #ffffff;
  --display: "Manrope", "Arial", sans-serif;
  --body: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { color: var(--white); background: var(--purple); }

.page-shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-inline: max(32px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(50, 37, 78, .08);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.brand-logo { display: block; width: auto; height: auto; max-width: 160px; max-height: 56px; object-fit: contain; flex: 0 1 auto; }
.main-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }
.main-nav a { color: #565061; font-size: 13px; font-weight: 600; transition: color .2s ease; }
.main-nav a:hover { color: var(--purple); }
.header-cta { display: inline-flex; align-items: center; gap: 18px; padding: 11px 15px; color: var(--purple-dark); border: 1px solid #dcd3f4; border-radius: 6px; font-size: 12px; font-weight: 700; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.header-cta:hover { color: var(--white); background: var(--purple); border-color: var(--purple); }
.header-cta span, .primary-button span { font-size: 17px; line-height: 1; }

/* 메인 히어로 */
.hero {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 78px);
  min-height: calc(100svh - 78px);
  margin: 0;
  padding: 64px max(32px, calc((100vw - 1160px) / 2)) 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: start;
  gap: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #211432;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  z-index: -2;
  background-color: #211432;
  background-image: url("/assets/images/MainBackground.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(23, 13, 39, 0.88) 0%,
    rgba(23, 13, 39, 0.68) 48%,
    rgba(23, 13, 39, 0.34) 100%
  );
}

.hero-copy {
  width: min(760px, 100%);
  padding: clamp(26px, 4.5vw, 52px);
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -10% -12%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 35% 48%,
    rgba(14, 7, 27, 0.52) 0%,
    rgba(14, 7, 27, 0.28) 34%,
    rgba(14, 7, 27, 0.08) 57%,
    rgba(14, 7, 27, 0) 74%
  );
  filter: blur(24px);
}

.eyebrow { margin: 0 0 17px; color: var(--purple); font: 800 10px/1.5 var(--display); letter-spacing: .16em; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--purple); border-radius: 50%; vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
.hero .eyebrow, .hero .hero-description, .hero .hero-caption { color: rgba(255, 255, 255, 0.9); }
.hero .eyebrow-dot { background: #c8afff; }
.hero h1 { margin-bottom: 23px; color: #ffffff; font-size: clamp(42px, 5.2vw, 66px); font-weight: 750; letter-spacing: -.075em; line-height: 1.22; text-shadow: 0 2px 22px rgba(10, 4, 22, 0.42); }
.hero h1 span { color: #d6c3ff; }
.hero h1 span::after { display: none; }
.hero-description { margin-bottom: 28px; color: var(--muted); font-size: 14px; line-height: 1.95; word-break: keep-all; }
.hero .hero-description { text-shadow: 0 1px 15px rgba(10, 4, 22, 0.55); }
.primary-button { display: inline-flex; align-items: center; gap: 28px; padding: 15px 19px; color: var(--white); background: #8055e8; border: 1px solid #8055e8; border-radius: 5px; font-size: 12px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24); transition: transform .2s, background .2s; }
.primary-button:hover { color: #ffffff; background: #6840c8; border-color: #6840c8; transform: translateY(-2px); }
.hero-caption { margin: 36px 0 0; color: #9a93a7; font: 700 9px/1.5 var(--display); letter-spacing: .15em; }
.hero .hero-caption { text-shadow: 0 1px 12px rgba(10, 4, 22, 0.5); }
.hero-visual { display: none; }
.hero-logo { display: block; width: auto; height: auto; max-width: min(320px, 100%); max-height: 320px; object-fit: contain; }
.desktop-only { display: initial; }

.projects-rise-trigger { height: 1px; margin-bottom: -1px; pointer-events: none; }

/* =========================================================
   게임 프로젝트: 풀스크린 가로 갤러리
   SuperTree의 프로젝트 소개 섹션에서 영감을 받은 넓은 배치
========================================================= */
.games-section {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.7vh, 28px);

  width: 100%;
  max-width: none;
  min-height: calc(100vh - 78px);
  min-height: calc(100svh - 78px);
  margin: 0;
  padding: clamp(34px, 4.5vh, 48px) clamp(24px, 4.5vw, 76px) clamp(26px, 3.2vh, 38px);
  overflow: hidden;

  border-top: 1px solid rgba(116, 80, 217, .11);
  background:
    radial-gradient(circle at 84% 18%, rgba(116, 80, 217, .085), transparent 27%),
    radial-gradient(circle at 10% 88%, rgba(165, 136, 235, .075), transparent 25%),
    linear-gradient(128deg, #ffffff 0%, #fcfaff 48%, #f7f3ff 100%);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  margin: 0;
  flex: 0 0 auto;
}

.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: 1.12;
}
.section-heading h2 span { color: var(--purple); }
.section-intro {
  position: relative;
  max-width: 340px;
  margin: 0 0 2px;
  padding-right: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  text-align: right;
}
.section-intro::after {
  content: "→";
  position: absolute;
  right: 0;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--purple-dark);
  border: 1px solid rgba(116, 80, 217, .22);
  border-radius: 50%;
  font: 16px/1 var(--display);
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  flex: 0 0 auto;
}
.project-filters {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(116, 80, 217, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
}
.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #746e82;
  background: transparent;
  font: 700 11px/1 var(--body);
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.filter-button span {
  color: #a49caf;
  font: 700 9px/1 var(--display);
  transition: color .2s ease;
}
.filter-button:hover { color: var(--purple-dark); }
.filter-button.is-active {
  color: #fff;
  background: var(--purple);
  box-shadow: 0 4px 12px rgba(116, 80, 217, .2);
}
.filter-button.is-active span { color: rgba(255,255,255,.72); }
.filter-button:focus-visible,
.carousel-arrow:focus-visible,
.pagination-dot:focus-visible {
  outline: 2px solid #9c7ce9;
  outline-offset: 3px;
}
.project-hint {
  margin: 0;
  color: #8d859d;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}
.project-hint span { margin-left: 7px; color: var(--purple); font-size: 16px; }

/* 가로 프로젝트 레일: 스크롤은 가능하지만 스크롤바는 숨깁니다. */
.game-grid {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 28px);
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 28px 30px 34px;
  overflow-x: auto;
  overflow-y: hidden;
  perspective: 1120px;
  scroll-snap-type: none;
  scroll-padding-inline: 30px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.game-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.game-grid:focus-visible {
  outline: 2px solid #bba4f0;
  outline-offset: 3px;
}

/* 좁은 카드와 세로로 조금 더 여유 있는 이미지 비율로 시원한 갤러리 구성 */
.game-card {
  position: relative;
  flex: 0 0 clamp(270px, 27vw, 360px);
  height: clamp(370px, 50svh, 460px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(116, 80, 217, .13);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(63, 41, 119, .055);
  --card-rotate-y: 28deg;
  --card-rotate-z: 1.1deg;
  opacity: 1;
  transform: rotateY(var(--card-rotate-y)) rotateZ(var(--card-rotate-z));
  transform-origin: center center;
  transform-style: preserve-3d;
  scroll-snap-align: center;
  transition:
    opacity .68s ease var(--reveal-delay, 0ms),
    transform .82s cubic-bezier(.18, .72, .22, 1) var(--reveal-delay, 0ms),
    border-color .35s ease,
    box-shadow .35s ease;
}
.game-card:nth-child(even) {
  --card-rotate-y: -28deg;
  --card-rotate-z: -1.1deg;
}

.game-card:hover,
.game-card:focus-within {
  z-index: 2;
  transform: rotateY(0deg) rotateZ(0deg) translateY(-6px) scale(1.025);
  transition-delay: 0ms;
  border-color: rgba(116, 80, 217, .34);
  box-shadow: 0 22px 44px rgba(63, 41, 119, .15);
}

.game-cover-link {
  display: block;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--purple-soft);
}
.game-cover {
  display: block;
  width: 100%;
  aspect-ratio: 1.28 / 1;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .75, .25, 1);
}
.game-card:hover .game-cover,
.game-card:focus-within .game-cover { transform: scale(1.045); }
.cover-topline {
  position: absolute;
  top: 11px;
  left: 11px;
  right: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.game-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--purple-dark);
  background: rgba(255, 255, 255, .94);
  border-radius: 50%;
  font: 800 9px var(--display);
}
.platform-chip {
  padding: 6px 8px;
  color: var(--purple-dark);
  background: rgba(255, 255, 255, .94);
  border-radius: 3px;
  font: 700 8px var(--display);
  letter-spacing: .05em;
}
.cover-action {
  position: absolute;
  right: 11px;
  bottom: 11px;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: var(--purple-dark);
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(28, 18, 48, .13);
  font: 21px var(--display);
  transition: color .25s ease, background .25s ease, transform .25s ease;
}
.game-card:hover .cover-action,
.game-card:focus-within .cover-action {
  color: var(--white);
  background: var(--purple);
  transform: translate(1px, -1px);
}
.game-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 17px 15px;
}
.game-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 7px;
}
.project-type-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  color: #6040b7;
  background: #f0eaff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.project-type-tag.app { color: #427b75; background: #eaf7f4; }
.game-kicker {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--purple);
  font: 800 8px/1.5 var(--display);
  letter-spacing: .11em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}
.game-info h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -.045em;
}
.game-description {
  flex: 1 1 auto;
  min-height: 40px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
  word-break: keep-all;
}
.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid #f0edf5;
}
.game-platform { color: #888194; font-size: 9px; }
.game-cta { color: var(--purple-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.game-cta:hover { color: var(--purple); }
.game-cta.muted { color: #aaa4b6; font-weight: 600; }
.loading-message { flex: 0 0 100%; padding: 30px 0; color: var(--muted); font-size: 13px; }

/* 프로젝트 슬라이더 이동 컨트롤 */
.project-navigation {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  flex: 0 0 auto;
}
.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 74px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #e5def4;
  border-radius: 999px;
  color: var(--purple-dark);
  background: rgba(255,255,255,.82);
  font: 700 11px/1 var(--body);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}
.carousel-arrow > span[aria-hidden="true"] { font: 18px/1 var(--display); }
.carousel-arrow:hover:not(:disabled) { color: #fff; border-color: var(--purple); background: var(--purple); }
.carousel-arrow:disabled { opacity: .35; cursor: default; }
.project-pagination { display: flex; align-items: center; justify-content: center; gap: 7px; }
.pagination-dot {
  display: block;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d9d1e9;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.pagination-dot[aria-current="true"] { width: 23px; background: var(--purple); }
.project-count {
  min-width: 52px;
  color: #655a7b;
  font: 800 10px/1 var(--display);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.project-count span { padding-inline: 3px; color: #bbb3ca; }

/* 스튜디오 소개 */
.studio-section { padding: 75px 0; background: var(--purple-pale); border-top: 1px solid #f1edfa; border-bottom: 1px solid #f1edfa; }
.studio-inner { display: grid; grid-template-columns: 1fr .85fr; align-items: center; gap: 80px; }
.studio-heading .eyebrow { margin-bottom: 12px; }
.studio-heading h2 { margin: 0; font-size: clamp(28px, 3.3vw, 38px); line-height: 1.4; font-weight: 750; letter-spacing: -.065em; }
.studio-heading h2 span { color: var(--purple); }
.studio-copy { padding-left: 28px; border-left: 2px solid #ded3fa; }
.studio-copy p { max-width: 440px; margin-bottom: 21px; color: var(--muted); font-size: 13px; line-height: 2; word-break: keep-all; }
.text-link { display: inline-flex; align-items: center; gap: 15px; color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.text-link:hover { color: var(--purple); }

/* 푸터 */
.site-footer { min-height: 105px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 20px; }
.footer-brand .brand-logo { max-width: 120px; max-height: 42px; }
.site-footer > p { margin: 0; color: #928b9f; text-align: center; font-size: 10px; }
.copyright { color: #928b9f; text-align: right; font: 500 9px var(--display); }

@media (max-width: 900px) {
  .site-header { padding-inline: 22px; }
  .hero { padding-left: 22px; padding-right: 22px; grid-template-columns: minmax(0, 1fr); }
  .hero-visual { min-height: 320px; }
  .hero-logo { max-width: min(280px, 100%); max-height: 280px; }
  .games-section { padding-inline: 22px; }
  .section-heading h2 { font-size: clamp(32px, 4.5vw, 44px); }
  .game-card { flex-basis: clamp(235px, 29vw, 270px); height: clamp(390px, 52svh, 450px); }
  .studio-inner { gap: 42px; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 70px; }
  .site-header { height: 68px; padding-inline: 18px; gap: 12px; }
  .brand-logo { max-width: 130px; max-height: 46px; }
  .main-nav { gap: 14px; }
  .main-nav a { font-size: 11px; }
  .header-cta { display: none; }
  .hero {
    min-height: calc(100vh - 68px);
    min-height: calc(100svh - 68px);
    padding: 36px 18px 64px;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy { padding: 27px 22px; }
  .hero h1 { font-size: clamp(34px, 9vw, 48px); }
  .hero-description { font-size: 12px; }
  .desktop-only { display: none; }
  .hero-caption { margin-top: 27px; font-size: 8px; }
  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(23, 13, 39, 0.56) 0%,
      rgba(23, 13, 39, 0.78) 48%,
      rgba(23, 13, 39, 0.88) 100%
    );
  }
  .hero-copy::before { inset: -8% -10%; filter: blur(20px); }
  .footer-brand .brand-logo { max-width: 100px; max-height: 36px; }
  .games-section {
    min-height: 0;
    gap: 17px;
    padding: 34px 18px 30px;
    overflow: hidden;
  }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-heading h2 { font-size: clamp(31px, 8vw, 39px); }
  .section-intro { max-width: none; padding-right: 31px; font-size: 11px; text-align: left; }
  .section-intro::after { bottom: 0; }
  .project-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .project-filters { gap: 3px; max-width: 100%; }
  .filter-button { min-height: 34px; padding-inline: 13px; font-size: 11px; }
  .project-hint { display: none; }
  .game-grid {
    align-items: stretch;
    gap: 12px;
    padding: 12px 4px 14px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
  }
  .game-card { --card-rotate-y: 0deg; --card-rotate-z: 0deg; flex: 0 0 calc(100% - 8px); width: calc(100% - 8px); height: 420px; min-height: 420px; transform: none; border-radius: 12px; }
  .game-card:hover,
  .game-card:focus-within { transform: none; }
  .game-cover { aspect-ratio: 1.28 / 1; }
  .game-info { padding: 15px 15px 14px; }
  .game-description { min-height: 0; margin-bottom: 13px; font-size: 11px; }
  .project-navigation { display: flex; gap: 11px; justify-content: space-between; }
  .carousel-arrow { min-width: 42px; min-height: 38px; padding-inline: 10px; }
  .carousel-arrow .arrow-word { display: none; }
  .project-pagination { gap: 5px; }
  .pagination-dot { width: 6px; height: 6px; }
  .pagination-dot[aria-current="true"] { width: 19px; }
  .project-count { min-width: 43px; font-size: 9px; }
  .project-navigation .project-count { margin-inline: 2px; }
  .studio-section { padding: 55px 0; }
  .studio-inner { grid-template-columns: 1fr; gap: 25px; }
  .studio-heading h2 { font-size: 29px; }
  .studio-copy { padding-left: 18px; }
  .site-footer { min-height: unset; padding-block: 24px; grid-template-columns: 1fr auto; gap: 12px; }
  .site-footer > p { display: none; }
  .copyright { font-size: 8px; }
}

/* 터치 기기에서도 카드 기울기와 가로 스와이프를 유지 */
@media (hover: none) {
  .game-card:hover .game-cover,
  .game-card:focus-within .game-cover { transform: none; }
}

@media (max-width: 380px) {
  .site-header { padding-inline: 13px; }
  .brand-logo { max-width: 112px; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 10px; }
  .games-section { padding-inline: 13px; }
  .game-card { height: 410px; min-height: 410px; }
  .game-info h3 { font-size: 15px; }
  .project-filters { width: 100%; justify-content: space-between; }
  .filter-button { gap: 5px; padding-inline: 10px; }
}

/* 사용자가 움직임 줄이기를 요청한 경우 애니메이션을 최소화 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}


/* =========================================================
   OHRORA STUDIO — high-contrast sections
   Charcoal / vivid violet, inspired by bold editorial portfolios.
========================================================= */
:root {
  --purple: #c3a6ff;
  --purple-dark: #1d1430;
  --purple-soft: #e5d8ff;
  --purple-pale: #0a0a08;
  --ink: #100d17;
  --muted: #c5bdd5;
  --line: rgba(195, 166, 255, .24);
  --white: #ffffff;
  --acid: #c3a6ff;
  --acid-olive: #8f6be8;
  --near-black: #0a0a08;
  --display: "Manrope", "Arial", sans-serif;
  --body: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

body { color: #f7f8f1; background: var(--near-black); }
::selection { color: var(--near-black); background: var(--acid); }

.site-header {
  background: rgba(10, 10, 8, .96);
  border-bottom: 1px solid rgba(195, 166, 255, .28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.main-nav a { color: #e7e8de; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--acid); }
.header-cta {
  color: var(--near-black);
  background: var(--acid);
  border-color: var(--acid);
  border-radius: 999px;
  font-weight: 850;
}
.header-cta:hover { color: var(--acid); background: var(--near-black); border-color: var(--acid); }

.hero {
  background: var(--near-black);
  border-bottom: 5px solid var(--acid);
}
.hero::before {
  filter: saturate(.8) brightness(.75);
  transform: scale(1.015);
}
.hero::after {
  background: linear-gradient(90deg,
    rgba(7, 7, 5, .97) 0%,
    rgba(7, 7, 5, .87) 37%,
    rgba(7, 7, 5, .49) 74%,
    rgba(7, 7, 5, .27) 100%);
}
.hero-copy::before {
  background: radial-gradient(ellipse at 36% 45%, rgba(0, 0, 0, .44), rgba(0, 0, 0, 0) 72%);
}
.hero .eyebrow { color: var(--acid); }
.hero .eyebrow-dot { background: var(--acid); }
.hero h1 { color: #fbfcf5; text-shadow: 0 4px 36px rgba(0, 0, 0, .62); }
.hero h1 span { color: var(--acid); }
.hero .hero-description { color: #e0e2d4; }
.primary-button {
  color: var(--near-black);
  background: var(--acid);
  border-color: var(--acid);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(166, 126, 255, .22);
}
.primary-button:hover { color: var(--acid); background: var(--near-black); border-color: var(--acid); }
.hero-caption { color: var(--acid) !important; }

/* The projects band is deliberately light and visually separated from its neighbours. */
.games-section {
  min-height: calc(100vh - 78px);
  min-height: calc(100svh - 78px);
  gap: clamp(16px, 2.6vh, 27px);
  background: linear-gradient(135deg, #c7b0ff 0%, #a98af3 62%, #8966df 100%);
  border-top: 0;
  border-bottom: 5px solid var(--near-black);
}
.section-heading .eyebrow { color: #24163f; font-weight: 900; letter-spacing: .19em; }
.section-heading h2 { color: #0a0a08; }
.section-heading h2 span { color: #f4edff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .24); }
.section-intro { color: rgba(25, 15, 45, .82); font-size: 10px; font-weight: 850; letter-spacing: .09em; }
.section-intro::after {
  color: var(--acid);
  background: var(--near-black);
  border-color: var(--near-black);
}
.project-toolbar { margin-top: 1px; }
.project-filters {
  padding: 5px;
  background: var(--near-black);
  border: 1px solid rgba(0, 0, 0, .85);
  border-radius: 999px;
}
.filter-button { color: #d7d9c8; }
.filter-button span { color: #b7a2df; }
.filter-button:hover { color: var(--acid); }
.filter-button.is-active {
  color: var(--near-black);
  background: var(--acid);
  box-shadow: 0 3px 0 rgba(255, 255, 255, .08) inset;
}
.filter-button.is-active span { color: rgba(10, 10, 8, .65); }
.filter-button:focus-visible, .carousel-arrow:focus-visible, .pagination-dot:focus-visible {
  outline-color: var(--near-black);
}

.game-grid { gap: clamp(38px, 4vw, 54px); padding: 46px 56px 54px; scroll-padding-inline: 56px; }
.game-card {
  flex-basis: clamp(280px, 27vw, 360px);
  height: clamp(500px, 60svh, 540px);
  min-height: 500px;
  background: #0b0c08;
  border: 1px solid rgba(195, 166, 255, .56);
  border-radius: 17px;
  box-shadow: 0 22px 0 rgba(0, 0, 0, .08), 0 25px 42px rgba(0, 0, 0, .22);
  --card-rotate-y: 28deg;
  --card-rotate-z: 1.15deg;
  transition:
    opacity .72s ease,
    transform .98s cubic-bezier(.16, 1, .3, 1),
    border-color .32s ease,
    box-shadow .32s ease;
}
.game-card:nth-child(even) { --card-rotate-y: -28deg; --card-rotate-z: -1.15deg; }
.game-card:hover, .game-card:focus-within {
  border-color: var(--acid);
  box-shadow: 0 22px 0 rgba(0, 0, 0, .08), 0 28px 48px rgba(0, 0, 0, .32);
}
.game-cover-link { background: var(--acid); }
.game-cover { aspect-ratio: 1.22 / 1; }
.game-number {
  color: var(--near-black);
  background: var(--acid);
  border-radius: 7px;
  font-size: 10px;
}
.platform-chip {
  color: #fff;
  background: rgba(10, 10, 8, .88);
  border: 1px solid rgba(195, 166, 255, .8);
  border-radius: 999px;
}
.cover-action { color: var(--near-black); background: var(--acid); border-radius: 9px; }
.game-card:hover .cover-action, .game-card:focus-within .cover-action { color: var(--acid); background: var(--near-black); }
.game-info { padding: 17px 18px 16px; color: #f7f8ef; }
.game-meta-line { margin-bottom: 9px; }
.project-type-tag {
  color: var(--near-black);
  background: var(--acid);
  border-radius: 999px;
  font-weight: 900;
}
.project-type-tag.app { color: #090a06; background: #fff; }
.game-kicker { color: var(--acid); letter-spacing: .09em; }
.game-info h3 { color: #fff; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.42; }
.game-description { color: #d0d2c3; font-size: 11px; line-height: 1.8; }
.game-footer { border-top: 1px solid rgba(195, 166, 255, .28); }
.game-platform { color: #c0b4d9; }
.game-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  color: var(--near-black);
  background: var(--acid);
  border: 1px solid var(--acid);
  border-radius: 999px;
  font-size: 10px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.game-cta:hover { color: var(--acid); background: var(--near-black); transform: translateY(-1px); }
.game-cta.muted { color: #f0eaff; background: transparent; border-color: #55466f; }
.loading-message { color: #24163f; }

/* Navigation controls are mobile-only. Desktop relies on mouse-wheel/trackpad. */
.project-navigation { display: none; }

.studio-section {
  padding: clamp(70px, 9vw, 108px) 0;
  background: var(--near-black);
  color: #f7f8f1;
  border-top: 0;
  border-bottom: 5px solid var(--acid);
}
.studio-heading .eyebrow { color: var(--acid); }
.studio-heading h2 { color: #fff; }
.studio-heading h2 span { color: var(--acid); }
.studio-copy { border-left: 3px solid var(--acid); }
.studio-copy p { color: #c4c6b8; }
.text-link { color: var(--acid); }
.text-link:hover { color: #fff; }
.site-footer {
  width: 100%;
  max-width: none;
  min-height: 112px;
  padding: 22px max(32px, calc((100vw - 1160px) / 2));
  background: var(--acid);
  color: var(--near-black);
  border-top: 0;
}
.site-footer > p, .copyright { color: rgba(10, 10, 8, .78); }

@media (max-width: 900px) {
  .games-section { padding-inline: 22px; }
  .game-grid { padding-inline: 28px; scroll-padding-inline: 28px; }
  .game-card { flex-basis: clamp(250px, 36vw, 330px); }
  .site-footer { padding-inline: 22px; }
}

@media (max-width: 600px) {
  .site-header { background: rgba(10, 10, 8, .97); }
  .hero {
    border-bottom-width: 4px;
    padding: 34px 16px 54px;
  }
  .hero::after {
    background: linear-gradient(180deg, rgba(7, 7, 5, .62) 0%, rgba(7, 7, 5, .83) 48%, rgba(7, 7, 5, .96) 100%);
  }
  .hero-copy { padding: 25px 18px; }
  .hero h1 { font-size: clamp(34px, 9vw, 47px); }
  .games-section {
    min-height: 0;
    gap: 18px;
    padding: 36px 16px 26px;
    background: linear-gradient(145deg, #c7b0ff, #9d7be9);
  }
  .section-heading { gap: 9px; }
  .section-heading h2 { font-size: clamp(32px, 8vw, 40px); }
  .section-intro { font-size: 9px; letter-spacing: .06em; }
  .project-toolbar { align-items: flex-start; }
  .project-filters { width: 100%; justify-content: space-between; }
  .filter-button { flex: 1 1 auto; justify-content: center; }
  .game-grid {
    align-items: stretch;
    gap: 22px;
    padding: 48px 7px 52px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 7px;
  }
  .game-card {
    --card-rotate-y: 0deg;
    --card-rotate-z: 0deg;
    flex: 0 0 calc(100% - 6px);
    width: calc(100% - 6px);
    height: 520px;
    min-height: 520px;
    transform: none;
    border-radius: 15px;
    box-shadow: 0 14px 0 rgba(0, 0, 0, .07), 0 20px 28px rgba(0, 0, 0, .2);
  }
  .game-card:hover, .game-card:focus-within { transform: none; }
  .game-cover { aspect-ratio: 1.34 / 1; }
  .game-info { padding: 16px 16px 15px; }
  .game-info h3 { font-size: 17px; }
  .game-description { font-size: 12px; }
  .project-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
  }
  .carousel-arrow {
    color: var(--acid);
    background: var(--near-black);
    border: 1px solid var(--near-black);
    border-radius: 999px;
  }
  .carousel-arrow:hover:not(:disabled) { color: var(--near-black); background: #fff; border-color: #fff; }
  .carousel-arrow:disabled { color: #a89ac6; }
  .pagination-dot { background: rgba(10, 10, 8, .32); }
  .pagination-dot[aria-current="true"] { background: var(--near-black); }
  .project-count { color: var(--near-black); }
  .project-count span { color: rgba(25, 15, 45, .6); }
  .studio-section { padding: 58px 0 62px; }
  .studio-inner { gap: 22px; }
  .studio-heading h2 { font-size: clamp(28px, 7.5vw, 34px); }
  .studio-copy { padding-left: 16px; }
  .site-footer {
    min-height: 0;
    padding: 22px 16px;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }
  .footer-brand .brand-logo { max-width: 86px; max-height: 38px; }
  .copyright { font-size: 8px; }
}

@media (max-width: 380px) {
  .games-section { padding-inline: 13px; }
  .game-card { height: 505px; min-height: 505px; }
  .site-footer { padding-inline: 13px; }
}

/* 카드 진입 애니메이션은 site.js의 Web Animations API가 담당합니다.
   카드 opacity는 유지하며, transform의 시작/종료 위치를 직접 애니메이션합니다. */


/* PC에서는 카드마다 좌우 기울기를 번갈아 적용해 리듬감을 줍니다. */
@media (min-width: 601px) {
  /* PC: 같은 45도 각도로 기울이고 좌우 방향만 거울처럼 반전합니다. */
  .games-section .game-grid .game-card {
    --card-rotate-y: 45deg;
    --card-rotate-z: 1.25deg;
  }
  .games-section .game-grid .game-card:nth-child(even) {
    --card-rotate-y: -45deg;
    --card-rotate-z: -1.25deg;
  }
}

/* 모바일 가로 스와이프는 site.js에서 한 카드 단위로 처리합니다. */
@media (max-width: 600px) {
  .games-section .game-grid {
    touch-action: pan-y pinch-zoom;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    overscroll-behavior-x: contain;
  }
  .games-section .game-grid .game-card,
  .games-section .game-grid .game-card:nth-child(even) {
    --card-rotate-y: 0deg;
    --card-rotate-z: 0deg;
    scroll-snap-align: center;
  }
}

/* 웹툰 섹션은 게임 갤러리와 분명히 구분되는 어두운 보라색 공간으로 구성합니다. */
.webtoon-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(720px, 86svh);
  display: flex;
  align-items: center;
  padding: clamp(68px, 9vw, 112px) 0;
  color: #f8f5ff;
  background:
    radial-gradient(ellipse at 82% 24%, rgba(124, 82, 213, .22), transparent 44%),
    linear-gradient(135deg, #0a0a08 0%, #15101e 52%, #0a0a08 100%);
  border-top: 5px solid var(--acid);
  border-bottom: 5px solid var(--acid);
}
.webtoon-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(38px, 7vw, 96px);
}
.webtoon-heading .eyebrow {
  color: #c3a6ff;
  letter-spacing: .2em;
}
.webtoon-heading h2 {
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(46px, 6.7vw, 86px);
  line-height: 1;
  letter-spacing: -.075em;
  font-weight: 850;
}
.webtoon-heading h2 span { color: #c3a6ff; }
.webtoon-description {
  max-width: 340px;
  margin: 0;
  color: #c7bfd5;
  font-size: 14px;
  line-height: 1.9;
  word-break: keep-all;
}
.webtoon-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.webtoon-link {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 218px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 9px;
  padding: clamp(20px, 2.2vw, 28px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, rgba(195, 166, 255, .12), rgba(255, 255, 255, .025) 56%), #111016;
  border: 1px solid rgba(195, 166, 255, .4);
  border-radius: 17px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
  transition: border-color .24s ease, background .24s ease, transform .24s ease, box-shadow .24s ease;
}
.webtoon-link::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #8f6be8;
  transform: scaleX(.22);
  transform-origin: left center;
  transition: transform .3s ease;
}
.webtoon-link:hover,
.webtoon-link:focus-visible {
  transform: translateY(-5px);
  border-color: #c3a6ff;
  background: linear-gradient(150deg, rgba(143, 107, 232, .22), rgba(255, 255, 255, .035) 62%), #111016;
  box-shadow: 0 26px 50px rgba(0, 0, 0, .3);
}
.webtoon-link:hover::before,
.webtoon-link:focus-visible::before { transform: scaleX(1); }
.webtoon-link:focus-visible { outline: 2px solid #c3a6ff; outline-offset: 4px; }
.webtoon-link-eyebrow {
  color: #c3a6ff;
  font: 800 10px/1.4 var(--display);
  letter-spacing: .19em;
}
.webtoon-link-title {
  max-width: 100%;
  color: #fff;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.webtoon-link-description {
  color: #bdb5cc;
  font-size: 11px;
  line-height: 1.6;
}
.webtoon-link-arrow {
  position: absolute;
  top: 20px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0a0a08;
  background: #c3a6ff;
  border-radius: 50%;
  font-size: 18px;
  transition: transform .24s ease;
}
.webtoon-link:hover .webtoon-link-arrow { transform: translate(2px, -2px); }
.webtoon-link.is-unavailable {
  opacity: .62;
  cursor: default;
  box-shadow: none;
}
.webtoon-link.is-unavailable:hover,
.webtoon-link.is-unavailable:focus-visible { transform: none; background: linear-gradient(150deg, rgba(195, 166, 255, .08), rgba(255, 255, 255, .02) 56%), #111016; }
.webtoon-link.is-unavailable::before { transform: scaleX(.22); }
.webtoon-link.is-unavailable .webtoon-link-arrow { color: #d6c8f3; background: #30283e; }

@media (max-width: 900px) {
  .webtoon-inner { grid-template-columns: 1fr; gap: 30px; }
  .webtoon-heading { max-width: 580px; }
  .webtoon-description { max-width: 480px; }
  .webtoon-link { min-height: 190px; }
}

@media (max-width: 600px) {
  .webtoon-section { min-height: 0; padding: 62px 0 68px; }
  .webtoon-inner { gap: 29px; }
  .webtoon-heading h2 { font-size: clamp(48px, 13vw, 66px); }
  .webtoon-description { font-size: 13px; }
  .webtoon-links { grid-template-columns: 1fr; gap: 12px; }
  .webtoon-link { min-height: 150px; padding: 22px; }
  .webtoon-link-title { font-size: 24px; }
  .webtoon-link-arrow { top: 18px; right: 18px; }
}

/* 최종 PC 카드 회전 보정:
   공통 레일의 perspective는 레일 중앙을 기준으로 카드마다 원근 강도가 달라 보이게 합니다.
   원근을 각 카드의 transform 안으로 옮겨 모든 카드가 같은 크기·각도로 보이도록 합니다. */
@media (min-width: 601px) {
  .games-section .game-grid {
    perspective: none;
  }

  .games-section .game-grid .game-card,
  .games-section .game-grid .game-card:nth-child(even) {
    transform: perspective(1100px) rotateY(var(--card-rotate-y)) rotateZ(var(--card-rotate-z));
    transform-origin: center center;
  }

  /* 마우스를 올리면 기존 동작대로 정면(0도)을 향합니다. */
  .games-section .game-grid .game-card:hover,
  .games-section .game-grid .game-card:focus-within {
    transform: perspective(1100px) rotateY(0deg) rotateZ(0deg) translateY(-6px) scale(1.025);
  }
}
