/* ============================================================
   부동산 단지 사이트 — 공용 스타일시트
   CSS 변수(--gold, --gold-dark, --gold-light)는 build_site.py가
   config의 색상값으로 치환하므로 직접 수정하지 말 것.
   ============================================================ */
:root {
  --gold: #A17546;
  --gold-dark: #7A5934;
  --gold-light: #C7AC90;
  --bg: #ffffff;
  --bg-alt: #f8f6f2;
  --bg-dark: #0a0a0a;
  --ink: #0a0a0a;
  --ink-2: #333333;
  --ink-3: #777777;
  --line: #e8e4de;
  --white: #ffffff;
  --max: 1200px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Layout ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 72px; display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.brand img { height: 36px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.brand-text span { font-size: 10px; color: var(--gold); letter-spacing: .15em; margin-top: 2px; }

.nav {
  flex: 1; display: flex; align-items: stretch; gap: 2px; justify-content: center;
}
.nav > a {
  display: flex; align-items: center;
  padding: 8px 14px; font-size: 14px; color: var(--ink-2);
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .18s, border-color .18s;
}
.nav > a:hover { color: var(--gold); }
.nav > a.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; font-size: 14px; color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav-dropdown-toggle:hover { color: var(--gold); }
.nav-dropdown-toggle.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.dropdown-arrow { font-size: 9px; transition: transform .2s; }
.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 160px; background: var(--white);
  border: 1px solid var(--line); z-index: 200;
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 12px 18px; font-size: 14px;
  color: var(--ink-2); border-bottom: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:last-child { border-bottom: 0; }
.nav-dropdown-menu a:hover { background: var(--bg-alt); color: var(--gold); }

.header-cta {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: var(--gold); border: 1.5px solid var(--gold);
  transition: background .18s, color .18s; white-space: nowrap;
}
.header-cta:hover { background: var(--gold); color: var(--white); }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  padding: 8px; flex: 0 0 auto;
}
.menu-toggle svg { width: 24px; height: 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 28px; font-size: 14px; font-weight: 600;
  letter-spacing: .03em; border: 2px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.75); }
.btn-outline:hover { background: var(--white); color: var(--gold); border-color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ── Hero ── */
.hero {
  position: relative; min-height: min(92vh, 820px);
  display: flex; align-items: flex-end; color: var(--white);
  overflow: hidden; background: #000;
}
.hero-bg { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.38) 0%,
    rgba(0,0,0,.18) 40%,
    rgba(0,0,0,.80) 100%
  );
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
  padding: 80px 24px 80px; width: 100%;
}
.hero-eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: .30em;
  text-transform: uppercase; color: var(--gold-light);
  border: 1px solid rgba(191,166,96,.55); padding: 5px 14px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(28px, 5.2vw, 56px); font-weight: 300;
  letter-spacing: -.015em; line-height: 1.15;
  margin-bottom: 18px; word-break: keep-all;
}
.hero h1 .accent { color: var(--gold-light); }
.hero .lead {
  font-size: 16px; color: rgba(255,255,255,.88);
  max-width: 600px; margin-bottom: 32px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Section blocks ── */
.block { padding: 96px 0; }
.block.alt { background: var(--bg-alt); }

/* ── Section head ── */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(24px, 3.2vw, 36px); font-weight: 300;
  letter-spacing: -.01em; margin-bottom: 14px;
}
.section-head p { font-size: 15px; color: var(--ink-3); line-height: 1.75; }

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  padding: 32px 24px; border: 1px solid var(--line); background: var(--white);
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.07); transform: translateY(-3px); }
.feature-icon { width: 44px; height: 44px; margin-bottom: 16px; color: var(--gold); }
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 9px; }
.feature-card p { font-size: 14px; color: var(--ink-3); line-height: 1.7; }

/* ── Spec table ── */
.spec-table { border-top: 2px solid var(--gold); margin-top: 20px; }
.spec-row {
  display: flex; gap: 24px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.spec-key { flex: 0 0 36%; font-size: 13px; font-weight: 600; color: var(--ink); }
.spec-val { flex: 1; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px; margin-top: 36px;
}
.gallery-item {
  aspect-ratio: 4/3; overflow: hidden;
  cursor: pointer; background: var(--bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .42s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* ── Banner CTA ── */
.banner-cta {
  margin: 64px auto; padding: 56px 40px;
  background: var(--gold); color: var(--white); text-align: center;
}
.banner-cta h2 {
  font-size: clamp(20px, 2.8vw, 30px); font-weight: 500; margin-bottom: 10px;
}
.banner-cta p { font-size: 15px; margin-bottom: 28px; opacity: .9; }
.banner-cta .btn {
  background: var(--white); color: var(--gold); border-color: var(--white);
}
.banner-cta .btn:hover { background: var(--gold-dark); color: var(--white); border-color: var(--gold-dark); }

/* ── Inquiry Form ── */
.form-section { padding: 80px 0; background: var(--bg-dark); color: var(--white); }
.form-wrap { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.form-wrap h2 {
  font-size: 24px; font-weight: 400; margin-bottom: 8px; color: var(--white);
}
.form-wrap p.intro { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 32px; }
.inquiry-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; letter-spacing: .04em; color: rgba(255,255,255,.6); }
.required { color: var(--gold-light); margin-left: 3px; }
.field input,
.field textarea {
  font-family: inherit; font-size: 15px; color: var(--white);
  background: transparent; border: 0;
  border-bottom: 1px solid rgba(255,255,255,.28);
  padding: 10px 2px; outline: none; transition: border-color .18s;
  -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255,255,255,.28); }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--gold-light); }
.field textarea { min-height: 100px; resize: vertical; }
.terms {
  font-size: 12px; color: rgba(255,255,255,.42); line-height: 1.8;
  background: rgba(255,255,255,.05); padding: 14px;
  max-height: 100px; overflow-y: auto;
  border: 1px solid rgba(255,255,255,.1);
}
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.checkbox-row input[type="checkbox"] { accent-color: var(--gold-light); width: 16px; height: 16px; }
.checkbox-row label { font-size: 13px; color: rgba(255,255,255,.75); cursor: pointer; }
.form-submit {
  width: 100%; padding: 16px; background: var(--gold); color: var(--white);
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: .04em;
  border: 0; cursor: pointer; transition: background .18s;
}
.form-submit:hover { background: var(--gold-dark); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; }
.form-msg { font-size: 13px; min-height: 18px; color: #9bcf9b; margin-top: 4px; }
.form-msg.error { color: #f4a4a4; }

/* ── FAB (Floating Action Buttons) ── */
.fab {
  position: fixed; right: 24px; bottom: 28px;
  display: flex; flex-direction: column; gap: 10px; z-index: 90;
}
.fab-call, .fab-form {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
  transition: transform .18s, box-shadow .18s;
  white-space: nowrap;
}
.fab-call:hover, .fab-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
}
.fab-call { background: #111; color: var(--white); }
.fab-form { background: var(--gold); color: var(--white); }
.fab svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,.6);
  padding: 72px 0 48px;
}
.footer-grid {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 48px;
}
.footer-brand { font-size: 14px; line-height: 1.8; }
.footer-brand img {
  height: 40px; margin-bottom: 16px;
  filter: brightness(0) invert(1);
}
.footer-brand strong { display: block; color: var(--white); font-size: 15px; margin-bottom: 6px; }
.footer-col h4 {
  color: var(--white); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 13px; transition: color .18s; }
.footer-col ul a:hover { color: var(--gold-light); }
.footer-col p { font-size: 13px; line-height: 1.9; }
.footer-bottom {
  max-width: var(--max); margin: 56px auto 0;
  padding: 28px 24px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.disclaimer { font-size: 12px; color: rgba(255,255,255,.28); line-height: 1.85; }
.footer-bottom > p { margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.25); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  font-size: 38px; color: rgba(255,255,255,.65); line-height: 1;
  transition: color .18s;
}
.lightbox-close:hover { color: var(--gold-light); }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; }

/* ── Responsive ── */
@media (max-width: 920px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--white); padding: 16px 24px 40px;
    overflow-y: auto; z-index: 99; gap: 0;
  }
  .nav > a {
    padding: 16px 4px; border-bottom: 1px solid var(--line);
    font-size: 16px; color: var(--ink); border-left: 0; border-right: 0; border-top: 0;
  }
  .nav-dropdown { display: block; }
  .nav-dropdown-toggle {
    padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink);
    width: 100%; justify-content: space-between;
  }
  .nav-dropdown-menu { position: static; box-shadow: none; border: 0; }
  .nav-dropdown-menu a { padding: 12px 20px; font-size: 15px; }
  .menu-toggle { display: flex; margin-left: auto; }
  .header-cta { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-text strong, .brand-text span {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .fab { right: 16px; bottom: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .block { padding: 64px 0; }
  .hero { min-height: 72vh; }
  .hero-inner { padding: 56px 20px 64px; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .banner-cta { padding: 40px 24px; }
  .fab { gap: 8px; }
  .fab-call, .fab-form { padding: 10px 14px; font-size: 13px; }
  .spec-key { flex: 0 0 42%; }
}

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