/* ==========================================================================
   JY Global · Internal AI Portal — Prototype Styles
   Built on the locked design system: design-system.md
   ========================================================================== */

/* ---- Base ---- */
body { font-family: 'Manrope', system-ui, sans-serif; background: #F5F7FA; }
* { box-sizing: border-box; }

/* ---- Design system utilities ---- */
.ease-spring { transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1); }
.tabular { font-variant-numeric: tabular-nums; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* ---- Shadows ---- */
.card-shadow    { box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 8px 30px -12px rgba(11,31,53,0.08); }
.card-shadow-lg { box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 20px 50px -20px rgba(11,31,53,0.18); }
.nav-shadow     { box-shadow: 0 1px 0 rgba(15,23,42,0.04); }
.hero-stats-shadow {
  box-shadow:
    0 1px 3px rgba(11,31,53,0.06),
    0 30px 60px -20px rgba(11,31,53,0.25),
    0 12px 24px -12px rgba(21,181,199,0.08);
}

/* ---- Underline grow link ---- */
.underline-grow {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 400ms cubic-bezier(0.32, 0.72, 0, 1);
}
.group:hover .underline-grow,
a:hover .underline-grow { background-size: 100% 1px; }

/* ---- Grid + dot patterns ---- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}
.dot-bg {
  background-image: radial-gradient(rgba(15,23,42,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- App shell ---- */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.app-sidebar {
  background: #FFFFFF;
  border-right: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.app-main { background: #F5F7FA; min-width: 0; }

/* sidebar nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: #F0F4F8; color: #0F172A; }
.nav-item.active {
  background: #0B1F35;
  color: #FFFFFF;
}
.nav-item.active i { color: #15B5C7; }
.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(21,181,199,0.15);
  color: #0E9DAE;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.nav-item.active .nav-badge { background: rgba(21,181,199,0.2); color: #15B5C7; }

.nav-section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748B;
  padding: 0 12px;
  margin-bottom: 6px;
}

/* ---- Top bar ---- */
.app-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ---- Eyebrow pill ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F0F4F8;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #0B1F35;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0B1F35;
}
.eyebrow.eyebrow-cyan { color: #15B5C7; background: rgba(21,181,199,0.1); }
.eyebrow.eyebrow-cyan::before { background: #15B5C7; }
.eyebrow.eyebrow-dark { background: rgba(255,255,255,0.08); color: #15B5C7; border: 1px solid rgba(255,255,255,0.15); }
.eyebrow.eyebrow-dark::before { background: #15B5C7; }

/* ---- Browser chrome (mockup wrapper) ---- */
.browser-chrome {
  background: linear-gradient(to bottom, #F8FAFC, #F1F5F9);
  border-bottom: 1px solid #E2E8F0;
}

/* ---- Citation ---- */
.citation {
  background: #ECFDFD;
  color: #0E9DAE;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid #B6EAEF;
}

/* ---- Custom scrollbar ---- */
.chat-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- Typing cursor + dots ---- */
.typing-cursor::after {
  content: '▍';
  color: #15B5C7;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 8px 12px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  background: #15B5C7;
  border-radius: 999px;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse-dot {
  0%, 60%, 100% { transform: scale(0.6); opacity: 0.4; }
  30% { transform: scale(1); opacity: 1; }
}

/* ---- Animations: reveal on scroll ---- */
html.anim-on .anim-up { opacity: 0; transform: translateY(20px); transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
html.anim-on .anim-up.is-visible { opacity: 1; transform: translateY(0); }
html.anim-on .anim-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
html.anim-on .anim-stagger.is-visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 80ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 160ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 240ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 320ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 400ms; }
html.anim-on .anim-stagger.is-visible > *:nth-child(n+7) { opacity: 1; transform: translateY(0); transition-delay: 480ms; }
html.anim-on .anim-fade { opacity: 0; transition: opacity 1000ms ease-out; }
html.anim-on .anim-fade.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .anim-up, .anim-stagger > *, .anim-fade { transition: none !important; opacity: 1 !important; transform: none !important; }
  .typing-cursor::after { animation: none; }
  .typing-dots span { animation: none; opacity: 0.7; }
}

/* ---- Float ---- */
.float-slow { animation: float-slow 6s ease-in-out infinite; }
@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- Toast / notification ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0B1F35;
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 20px 50px -20px rgba(11,31,53,0.4);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms cubic-bezier(0.32, 0.72, 0, 1), transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast i { color: #15B5C7; font-size: 18px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,21,37,0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.32, 0.72, 0, 1);
  display: grid;
  place-items: center;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 480px;
  width: calc(100% - 48px);
  padding: 32px;
  transform: scale(0.95);
  transition: transform 250ms cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 30px 60px -20px rgba(11,31,53,0.4);
}
.modal-overlay.show .modal-card { transform: scale(1); }

/* ---- Stat counter ---- */
.stat-num {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1;
}

/* ---- Hover lifts ---- */
.lift-on-hover { transition: all 300ms cubic-bezier(0.32, 0.72, 0, 1); }
.lift-on-hover:hover { transform: translateY(-2px); box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 20px 50px -20px rgba(11,31,53,0.18); }

/* ---- Phone frame ---- */
.phone-frame {
  border-radius: 44px;
  background: linear-gradient(145deg, #0B1F35, #061525);
  padding: 12px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 0 0 8px rgba(15,23,42,0.4) inset;
}
.phone-screen {
  border-radius: 34px;
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
}

/* ---- Buttons (design system primitives) ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #15B5C7;
  color: #061525;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-primary:hover { background: #2DC4D5; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #0B1F35;
  color: #FFFFFF;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-secondary:hover { background: #15324F; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #FFFFFF;
  color: #0F172A;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-ghost:hover { background: #F0F4F8; }

/* ---- Project card on hover ---- */
.project-card {
  transition: all 250ms cubic-bezier(0.32, 0.72, 0, 1);
  cursor: pointer;
}
.project-card:hover {
  border-color: rgba(11,31,53,0.3);
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 20px 50px -20px rgba(11,31,53,0.18);
}

/* ---- Demo banner ---- */
.demo-banner {
  background: linear-gradient(90deg, #061525 0%, #0B1F35 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.demo-banner a { color: #15B5C7; text-decoration: none; font-weight: 700; }
.demo-banner a:hover { color: #2DC4D5; }
</content>
