/* ===== Design Tokens ===== */
:root {
  --bg: #0a0a0a;
  --bg-secondary: #050505;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-mute: rgba(255, 255, 255, 0.35);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.25);
  --accent: #d4c5a9;
  --accent-dim: rgba(212, 197, 169, 0.4);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Noto Sans KR', 'Pretendard', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h: 92px;
  --nav-h-scrolled: 64px;
  --pad-x: 56px;
  --max-w: 1600px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Base ===== */
body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

/* Page wrapper for non-index pages adds top padding */
.page-pad-top { padding-top: var(--nav-h); }

/* ===== Typography helpers ===== */
.serif { font-family: var(--serif); font-weight: 400; }
.eyebrow {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.section-title-ko {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}
.section-title-en {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--text-mute);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ===== Global Navigation ===== */
#global-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 32px;
  padding: 36px var(--pad-x);
  background: transparent;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
#global-nav.scrolled,
#global-nav.solid {
  padding: 18px var(--pad-x);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-left { grid-column: 1; justify-content: flex-start; gap: 0; }
.nav-left > .nav-link { display: none; }
.nav-right { display: none; }
.nav-right.mobile-show { display: none; }

.nav-link {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--text);
  opacity: 0.85;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease);
  text-transform: uppercase;
}
.nav-link:hover { opacity: 1; }
.nav-link.active {
  opacity: 1;
  border-bottom-color: var(--accent);
}

.nav-search {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.3s var(--ease);
}
.nav-search:hover { opacity: 1; }
.nav-search svg { width: 16px; height: 16px; stroke: currentColor; }

.nav-logo {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  z-index: 1;
}
.logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-family: 'Inter', 'Helvetica Neue', -apple-system, sans-serif;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}
.logo-double {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.logo-graphy {
  font-weight: 200;
  letter-spacing: 0.005em;
}
.nav-logo .logo-text { font-size: 28px; }
.nav-logo .logo-sub {
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--text-dim);
  white-space: nowrap;
}
#global-nav.scrolled .nav-logo .logo-text { font-size: 22px; }
#global-nav.scrolled .nav-logo .logo-sub { font-size: 8px; }

/* Hamburger — always visible (minimal nav) */
.nav-hamburger {
  display: flex;
  width: 28px;
  height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  grid-column: 3;
  justify-self: end;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-cta {
  display: none;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-transform: uppercase;
}

/* Mobile menu — right side drawer with backdrop */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(82vw, 380px);
  height: 100vh;
  background: var(--bg);
  padding: 80px 32px 40px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-soft);
  overflow-y: auto;
}
.mobile-menu.open .mobile-drawer {
  transform: translateX(0);
}
.mobile-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 2;
  transition: transform 0.3s var(--ease);
}
.mobile-close:hover { transform: rotate(90deg); }
.mobile-close svg { width: 18px; height: 18px; }

.mobile-nav-list {
  display: flex;
  flex-direction: column;
}
.mobile-nav-list .nav-link {
  display: block;
  padding: 20px 0;
  font-family: 'Inter', var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  opacity: 1;
  text-align: left;
  color: var(--text);
}
.mobile-nav-list .nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}

.mobile-secondary {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-secondary a {
  font-family: 'Inter', var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
  text-transform: capitalize;
}
.mobile-secondary a:hover { color: var(--text); }

/* ===== Global Footer (an-otherday style) ===== */
#global-footer {
  background: var(--bg);
  padding: 80px var(--pad-x) 32px;
  margin-top: 0;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Top row: Company info + Scroll to top */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 56px;
}
.footer-company {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}
.footer-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0;
}
.footer-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.footer-totop {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: opacity 0.3s var(--ease);
}
.footer-totop:hover { opacity: 0.7; }

/* Middle row: Menu + Social columns */
.footer-mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-bottom: 64px;
  max-width: 480px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}
.footer-col a:hover { color: var(--text); }

/* Bottom: Big logo + copyright */
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-logo {
  display: inline-block;
}
.footer-logo .logo-text {
  font-size: 36px;
  letter-spacing: -0.02em;
}
.footer-copy {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mute);
  letter-spacing: 0;
  text-transform: none;
}

/* ===== Common Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #e6d8be;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(212,197,169,0.06);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  :root { --pad-x: 24px; }

  #global-nav { padding: 18px var(--pad-x); }
  #global-nav.scrolled { padding: 14px var(--pad-x); }

  .nav-logo .logo-text { font-size: 22px; }
  .nav-logo .logo-sub { font-size: 8px; letter-spacing: 0.4em; }

  #global-footer { padding: 60px var(--pad-x) 28px; }
  .footer-top { padding-bottom: 40px; }
  .footer-mid { padding-bottom: 48px; gap: 24px; }
  .footer-logo .logo-text { font-size: 26px; }
}
