/* ===== CUSTOM CSS — Changjo City ===== */

/* ---- CSS Custom Properties ---- */
:root {
  --navy: #1e3a5f;
  --navy-light: #25477a;
  --gold: #c9a84c;
  --gold-light: #d9bb6e;
  --gold-dark: #a8883a;

  --shadow-card: 0 1px 4px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
}

/* ---- Base & Typography ---- */
* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
}

.font-serif {
  font-family: 'Noto Serif KR', Georgia, serif;
}

/* ---- Color Utilities ---- */
.bg-navy { background-color: var(--navy); }
.bg-navy-light { background-color: var(--navy-light); }
.hover\:bg-navy-light:hover { background-color: var(--navy-light); }
.text-navy { color: var(--navy); }
.border-navy { border-color: var(--navy); }
.hover\:border-navy:hover { border-color: var(--navy); }
.hover\:bg-navy:hover { background-color: var(--navy); }
.focus-visible\:ring-navy:focus-visible { --tw-ring-color: var(--navy); }
.focus-visible\:ring-offset-navy:focus-visible { --tw-ring-offset-color: var(--navy); }

.text-gold { color: var(--gold); }
.bg-gold { background-color: var(--gold); }
.bg-gold-light { background-color: var(--gold-light); }
.hover\:bg-gold:hover { background-color: var(--gold); }
.hover\:bg-gold-light:hover { background-color: var(--gold-light); }
.hover\:text-gold:hover { color: var(--gold); }
.border-gold { border-color: var(--gold); }
.ring-gold { --tw-ring-color: var(--gold); }
.focus-visible\:ring-gold:focus-visible { --tw-ring-color: var(--gold); }
.focus\:ring-gold:focus { --tw-ring-color: var(--gold); }
.focus\:border-transparent:focus { border-color: transparent; }

/* ---- Logo Emblem ---- */
.logo-emblem {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border: 1px solid rgba(201, 168, 76, 0.3);
}

/* ---- Header ---- */
#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(18, 31, 52, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 16px rgba(0,0,0,0.2);
}

/* ---- Mobile menu ---- */
.mobile-menu-panel {
  background: rgba(18, 31, 52, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Hero ---- */
.hero-bg {
  z-index: 0;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(12, 22, 40, 0.85) 0%,
    rgba(18, 35, 60, 0.70) 50%,
    rgba(12, 22, 40, 0.60) 100%
  );
}

/* Stats bar */
.stats-bar {
  background: rgba(12, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.stat-item {
  transition: background 0.2s;
}

.stat-item:hover {
  background: rgba(201, 168, 76, 0.05);
}

/* Scroll cue animation */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

.scroll-cue-dot {
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

/* ---- Fade-up entrance ---- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: var(--delay, 0s);
}

/* ---- Shadow utilities ---- */
.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-card-hover {
  box-shadow: var(--shadow-card-hover);
}

/* ---- Filter buttons ---- */
.filter-btn {
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.filter-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.filter-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ---- News tabs ---- */
.news-tab {
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.news-tab:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.news-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ---- Project card ---- */
.project-card {
  will-change: transform;
}

/* ---- Badge statuses ---- */
.badge-status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  backdrop-filter: blur(4px);
}

.badge-status-upcoming {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold-dark);
  border: 1px solid rgba(201, 168, 76, 0.3);
  backdrop-filter: blur(4px);
}

.badge-status-done {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
  backdrop-filter: blur(4px);
}

/* ---- Services section ---- */
.services-bg-pattern {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201, 168, 76, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(37, 71, 122, 0.3) 0%, transparent 50%);
}

/* ---- Service card ---- */
.service-card {
  cursor: default;
}

/* ---- Form fields ---- */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #ef4444 !important;
  --tw-ring-color: #ef4444 !important;
}

/* ---- Toast notifications ---- */
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.1);
  animation: toast-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.toast-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.toast-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.toast-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

.toast-hiding {
  animation: toast-out 0.25s ease forwards;
}

/* ---- line-clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- News item filter ---- */
.news-item.filtered-out {
  display: none;
}

/* ---- Project filter ---- */
.project-card.filtered-out {
  display: none;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .scroll-cue-dot,
  .toast,
  .project-card,
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Print styles ---- */
@media print {
  #site-header,
  #mobile-menu,
  #toast-region,
  #privacy-modal,
  #project-modal {
    display: none !important;
  }
  body {
    font-size: 12pt;
  }
}
