/* ========================================
   DEEN.IN — Premium Design System
   Celestial dark + liquid glass + cinematic animations
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg-deep: #060B16;
  --bg-primary: #0A1323;
  --bg-surface: #101B2E;
  --bg-elevated: #17253C;

  --primary: #6FD8A7;
  --primary-variant: #4CBF8B;
  --primary-soft: rgba(111, 216, 167, 0.16);
  --accent: #E2C98B;
  --accent-variant: #C9AA66;
  --accent-soft: rgba(226, 201, 139, 0.18);

  --text-primary: #FFFFFF;
  --text-secondary: #C0CCDE;
  --text-tertiary: #8E9AB8;
  --border: rgba(183, 200, 230, 0.26);
  --border-strong: rgba(226, 236, 255, 0.40);

  /* Liquid Glass tokens */
  --glass-bg: rgba(13, 20, 35, 0.90);
  --glass-light: rgba(16, 27, 46, 0.78);
  --glass-border: rgba(183, 200, 230, 0.26);
  --glass-border-strong: rgba(226, 236, 255, 0.40);
  --glass-shine: rgba(255,255,255,0.03);
  --glass-blur: 20px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===================== LIQUID GLASS (subtle) ===================== */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(111, 216, 167, 0.35) 0%,
    rgba(183, 200, 230, 0.12) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(183, 200, 230, 0.12) 80%,
    rgba(226, 201, 139, 0.25) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===================== LIQUID GLASS STRONG (prominent) ===================== */
.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border: none;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(111, 216, 167, 0.45) 0%,
    rgba(183, 200, 230, 0.18) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(183, 200, 230, 0.18) 80%,
    rgba(226, 201, 139, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===================== LEGACY GLASS (content pages) ===================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.glass::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--glass-shine), transparent 40%);
  pointer-events: none;
}

/* ===================== BLUR TEXT ANIMATION ===================== */
@keyframes blurReveal {
  0% {
    filter: blur(12px);
    opacity: 0;
    transform: translateY(20px);
  }
  60% {
    filter: blur(4px);
    opacity: 0.6;
    transform: translateY(-3px);
  }
  100% {
    filter: blur(0px);
    opacity: 1;
    transform: translateY(0);
  }
}
.blur-word {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  animation: blurReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Stagger delays for up to 10 words */
.blur-word:nth-child(1) { animation-delay: 0.1s; }
.blur-word:nth-child(2) { animation-delay: 0.22s; }
.blur-word:nth-child(3) { animation-delay: 0.34s; }
.blur-word:nth-child(4) { animation-delay: 0.46s; }
.blur-word:nth-child(5) { animation-delay: 0.58s; }
.blur-word:nth-child(6) { animation-delay: 0.7s; }
.blur-word:nth-child(7) { animation-delay: 0.82s; }
.blur-word:nth-child(8) { animation-delay: 0.94s; }

/* ===================== SCROLL REVEAL ANIMATIONS ===================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}
@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(6px);
  transition: none;
}
.reveal.visible {
  animation: fadeSlideUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  transition: none;
}
.reveal-scale.visible {
  animation: fadeScaleIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Stagger children */
.reveal-stagger > * { opacity: 0; transform: translateY(24px); filter: blur(4px); }
.reveal-stagger.visible > * {
  animation: fadeSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.reveal-stagger.visible > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { animation-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { animation-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(4) { animation-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { animation-delay: 0.33s; }
.reveal-stagger.visible > *:nth-child(6) { animation-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7) { animation-delay: 0.47s; }
.reveal-stagger.visible > *:nth-child(8) { animation-delay: 0.54s; }
.reveal-stagger.visible > *:nth-child(9) { animation-delay: 0.61s; }

/* ===================== GLOW PULSE (for hero logo) ===================== */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(111,216,167,0.15), 0 0 60px rgba(111,216,167,0.05); }
  50% { box-shadow: 0 0 40px rgba(111,216,167,0.25), 0 0 80px rgba(111,216,167,0.1); }
}
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===================== CELESTIAL BACKGROUND ===================== */
.celestial-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
}
.celestial-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, #0F2847 0%, var(--bg-deep) 70%);
}
.stars {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 30% 85%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.35), transparent),
    radial-gradient(2px 2px at 50% 5%, rgba(226,201,139,0.4), transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, rgba(226,201,139,0.3), transparent),
    radial-gradient(1px 1px at 20% 50%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 45% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 75% 90%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 95% 10%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 5% 40%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 65% 50%, rgba(111,216,167,0.25), transparent);
  animation: twinkle 8s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(111,216,167,0.10), transparent 70%);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(226,201,139,0.06), transparent 70%);
  bottom: 20%; left: -80px;
  animation-delay: -7s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ===================== NAVIGATION ===================== */
.page-wrapper { position: relative; z-index: 1; }

.nav-wrap {
  position: sticky; top: 0; z-index: 100;
  padding: 12px 24px;
}
nav {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  border-radius: 9999px;
}
nav.liquid-glass {
  background: rgba(6,11,22,0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo {
  height: 36px;
  border-radius: 8px;
}
.nav-wordmark {
  display: flex; align-items: baseline; gap: 2px;
}
.nav-wordmark .brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.nav-wordmark .brand-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 1px 3px;
  display: inline-block;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: all 0.25s;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(183,200,230,0.06); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); }

/* ===================== COMMON ===================== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 740px; margin: 0 auto; padding: 0 24px; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.15;
}
/* Serif heading — Instrument Serif for cinematic editorial feel */
.section-title-serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 0.92;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-variant), var(--primary));
  color: #062116;
  box-shadow: 0 4px 20px rgba(111,216,167,0.2), 0 0 0 1px rgba(111,216,167,0.1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(111,216,167,0.3), 0 0 0 1px rgba(111,216,167,0.2);
}
.btn-liquid {
  color: var(--text-primary);
}
.btn-liquid.liquid-glass-strong {
  padding: 14px 28px;
  border-radius: 9999px;
}
.btn-liquid:hover { transform: translateY(-2px); }
.btn-glass {
  background: var(--glass-light);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.btn-glass:hover { transform: translateY(-2px); background: rgba(22,37,68,0.7); }
.btn svg { width: 18px; height: 18px; }

/* ===================== FOOTER ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
}
.footer-brand img { height: 28px; border-radius: 6px; }
.footer-brand p { font-size: 13px; color: var(--text-tertiary); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy {
  width: 100%; text-align: center; color: var(--text-tertiary);
  font-size: 12px; margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===================== CONTENT PAGES ===================== */
.content-page { padding: 48px 0 80px; }
.content-page h1 {
  font-size: 36px; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.content-page .updated { font-size: 13px; color: var(--text-tertiary); margin-bottom: 40px; }
.content-page .intro { font-size: 16px; color: var(--text-secondary); margin-bottom: 36px; }
.content-page h2 {
  font-size: 20px; color: var(--text-primary); margin-top: 44px; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.content-page p { font-size: 14.5px; color: var(--text-secondary); margin-bottom: 16px; }
.content-page ul { padding-left: 24px; margin-bottom: 16px; }
.content-page li { font-size: 14.5px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.7; }
.content-page li strong { color: var(--text-primary); font-weight: 600; }
.content-page a { color: var(--primary); text-decoration: none; }
.content-page a:hover { text-decoration: underline; }
.highlight-box {
  background: var(--primary-soft);
  border: 1px solid rgba(111,216,167,0.18);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
}
.highlight-box p { color: var(--primary); font-weight: 600; margin: 0; font-size: 15px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .nav-wordmark .brand-name { font-size: 16px; }
  .content-page h1 { font-size: 28px; }
}
@media (max-width: 480px) {
  nav { padding: 8px 14px; border-radius: 16px; }
  .nav-logo { height: 30px; }
}
