/* ============================================
   layout.css — Diground Core Layout
   ============================================ */

/* ── Body & Page Wrapper ── */
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Page layout: center column + optional right banner ── */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  position: relative;
  /* subtle dot-grid texture — 민트 컬러 기반 */
  background-image: radial-gradient(circle, rgba(45,223,200,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Central mobile-width container ── */
.app-container {
  width: 100%;
  max-width: var(--container-max-width);
  background-color: var(--color-white);
  min-height: 100vh;
  position: relative;
  /* Subtle side borders + glow shadow to visually separate from white bg */
  box-shadow: var(--shadow-container);
  flex-shrink: 0;
}

/* ── PC Right Banner (desktop only) ── */
.banner-rail {
  display: none; /* hidden by default (mobile-first) */
  width: 220px;
  margin-left: var(--space-6);
  flex-shrink: 0;
}

.banner-sticky {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Desktop: show banner on wide screens ── */
@media (min-width: 1024px) {
  .banner-rail {
    display: block;
  }
}

/* ── Sticky Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--shadow-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  transition: box-shadow var(--duration-base) var(--ease-smooth);
  /* 하단에 브랜드 민트 얇은 라인 */
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--color-primary), transparent) 1;
}

.site-header.scrolled {
  box-shadow: 0 1px 0 rgba(45, 223, 200, 0.2),
              0 8px 28px rgba(45, 223, 200, 0.12);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 28px;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}
.header-logo:hover { opacity: 0.7; }

.header-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* fallback logo text (shown if img fails) */
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* ── Hamburger Button ── */
.hamburger-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-spring);
  position: relative;
}
.hamburger-btn:hover {
  background-color: var(--color-surface);
  transform: scale(1.05);
}
.hamburger-btn:active {
  transform: scale(0.95);
}

/* SVG icon lines */
.hamburger-icon {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger-icon span {
  display: block;
  height: 2px;
  background-color: var(--color-text-primary);
  border-radius: var(--radius-full);
  transform-origin: center;
  transition:
    transform var(--duration-base) var(--ease-spring),
    opacity var(--duration-base) var(--ease-smooth),
    width var(--duration-base) var(--ease-smooth);
}
.hamburger-icon span:nth-child(2) {
  width: 75%;
}
/* Active (open) state */
.hamburger-btn.is-active .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-active .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Main Content Area ── */
.main-content {
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  padding: 0;
  /* intentionally blank — ready for test screens */
}
