﻿@charset "utf-8";
/* 공통 — 토큰 · 공통 틀 · 버튼 · 헤더 · 한 페이지 넘김 · 등장 애니메이션 (섹션별 꾸밈은 sub.css) */

/* 토큰 — 기본값은 여기, 섹션에서 바꾸면 그 아래로 상속 */
:root {
  --ink: #1a1a1c;
  --dark: #151515;
  --accent: #1f5fe0;
  --gray: #a2a4aa;
  --soft: #f5f6f8;                                       /* 연회색 바탕 (섹션 번갈아) */
  --line: #e6e6e6;
  --w: 1240px;
  --r: 24px;
  --glow: radial-gradient(60% 80% at 75% 30%, #5b9bff 0, #1f5fe0 25%, #0a2a6b 55%, transparent 75%), radial-gradient(50% 60% at 15% 90%, #1f5fe099, transparent 70%), #0b0b0c;
  color: var(--ink);
  background: #fff
}

/* 섹션 제목 — 가운데 제목 + 설명 */
.head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%
}

.head p {
  font-size: 1.4rem
}

/* 카드 묶음 (flex) — 칸 최소폭은 섹션에서 --min 으로 */
.g {
  display: flex;
  flex-wrap: wrap;
  gap: 16px
}

.g>* {
  flex: 1 1 var(--min, 240px);
  min-width: 0
}

/* 여러 칸 분할 */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
  border-top: 1px solid #ffffff1f
}

.row>* {
  flex: 1 1 220px;
  min-width: 0
}

/* 태그 — 색은 섹션의 --accent 상속 */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px
}

.tags span {
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 99px;
  color: var(--accent);
  font-weight: 600
}

/* 버튼 */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  border: 1px solid #0000001a;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transition: .2s
}

.btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.btn:hover {
  translate: 0 -2px
}

/* 헤더 — 로고 / 버튼 · 메뉴(details) */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  background: #fff
}

.headermenu {
  display: flex
}

header img {
  width: 200px;
  padding: 4px 8px
}

details {
  position: relative
}

summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer
}

details nav {
  position: absolute;
  right: 0;
  top: 54px;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 40px #0003
}

details nav a {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600
}

details nav a:hover {
  background: var(--soft);
  color: var(--accent)
}

/* 메뉴 구역 이름 (메뉴 / 관련 사이트 바로가기) */
details nav small {
  padding: 6px 14px 4px;
  color: #8a8f98;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em
}

/* 아래 구역 — 외부 사이트 바로가기: 연회색 상자로 분리 */
details nav .ext {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding: 4px;
  border-radius: 12px;
  background: var(--soft)
}

details nav .ext a {
  padding: 6px 12px;                                       /* 바로가기는 촘촘하게 */
  color: #4b5160;
  font-size: 15px;
  font-weight: 500
}

details nav .ext a:hover {
  background: #fff
}

/* 맨 위로 */
.top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px #0002;
  font-weight: 700
}

/* 한 페이지씩 넘김 — 마우스 휠 환경(데스크톱)에서만 */
@media (min-width:761px) and (hover:hover) {
  html {
    scroll-snap-type: y mandatory
  }

  html.gliding {
    scroll-snap-type: none;
    scroll-behavior: auto
  }

  /* 모든 화면 = 높이 100% → 휠 한 번에 정확히 한 화면 */
  section,
  footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always
  }

  section {
    padding-block: clamp(72px, 9vh, 120px)
  }

  .head {
    margin-bottom: clamp(28px, 4vh, 56px)
  }
}

@media (max-width:760px) {
  section {
    padding-block: 96px
  }

  header .btn:not(.on) {
    display: none
  }

  .row>* {
    padding: 40px 0
  }

  .head {
    text-align: center                                     /* 제목·설명 모두 가운데 */
  }
}

/* ───────── 등장 애니메이션 — 아이템별 시간차 ─────────
   섹션이 화면에 들어오면 js/reveal.js 가 .in 을 붙이고,
   아래 묶음의 아이템이 순서(--i) × 0.09초 간격으로 겹치듯 이어서 올라옴.
   제목(.head)이 먼저, 카드·목록은 --d(0.2초) 뒤에 시작.
   길게(1.1초) + 끝에서 천천히 멈추는 곡선 → 뚝뚝 끊기지 않고 흐르듯 등장 */
:nth-child(1) { --i: 0 }
:nth-child(2) { --i: 1 }
:nth-child(3) { --i: 2 }
:nth-child(4) { --i: 3 }
:nth-child(5) { --i: 4 }
:nth-child(6) { --i: 5 }
:nth-child(n+7) { --i: 6 }

.js :is(.intro, .sites, .head, .g, .row, .hist ol, footer)>*,
.js #about>:not(.g) {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 1.1s cubic-bezier(.33, 0, .2, 1), translate 1.1s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--d, 0s) + var(--i) * .09s);
  will-change: opacity, translate
}

.js :is(.sites, .g, .row, .hist ol)>* {
  --d: .2s
}

.js .in :is(.intro, .sites, .head, .g, .row, .hist ol)>*,
.js .in:is(footer, #about)>* {
  opacity: 1;
  translate: none
}

@media (prefers-reduced-motion:reduce) {
  .js * {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important
  }
}
