/* 디어메타 홈페이지 v2 */

:root {
  --deep: #0a2e2b;          /* 첫 화면·일하는 방식·바닥글 (로고 청록의 가장 짙은 톤) */
  --deep-2: #0f3b37;
  --teal: #02b2a1;          /* 로고 청록 */
  --teal-ink: #00766a;      /* 밝은 바탕 위 링크·연도 */
  --paper: #f3f6f5;         /* 밝은 구역 바탕 */
  --surface: #ffffff;
  --ink: #12201e;
  --mute: #5b6a67;
  --line: #d9e3e1;
  --on-deep: #ffffff;
  --on-deep-mute: rgba(255, 255, 255, .7);
  --on-deep-line: rgba(255, 255, 255, .14);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --radius-lg: 24px;
  --radius: 16px;

  --display: "Orbit", "Pretendard Variable", Pretendard, sans-serif;
  --text: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1716;
    --surface: #122220;
    --ink: #e6eeec;
    --mute: #98a8a5;
    --line: #233733;
    --teal-ink: #3fd3c3;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--teal-ink); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #fff; color: #12201e; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.wall { background: var(--deep); color: var(--on-deep); }

/* ── 버튼 ─────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn-teal { background: var(--teal); color: var(--deep); }
.btn-teal:hover { background: #2fd0bf; }
.btn-line { background: transparent; color: var(--on-deep); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); }
.btn-line:hover { background: rgba(255, 255, 255, .08); }
.btn-deep { background: var(--deep); color: #fff; }
.btn-deep:hover { background: #134a45; }

/* ── 머리글 ───────────────────────────── */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--deep);
  border-bottom: 1px solid transparent;
  color: #fff;
  transition: background-color .25s, border-color .25s;
}
.masthead.scrolled {
  background: rgba(10, 46, 43, .86);
  -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: rgba(255, 255, 255, .08);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 64px;
}
.brand { display: inline-flex; }
.brand img { height: 26px; width: auto; }

.nav ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  color: rgba(255, 255, 255, .82); font-size: 15px; font-weight: 500; text-decoration: none;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .cta a { margin-left: 8px; background: var(--teal); color: var(--deep); font-weight: 700; }
.nav .cta a:hover { background: #2fd0bf; }

.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px;
  border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .close { display: none; }
.nav[data-open] .nav-toggle .open { display: none; }
.nav[data-open] .nav-toggle .close { display: block; }

@media (max-width: 760px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav ul {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 20px; background: var(--deep); border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .js .nav[data-open] ul { display: flex; }
  .js .nav a { min-height: 48px; font-size: 17px; }
  .js .nav .cta a { margin: 8px 0 0; justify-content: center; }
  .nav .hide-sm { display: none; }
}

/* ── 첫 화면 ──────────────────────────── */

.hero { position: relative; overflow: hidden; background: var(--deep); color: var(--on-deep); }

.hero-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  min-height: min(720px, calc(100svh - 64px - 150px));
}

.hero-copy { padding: 72px 0; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6.2vw, 5rem); font-weight: 800; line-height: 1.16; letter-spacing: -.045em;
}
.hero h1 span { display: block; }
.hero .lede {
  max-width: 27em; margin: 24px 0 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); line-height: 1.75; color: var(--on-deep-mute);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }

/* 기울어진 아이콘 벽 */
.icon-wall {
  position: relative; align-self: stretch; height: 100%; min-height: 560px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.icon-wall .tracks {
  position: absolute; inset: -30% -10%; display: flex; justify-content: center; gap: 20px;
  transform: rotate(-10deg);
}
.track { display: flex; flex-direction: column; animation: rise var(--dur, 60s) linear infinite; will-change: transform; }
.track.down { animation-direction: reverse; }
.track img {
  width: 116px; height: 116px; margin: 0 0 20px; border-radius: 27px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06);
  background: var(--deep-2);
}
@keyframes rise { to { transform: translate3d(0, -50%, 0); } }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }

.wall-pause {
  position: absolute; right: var(--gutter); bottom: 24px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.wall-pause:hover { background: rgba(255, 255, 255, .2); }
.wall-pause svg { width: 18px; height: 18px; }
.wall-pause .play { display: none; }
.paused .track { animation-play-state: paused; }
.paused .wall-pause .pause { display: none; }
.paused .wall-pause .play { display: block; }

@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
  .wall-pause { display: none; }
}

/* 숫자로 보는 디어메타 */
.figures {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
}
.figures div {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px;
  padding: 28px 24px 44px 0; border-top: 1px solid var(--on-deep-line);
}
.figures div + div { padding-left: 24px; border-left: 1px solid var(--on-deep-line); }
.figures dd, .work-lead .count, .catalog .year, .catalog-head span {
  word-spacing: -.32em;
}
.figures dd {
  margin: 0; font-family: var(--display); font-size: clamp(2rem, 3.8vw, 3.25rem); line-height: 1.1; color: #fff;
}
.figures dt { font-size: 15px; line-height: 1.5; color: var(--on-deep-mute); }

@media (max-width: 899px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-copy { padding: 48px 0 32px; }
  .icon-wall {
    height: 236px; min-height: 0; margin: 0 calc(var(--gutter) * -1) 12px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  }
  .icon-wall .tracks { inset: 0 -20%; flex-direction: column; justify-content: center; gap: 14px; transform: rotate(-6deg); }
  .track { flex-direction: row; width: max-content; animation-name: slide; }
  .track:nth-child(3) { display: none; }
  .track img { width: 84px; height: 84px; margin: 0 14px 0 0; border-radius: 20px; }
  .wall-pause { bottom: 18px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures div { padding: 22px 16px 26px 0; }
  .figures div + div { padding-left: 0; border-left: 0; }
  .figures div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--on-deep-line); }
  .figures div:nth-child(n+3) { padding-bottom: 36px; }
}

/* ── 구역 공통 ────────────────────────── */

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { max-width: 30em; margin: 0; color: var(--mute); }

.section h2, .work h2, .contact h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; line-height: 1.2; letter-spacing: -.04em;
}

/* ── 게임 ─────────────────────────────── */

.feature { position: relative; }
.feature-media {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg); background: var(--deep-2);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.feature:hover .feature-media img { transform: scale(1.035); }

.feature-body { display: flex; align-items: center; gap: 14px; padding-top: 16px; }
.feature-icon { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.feature h3 { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.feature h3 a { color: inherit; text-decoration: none; }
.feature h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.feature h3 a:focus-visible { outline: 0; }
.feature h3 a:focus-visible::after { outline: 3px solid var(--teal); outline-offset: 4px; }
.feature p { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: var(--mute); }
.feature .store { margin-left: auto; flex: none; font-size: 14px; font-weight: 600; color: var(--teal-ink); }

.feature-lead .feature-media { aspect-ratio: 21 / 9; }
.feature-lead .feature-media img { object-position: 50% 32%; }
.feature-lead .feature-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 32px 28px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: linear-gradient(to top, rgba(6, 22, 20, .86), rgba(6, 22, 20, 0));
  color: #fff;
}
.feature-lead .feature-icon { width: 72px; height: 72px; border-radius: 18px; }
.feature-lead h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; }
.feature-lead p { color: rgba(255, 255, 255, .8); font-size: 16px; }
.feature-lead .store { color: #fff; }

.feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0 0; padding: 0; list-style: none; }

@media (max-width: 899px) {
  .feature-lead .feature-media { aspect-ratio: 16 / 10; }
  .feature-lead .feature-body { padding: 56px 20px 20px; }
  .feature-lead .feature-icon { width: 56px; height: 56px; border-radius: 14px; }
  .feature-lead .store { display: none; }
  .feature-row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 340px);
    gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 24px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter);
  }
  .feature-row::-webkit-scrollbar { display: none; }
  .feature-row .feature { scroll-snap-align: start; }
  .feature-row .feature-media { border-radius: var(--radius); }
  .feature-row .store { display: none; }
}

.catalog-head { margin: clamp(64px, 8vw, 96px) 0 28px; display: flex; align-items: baseline; gap: 12px; }
.catalog-head h3 { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -.03em; }
.catalog-head span { font-family: var(--display); color: var(--mute); font-size: 15px; }

.catalog {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 32px 12px;
  margin: 0; padding: 0; list-style: none;
}
.catalog li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.catalog img {
  width: 80px; height: 80px; border-radius: 19px; margin-bottom: 12px;
  box-shadow: 0 6px 16px rgba(10, 46, 43, .14), 0 0 0 1px rgba(0, 0, 0, .05);
}
.catalog .name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.catalog .year { margin-top: 3px; font-family: var(--display); font-size: 13px; color: var(--mute); }
@media (max-width: 599px) {
  .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 6px; }
  .catalog img { width: 64px; height: 64px; border-radius: 15px; }
  .catalog .name { font-size: 13px; }
}

/* ── 일하는 방식 ──────────────────────── */

.work { padding: clamp(72px, 10vw, 128px) 0; background: var(--deep); color: var(--on-deep); }
.work-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; }
.work-top .intro { margin: 20px 0 0; max-width: 24em; color: var(--on-deep-mute); }

.work-lead {
  position: relative; overflow: hidden; padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg); background: var(--deep-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.work-lead .count { display: block; font-family: var(--display); font-size: clamp(3rem, 7vw, 5.25rem); line-height: 1; color: var(--teal); }
.work-lead h3 { position: relative; margin: 18px 0 8px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; }
.work-lead p { position: relative; margin: 0; max-width: 32em; color: var(--on-deep-mute); }

.ways {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 40px;
  margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; list-style: none;
}
.ways > li { padding-top: 22px; border-top: 1px solid var(--on-deep-line); }
.ways h3 { margin: 0 0 8px; font-size: 1.1875rem; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; }
.ways p { margin: 0; color: var(--on-deep-mute); font-size: 16px; }

.ops h3 { margin: 0 0 14px; font-size: 1.1875rem; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1.4;
  background: rgba(2, 178, 161, .14); color: #bff3ec; box-shadow: inset 0 0 0 1px rgba(2, 178, 161, .35);
}

@media (max-width: 899px) {
  .work-top { grid-template-columns: 1fr; }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
}
@media (max-width: 599px) {
  .ways { grid-template-columns: 1fr; gap: 28px; }
}

/* ── 회사 소개 · 연혁 ─────────────────── */

.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px 80px; align-items: start; }
.about-facts { position: sticky; top: 104px; }
.about-facts h2, .history h2 { margin-bottom: 32px; }

.facts { margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--mute); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts .titles span { white-space: nowrap; }

.timeline, .timeline ul { margin: 0; padding: 0; list-style: none; }
.timeline > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.timeline .year { font-family: var(--display); font-size: 1.625rem; line-height: 1.25; color: var(--teal-ink); }
.timeline ul li { padding: 2px 0; line-height: 1.6; }

@media (max-width: 899px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-facts { position: static; }
}
@media (max-width: 599px) {
  .timeline > li { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 12px; }
  .timeline .year { font-size: 1.3rem; }
}

/* ── 문의 ─────────────────────────────── */

.contact { padding: clamp(72px, 10vw, 120px) 0; background: var(--teal); color: var(--deep); }
.contact-inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px 48px; }
.contact h2 { max-width: 13em; }
.contact p { margin: 14px 0 0; font-size: 18px; font-weight: 500; color: rgba(10, 46, 43, .8); }
.contact .btn { min-height: 56px; padding: 0 30px; font-size: 18px; }

/* ── 바닥글 ───────────────────────────── */

.footer { padding: 56px 0 64px; color: var(--on-deep-mute); font-size: 14px; line-height: 1.8; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: start; }
.footer .brand img { height: 28px; width: auto; }
.footer nav ul { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 16px; padding: 0; list-style: none; }
.footer nav a { color: #fff; font-size: 15px; font-weight: 500; }
.footer p { margin: 0; }
.footer .company { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer .copy { margin-top: 14px; color: rgba(255, 255, 255, .5); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ── 약관 · 개인정보처리방침 ──────────── */

.doc { max-width: 800px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(72px, 10vw, 120px); }
.doc h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.2; letter-spacing: -.04em; }
.doc .meta { margin: 14px 0 0; color: var(--mute); font-size: 15px; }
.doc .intro { margin: 32px 0 0; }
.toc { margin: 36px 0 8px; padding: 24px 28px; background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.toc h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--mute); }
.toc ol { margin: 0; padding: 0; list-style: none; columns: 2 16em; column-gap: 32px; }
.toc li { break-inside: avoid; padding: 3px 0; font-size: 15px; }
.doc h2.clause { margin: 48px 0 12px; font-size: 1.25rem; font-weight: 700; line-height: 1.5; letter-spacing: -.02em; scroll-margin-top: 88px; }
.doc p { margin: 6px 0; font-size: 16px; }
.doc p.l1 { padding-left: 1.2em; }
.doc p.l2 { padding-left: 2.4em; }
.doc p.l3 { padding-left: 3.6em; color: var(--mute); }
.doc .appendix { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--mute); }
.appendix > .clause:first-child { margin-top: 0; }
/* 개인정보 처리방침: 주요 내용 상자, 표 (2026-11-02) */
.doc .summary { margin: 32px 0 0; padding: 22px 26px; background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.doc .summary h2 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--mute); }
.doc .summary ul { margin: 0; padding-left: 1.2em; }
.doc .summary li { margin: 6px 0; font-size: 16px; }
.doc .table-wrap { margin: 14px 0 10px 1.2em; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; background: var(--surface); }
.doc th, .doc td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc thead th, .doc tbody th { font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--line) 35%, var(--surface)); }
.doc tbody th { width: 9em; }
.doc table.wide { min-width: 640px; }
@media (max-width: 560px) { .doc .table-wrap { margin-left: 0; } .doc tbody th { width: 6.5em; } .doc th, .doc td { padding: 9px 10px; } .doc .summary { padding: 18px 18px; } }
.back { margin-top: 56px; }

/* ── 404 ──────────────────────────────── */

.notfound { text-align: center; padding: clamp(96px, 16vw, 180px) var(--gutter); }
.notfound h1 { margin: 0 0 12px; font-size: clamp(2.25rem, 5.5vw, 3.5rem); font-weight: 800; letter-spacing: -.04em; }
.notfound p { margin: 0 0 32px; color: var(--on-deep-mute); }
