/* 페티키티 회사 사이트. 흰 바탕과 먹색 한 가지, 색은 게임 그림에서만 나온다. */
:root {
  --paper: #ffffff;
  --ink: #1d2122;
  --ink-2: #555b5c;
  --line: #d9dcdc;
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4rem; --s7: 6rem; --s8: 8rem;
  --t-display: clamp(2.5rem, 4.4vw, 4rem);
  --t-h2: clamp(1.75rem, 2.8vw, 2.5rem);
  --t-h3: 1.75rem;
  --t-lead: 1.3125rem;
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --pad: clamp(1.5rem, 4vw, 4rem);
  --tabs-h: 4.75rem;
}

html { scroll-padding-top: var(--tabs-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Gowun Dodum', system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-underline-position: from-font; text-decoration-thickness: from-font; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
h1, h2, h3, h4, p, dl, dd, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: 'Black Han Sans', 'Gowun Dodum', sans-serif; font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--t-display); line-height: 1.15; }
h2 { font-size: var(--t-h2); line-height: 1.2; }
h3, h4 { font-size: var(--t-h3); line-height: 1.3; }
p { text-wrap: pretty; }
img { max-width: 100%; }

/* 왼쪽 절반: 로고가 고정된 면. 오른쪽 절반만 스크롤된다. */
.stage {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 50%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: var(--s5);
  border-inline-end: 1px solid var(--line);
  background: var(--paper);
}
.logo { width: min(34rem, 86%); cursor: pointer; }
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.logo .ink { fill: var(--ink); }
.logo .paper { fill: var(--paper); }
.logo #armLine, .logo .spk { stroke: var(--ink); stroke-linecap: round; fill: none; }

.tabs, main, .peek, .foot { margin-inline-start: 50%; }

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  min-height: var(--tabs-h);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s2) var(--pad);
  padding-block-start: max(var(--s2), env(safe-area-inset-top));
  border-block-end: 1px solid var(--line);
}
.tabs nav { display: flex; gap: var(--s1); }
.tabs a { text-decoration: none; white-space: nowrap; min-height: 2.75rem; box-sizing: border-box; display: inline-flex; align-items: center; padding-inline: 0.75rem; }
.lang { display: inline-flex; border: 2px solid var(--ink); }
.lang a { font-size: var(--t-small); min-height: 2.5rem; }
.lang a.on { background: var(--ink); color: #fff; }

.sec { padding: var(--s7) var(--pad); }
.sec + .sec { border-block-start: 1px solid var(--line); }

.hero { text-align: center; padding-block: var(--s8) var(--s7); }
.hero h2 { margin-block-start: var(--s6); }
.hero p { font-size: var(--t-lead); margin: var(--s3) auto 0; max-width: 24em; }
/* 소개 글 아래로 지나가는 발자국 */
.trail { display: flex; justify-content: center; gap: var(--s3); margin-block-start: var(--s6); }
.trail svg { width: 2.5rem; height: 2.5rem; fill: var(--ink); }
.trail svg:nth-child(odd) { transform: rotate(78deg) translateX(-0.5rem); }
.trail svg:nth-child(even) { transform: rotate(102deg) translateX(0.5rem); }

.ways ol { list-style: none; margin-block-start: var(--s5); display: grid; gap: var(--s4); }
.ways li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.ways li + li { border-block-start: 1px solid var(--line); padding-block-start: var(--s4); }
.ways p { font-size: var(--t-lead); }

.games h2 { margin-block-end: var(--s5); }
.games .grp { padding-block-end: var(--s1); margin-block-end: var(--s3); border-block-end: 0.25rem solid var(--ink); }
.games article + .grp { margin-block-start: var(--s6); }

/* 벨모라 카드만 게임의 어두운 판과 명조를 쓴다. */
.vel { background: #120f0d; color: #d6cbb4; font-family: 'Nanum Myeongjo', serif; }
.vel-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 58%; -webkit-mask-image: linear-gradient(to top, transparent, #000 35%); mask-image: linear-gradient(to top, transparent, #000 35%); }
.vel-copy { padding: 0 var(--s5) var(--s5); margin-block-start: calc(var(--s6) * -1); position: relative; }
.vel-logo { display: block; width: 15rem; max-width: 70%; }
.vel h4 { font-family: 'Nanum Myeongjo', serif; font-weight: 800; color: #efe6d2; margin-block-start: var(--s3); }
.vel p { line-height: 1.7; margin-block-start: var(--s2); max-width: 30em; }
.vlink { color: #d6cbb4; font-size: var(--t-small); min-height: 2.75rem; display: inline-flex; align-items: center; margin-block-start: var(--s2); }
.vlink:focus-visible { outline-color: #efe6d2; }

.next { border: 0.25rem solid var(--ink); }
.next-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.next-copy { padding: var(--s5); display: grid; gap: var(--s4); }
.next p { margin-block-start: var(--s2); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.facts dt { font-size: var(--t-small); color: var(--ink-2); }
.facts dd { font-family: 'Black Han Sans', sans-serif; font-size: 1.25rem; line-height: 1.3; }

.contact { text-align: center; padding-block-end: var(--s8); }
.mail { font-family: 'Black Han Sans', sans-serif; font-size: var(--t-h2); line-height: 1.2; letter-spacing: -0.01em; display: inline-block; margin-block-start: var(--s3); overflow-wrap: anywhere; text-decoration-thickness: 4px; text-underline-offset: 0.18em; }

/* 바닥글 위로 고개를 내미는 고양이 */
.peek { display: block; width: 11rem; height: auto; margin-inline-end: var(--pad); margin-block: 0 -4.5rem; margin-inline-start: auto; }
.foot { position: relative; z-index: 1; background: var(--ink); color: #d9dcdc; padding: var(--s6) var(--pad) var(--s8); padding-block-end: calc(var(--s8) + env(safe-area-inset-bottom)); font-size: var(--t-small); display: grid; gap: var(--s4); }
.foot-logo { display: block; height: 3.75rem; width: auto; }
.foot dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); line-height: 1.5; }
.foot dt, .foot-row { color: #a9aeae; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.foot-row a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.foot a:focus-visible { outline-color: #fff; }

/* 떠 있는 주요 버튼. 채운 버튼은 이것 하나다. */
.cta {
  position: fixed;
  inset-inline-end: max(var(--s4), env(safe-area-inset-right));
  inset-block-end: max(var(--s4), env(safe-area-inset-bottom));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding-inline: var(--s4);
  box-sizing: border-box;
  border-radius: 1.75rem;
  background: var(--ink);
  color: #fff;
  border: 2px solid #fff;
  font-family: 'Black Han Sans', sans-serif;
  font-size: 1.125rem;
  text-decoration: none;
  white-space: nowrap;
  transition: scale 150ms ease-out;
}
.cta:active { scale: 0.96; }

@media (hover: hover) {
  .tabs nav a:hover { text-decoration: underline; text-underline-offset: 0.4em; }
  .mail:hover { text-decoration-style: double; }
  .cta:hover { background: #000; }
}

@media (prefers-reduced-motion: no-preference) {
  /* 메뉴를 누르면 해당 구역으로 부드럽게 이동한다. */
  html { scroll-behavior: smooth; }

  @keyframes pk-in { from { opacity: 0; translate: 0 0.75rem; filter: blur(4px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
  .hero h1, .hero h2, .hero p { animation: pk-in 600ms ease-out both; }
  .hero h2 { animation-delay: 150ms; }
  .hero p { animation-delay: 250ms; }

  /* 발자국이 하나씩 찍혔다가 함께 사라진다. */
  @keyframes pk-step { 0%, 46% { opacity: 0; } 50%, 96% { opacity: 1; } 100% { opacity: 0; } }
  .trail svg { animation: pk-step 7s infinite both; }
  .trail svg:nth-child(2) { animation-delay: 0.35s; }
  .trail svg:nth-child(3) { animation-delay: 0.7s; }
  .trail svg:nth-child(4) { animation-delay: 1.05s; }

  /* 스크립트가 켜져 있을 때만 숨겼다가, 바닥글이 보이면 한 번 올라온다. */
  .js .peek { translate: 0 72%; transition: translate 450ms cubic-bezier(0.2, 0, 0, 1); }
  .js .peek.up { translate: 0 0; }
}

/* 좁은 화면: 한 줄로 쌓는다. 메뉴는 맨 위에 붙어 있다. */
@media (max-width: 60rem) {
  :root { --t-h3: 1.375rem; --t-lead: 1.125rem; --tabs-h: 3.75rem; }
  .tabs, main, .peek, .foot { margin-inline-start: 0; }
  .tabs { padding-block: var(--s1); padding-block-start: max(var(--s1), env(safe-area-inset-top)); gap: var(--s1); }
  .tabs nav { gap: 0; }
  .tabs a { padding-inline: 0.5rem; }
  .stage { position: static; width: auto; min-height: 21rem; padding: var(--s3) var(--pad); border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .logo { width: min(22rem, 90%); }
  .sec { padding-block: var(--s6); }
  .hero { padding-block: var(--s6); }
  .hero h2 { margin-block-start: var(--s5); }
  .trail { margin-block-start: var(--s5); }
  .trail svg { width: 2.25rem; height: 2.25rem; }
  .contact { padding-block-end: var(--s7); }
  .ways li { grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--s2); }
  .vel-art { aspect-ratio: 4 / 3; }
  .vel-copy { padding: 0 var(--s3) var(--s4); }
  .next-copy { padding: var(--s3); gap: var(--s3); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail { font-size: min(1.75rem, 5.8vw); text-decoration-thickness: 3px; }
  .peek { width: 9.5rem; margin-block-end: -3.875rem; margin-inline-start: auto; }
  .foot { padding-block-start: var(--s5); }
  .foot-logo { height: 3.125rem; }
  .cta { inset-inline-end: max(var(--s2), env(safe-area-inset-right)); inset-block-end: max(var(--s2), env(safe-area-inset-bottom)); min-height: 3rem; padding-inline: var(--s3); font-size: 1rem; }
}
