/*
 * 와와커뮤니티 홈페이지
 *
 * 본문 서체 Pretendard Variable 은 index.html 의 <link> 로 CDN 에서 불러온다.
 * (@import 를 쓰면 CSS→CSS→woff2 로 요청이 직렬화돼 렌더링이 늦어짐)
 * Copyright (c) 2021 Kil Hyung-jin, with Reserved Font Name Pretendard.
 * https://github.com/orioncactus/pretendard — SIL Open Font License 1.1
 */

/* ── Tokens ─────────────────────────────────────────────── */

:root {
  --navy: #0E2A47;
  --navy-dark: #0A1F36;
  --navy-hover: #0A1F36;
  --accent: #F26B1F;
  --accent-hover: #D4551A;

  --bg: #FAFAF7;
  --bg-panel: #F3F1EC;
  --surface: #fff;

  --text: #0E2A47;
  --text-strong: #44403A;
  --text-muted: #57534A;
  --text-faint: #8A857A;

  --line: #E8E6E0;
  --line-strong: #E0DDD5;
  --line-hover: #C9C4B8;

  --on-navy: #FAFAF7;
  --on-navy-muted: rgba(250, 250, 247, 0.72);
  --on-navy-faint: rgba(250, 250, 247, 0.55);
  --on-navy-line: rgba(250, 250, 247, 0.2);
  --on-navy-line-soft: rgba(250, 250, 247, 0.14);

  --max: 1280px;
  --gutter: 48px;

  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ── Base ───────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a {
  color: var(--text);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 숫자 라벨(01, STEP 1 …). 본문과 같은 서체를 쓰되, 자릿수가 흔들리지
   않도록 고정폭 숫자만 켠다. */
.card__num,
.step__no {
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn--lg {
  padding: 16px 28px;
  border-radius: 8px;
  font-size: 16px;
}

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-hover); }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); }

/* 네이비 밴드 위 보조 버튼. 채우지 않고 테두리로만 선다 —
   페이지에서 채운 버튼은 액센트 하나로 유지한다. */
.btn--outline {
  background: transparent;
  border-color: rgba(250, 250, 247, 0.35);
  color: var(--on-navy);
}
.btn--outline:hover {
  background: rgba(250, 250, 247, 0.08);
  border-color: var(--on-navy);
}

/* 링크가 아니라 파일을 내려받는다는 신호. 페이지에서 유일한 아이콘이다. */
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.doc-link__icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  opacity: 0.85;
}

/* 히어로 보조 버튼. 배경 사진 위에서 눌러 읽히도록 네이비 불투명. */
.btn--ghost {
  background: var(--navy);
  border-color: rgba(250, 250, 247, 0.3);
  color: var(--on-navy);
}
.btn--ghost:hover {
  background: var(--navy-dark);
  border-color: rgba(250, 250, 247, 0.7);
}

/* ── Header ─────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.header.is-scrolled { box-shadow: 0 1px 12px rgba(14, 42, 71, 0.06); }

.header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

/* 로고가 투명 PNG 라 흰 배경을 지우는 mix-blend-mode 가 더는 필요 없다. */
.brand__logo {
  height: 40px;
  width: auto;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.nav__link { color: var(--text-strong); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────── */

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

.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 42, 71, 0.7);
  pointer-events: none;
}

.hero__body {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 200px var(--gutter) 72px;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.hero__copy { max-width: 760px; }

/* 히어로 첫 요소라 위쪽 여백은 .hero__body 의 padding 이 잡는다. */
.hero__title {
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  word-break: keep-all;
}

.hero__lead {
  margin-top: 32px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--on-navy-muted);
  max-width: 620px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  pointer-events: auto;
}

.hero__stats-wrap {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: transparent;
  border: 1px solid rgba(250, 250, 247, 0.14);
}

/* 배경을 깔지 않고 배경 사진이 그대로 비치게 둔다.
   칸을 나누는 선은 부모 배경 대신 각 칸의 outline 으로 그린다.
   (부모에 배경색을 주면 칸이 투명해진 만큼 전체가 뿌옇게 덮인다) */
.stats__item {
  background: transparent;
  outline: 1px solid rgba(250, 250, 247, 0.14);
  padding: 24px;
}

.stats__label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Section shell ──────────────────────────────────────── */

/* 스티키 헤더에 가리지 않도록 앵커 도착 지점을 내린다. */
[id] { scroll-margin-top: 88px; }

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

.section__head { margin-bottom: 48px; }

.section__title {
  font-size: 38px;
  letter-spacing: -0.025em;
  font-weight: 700;
}

/* 제목 바로 밑에 붙는 한 줄 설명. 세 섹션 모두 같은 자리에 온다. */
.section__desc {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  word-break: keep-all;
}

/* ── Service cards ──────────────────────────────────────── */

.cards {
  display: grid;
  gap: 32px;
}

/* 사진과 글을 좌우로 나눈다. 짝수 카드는 좌우를 뒤집어 지그재그로 읽힌다. */
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--line-hover); }

.card:nth-child(even) .card__media { grid-column: 2; grid-row: 1; }
.card:nth-child(even) .card__body  { grid-column: 1; grid-row: 1; }

.card__media {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.card:nth-child(even) .card__media {
  border-right: 0;
  border-left: 1px solid var(--line);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.card__num {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
}

.card__title {
  margin-bottom: 20px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.25;
  word-break: keep-all;
}

.bullets {
  display: grid;
  gap: 10px;
  font-size: 15px;
  color: var(--text-strong);
  line-height: 1.5;
}
.bullets li {
  display: flex;
  gap: 10px;
  word-break: keep-all;
}
.bullets li::before {
  content: '·';
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Clients ────────────────────────────────────────────── */

.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}

/* 여백은 .section 과 동일하게 — 같은 급의 제목을 달고 있다. */
.clients__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 112px var(--gutter);
}

/* 제목은 .section__title 을 그대로 쓴다(서비스 · 진행 절차와 동일). */

/* 셀 테두리 없이 여백만으로 나눈다. 열을 8 에서 4 로 줄여 4줄로 앉히면
   같은 16 개라도 훨씬 두툼하게 읽힌다. 로고 색은 원본 그대로 둔다. */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}

.logo-wall__cell {
  display: grid;
  place-items: center;
  min-height: 88px;
}

.logo-wall__cell img {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* ── Process ────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.step {
  border-top: 2px solid var(--navy);
  padding-top: 20px;
}

.step__media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 20px;
  background: var(--bg-panel);
  overflow: hidden;
}
.step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.step__no {
  font-size: 12px;
  color: var(--text-faint);
}

.step__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.step__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  word-break: keep-all;
}

/* ── Contact ────────────────────────────────────────────── */

.contact {
  background: var(--navy);
  color: var(--on-navy);
}

.contact__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}

.contact__title {
  font-size: 44px;
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.1;
  word-break: keep-all;
}

.contact__lead {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-navy-muted);
  max-width: 420px;
  word-break: keep-all;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.info { border-top: 1px solid var(--on-navy-line); }

.info__row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--on-navy-line-soft);
}

.info__label {
  font-size: 13px;
  color: var(--on-navy-faint);
}

.info__value {
  font-size: 15px;
  line-height: 1.5;
}
.info__value a { color: inherit; }

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  background: var(--navy-dark);
  color: rgba(250, 250, 247, 0.5);
}

.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
}

/* ── Scroll reveal ──────────────────────────────────────── */

/* 기본은 노출 상태 — JS가 관찰을 시작할 때만 숨긴다(no-JS 안전). */
.reveal { transition: opacity 0.5s ease, transform 0.5s ease; }

.reveal.is-armed {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .nav__cta {
    margin-top: 16px;
    text-align: center;
    padding: 14px 18px;
  }

  .hero__body { padding-top: 72px; padding-bottom: 48px; }
  .hero__lead { font-size: 17px; }
  .hero__stats-wrap { padding-bottom: 64px; }

  .section,
  .clients__inner { padding: 72px var(--gutter); }
  .section__title { font-size: 30px; }

  /* 좁아지면 좌우 분할을 풀고 사진을 위로 올린다 */
  .card,
  .card:nth-child(even) { grid-template-columns: 1fr; }
  .card__media,
  .card:nth-child(even) .card__media {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .card__body,
  .card:nth-child(even) .card__body {
    grid-column: 1;
    grid-row: 2;
    padding: 32px;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 72px var(--gutter);
  }
  .contact__title { font-size: 32px; }
}

@media (max-width: 560px) {
  .hero__body { padding-top: 56px; }
  .hero__actions { margin-top: 32px; }

  .steps { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-armed { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
