/* ============================================================
   AX-On Platform — Common CSS
   S7FE1: 공통 스타일 분리
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS VARIABLES ── */
:root {
  --ink: #1a1a2e;
  --ink-muted: #5a5f7d;
  --surface: #faf9f7;
  --surface-warm: #f5f0eb;
  --surface-card: #ffffff;
  --amber: #e8920d;
  --amber-light: #f5b942;
  --amber-glow: rgba(232, 146, 13, 0.12);
  --teal: #0d9488;
  --teal-light: #2dd4bf;
  --coral: #e85d4a;
  --violet: #7c5ce0;
  --sky: #3b82f6;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-soft: 0 4px 24px rgba(26, 26, 46, 0.06);
  --shadow-hover: 0 12px 40px rgba(26, 26, 46, 0.12);
  /* Tomorrow Night Blue */
  --dark-bg: #002451;
  --dark-bg-deep: #001126;
  --dark-bg-hover: #00346e;
  --dark-bg-active: #003f8e;
  --dark-text-muted: #7285b7;
  --dark-border: rgba(114, 133, 183, 0.15);
}

/* ── SKIP LINK (접근성) ── */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--amber); color: #fff;
  padding: 12px 24px; border-radius: 0 0 12px 12px;
  font-weight: 700; font-size: 16px;
  z-index: 999; text-decoration: none;
  transition: top 0.3s ease;
}
.skip-link:focus { top: 0; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
  transition: all 0.4s ease;
}
.nav.scrolled {
  background: rgba(250, 249, 247, 0.95);
  box-shadow: 0 2px 20px rgba(26, 26, 46, 0.08);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 72px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(232, 146, 13, 0.3);
}
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 22px;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--amber); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  text-decoration: none; color: #1a1a2e;
  font-size: 17px; font-weight: 700;
  padding: 8px 16px; border-radius: 10px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--violet); background: rgba(124, 92, 224, 0.06); }

.nav-auth-mobile { display: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-auth-btn {
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: 10px;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: 'Noto Sans KR', sans-serif;
}
.nav-login {
  color: var(--ink-muted);
}
.nav-login:hover { color: var(--ink); }
.nav-signup {
  background: var(--ink); color: #fff;
  border-radius: 12px;
}
.nav-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.2);
}

.mobile-toggle {
  display: none; background: none; border: none;
  width: 40px; height: 40px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.mobile-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── NAV AUTH STATE ── */
.nav-user-wrap {
  display: flex; align-items: center; gap: 8px;
}
.nav-user-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  text-decoration: none; padding: 8px 12px; border-radius: 10px;
  transition: all 0.25s ease;
}
.nav-user-name:hover { background: rgba(26,26,46,0.04); }
.nav-logout-btn {
  font-size: 13px; font-weight: 600; color: var(--ink-muted);
  background: none; border: 1.5px solid rgba(26,26,46,0.12);
  padding: 6px 14px; border-radius: 10px; cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  transition: all 0.25s ease;
}
.nav-logout-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 32px; border-radius: 14px;
  font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: all 0.3s ease; border: none;
  font-family: 'Noto Sans KR', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber), #d4820b);
  color: #fff;
  box-shadow: 0 6px 24px rgba(232, 146, 13, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(232, 146, 13, 0.4);
}
.btn-outline {
  background: transparent; color: var(--ink);
  border: 2px solid rgba(26, 26, 46, 0.15);
}
.btn-outline:hover {
  border-color: var(--ink); background: rgba(26, 26, 46, 0.03);
}

/* ── FOOTER ── */
.footer {
  padding: 24px 40px 16px;
  background: var(--dark-bg);
  color: var(--dark-text-muted);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
}
.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 20px; color: #fff;
  text-align: center;
}
.footer-logo span { color: var(--amber); }
.footer-org-name {
  font-size: 15px; color: rgba(255,255,255,0.85); font-weight: 600;
  margin-top: 4px; text-align: center; letter-spacing: 0.5px;
}
.footer-org-person {
  font-size: 12px; color: var(--dark-text-muted); opacity: 0.75;
  margin-top: 2px; text-align: center;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--dark-text-muted);
  text-decoration: none; font-size: 14px;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--amber); }
.footer-copyright {
  max-width: 1280px; margin: 6px auto 0; padding: 6px 40px 0;
  border-top: 1px solid var(--dark-border);
  text-align: center; font-size: 12px; color: var(--dark-text-muted); opacity: 0.7;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── RESPONSIVE — NAV & FOOTER ── */
@media (max-width: 768px) {
  /* NAV */
  .nav-inner { padding: 0 16px; }
  .nav-links { display: none; }
  .mobile-toggle { display: flex; min-width: 44px; min-height: 44px; }
  .nav-login { display: none; }
  .nav-signup { display: none; }
  .nav-user-wrap .nav-user-name { display: none; }
  .nav-user-wrap .nav-logout-btn { display: none; }

  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--surface);
    padding: 12px 16px 20px;
    border-bottom: 1px solid rgba(26,26,46,0.06);
    box-shadow: 0 8px 24px rgba(26,26,46,0.08);
    gap: 2px;
  }
  .nav-links.open a {
    padding: 12px 16px;
    min-height: 44px;
    display: flex; align-items: center;
    font-size: 16px;
    border-radius: 10px;
  }
  .nav-links.open .nav-auth-mobile {
    display: flex !important;
  }
  .nav-auth-mobile {
    display: none;
    text-decoration: none;
    font-size: 16px; font-weight: 600;
    padding: 12px 16px; border-radius: 10px;
    min-height: 44px; align-items: center;
    transition: all 0.25s ease;
    font-family: 'Noto Sans KR', sans-serif;
    white-space: nowrap;
  }
  .nav-auth-mobile.login-mobile {
    color: var(--ink-muted);
    margin-top: 8px;
    border-top: 1px solid rgba(26,26,46,0.06);
    padding-top: 16px;
  }
  .nav-auth-mobile.login-mobile:hover { color: var(--ink); background: rgba(26,26,46,0.04); }
  .nav-auth-mobile.signup-mobile {
    background: var(--ink); color: #fff;
    margin-top: 6px;
  }
  .nav-auth-mobile.signup-mobile:hover { background: #2a2a4e; }

  /* FOOTER */
  .footer { padding: 24px 16px 16px; }
  .footer-inner { text-align: center; gap: 6px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 12px; }
  .footer-links { gap: 12px; }
}
