/* ==========================================================================
   제주AI파트너스 (Jeju AI Partners) - Modern Jeju Ocean Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #050C1A;
  --bg-card: rgba(15, 32, 67, 0.6);
  --bg-card-hover: rgba(22, 45, 92, 0.8);
  --primary-blue: #0284C7;
  --primary-cyan: #06B6D4;
  --accent-sky: #38BDF8;
  --accent-emerald: #10B981;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-glass: rgba(56, 189, 248, 0.18);
  --glass-glow: 0 0 25px rgba(2, 132, 199, 0.25);
}

* {
  font-family: 'Noto Sans KR', 'Outfit', sans-serif;
  scroll-behavior: smooth;
}

/* 3D Image Carousel Hero Styles */
.carousel-perspective {
  perspective: 1000px;
}

.carousel-card-container {
  transform-style: preserve-3d;
  will-change: transform;
}

.carousel-card-item {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.carousel-card-item:hover {
  box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.5);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #050C1A;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 5px;
  border: 2px solid #050C1A;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

/* Glassmorphism Components */
.glass-panel {
  background: rgba(10, 25, 49, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-panel-hover:hover {
  background: rgba(15, 35, 70, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.3);
  transform: translateY(-4px);
}

.glass-nav {
  background: rgba(5, 12, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

/* Gradients & Glows */
.text-gradient {
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #FDE047 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-jeju {
  background: linear-gradient(135deg, #0F172A 0%, #0F2C59 50%, #0284C7 100%);
}

.bg-gradient-button {
  background: linear-gradient(135deg, #0284C7 0%, #06B6D4 100%);
  transition: all 0.3s ease;
}
.bg-gradient-button:hover {
  background: linear-gradient(135deg, #0369A1 0%, #0891B2 100%);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.glow-effect {
  position: relative;
}
.glow-effect::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #0284C7, #06B6D4, #38BDF8, #10B981);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.glow-effect:hover::before {
  opacity: 0.6;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes modalPopOnce {
  0% { transform: scale(0.92) translateY(12px); opacity: 0; }
  50% { transform: scale(1.02) translateY(-3px); opacity: 1; }
  75% { transform: scale(0.99) translateY(1px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.animate-pop-once {
  animation: modalPopOnce 0.35s cubic-bezier(0.16, 1, 0.3, 1) 1 forwards;
}

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

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Phone Mockup Frame for Shortform Video */
.phone-mockup {
  width: 270px;
  height: 520px;
  background: #000;
  border-radius: 40px;
  border: 8px solid #1E293B;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(2, 132, 199, 0.3);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 18px;
  background: #1E293B;
  border-radius: 10px;
  z-index: 30;
}

.shortform-card {
  aspect-ratio: 9/16;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.shortform-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
}

/* Modal Overlay */
.modal-backdrop {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
}

/* Custom Tab & Active Styles */
.nav-link {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.nav-link.active {
  color: #38BDF8;
  font-weight: 700;
}
.nav-link.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: #38BDF8;
  margin-top: 4px;
  border-radius: 2px;
}

/* Badge Pulse */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-live-dot {
  width: 8px;
  height: 8px;
  background-color: #34D399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34D399;
  animation: pulse 1.5s infinite;
}

/* ==========================================================================
   Light Mode Styles Overrides
   ========================================================================== */
body.light-theme {
  --bg-dark: #F8FAFC;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --primary-blue: #0284C7;
  --primary-cyan: #06B6D4;
  --accent-sky: #0369A1;
  --accent-emerald: #059669;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-glass: rgba(2, 132, 199, 0.15);
  --glass-glow: 0 10px 30px rgba(2, 132, 199, 0.08);
}

body.light-theme {
  background-color: #F8FAFC;
  color: #0F172A;
}

/* Scrollbar in Light Theme */
body.light-theme::-webkit-scrollbar-track {
  background: #F8FAFC;
}
body.light-theme::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-color: #F8FAFC;
}
body.light-theme::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Background overrides */
body.light-theme .bg-\[\#050C1A\] {
  background-color: #F8FAFC !important;
}
body.light-theme .bg-\[\#050C1A\]\/40 {
  background-color: rgba(248, 250, 252, 0.4) !important;
}
body.light-theme .bg-\[\#0A1931\] {
  background-color: #F1F5F9 !important;
}
body.light-theme .bg-\[\#0A1931\]\/40 {
  background-color: rgba(241, 245, 249, 0.4) !important;
}
body.light-theme .bg-\[\#0A1931\]\/60 {
  background-color: rgba(241, 245, 249, 0.6) !important;
}
body.light-theme .bg-\[\#0A1931\]\/95 {
  background-color: rgba(255, 255, 255, 0.98) !important;
}
body.light-theme .bg-gradient-to-b.from-\[\#0A1931\]\/90.via-\[\#0F2C59\]\/40.to-\[\#050C1A\],
body.light-theme .bg-gradient-to-b.from-\[\#050C1A\].via-\[\#0A1931\]\/80.to-\[\#0F2C59\]\/40 {
  background: linear-gradient(to bottom, #F1F5F9 0%, #E2E8F0 50%, #F8FAFC 100%) !important;
}
body.light-theme .bg-sky-500\/20 {
  background-color: rgba(2, 132, 199, 0.15) !important;
}

/* Master attribute background selector for all card bodies and sub-boxes */
body.light-theme [class*="bg-slate-950"],
body.light-theme [class*="bg-slate-900"],
body.light-theme [class*="bg-slate-800"],
body.light-theme [class*="bg-[#0F172A]"],
body.light-theme [class*="bg-[#0A1931]"],
body.light-theme [class*="bg-slate-950/"],
body.light-theme [class*="bg-slate-900/"] {
  background-color: #F1F5F9 !important; /* Soft Slate 100 for sub-box depth */
  background-image: none !important;
  color: #0F172A !important;
  border-color: #E2E8F0 !important; /* Slate 200 */
}

/* Force pure white for main card containers */
body.light-theme .glass-panel,
body.light-theme .port-item,
body.light-theme .lg\:col-span-5.glass-panel,
body.light-theme .lg\:col-span-7.glass-panel {
  background-color: #FFFFFF !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
}

body.light-theme .bg-sky-950\/90 {
  background-color: rgba(224, 242, 254, 0.9) !important;
}

/* Specific partnership banner light mode background mapping */
body.light-theme .bg-gradient-to-r.from-slate-900\/90.via-sky-950\/80.to-slate-900\/90 {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(224, 242, 254, 0.8), rgba(255, 255, 255, 0.95)) !important;
  color: #0F172A !important;
  border-color: #E2E8F0 !important;
}

/* 3D Pricing Card custom light mode backgrounds */
body.light-theme .bg-gradient-to-b.from-\[\#0F2C59\]\/80.to-\[\#050C1A\],
body.light-theme .bg-gradient-to-b.from-\[\#0F2C59\]\/60.to-\[\#0A1931\]\/90 {
  background: linear-gradient(to bottom, rgba(224, 242, 254, 0.6) 0%, #FFFFFF 100%) !important;
  border-color: rgba(2, 132, 199, 0.2) !important;
}

/* Text overrides for headers and general tags */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #0F172A !important;
}

body.light-theme p,
body.light-theme li,
body.light-theme dt,
body.light-theme dd,
body.light-theme label,
body.light-theme strong,
body.light-theme em {
  color: #334155 !important;
}

/* Force slate text for text utility classes */
body.light-theme .text-white,
body.light-theme .text-slate-100,
body.light-theme .text-slate-200,
body.light-theme .text-slate-300,
body.light-theme .text-slate-400,
body.light-theme .text-slate-500,
body.light-theme .text-gray-100,
body.light-theme .text-gray-200,
body.light-theme .text-gray-300,
body.light-theme .text-gray-400 {
  color: #334155 !important;
}

/* Specific elements containing text inside dark boxes */
body.light-theme [class*="bg-slate-"] h1,
body.light-theme [class*="bg-slate-"] h2,
body.light-theme [class*="bg-slate-"] h3,
body.light-theme [class*="bg-slate-"] h4,
body.light-theme [class*="bg-slate-"] strong,
body.light-theme [class*="bg-slate-"] span:not(.text-sky-400):not(.text-emerald-400):not(.text-amber-400):not(.text-amber-300):not(.text-red-400):not(.text-pink-400) {
  color: #0F172A !important;
}

body.light-theme [class*="bg-slate-"] p,
body.light-theme [class*="bg-slate-"] li,
body.light-theme [class*="bg-slate-"] div {
  color: #334155 !important;
}

/* Revert icons inside dark elements so they keep brand colors */
body.light-theme [class*="bg-slate-"] i {
  color: revert !important;
}

/* Brand colored texts contrast fix for light mode */
body.light-theme .text-sky-300 {
  color: #0284C7 !important;
}
body.light-theme .text-sky-400 {
  color: #0369A1 !important;
}
body.light-theme .text-cyan-300 {
  color: #0891B2 !important;
}
body.light-theme .text-emerald-300 {
  color: #059669 !important;
}
body.light-theme .text-amber-300 {
  color: #D97706 !important;
}
body.light-theme .text-amber-400 {
  color: #D97706 !important;
}

/* Force original styles inside interactive actions */
body.light-theme button:not(.border-slate-700\/80):not(.bg-slate-900\/90),
body.light-theme button:not(.border-slate-700\/80):not(.bg-slate-900\/90) *,
body.light-theme .bg-gradient-button,
body.light-theme .bg-gradient-button *,
body.light-theme .bg-sky-500,
body.light-theme .bg-sky-500 *,
body.light-theme .bg-sky-600,
body.light-theme .bg-sky-600 *,
body.light-theme .bg-emerald-500,
body.light-theme .bg-emerald-500 *,
body.light-theme .bg-pink-500,
body.light-theme .bg-pink-500 *,
body.light-theme .bg-red-600,
body.light-theme .bg-red-600 *,
body.light-theme .badge-live,
body.light-theme .badge-live *,
body.light-theme a.btn-primary-sm,
body.light-theme a.btn-primary-sm *,
body.light-theme #btn-kakao-chat * {
  color: revert !important;
}

/* Explicit secondary button dark slate text */
body.light-theme button.border-slate-700\/80,
body.light-theme button.border-slate-700\/80 *,
body.light-theme button.bg-slate-900\/90,
body.light-theme button.bg-slate-900\/90 *,
body.light-theme [class*="bg-slate-"] button,
body.light-theme [class*="bg-slate-"] button * {
  color: #1E293B !important;
}

/* Borders */
body.light-theme .border-slate-800,
body.light-theme .border-slate-700,
body.light-theme .border-slate-700\/80,
body.light-theme .border-slate-800\/80,
body.light-theme .border-sky-500\/20,
body.light-theme .border-sky-500\/30,
body.light-theme .border-sky-500\/40,
body.light-theme .border-emerald-500\/30,
body.light-theme .border-amber-400\/80,
body.light-theme .border-amber-500\/30 {
  border-color: #E2E8F0 !important;
}

/* Nav & Glass overrides */
body.light-theme .glass-nav {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(2, 132, 199, 0.15) !important;
}
body.light-theme .nav-link {
  color: #475569 !important;
}
body.light-theme .nav-link:hover {
  color: #0284C7 !important;
}
body.light-theme .nav-link.active {
  color: #0284C7 !important;
}
body.light-theme #mobile-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(2, 132, 199, 0.15) !important;
}
body.light-theme #mobile-menu a {
  color: #334155 !important;
}
body.light-theme #mobile-menu a:hover {
  background-color: rgba(2, 132, 199, 0.08) !important;
  color: #0284C7 !important;
}

/* Modals & Popups */
body.light-theme .modal-backdrop {
  background: rgba(15, 23, 42, 0.5) !important;
}
body.light-theme .bg-[#0F172A],
body.light-theme .bg-slate-950 {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
}
body.light-theme input,
body.light-theme textarea,
body.light-theme select {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  border-color: #E2E8F0 !important;
}

/* Gradient overrides for light mode readability */
body.light-theme .bg-gradient-to-b.from-\[\#050C1A\].via-\[\#0A1931\].to-\[\#050C1A\] {
  background: linear-gradient(to bottom, #F8FAFC 0%, #F1F5F9 50%, #F8FAFC 100%) !important;
}
body.light-theme .bg-gradient-to-br.from-\[\#030712\].to-\[\#0F172A\] {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%) !important;
}
body.light-theme .bg-[#0F172A]/90 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Footer Legibility Rules for Light Theme */
body.light-theme footer,
body.light-theme footer * {
  color: revert !important;
}
body.light-theme footer p,
body.light-theme footer a,
body.light-theme footer span {
  color: #94A3B8 !important;
}
body.light-theme footer a:hover {
  color: #FFFFFF !important;
}
body.light-theme footer h3 {
  color: #FFFFFF !important;
}
