/* =========================================================================
   ONTER Co., Ltd. — 공식 홈페이지 스타일시트
   디자인 톤: 신뢰감 있는 데이터 회사(딥 네이비/차분한 블루)
             게임 섹션만 따뜻한 레트로 포인트
   라이트/다크 모두 지원 · 반응형 필수
   ========================================================================= */

/* ---------- 디자인 토큰 (라이트 기본) ---------- */
:root {
  /* 브랜드 (로고 기준: 차콜 잉크 + 그린 액센트) */
  --navy-900: #161a17;   /* 가장 어두운 차콜 (히어로·푸터 배경) */
  --navy-800: #1f2521;
  --navy-700: #2b332d;
  --blue-600: #45822f;   /* 그린 (버튼·솔리드 필) — 흰 글씨 대비 AA */
  --blue-500: #62a34b;   /* 그린 액센트 (로고 삼각형 톤) */
  --blue-050: #edf4e7;   /* 그린 연한 틴트 */
  --link:     #3f7a30;   /* 그린 텍스트 링크·라벨 (흰 배경 대비 AA) */

  /* 게임(레트로) 포인트 */
  --retro-amber: #e08a2b;
  --retro-red:   #c9503e;
  --retro-cream: #fdf6e9;
  --retro-ink:   #3a2c1a;

  /* 중립 */
  --bg:        #ffffff;
  --bg-soft:   #f4f6f2;
  --surface:   #ffffff;
  --border:    #e4e8df;
  --text:      #1e2521;
  --text-soft: #4c554d;
  --text-mute: #6f776e;

  /* 시스템 */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 18, .06), 0 2px 8px rgba(20, 30, 18, .05);
  --shadow-md: 0 8px 30px rgba(20, 30, 18, .10);
  --maxw: 1120px;
  --header-h: 66px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  color-scheme: light dark;
}

/* ---------- 다크 모드 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e1210;
    --bg-soft:   #141a15;
    --surface:   #161d17;
    --border:    #29332b;
    --text:      #e9efe8;
    --text-soft: #b6c1b4;
    --text-mute: #879485;
    --blue-600:  #45822f;   /* 버튼 유지: 흰 글씨 대비 확보 */
    --blue-500:  #7cc063;   /* 다크용 밝은 액센트 */
    --blue-050:  #1a2416;
    --link:      #8ac66f;   /* 다크 배경 링크·라벨 */
    --retro-cream: #241d12;
    --retro-ink:   #f3e2c4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
    --shadow-md: 0 8px 30px rgba(0,0,0,.45);
  }
}

/* ---------- 리셋 & 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 한글은 어절(띄어쓰기) 단위로만 줄바꿈 — 단어 중간에서 끊기는 어색함 방지 */
  word-break: keep-all;
  overflow-wrap: break-word;   /* 단, 긴 URL·이메일 등은 넘치지 않게 예외적으로 끊음 */
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; color: var(--text-soft); text-wrap: pretty; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }

/* 스킵 링크 (접근성) */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 28px; width: auto; display: block; box-sizing: content-box; }
/* 다크모드 헤더는 배경이 어두워 차콜 로고가 묻히므로 흰 카드 칩 위에 얹음 */
@media (prefers-color-scheme: dark) {
  .site-header .brand-logo { background: #fff; padding: 5px 9px; border-radius: 9px; }
}
/* 푸터는 항상 어두운 배경 → 흰 카드 칩 고정 (로고 패키지의 화이트 카드와 동일한 룩) */
.footer-logo { height: 26px; background: #fff; padding: 7px 11px; border-radius: 10px; box-sizing: content-box; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-soft); font-weight: 600; font-size: .93rem;
  padding: 8px 13px; border-radius: var(--radius-sm); transition: all .15s var(--ease);
}
.nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--link); background: var(--blue-050); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 42px; height: 42px; cursor: pointer;
  color: var(--text); align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 700;
  font-size: .95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #37671f; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-retro { background: var(--retro-amber); color: #fff; }
.btn-retro:hover { background: var(--retro-red); }
.btn[disabled], .btn.is-disabled {
  opacity: .55; cursor: not-allowed; pointer-events: none; box-shadow: none;
}

/* ---------- 섹션 공통 ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--link); margin-bottom: 14px;
}
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
.section-lead { font-size: 1.08rem; color: var(--text-soft); max-width: 640px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* ---------- 히어로 (홈) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 78% -8%, rgba(98, 163, 75, .28), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #eef2ec;
  padding: clamp(72px, 12vw, 128px) 0 clamp(72px, 11vw, 116px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(700px 380px at 75% 0%, #000, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.55rem, 6vw, 3.35rem); font-weight: 800; color: #fff; }
/* 슬로건은 각 구를 한 줄로 고정(어절 중간·구 중간 끊김 방지) */
.hero h1 span { display: block; white-space: nowrap; }
.hero .tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #c2ceba; max-width: 52ch; }
.hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .brand-note {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  padding: 7px 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  font-size: .85rem; color: #cdd8c4; background: rgba(255,255,255,.05);
}
.hero .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.2); }

/* ---------- 사업 카드 그리드 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.card.link-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-500); }
.card h3 { font-size: 1.3rem; }
.card .card-icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 18px; font-size: 1.5rem;
}
.card .card-icon.data { background: var(--blue-050); color: var(--blue-600); }
.card .card-icon.game { background: var(--retro-cream); color: var(--retro-amber); }
.card .badge {
  display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; letter-spacing: .02em; margin-left: 8px; vertical-align: middle;
}
.badge.b2b   { background: var(--blue-050); color: var(--blue-600); }
.badge.b2c   { background: var(--retro-cream); color: var(--retro-red); }
.badge.soon  { background: #fff4e0; color: #b5731a; }
@media (prefers-color-scheme: dark) { .badge.soon { background: #2c2312; color: #e3a94a; } }
.card .card-more { font-weight: 700; color: var(--link); font-size: .93rem; margin-top: 6px; display: inline-block; }

/* 기능/특징 리스트 */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-soft); }
.feature-list .check {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; margin-top: 2px;
  background: var(--blue-050); color: var(--blue-600); display: grid; place-items: center; font-weight: 900; font-size: .8rem;
}

/* ---------- 서브 페이지 헤더 배너 ---------- */
.page-hero {
  background:
    radial-gradient(800px 380px at 85% -20%, rgba(98,163,75,.22), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #eef2ec; padding: clamp(56px, 9vw, 92px) 0;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
.page-hero p { color: #c2ceba; font-size: 1.08rem; max-width: 60ch; margin-bottom: 0; }
.page-hero .eyebrow { color: #9ecb85; }

/* 신뢰/주의 안내 박스 */
.notice-box {
  border: 1px solid var(--border); border-left: 4px solid var(--blue-500);
  background: var(--bg-soft); border-radius: var(--radius-sm);
  padding: 18px 22px; margin: 26px 0; font-size: .95rem; color: var(--text-soft);
}
.notice-box strong { color: var(--text); }

/* ---------- 게임 페이지 (시니어 친화 · 레트로) ---------- */
.game-page { --text-soft: var(--retro-ink); }
.game-hero {
  background:
    radial-gradient(700px 340px at 12% 0%, rgba(224,138,43,.28), transparent 60%),
    linear-gradient(180deg, var(--retro-cream), var(--bg));
  color: var(--retro-ink); padding: clamp(56px, 9vw, 92px) 0;
  border-bottom: 1px solid var(--border);
}
.game-hero .eyebrow { color: var(--retro-red); }
.game-hero h1 { color: var(--retro-ink); font-size: clamp(2rem, 5.5vw, 3rem); }
.game-hero h2 { color: var(--retro-ink); font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: .35em; }
.game-hero p { color: var(--retro-ink); font-size: clamp(1.1rem, 2.6vw, 1.35rem); max-width: 46ch; }

/* 시니어 접근성: 게임 페이지 본문 글자 크게, 대비 높게 */
.game-page .section { font-size: 1.12rem; }
.game-page p { font-size: 1.12rem; line-height: 1.85; }

.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.game-tile {
  background: var(--retro-cream); border: 2px solid color-mix(in srgb, var(--retro-amber) 35%, var(--border));
  border-radius: var(--radius); padding: 28px; color: var(--retro-ink);
}
.game-tile .emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 14px; display: block; }
.game-tile h3 { color: var(--retro-ink); font-size: 1.35rem; }
.game-tile p { margin-bottom: 0; font-size: 1.08rem; }

.store-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px;
  border-radius: 12px; background: var(--retro-ink); color: var(--retro-cream);
  font-weight: 700; font-size: 1.05rem; border: 2px solid var(--retro-ink);
}
.store-badge.is-disabled { opacity: .5; cursor: not-allowed; }
.store-badge small { display: block; font-size: .72rem; font-weight: 500; opacity: .85; }
.store-badge strong { font-size: 1.05rem; }

/* ---------- 회사 소개 (연혁/비전) ---------- */
.vision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; }
.vision-item h3 { font-size: 1.15rem; }
.vision-item .num { font-size: 2rem; font-weight: 800; color: var(--blue-600); }

.timeline { list-style: none; padding: 0; margin: 30px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--blue-500); border: 3px solid var(--bg);
}
.timeline .t-date { font-weight: 800; color: var(--text); }
.timeline .t-desc { color: var(--text-soft); }

.info-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.info-table th, .info-table td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top;
}
.info-table th { width: 34%; color: var(--text-mute); font-weight: 600; white-space: nowrap; }
.info-table td { color: var(--text); font-weight: 500; }

/* ---------- 공고 (전자공고 게시판) ---------- */
.notice-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.notice-list li {
  display: flex; gap: 18px; align-items: baseline; padding: 20px 4px;
  border-bottom: 1px solid var(--border);
}
.notice-list .n-date { flex: 0 0 auto; color: var(--text-mute); font-variant-numeric: tabular-nums; font-size: .92rem; min-width: 108px; }
.notice-list .n-title { font-weight: 600; color: var(--text); }
.notice-empty {
  text-align: center; padding: 72px 24px; border: 1px dashed var(--border);
  border-radius: var(--radius); color: var(--text-mute); background: var(--bg-soft); margin-top: 8px;
}
.notice-empty .n-icon { font-size: 2.4rem; margin-bottom: 12px; }

/* ---------- 문의 ---------- */
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow-sm); text-align: center; max-width: 560px; margin: 0 auto;
}
.contact-card .mail {
  font-size: clamp(1.2rem, 3.5vw, 1.7rem); font-weight: 800; color: var(--link);
  word-break: break-all; display: inline-block; margin: 10px 0 18px;
}

/* ---------- CTA 밴드 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  color: #fff; border-radius: var(--radius); padding: 44px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #dde8d5; max-width: 52ch; margin-inline: auto; }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--navy-900); color: #b6c1b2; padding: 56px 0 32px; margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer a { color: #cdd8c4; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: #8d9989; font-size: .92rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-col a { font-size: .92rem; color: #b6c1b2; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  font-size: .84rem; color: #838d7e; line-height: 1.9;
}
.footer-legal .legal-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.footer-legal .legal-row span { white-space: nowrap; }
.footer-legal .ph { color: #6a7565; font-style: italic; }
.footer-legal .copyright { color: #77826e; }

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .vision-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 2px; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px; box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .25s var(--ease); visibility: hidden;
  }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav a { padding: 13px 12px; font-size: 1rem; }
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .game-grid, .vision-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 22px; }
  .notice-list li { flex-direction: column; gap: 4px; }
  .notice-list .n-date { min-width: 0; }
}
@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .card, .contact-card { padding: 24px; }
}

/* ---------- 모션 최소화 선호 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
