/* =========================================
   추진 사업 — 오션프론트 리조트 개발 페이지
   (styles.css 토큰/컴포넌트 재사용 + 페이지 전용)
   ========================================= */

.proj-page {
  padding-top: 0;
  /* page-local deep tone for large image/color blocks (keeps white text legible
     even though the global --bg-deep is now bright sky) */
  --proj-deep: #103c52;
  --proj-deep-2: #0c2f41;
}

/* In-page anchor offset for fixed nav + smooth scroll */
html { scroll-behavior: smooth; }
#overview, #land, #infra, #render, #aerial, #maps { scroll-margin-top: 84px; }

/* Nav CTA (projects page) */
.nav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  transition: background 180ms ease;
}
.nav .nav-cta:hover { background: var(--accent-2); color: #fff; }
.nav .nav-cta::after { display: none !important; }
.nav .nav-cta .arrow { font-family: var(--font-mono); }

/* ---------- Hero ---------- */
.proj-hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--proj-deep);
}
.proj-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}
.proj-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,20,38,0.55) 0%, rgba(10,20,38,0.15) 38%, rgba(10,20,38,0.82) 100%);
}
.proj-hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 72px;
  padding-top: 140px;
}
.proj-hero .eyebrow { color: var(--accent-2); }
.proj-hero .eyebrow .bar { background: var(--accent-2); }
.proj-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #fff;
  margin: 22px 0 0;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.proj-hero .slogan {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 28px);
  color: rgba(255,255,255,0.92);
  margin: 20px 0 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.proj-hero .loc {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.proj-hero .loc svg { width: 16px; height: 16px; }
.proj-hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.proj-hero-cta .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.proj-hero-cta .btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ---------- Stats bar ---------- */
.proj-stats {
  background: var(--proj-deep-2);
  color: var(--on-deep);
}
.proj-stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.proj-stat {
  padding: 40px 28px;
  position: relative;
}
.proj-stat + .proj-stat::before {
  content: "";
  position: absolute;
  left: 0; top: 28px; bottom: 28px;
  width: 1px;
  background: rgba(255,255,255,0.12);
}
.proj-stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.proj-stat .value {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.proj-stat .sub {
  font-size: 13px;
  color: var(--on-deep-mute);
  margin-top: 6px;
}

/* ---------- Generic section ---------- */
.proj-section { padding: 110px 0; }
.proj-section.tint { background: var(--bg-elevated); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proj-head { max-width: 760px; margin-bottom: 56px; }
.proj-head h2 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.035em;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 0;
  text-wrap: balance;
}
.proj-head p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 20px 0 0;
}

/* ---------- Overview facts ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}
.overview-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.fact-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.fact-row .k {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.fact-row .v {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.55;
}
.fact-row .v strong { font-weight: 700; }
.overview-note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 24px 26px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--accent-ink);
  border-radius: 0 4px 4px 0;
}

/* ---------- Land schedule table ---------- */
.land-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.land-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-variant-numeric: tabular-nums;
}
.land-table thead th {
  background: var(--proj-deep);
  color: var(--on-deep);
  font-size: 12.5px;
  font-weight: 600;
  padding: 14px 12px;
  text-align: right;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.land-table thead th:first-child,
.land-table thead th:nth-child(2),
.land-table thead th:nth-child(3) { text-align: center; }
.land-table thead .grp th {
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 12px;
}
.land-table tbody td {
  font-size: 14px;
  padding: 14px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  white-space: nowrap;
}
.land-table tbody td:first-child,
.land-table tbody td:nth-child(2),
.land-table tbody td:nth-child(3) { text-align: center; color: var(--ink-2); }
.land-table tbody tr:hover td { background: var(--bg-soft); }
.land-table tbody .jimok {
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.land-table tbody .jimok.im { background: var(--lime-soft); color: var(--lime-ink); }
.land-table tfoot td {
  font-size: 14.5px;
  font-weight: 700;
  padding: 16px 12px;
  text-align: right;
  background: var(--bg-elevated);
  border-top: 2px solid var(--ink);
  color: var(--ink);
  white-space: nowrap;
}
.land-table tfoot td:first-child { text-align: center; color: var(--accent); }
.land-note {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 16px;
  line-height: 1.6;
}
.land-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
.land-chip {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 22px 24px;
}
.land-chip .lc-k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.land-chip .lc-v {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
  letter-spacing: -0.02em;
}
.land-chip.accent { background: var(--proj-deep); border-color: var(--proj-deep); }
.land-chip.accent .lc-k { color: var(--accent-2); }
.land-chip.accent .lc-v { color: #fff; }

/* ---------- Infrastructure ---------- */
.infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.infra-figure { margin: 0; }
.infra-figure img {
  width: 100%;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: filter 200ms ease;
}
.infra-figure img:hover { filter: brightness(1.03); }
.infra-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-top: 12px;
  text-transform: uppercase;
}
.infra-list { display: grid; gap: 22px; }
.infra-item { }
.infra-item .it-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.infra-item .it-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.infra-item:nth-child(2n) .it-dot { background: var(--accent-2); }
.infra-item .it-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.infra-item .it-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  padding-left: 19px;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: zoom-in;
}
.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 20px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10,20,38,0.78));
  letter-spacing: 0.02em;
}
.g-span-7 { grid-column: span 7; }
.g-span-5 { grid-column: span 5; }
.g-span-6 { grid-column: span 6; }
.g-span-12 { grid-column: span 12; }
.gallery figure.tall { min-height: 340px; }

/* ---------- Maps ---------- */
.maps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.map-figure { margin: 0; }
.map-figure img {
  width: 100%;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: var(--bg-elevated);
}
.map-figure figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.map-figure .mf-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 3px 8px;
}
.map-figure .mf-t { font-size: 15px; font-weight: 700; color: var(--ink); }

/* ---------- CTA band ---------- */
.proj-cta {
  position: relative;
  background: var(--proj-deep);
  color: #fff;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}
.proj-cta::before {
  content: none;
}
.proj-cta .container { position: relative; z-index: 1; }
.proj-cta h2 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}
.proj-cta p {
  font-size: 17px;
  color: var(--on-deep-mute);
  margin: 0 auto 36px;
  max-width: 540px;
  line-height: 1.7;
}
.proj-cta .btn-primary { background: var(--accent); border-color: var(--accent); }
.proj-cta .btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,16,30,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 280ms ease;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  transform: scale(0.97);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.lightbox.open img { transform: scale(1); }
.lightbox .lb-close {
  position: absolute;
  top: 24px; right: 28px;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox .lb-cap {
  position: absolute;
  bottom: 28px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

/* ---------- Back link ---------- */
.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 8px;
  transition: color 160ms ease;
}
.proj-back:hover { color: var(--accent); }

/* ---------- Reveal ---------- */
.r { opacity: 1; transform: none; transition: opacity 760ms cubic-bezier(.2,.7,.2,1), transform 760ms cubic-bezier(.2,.7,.2,1); }
.r[data-pending] { opacity: 0; transform: translateY(26px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .proj-stats .container { grid-template-columns: 1fr 1fr; }
  .proj-stat:nth-child(3)::before, .proj-stat:nth-child(odd)::before { display: none; }
  .proj-stat { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .overview-grid, .infra-grid, .maps-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery > figure { grid-column: span 12 !important; }
  .proj-section { padding: 72px 0; }
  .proj-hero { min-height: 76vh; }
}
@media (max-width: 560px) {
  .proj-stats .container { grid-template-columns: 1fr; }
  .proj-stat::before { display: none !important; }
  .fact-row { grid-template-columns: 1fr; gap: 6px; }
}

/* =========================================
   Print / PDF (이메일 제출용)
   ========================================= */
@page {
  size: A4;
  margin: 9mm 11mm;
}
@media print {
  html, body { background: #fff !important; }

  /* 화면 전용 요소 숨김 */
  .nav, .lightbox, .proj-back, .scroll-hint, .proj-cta, .proj-hero-cta { display: none !important; }

  /* reveal 애니메이션 강제 표시 */
  .r, .r[data-pending] { opacity: 1 !important; transform: none !important; }

  /* 색·이미지 그대로 인쇄 */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; box-shadow: none !important; }
  a { text-decoration: none !important; color: inherit !important; }
  img { max-width: 100% !important; }

  /* ===== 페이지 1: 히어로 + 스탯 ===== */
  .proj-hero {
    min-height: auto !important;
    height: auto !important;
    padding: 0 !important;
    display: block !important;
    background: var(--proj-deep) !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .proj-hero, .proj-hero * { break-inside: avoid !important; page-break-inside: avoid !important; }
  .proj-hero-img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 74mm !important;
    object-fit: cover !important;
    display: block !important;
  }
  .proj-hero::after { display: none !important; }
  .proj-hero .container {
    position: relative !important;
    background: var(--proj-deep) !important;
    padding-top: 7mm !important;
    padding-bottom: 7mm !important;
  }
  .proj-hero h1 { font-size: 30px !important; margin: 8px 0 0 !important; }
  .proj-hero .slogan { margin-top: 8px !important; }
  .proj-hero .loc { margin-top: 10px !important; }
  .proj-stats {
    padding: 9mm 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    break-before: avoid !important;
    break-after: page;
  }

  /* ===== 각 섹션 = 한 페이지 ===== */
  .proj-section {
    padding: 0 !important;
    margin: 0 !important;
    break-before: page;
    break-after: page;
    break-inside: avoid;
    border: none !important;
  }
  .proj-section > .container {
    padding-top: 6mm !important;
    padding-bottom: 6mm !important;
  }
  /* 마지막 섹션 뒤 빈 페이지 방지 */
  .proj-section:last-of-type { break-after: auto; }

  /* 섹션 머리글 간격 축소 */
  .proj-head { margin-bottom: 5mm !important; break-inside: avoid; }
  .proj-head h2 { font-size: 23px !important; }
  .proj-head p { font-size: 13px !important; margin-top: 4px !important; }
  h2, h3, h4 { break-after: avoid; }

  /* 블록이 쪼개지지 않게 */
  .overview-grid, .fact-row, .infra-card, .render-item,
  .map-card, .land-table, .rec-table, tr, .gallery figure { break-inside: avoid; }

  /* 표 글자 축소 */
  .land-table, .rec-table { font-size: 11px !important; }
  .land-table th, .land-table td,
  .rec-table th, .rec-table td { padding: 5px 8px !important; }
  .fact-row { padding: 7px 0 !important; }

  /* 한 페이지에 맞도록 이미지 높이 제한 (A4 인쇄영역 ≈ 250mm) */
  .render-item img, .aerial-img, .map-card img, .gallery img {
    max-height: 112mm !important;
    object-fit: cover !important;
    width: 100% !important;
  }
  /* 조감도·갤러리 그리드가 세로로 길면 페이지 넘침 → 높이 캡 */
  .gallery figure.tall { min-height: 0 !important; }
}
