/* ==========================================================
   layout.css: 상단바, 헤더, 메인 배너, 바로가기, 푸터, 하단 탭
   ========================================================== */

/* 상단 유틸 바 */
.topbar { background: var(--navy); color: rgba(255, 255, 255, .72); font-size: .8125rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar p { margin: 0; }
.topbar ul { display: flex; list-style: none; margin: 0; padding: 0; }
.topbar li + li::before { content: ""; display: inline-block; width: 1px; height: 10px; background: rgba(255, 255, 255, .25); vertical-align: middle; }
.topbar button { background: none; border: 0; color: inherit; padding: 6px 10px; cursor: pointer; font-size: .8125rem; }
.topbar button:hover { color: #fff; }

/* 헤더 + 주 메뉴 */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--surface); }
.header-in { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo strong { display: block; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1.2; }
.logo small { display: block; font-size: .75rem; color: var(--text-3); font-weight: 500; }
.gnb { display: flex; gap: 4px; margin-left: auto; }
.gnb a { position: relative; padding: 0 16px; height: var(--header-h); display: flex; align-items: center; text-decoration: none; font-weight: 600; font-size: 1.0625rem; color: var(--text-2); }
.gnb a:hover { color: var(--primary); }
.gnb a[aria-current="page"] { color: var(--primary); }
.gnb a[aria-current="page"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; background: var(--primary); border-radius: 3px 3px 0 0; }

/* 메인 배너 */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 0 104px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 184, 28, .18) 0 120px, transparent 121px),
    radial-gradient(circle at 78% 110%, rgba(91, 134, 240, .35) 0 220px, transparent 221px),
    linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-badge { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .8125rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: 2.5rem; line-height: 1.25; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-sub { margin: 14px 0 26px; color: rgba(255, 255, 255, .78); font-size: 1.0625rem; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.dcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dcard { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 20px; min-height: 132px; }
.dcard p { margin: 0; }
.dcard .k { font-size: .875rem; color: rgba(255, 255, 255, .72); }
.dcard .v { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 6px; }
.dcard .d { font-size: .8125rem; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.dcard .btn { margin-top: 12px; }

/* 바로가기 메뉴 */
.quick { margin-top: -60px; position: relative; z-index: 2; }
.quick ul { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.quick li + li { border-left: 1px solid var(--line-2); }
.quick button { width: 100%; background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-align: left; color: var(--text); border-radius: 10px; }
.quick button:hover { background: var(--primary-soft); }
.qi { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.qi svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick strong { display: block; font-size: 1.0625rem; }
.quick small { display: block; color: var(--text-3); font-size: .8125rem; margin-top: 2px; }

/* 하위 페이지 머리 */
.subvis { color: #fff; padding: 40px 0 36px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); }
.subvis h1 { font-size: 2rem; letter-spacing: -0.03em; }
.subvis p { margin: 8px 0 0; color: rgba(255, 255, 255, .75); }
.crumb { font-size: .8125rem; color: rgba(255, 255, 255, .6); margin-bottom: 10px !important; }

/* 본문 그리드 */
.home-body { padding-top: 40px; padding-bottom: 64px; }
.page { padding-top: 32px; padding-bottom: 72px; }
.page.narrow { max-width: 860px; }
.grid { display: grid; gap: 24px; }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack-col { display: grid; gap: 24px; align-content: start; }
.section-gap { margin-top: 24px; }

/* 푸터 */
.footer { background: #0A132B; color: rgba(255, 255, 255, .7); padding: 36px 0 40px; font-size: .875rem; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer strong { color: #fff; font-size: 1.0625rem; }
.footer p { margin: 6px 0 0; max-width: 56ch; }
.footer .actions { margin-top: 10px; }

/* 모바일 하단 탭 */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 9px; color: var(--text-3); text-decoration: none; font-size: .75rem; font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--primary); }

@media (max-width: 960px) {
  .grid-main, .grid-2 { grid-template-columns: 1fr; }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .quick ul { grid-template-columns: repeat(2, 1fr); }
  .quick li:nth-child(3) { border-left: 0; }
  .quick li:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .topbar, .gnb, .hide-sm { display: none !important; }
  .tabbar { display: block; }
  main { padding-bottom: 72px; }
  .footer { padding-bottom: 100px; }
  .hero { padding: 32px 0 80px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-sub { font-size: 1rem; }
  .dcard { padding: 16px; min-height: 0; }
  .dcard .v { font-size: 1.75rem; }
  .quick button { flex-direction: column; align-items: center; text-align: center; padding: 14px 8px; gap: 8px; }
  .quick small { display: none; }
  .qi { width: 44px; height: 44px; }
  .subvis { padding: 24px 0 22px; }
  .subvis h1 { font-size: 1.5rem; }
  .home-body { padding-top: 24px; }
  .page { padding-top: 20px; }
}
