/* ============================================================
   김포 풍무동 샤인프라자 — D2 "Stone Ivory" 디자인 시스템
   출처: reports/design-directions.md (2026-07-08 approved, D2)
   Council guardrails 적용:
   - 본문 ≥17px(모바일), line-height 1.6+
   - 장식 hairline #D6D3D1 / 인터랙티브 테두리 ≥3:1 (#A8A29E)
   - WCAG AA 4.5:1 (brass #A16207 on #FAFAF9 ≈ 4.9:1)
   - 터치 타겟 ≥44px
   - prefers-reduced-motion 대응
   ============================================================ */

:root {
  /* palette — D2 Stone Ivory */
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --muted-bg: #F5F4F1;
  --text: #1C1917;
  --text-2: #44403C;
  --text-3: #78716C;
  --brass: #A16207;
  --brass-tint: rgba(161, 98, 7, 0.08);
  --hairline: #D6D3D1;
  --border-ui: #A8A29E;
  --focus: #1C1917;

  /* typography */
  --serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --sans: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;

  /* layout */
  --max: 1080px;
  --gutter: 20px;
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 32px;
  --space-l: 64px;
  --space-xl: 96px;
  --radius: 4px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

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

.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;
}

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

/* ---------- top info bar (정식 정보 공개 예정 — 기능 없음, static) ---------- */
.info-bar {
  background: var(--text);
  color: #F5F2EC;
  font-size: 14px;
  text-align: center;
  padding: 9px var(--gutter);
  letter-spacing: 0.02em;
}
.info-bar .brass { color: #D8B45A; font-weight: 700; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 200ms ease;
}
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(28, 25, 23, 0.06); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 64px;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; }
.brand .name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.brand .name em { font-style: normal; color: var(--brass); }
.brand .sub { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; }

.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--brass); }

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

/* ---------- hero ---------- */
/* hero — full-bleed: 조감도 우측 블리드 + 아이보리 스크림 (좌측 텍스트) */
.hero {
  position: relative;
  overflow: hidden;
  /* grid: .wrap을 풀 폭(1080) 유지 — flex면 콘텐츠 폭으로 수축해 중앙으로 이동 */
  display: grid;
  align-content: center;
  min-height: 600px;
  padding: var(--space-l) 0;
}
/* 이미지 컨테이너: 우측 경계 = 콘텐츠 컬럼 우측 (540px = --max/2), 그 이하 폭 → 풀블리드
   aspect-ratio 654/466 = 소스 769×466의 우측 15% 크롭 라인 (85% 지점, 공한 광장)
   → 프레임 내 건물 위치: 좌 37.6% / 우 94% (중앙 → 우측 이동, 워터마크·우측 배경건물 제외) */
.hero-media {
  position: absolute;
  top: 50%;
  right: max(calc(50% - 540px), 0px);
  transform: translateY(-50%);
  width: min(64%, 760px);
  aspect-ratio: 654 / 466;
  z-index: 0;
}
.hero-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 50%;
  /* D2 Stone Ivory 톤 융합: 미세 웜 필터 + 상/하단 엣지 페더 */
  filter: saturate(0.85) sepia(0.08) contrast(1.02);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
/* 스크림: 이미지 박스에 고정 (뷰포트가 아님) — 페이드는 건물 좌측 경계(37.6%, canvas 측정) 직전 종료 */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 16%, rgba(250, 250, 249, 0.55) 24%, rgba(250, 250, 249, 0) 32%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 560px; }
.hero-credit {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  font-size: 12px;
  color: var(--text-3);
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: var(--space-s);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.hero .lead {
  margin-top: var(--space-s);
  font-size: 17px;
  color: var(--text-2);
  max-width: 520px;
}
.hero .lead .fact-strong { font-weight: 700; color: var(--text); }
.hero-cta { margin-top: var(--space-m); display: flex; gap: 12px; flex-wrap: wrap; }

/* anchor-style buttons (정보 앵커 CTA — 문의 CTA 아님) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--sans);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #292524; }
.btn-line { background: transparent; color: var(--text); border-color: var(--border-ui); }
.btn-line:hover { border-color: var(--text); }
.btn .arrow { font-family: var(--serif); }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.hero-art img { width: 100%; height: auto; display: block; }
.hero-art .art-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-3);
  text-align: right;
}

/* ---------- fact strip ---------- */
.fact-strip {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.fact-strip .cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cell {
  padding: 22px 20px;
  border-left: 1px solid var(--hairline);
}
.cell:first-child { border-left: none; }
.cell .v {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cell .v small { font-size: 15px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.cell .k { font-size: 13.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- sections ---------- */
.section { padding: var(--space-l) 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { margin-bottom: var(--space-m); max-width: 640px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.section-head .k {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 10px;
}
.section-head p { margin-top: 10px; color: var(--text-2); }

/* visible answer block (T-002 규약 — AI 인용용 첫단락) */
.answer-block {
  border-left: 3px solid var(--brass);
  background: var(--surface);
  padding: 20px 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: var(--space-m);
}
.answer-block strong { color: var(--text); }

/* ---------- cards / teaser grid ---------- */
.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  transition: border-color 150ms ease;
}
.card:hover { border-color: var(--border-ui); }
.card .card-k { font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em; color: var(--brass); }
.card h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.35; }
.card p { font-size: 15.5px; color: var(--text-2); flex: 1; }
.card .card-link {
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  min-height: 44px;
}
.card .card-link .arrow { color: var(--brass); }

/* ---------- tables (semantic, caption/scope) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); }
table.fact-table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 480px; }
.fact-table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--text-3);
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--hairline);
}
.fact-table th, .fact-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.fact-table tbody tr:last-child th,
.fact-table tbody tr:last-child td { border-bottom: none; }
.fact-table th[scope="row"] { font-weight: 700; background: var(--muted-bg); width: 34%; color: var(--text); }
.fact-table td .src { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.fact-table .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.fact-table tfoot th, .fact-table tfoot td { border-top: 2px solid var(--text); background: var(--muted-bg); font-weight: 700; }

/* status label (color + text 병기 — anti-pattern 방지) */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 3px; }
.st .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.st-fact { background: var(--brass-tint); color: var(--brass); }
.st-fact .dot { background: var(--brass); }
.st-soon { background: #F5F4F1; color: var(--text-2); border: 1px solid var(--hairline); }
.st-soon .dot { background: var(--text-3); }

/* ---------- coming-soon block ---------- */
.coming {
  background: var(--muted-bg);
  border-top: 1px solid var(--hairline);
  padding: var(--space-l) 0;
}
.coming .inner { text-align: center; max-width: 640px; margin: 0 auto; }
.coming .mark {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; color: var(--brass); font-size: 20px;
}
.coming h2 { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 30px); font-weight: 700; }
.coming p { margin-top: 12px; color: var(--text-2); }
.coming .note { margin-top: 20px; font-size: 13.5px; color: var(--text-3); }

/* ---------- map links ---------- */
.map-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: var(--space-m); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.faq-item { border-bottom: 1px solid var(--hairline); padding: 26px 0; }
.faq-item h2 { font-size: 18px; font-weight: 700; display: flex; gap: 12px; }
.faq-item h2 .q {
  font-family: var(--serif);
  color: var(--brass);
  flex: none;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}
.faq-item p { margin-top: 10px; color: var(--text-2); padding-left: 42px; }
.faq-item .src { padding-left: 42px; font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ---------- strengths (investment) ---------- */
.strength-list { border-top: 1px solid var(--hairline); margin-top: var(--space-m); }
.strength-item { border-bottom: 1px solid var(--hairline); padding: 24px 0; }
.strength-item h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.strength-item p { color: var(--text-2); }
.strength-item .src { display: inline; font-size: 13px; color: var(--text-3); margin-left: 8px; }

/* ---------- page header (subpages) ---------- */
.page-head { padding: var(--space-l) 0 var(--space-m); border-bottom: 1px solid var(--hairline); }
.page-head h1 { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.page-head .lead { margin-top: 12px; color: var(--text-2); max-width: 560px; }
.breadcrumbs { font-size: 13.5px; color: var(--text-3); margin-bottom: 18px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; color: var(--hairline); }

/* ---------- footer ---------- */
.site-footer { background: var(--text); color: #A8A29E; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-m);
  padding: var(--space-l) 0 var(--space-m);
}
.site-footer h4 { color: #F5F2EC; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 14px; }
.site-footer .f-brand { font-family: var(--serif); font-size: 24px; font-weight: 700; color: #F5F2EC; }
.site-footer .f-brand em { font-style: normal; color: #D8B45A; }
.site-footer p, .site-footer li { font-size: 14px; line-height: 1.8; }
.site-footer ul { list-style: none; }
.site-footer a { color: #D6D3D1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-bottom {
  border-top: 1px solid #292524;
  padding: 20px 0 28px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #78716C;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  /* mobile hero: 이미지 밴드 상단, 텍스트 하단 */
  .hero { display: block; min-height: 0; padding: 0 0 var(--space-m); }
  .hero-media {
    position: relative;
    top: 0;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    height: 340px;
  }
  .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
  }
  .hero-scrim { display: none; }
  .hero .wrap { padding-top: var(--space-m); }
  .hero-art { max-width: 420px; }
  .teaser-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --space-l: 48px; --space-xl: 64px; }
  body { font-size: 17px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    display: none;
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: flex; width: 100%; min-height: 48px; border-bottom: 1px solid var(--hairline); border-radius: 0; }
  .site-footer a { min-height: 44px; }
  .site-nav a[aria-current="page"] { border-bottom: 1px solid var(--hairline); box-shadow: inset 3px 0 0 var(--brass); }
  .fact-strip .cells { grid-template-columns: repeat(2, 1fr); }
  .cell:nth-child(3) { border-left: none; }
  .cell { border-top: 1px solid var(--hairline); }
  .cell:nth-child(-n+2) { border-top: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-m); }
}
