/* ============================================
   재테크트리 — Global Stylesheet
   Tone: JP Morgan-inspired — restrained authority
   Target: 40-60+ HNW individuals (10억+)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --navy: #0A1630;
  --navy-light: #12213D;
  --charcoal: #2C3E5C;
  --slate: #3F526F;
  --gray-500: #4A5A7F;
  --gray-300: #CDD4E0;
  --gray-100: #ECEEF2;
  --gray-50: #F7F8FA;
  --white: #FFFFFF;
  --cream: #FAF7F2;
  --gold: #9E7D3E;
  --gold-light: #D4B87A;
  --gold-bg: #F8F3EA;
  --green: #1A7A5E;
  --green-light: #B8FBDA;
  --red: #B83A2E;
  --red-light: #FDD8D3;

  --font-display: 'Playfair Display', Georgia, 'Noto Serif KR', serif;
  --font-body: 'Pretendard Variable', 'Pretendard', -apple-system, 'Noto Sans KR', sans-serif;

  --max-w: 1140px;
  --header-h: 76px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.04);
  --shadow-md: 0 4px 20px rgba(16,24,40,0.06);
  --shadow-lg: 0 12px 48px rgba(16,24,40,0.08);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ====== RESET ====== */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; }
body { font-family:var(--font-body); color:var(--charcoal); background:var(--white); line-height:1.85; font-size:15px; font-weight:400; letter-spacing:-0.01em; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; font-family:var(--font-body); }

/* ====== TYPOGRAPHY — extreme hierarchy ====== */
.display { font-family:var(--font-display); font-weight:700; line-height:1.1; color:var(--navy); letter-spacing:-0.03em; }
.display-xl { font-size:clamp(42px,6vw,72px); }
.display-lg { font-size:clamp(32px,4.5vw,52px); }
.display-md { font-size:clamp(26px,3.5vw,38px); }
.label { font-size:11px; font-weight:500; letter-spacing:3px; text-transform:uppercase; color:var(--gold); font-family:var(--font-body); }
.body-lg { font-size:17px; line-height:1.9; color:var(--slate); font-weight:400; }
.body-sm { font-size:13px; color:var(--gray-500); line-height:1.7; }
.caption { font-size:11px; color:var(--gray-500); line-height:1.6; }

/* ====== FOCUS — keyboard accessibility ====== */
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }

/* ====== LAYOUT — generous spacing ====== */
.container { max-width:var(--max-w); margin:0 auto; padding:0 40px; }
.section { padding:140px 0; }
.section-sm { padding:80px 0; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:64px; align-items:center; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:32px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.text-center { text-align:center; }

/* ====== HEADER — refined ====== */
.header {
  position:fixed; top:0; left:0; right:0; z-index:100;
  height:var(--header-h); display:flex; align-items:center;
  background:rgba(255,255,255,0.95); backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(0,0,0,0.04);
  transition:var(--transition);
}
.header-inner {
  max-width:var(--max-w); margin:0 auto; padding:0 40px; width:100%;
  display:flex; align-items:center; justify-content:space-between;
}
.logo {
  font-family:var(--font-display); font-size:20px; font-weight:700;
  color:var(--navy); letter-spacing:0.5px;
}
.logo span { color:var(--gold); }
.nav { display:flex; align-items:center; gap:36px; }
.nav a {
  font-size:13px; font-weight:400; color:var(--gray-500);
  transition:var(--transition); position:relative; padding:4px 0;
  letter-spacing:0.02em;
}
.nav a::after {
  content:''; position:absolute; bottom:-2px; left:0; width:0; height:1px;
  background:var(--gold); transition:width 0.3s;
}
.nav a:hover { color:var(--navy); }
.nav a:hover::after { width:100%; }
.nav a.active { color:var(--navy); font-weight:500; }
.nav a.active::after { width:100%; }
.header-cta {
  background:var(--navy); color:var(--white); font-size:12px; font-weight:500;
  padding:10px 24px; border-radius:var(--radius); border:none;
  transition:var(--transition); letter-spacing:0.03em;
}
.header-cta:hover { background:var(--charcoal); }

/* Mobile menu */
.mobile-menu-btn {
  display:none; background:none; border:none; padding:8px;
  flex-direction:column; gap:5px;
}
.mobile-menu-btn span {
  display:block; width:22px; height:1.5px; background:var(--navy);
  transition:var(--transition);
}

/* ====== BUTTONS — subtle, confident ====== */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px; font-weight:500; padding:14px 32px;
  border-radius:var(--radius); border:none; transition:var(--transition);
  letter-spacing:0.02em;
}
.btn-primary { background:var(--navy); color:var(--white); }
.btn-primary:hover { background:var(--charcoal); }
.btn-gold { background:var(--gold); color:var(--white); }
.btn-gold:hover { background:#9E7D3E; }
.btn-outline {
  background:transparent; color:var(--navy);
  border:1px solid var(--gray-300);
}
.btn-outline:hover { border-color:var(--navy); }
.btn-text { background:none; border:none; color:var(--gold); font-weight:500; font-size:13px; padding:0; }
.btn-text:hover { color:#9E7D3E; }
.btn-text::after { content:' →'; }

/* ====== CARDS ====== */
.card {
  background:var(--white); border:1px solid var(--gray-100);
  border-radius:var(--radius-lg); transition:var(--transition); overflow:hidden;
}
.card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card-body { padding:32px; }

/* ====== IMAGE PLACEHOLDERS ====== */
.img-placeholder {
  background:var(--gray-50); border:1px dashed var(--gray-300);
  border-radius:var(--radius); display:flex; flex-direction:column;
  align-items:center; justify-content:center; color:var(--gray-500);
  font-size:12px; text-align:center; padding:16px; gap:8px;
  min-height:200px; position:relative;
}
.img-placeholder .ph-icon { font-size:24px; opacity:0.4; }
.img-placeholder .ph-label { font-weight:500; }
.img-placeholder .ph-note { font-size:10px; color:var(--gray-300); max-width:200px; }

/* ====== HERO ====== */
.hero {
  min-height:100vh; display:flex; align-items:center;
  padding-top:var(--header-h); position:relative; overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0; z-index:0;
  background: linear-gradient(rgba(10,22,48,0.7), rgba(10,22,48,0.85)),
              url('../images/hero-bg.jpg') center/cover no-repeat;
}
.hero-content { position:relative; z-index:1; }
.hero .display-xl { margin-bottom:24px; }
.hero .body-lg { margin-bottom:40px; max-width:520px; }
.hero-btns { display:flex; gap:16px; flex-wrap:wrap; }

/* ====== TRUST BAR ====== */
.trust-bar {
  display:grid; grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--gray-100);
  border-bottom:1px solid var(--gray-100);
}
.trust-item {
  padding:40px 24px; text-align:center;
  border-right:1px solid var(--gray-100);
}
.trust-item:last-child { border-right:none; }
.trust-num { font-family:var(--font-display); font-size:32px; font-weight:700; color:var(--navy); letter-spacing:-0.02em; }
.trust-label { font-size:12px; color:var(--gray-500); margin-top:6px; letter-spacing:0.02em; }

/* Legacy stat-bar support */
.stat-bar {
  display:grid; grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--gray-100);
  border-bottom:1px solid var(--gray-100);
}
.stat-item {
  padding:40px 24px; text-align:center;
  border-right:1px solid var(--gray-100);
}
.stat-item:last-child { border-right:none; }
.stat-num { font-family:var(--font-display); font-size:28px; font-weight:700; color:var(--navy); }
.stat-label { font-size:12px; color:var(--gray-500); margin-top:4px; }

/* ====== FOOTER — minimal ====== */
.footer { background:var(--navy); color:var(--gray-300); padding:80px 0 40px; }
.footer-grid {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:64px;
  padding-bottom:48px; border-bottom:1px solid rgba(255,255,255,0.06);
}
.footer-brand .logo { color:var(--white); margin-bottom:12px; display:inline-block; }
.footer-brand p { font-size:13px; color:var(--gray-500); line-height:1.7; max-width:280px; }
.footer h4 { color:var(--white); font-size:12px; font-weight:500; margin-bottom:20px; letter-spacing:0.05em; text-transform:uppercase; }
.footer a { display:block; font-size:13px; color:var(--gray-500); margin-bottom:10px; transition:color 0.2s; }
.footer a:hover { color:var(--gold); }
.footer-bottom {
  display:flex; justify-content:space-between; align-items:center;
  padding-top:32px; font-size:11px; color:var(--gray-500);
}
.footer-social { display:flex; gap:16px; }
.footer-social a { font-size:13px; }

/* ====== SCROLL REVEAL ====== */
.reveal { opacity:0; transform:translateY(24px); transition:all 0.7s cubic-bezier(0.25,1,0.5,1); }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:0.12s; }
.reveal-delay-2 { transition-delay:0.24s; }
.reveal-delay-3 { transition-delay:0.36s; }

/* ====== MOBILE BOTTOM SHEET NAV ====== */
.mobile-overlay {
  display:none; position:fixed; inset:0; z-index:199;
  background:rgba(10,22,48,0.5); backdrop-filter:blur(4px);
  opacity:0; transition:opacity 0.3s ease;
}
.mobile-overlay.active { display:block; opacity:1; }

.mobile-sheet {
  display:none; position:fixed; left:0; right:0; bottom:0; z-index:200;
  background:var(--white); border-radius:20px 20px 0 0;
  padding:12px 24px 32px; max-height:85vh; overflow-y:auto;
  transform:translateY(100%); transition:transform 0.35s cubic-bezier(0.32,0.72,0,1);
  box-shadow:0 -8px 40px rgba(10,22,48,0.15);
}
.mobile-sheet.active { display:block; transform:translateY(0); }

/* Drag handle */
.sheet-handle {
  width:36px; height:4px; background:var(--gray-100);
  border-radius:2px; margin:0 auto 20px;
}

/* Menu items */
.sheet-nav { display:grid; gap:4px; margin-bottom:20px; }
.sheet-nav a {
  display:flex; align-items:center; gap:14px;
  padding:16px 16px; border-radius:var(--radius-lg);
  font-size:16px; font-weight:500; color:var(--navy);
  transition:background 0.2s;
}
.sheet-nav a:hover,
.sheet-nav a.active { background:var(--cream); color:var(--gold); }
.sheet-nav a .sheet-icon {
  width:36px; height:36px; border-radius:10px;
  background:var(--cream); display:flex; align-items:center;
  justify-content:center; font-size:16px; flex-shrink:0;
}
.sheet-nav a.active .sheet-icon { background:var(--gold-bg); }

/* Sheet CTA */
.sheet-cta {
  display:block; width:100%; text-align:center;
  background:var(--navy); color:var(--white);
  font-size:15px; font-weight:600; padding:16px;
  border-radius:var(--radius-lg); border:none;
  margin-bottom:12px; transition:background 0.2s;
}
.sheet-cta:hover { background:var(--charcoal); }

/* Sheet contact */
.sheet-contact {
  display:flex; gap:8px; justify-content:center;
}
.sheet-contact a {
  font-size:13px; color:var(--gray-500); padding:8px 16px;
  border:1px solid var(--gray-100); border-radius:20px;
  transition:var(--transition);
}
.sheet-contact a:hover { border-color:var(--gold); color:var(--gold); }

/* Hamburger → X */
.mobile-menu-btn.active span { background:var(--navy); }
.mobile-menu-btn.active span:nth-child(1) { transform:rotate(45deg) translateY(6.5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity:0; }
.mobile-menu-btn.active span:nth-child(3) { transform:rotate(-45deg) translateY(-6.5px); }

/* Body scroll lock */
body.menu-open { overflow:hidden; }

/* Hide old nav.open styles — bottom sheet replaces them */
.nav.open { display:none !important; }

/* ====== RESPONSIVE — tablet ====== */
@media (max-width:900px) {
  .container { padding:0 24px; }
  .grid-2 { grid-template-columns:1fr; gap:40px; }
  .grid-3 { grid-template-columns:1fr; }
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .nav { display:none; }
  .mobile-menu-btn { display:flex; }
  .header-cta { display:none; }
  .stat-bar, .trust-bar { grid-template-columns:repeat(2,1fr); }
  .stat-item:nth-child(2), .trust-item:nth-child(2) { border-right:none; }
  .stat-item:nth-child(1), .stat-item:nth-child(2),
  .trust-item:nth-child(1), .trust-item:nth-child(2) { border-bottom:1px solid var(--gray-100); }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .hero { min-height:85vh; }
  .section { padding:80px 0; }
  .section-sm { padding:48px 0; }
  .display-xl { font-size:clamp(32px,7vw,48px); }
  .display-lg { font-size:clamp(26px,5vw,38px); }
}

/* ====== RESPONSIVE — small tablet ====== */
@media (max-width:600px) {
  .reality-grid { grid-template-columns:1fr !important; gap:12px !important; }
  .reality-grid .vs-label { display:none; }
  .seminar-banner { grid-template-columns:1fr !important; padding:32px !important; }
  .seminar-banner > div:last-child { display:none; }
}

/* ====== RESPONSIVE — mobile ====== */
@media (max-width:480px) {
  .container { padding:0 20px; }
  .stat-bar, .trust-bar { grid-template-columns:1fr; }
  .stat-item, .trust-item { border-right:none; border-bottom:1px solid var(--gray-100); }
  .stat-item:last-child, .trust-item:last-child { border-bottom:none; }
  .grid-4 { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; gap:32px; }
  .footer-bottom { flex-direction:column; gap:12px; text-align:center; }
  .hero { min-height:80vh; }
  .hero-btns { flex-direction:column; }
  .hero-btns .btn { width:100%; justify-content:center; }
  .section { padding:60px 0; }
  .display-xl { font-size:32px; }
  .display-lg { font-size:26px; }
  .display-md { font-size:22px; }
  .body-lg { font-size:15px; }
}
