/* ── SAJU AI · GLOBAL STYLES ── */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,400;1,700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  /* ── LIGHT MODE (DEFAULT) ── */
  --bg:    #f8fafc;
  --bg-lowest: #ffffff;
  --bg1:   #ffffff;
  --bg2:   #f1f5f9;
  --bg3:   #e2e8f0;
  --bg4:   #cbd5e1;
  --line:  rgba(15, 23, 42, 0.06);
  --line2: rgba(15, 23, 42, 0.1);
  --line3: rgba(15, 23, 42, 0.18);
  --txt:   #0f172a;
  --txt2:  #334155;
  --txt3:  #64748b;
  --v:     #6366f1;
  --v2:    #4f46e5;
  --v3:    #8b5cf6;
  --vd:    rgba(99, 102, 241, 0.04);
  --vbd:   rgba(99, 102, 241, 0.12);
  --on-primary-txt: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --mob-nav-bg: rgba(255, 255, 255, 0.98);
  --r:     12px;
  --r2:    16px;
  --r3:    24px;
  --font-sans: 'Manrope', 'Pretendard', sans-serif;
  --font-serif: 'Plus Jakarta Sans', 'Playfair Display', serif;
}

html.dark {
  /* ── DARK MODE ── */
  --bg:    #0b1326;
  --bg-lowest: #060e20;
  --bg1:   #131b2e;
  --bg2:   #171f33;
  --bg3:   #222a3d;
  --bg4:   #2d3449;
  --line:  rgba(255,255,255,.05);
  --line2: rgba(255,255,255,.1);
  --line3: rgba(255,255,255,.18);
  --txt:   #dae2fd;
  --txt2:  #c9c4d8;
  --txt3:  #938ea1;
  --v:     #937dff;
  --v2:    #7bd0ff;
  --v3:    #ddb8ff;
  --vd:    rgba(147,125,255,.08);
  --vbd:   rgba(147,125,255,.2);
  --on-primary-txt: #dae2fd;
  --nav-bg: rgba(7, 8, 14, 0.88);
  --mob-nav-bg: rgba(7, 8, 14, 0.97);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--txt);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  position: relative;
}

/* 노이즈 텍스처 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: .028;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

/* ── NAV ── */
header nav {
  position: sticky; top: 0; z-index: 200;
  height: 48px;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
  display: flex; align-items: center;
  padding: 0 clamp(20px,5vw,64px);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  max-width: 1240px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  letter-spacing: .02em; color: var(--txt);
  text-decoration: none; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  font-size: 13px; color: var(--txt3); text-decoration: none;
  padding: 5px 13px; border-radius: 8px;
  transition: color .15s; letter-spacing: -.01em;
}
.nav-links a:hover { color: var(--txt); }
.nav-right { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  background: none; border: 1px solid var(--line2);
  color: var(--txt3); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; padding: 5px 11px; border-radius: 7px;
  cursor: pointer; font-family: var(--font-sans); transition: all .15s;
}
.lang-btn:hover { color: var(--txt2); border-color: var(--line3); }
.btn-login {
  background: none; border: 1px solid var(--line2);
  color: var(--txt2); font-size: 13px; padding: 7px 16px;
  border-radius: 9px; cursor: pointer; font-family: var(--font-sans);
  transition: all .15s; letter-spacing: -.01em;
}
.btn-login:hover { color: var(--txt); border-color: var(--line3); }
.btn-cta {
  background: var(--v); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 8px 20px; border-radius: 9px;
  border: none; cursor: pointer; font-family: var(--font-sans);
  letter-spacing: -.01em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s; box-shadow: 0 0 24px rgba(99,102,241,.3);
}
.btn-cta:hover { background: var(--v2); transform: translateY(-1px); box-shadow: 0 4px 28px rgba(99,102,241,.4); }
.mob-btn {
  display: none; background: none; border: none;
  color: var(--txt2); cursor: pointer; padding: 4px;
  font-size: 22px; line-height: 1;
}

/* ── MOBILE NAV ── */
.mob-nav {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: var(--mob-nav-bg); backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 36px; text-align: center;
  transition: background 0.3s ease;
}
.mob-nav.open { display: flex; }
.mob-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; color: var(--txt2);
  font-size: 26px; cursor: pointer; line-height: 1;
}
.mob-nav a {
  font-family: var(--font-serif); font-size: 42px; font-weight: 700;
  color: var(--txt); text-decoration: none; letter-spacing: .02em; transition: color .15s;
}
.mob-nav a:hover { color: var(--v3); }

/* ── MARQUEE ── */
.marquee-section {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg1); padding: 16px 0; overflow: hidden;
}
.marquee-track { display: flex; width: max-content; animation: mscroll 32s linear infinite; }
.mq-item { display: flex; align-items: center; gap: 12px; padding: 0 28px; white-space: nowrap; flex-shrink: 0; }
.mq-item span {
  font-family: var(--font-serif); font-size: 16px;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(176,174,208,.25);
}
.mq-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--v2); opacity: .4; }
@keyframes mscroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── SECTION COMMONS ── */
.section { padding: clamp(64px,8vw,100px) clamp(20px,5vw,64px); position: relative; z-index: 1; }
.s-wrap { max-width: 1240px; margin: 0 auto; }
.s-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--v2); display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.s-eyebrow::before { content:''; width: 18px; height: 1px; background: var(--v2); opacity: .7; }
.s-h2 {
  font-family: var(--font-serif); font-size: clamp(36px,5vw,52px);
  font-weight: 700; line-height: 1.06; letter-spacing: -.02em; margin-bottom: 14px;
}
.s-h2 em { font-style: italic; font-weight: 400; color: rgba(255,255,255,.3); }
.s-p { font-size: 15px; color: var(--txt2); line-height: 1.8; max-width: 480px; font-weight: 400; letter-spacing: -.01em; }

/* ── AUTH MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--line2);
  border-radius: var(--r3); padding: 30px; width: 100%; max-width: 380px;
  transform: translateY(14px) scale(.98); transition: transform .22s;
  box-shadow: 0 30px 80px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.05);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-head h3 { font-family: var(--font-serif); font-size: 22px; font-weight: 700; }
.modal-x { background: none; border: none; color: var(--txt2); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-x:hover { color: var(--txt); }
.modal-tabs { display: flex; background: var(--bg1); border-radius: var(--r); padding: 3px; margin-bottom: 22px; gap: 3px; }
.modal-tab {
  flex: 1; background: transparent; border: none; color: var(--txt2);
  font-size: 13px; font-weight: 500; padding: 8px; border-radius: 8px;
  cursor: pointer; font-family: var(--font-sans); transition: all .15s;
}
.modal-tab.on { background: var(--bg3); color: var(--txt); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.mfield { margin-bottom: 14px; }
.mfield label { display: block; font-size: 11px; color: var(--txt2); margin-bottom: 6px; letter-spacing: .04em; }
.mfield input {
  width: 100%; background: var(--bg1); border: 1px solid var(--line2);
  border-radius: var(--r); padding: 11px 14px; color: var(--txt); font-size: 14px;
  outline: none; font-family: var(--font-sans); transition: border-color .15s;
}
.mfield input:focus { border-color: var(--v); }
.mfield input::placeholder { color: var(--txt3); }
.modal-submit {
  width: 100%; background: var(--v); border: none; border-radius: var(--r);
  padding: 13px; color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: var(--font-sans); margin-top: 6px;
  letter-spacing: -.01em; transition: background .15s;
  box-shadow: 0 4px 20px rgba(99,102,241,.35);
}
.modal-submit:hover { background: var(--v2); }

/* User menu */
.user-wrap { position: relative; }
.user-btn {
  background: var(--bg2); border: 1px solid var(--line); color: var(--txt2);
  font-size: 13px; padding: 7px 14px; border-radius: 9px; cursor: pointer;
  font-family: var(--font-sans); display: flex; align-items: center; gap: 8px; transition: all .15s;
}
.user-btn:hover { border-color: var(--line2); color: var(--txt); }
.user-drop {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg2);
  border: 1px solid var(--line2); border-radius: var(--r2); padding: 6px;
  min-width: 150px; display: none; z-index: 100; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.user-drop.open { display: block; }
.udrop-item {
  width: 100%; background: none; border: none; color: var(--txt2); font-size: 13px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px; font-family: var(--font-sans); transition: background .1s;
}
.udrop-item:hover { background: var(--bg4); color: var(--txt); }

/* Toasts */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r2);
  padding: 12px 18px; font-size: 13px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: toastIn .25s ease; transition: opacity .25s, transform .25s;
}
@keyframes toastIn { from { transform: translateX(14px); opacity: 0; } }

/* ── CONFIRM MODAL ── */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.confirm-box {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r3);
  padding: 28px; width: 100%; max-width: 320px; box-shadow: 0 30px 80px rgba(0,0,0,.65);
}
.confirm-box h4 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.confirm-box p { font-size: 13px; color: var(--txt2); margin-bottom: 24px; font-weight: 300; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-cancel {
  flex: 1; padding: 10px; border-radius: var(--r); border: 1px solid var(--line2);
  background: transparent; color: var(--txt2); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: var(--font-sans); transition: all .15s;
}
.confirm-cancel:hover { color: var(--txt); border-color: var(--line3); }
.confirm-ok {
  flex: 1; padding: 10px; border-radius: var(--r); border: none;
  background: rgba(248,113,113,.15); color: #f87171; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font-sans); transition: all .15s;
}
.confirm-ok:hover { background: rgba(248,113,113,.25); }

.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .btn-login { display: none; }
  .mob-btn { display: block; }
}

/* ── CONSOLIDATED GLASS CARD, GLOWS, AND UTILITIES ── */
.glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Premium Vercel-style dynamic border hover glow */
.glass-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(202, 190, 255, 0.35),
    transparent 50%
  );
  -webkit-mask: 
     linear-gradient(#fff 0 0) content-box, 
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card:hover {
  border-color: rgba(202, 190, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.celestial-glow {
  position: absolute;
  width: 40vw;
  height: 40vw;
  border-radius: 100%;
  background: radial-gradient(circle, rgba(147, 125, 255, 0.13) 0%, rgba(147, 125, 255, 0) 70%);
  filter: blur(60px);
  z-index: -1;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.nav-blur {
  backdrop-filter: blur(12px);
}

.active-advisor-glow {
  box-shadow: 0 0 15px rgba(202, 190, 255, 0.25);
}

/* ── PREMIUM CHAT UI EFFECTS ── */
.chat-input-focus-glow {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.chat-input-focus-glow:focus-within {
  border-color: rgba(147, 125, 255, 0.4) !important;
  box-shadow: 0 0 35px rgba(147, 125, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

/* ── LIGHT MODE OVERRIDES FOR HARDCODED TAILWIND GLASS CLASSES ── */
html:not(.dark) .border-white\/10 {
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .border-white\/20 {
  border-color: rgba(15, 23, 42, 0.15) !important;
}
html:not(.dark) .border-b-white\/10 {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .bg-white\/5 {
  background-color: rgba(15, 23, 42, 0.03) !important;
}
html:not(.dark) .bg-white\/10 {
  background-color: rgba(15, 23, 42, 0.06) !important;
}
html:not(.dark) .hover\:bg-white\/5:hover {
  background-color: rgba(15, 23, 42, 0.05) !important;
}
html:not(.dark) .hover\:bg-white\/10:hover {
  background-color: rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .text-primary-fixed-dim {
  color: var(--v) !important;
}
html:not(.dark) .text-primary-fixed {
  color: var(--v) !important;
}

/* Glass card overrides for Light Mode */
html:not(.dark) .glass-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .glass-card:hover {
  border-color: rgba(99, 102, 241, 0.22) !important;
  background: rgba(255, 255, 255, 0.85) !important;
}
html:not(.dark) .glass-card::before {
  background: radial-gradient(
    300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(99, 102, 241, 0.15),
    transparent 50%
  ) !important;
}

/* Celestial glow override for Light Mode */
html:not(.dark) .celestial-glow {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0) 70%) !important;
}

/* Modal Overlay and Modal overrides for Light Mode */
html:not(.dark) .modal-overlay {
  background: rgba(15, 23, 42, 0.3) !important;
}
html:not(.dark) .modal {
  background: #ffffff !important;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.1) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .modal-tab.on {
  background: var(--bg2) !important;
  color: var(--txt) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
}
html:not(.dark) .modal-submit {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15) !important;
}

/* Toast overrides for Light Mode */
html:not(.dark) .toast {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08) !important;
}

/* Scrollbar overrides for Light Mode */
html:not(.dark) ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15) !important;
}

/* Smooth transitions */
body, header, header nav, .glass-card, input, select, button, a {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}


