/* ============================================================
   Aive — layout.css
   모든 페이지에 쓰이는 persistent 레이아웃
   · GNB (Global Navigation)
   · Footer
   · Auth Layout (split screen)
   · Onboarding Layout (stepper)
   · App Layout (sidebar + main)
   ============================================================ */

/* ============================================================
   GNB (Global Navigation)
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(10,10,11,0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.nav-menu {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--text-sub);
}
.nav-menu a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active { color: var(--text); }
.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: #050506;
  border-top: 1px solid var(--line-soft);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0 0 20px;
  max-width: 300px;
}
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}
.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-info {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.8;
}
.footer-info span {
  display: inline-block;
  margin-right: 18px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a {
  font-size: 12px;
  color: var(--text-mute);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--text-sub); }
.footer-legal .copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}

/* ============================================================
   Auth Layout (signup / login / forgot-password)
   Split screen: 좌측 브랜드 메시지 + 우측 폼
   ============================================================ */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.8fr 1fr;
}
.auth-brand {
  background: var(--bg-elev);
  border-right: 1px solid var(--line-soft);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand .logo { margin-bottom: 48px; }
.auth-brand-message h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 20px;
}
.auth-brand-message h2 em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}
.auth-brand-message p {
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 440px;
}
.auth-brand-trust {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-brand-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-sub);
}
.auth-brand-trust-item .check {
  color: var(--accent);
  font-weight: 600;
}
.auth-brand-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.auth-form-area {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.auth-form {
  width: 100%;
  max-width: 400px;
}
.auth-form h1 {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.auth-form p.lead {
  color: var(--text-sub);
  font-size: 15px;
  margin: 0 0 36px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-mute);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.auth-switch {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-sub);
}
.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 6px;
  font-weight: 500;
}

/* ============================================================
   Onboarding Layout (4-step wizard)
   ============================================================ */
.onboarding-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.onboarding-header {
  border-bottom: 1px solid var(--line-soft);
  padding: 20px 0;
  background: rgba(10,10,11,0.8);
  backdrop-filter: blur(20px);
}
.onboarding-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.onboarding-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
}
.onboarding-content {
  width: 100%;
  max-width: 760px;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stepper-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
}
.stepper-item .num {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
}
.stepper-item.active { color: var(--accent); }
.stepper-item.active .num {
  background: var(--accent);
  color: #0a0a0b;
  border-color: var(--accent);
}
.stepper-item.done { color: var(--text-sub); }
.stepper-item.done .num {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}
.stepper-divider {
  flex: 0.5;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   App Layout (sidebar + main)
   대시보드·상품·리포트 등 인증 이후 페이지
   ============================================================ */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line-soft);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .logo { margin-bottom: 40px; padding: 0 8px; }
.sidebar-section {
  margin-bottom: 28px;
}
.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar-nav a:hover {
  background: var(--bg-card);
  color: var(--text);
}
.sidebar-nav a.active {
  background: var(--bg-card);
  color: var(--accent);
}
.sidebar-nav a.active::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: -3px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--line-soft);
}
.sidebar-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.sidebar-plan .plan-name {
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.08em;
}
.sidebar-plan .plan-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 11px;
}
.sidebar-plan .plan-link:hover { color: var(--text); }

.app-main {
  padding: 32px 40px;
  max-width: 1400px;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.app-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.app-header .tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.app-search {
  position: relative;
  width: 280px;
}
.app-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
}
.app-search input::placeholder { color: var(--text-mute); }
.app-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-area { padding: 40px 20px; min-height: 100vh; }
  .app-layout { grid-template-columns: 80px 1fr; }
  .sidebar { padding: 20px 10px; }
  .sidebar-nav a span { display: none; }
  .sidebar-section-title { display: none; }
  .sidebar-footer { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .nav-menu { display: none; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .app-main { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stepper-item .label { display: none; }
}
