/* ==========================================================================
   AI Instructor Kim KyungJu - Landing Page Custom Stylesheet
   ========================================================================== */

/* Pretendard & Font Imports */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #041534;
  --color-primary-container: #1b2a4a;
  --color-secondary: #735c00;
  --color-secondary-fixed: #ffe088;
  --color-secondary-fixed-dim: #e9c349;
  --color-tertiary: #300900;
  --color-tertiary-container: #531500;
  --color-surface: #f8f9ff;
  --color-surface-container: #e4efff;
  --color-surface-container-low: #eef4ff;
  --color-surface-container-lowest: #ffffff;
  --color-outline: #75777f;
  --color-outline-variant: #c5c6cf;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-family: 'Pretendard', 'Noto Sans KR', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-surface);
  color: #031d34;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #eef4ff;
}

::-webkit-scrollbar-thumb {
  background: #8392b7;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1b2a4a;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseSubtle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-float {
  animation: floatBadge 4s ease-in-out infinite;
}

/* Scroll Reveal (Section title & body entrance) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(4, 21, 52, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  background-color: #ffffff;
  border-radius: 1rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

/* Toast Notification */
#toastNotification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  background-color: #1b2a4a;
  color: #ffffff;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(27, 42, 74, 0.35);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 224, 136, 0.3);
}

#toastNotification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Back to Top Button */
#backToTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 80;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #1b2a4a;
  color: #ffe088;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(4, 21, 52, 0.25);
  border: 1px solid rgba(255, 224, 136, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#backToTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTopBtn:hover {
  background-color: #041534;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(4, 21, 52, 0.35);
}

/* Active Navigation indicator */
nav a.nav-active {
  color: #ffe088 !important;
  font-weight: 700 !important;
  position: relative;
}

nav a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffe088;
  border-radius: 2px;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #e9c349;
  outline-offset: 2px;
}

/* Print styling */
@media print {
  header, footer, #backToTopBtn, #toastNotification, form button {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
