/* 
   Rabbit Hole - Vanilla CSS Framework
   Follows TailwindCSS paradigm combined with modern UI principles.
*/

:root {
  --primary: #9D70FF; /* Neon Lavender */
  --primary-hover: #b08cff;
  --accent: #E5A93B; /* Ochre */
  --surface: #0a0a0c;
  --surface-hover: #121215;
  --on-surface: #ffffff;
  --nav-blur: rgba(10, 10, 12, 0.7);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--surface);
  color: var(--on-surface);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-outfit {
  font-family: 'Outfit', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Utility Classes similar to Tailwind */
.container { width: 100%; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

.mx-auto { margin-left: auto; margin-right: auto; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-16 { padding-top: 4rem; }
.pb-8 { padding-bottom: 2rem; }
.pt-32 { padding-top: 8rem; }
.pb-20 { padding-bottom: 5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }
.mt-20 { margin-top: 5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-16 { gap: 4rem; }
.flex-1 { flex: 1 1 0%; }
.items-stretch { align-items: stretch; }
.flex-wrap { flex-wrap: wrap; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.p-2 { padding: 0.5rem; }
.p-8 { padding: 2rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.leading-relaxed { line-height: 1.625; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.max-w-7xl { max-width: 80rem; }

.border { border-width: 1px; border-style: solid; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.drop-shadow-\[0_20px_50px_rgba\(0\,0\,0\,0\.5\)\] { filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5)); }
.scroll-smooth { scroll-behavior: smooth; }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
}

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.hidden { display: none; }
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-left { text-align: left; }
  .md\:mx-0 { margin-left: 0; margin-right: 0; }
}

@media (min-width: 1024px) {
  .lg\:flex-row { flex-direction: row; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:pt-48 { padding-top: 12rem; }
  .lg\:pb-32 { padding-bottom: 8rem; }
}

.text-center { text-align: center; }
.text-left { text-align: left; }

.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-rose-400 { color: #fb7185; }
.bg-surface { background-color: var(--surface); }

.w-full { width: 100%; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-sm { max-width: 24rem; }
.h-auto { height: auto; }
.w-14 { width: 3.5rem; }
.h-14 { height: 3.5rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }

.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Custom Glass & FX */
.glass-nav {
  background: var(--nav-blur);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(157, 112, 255, 0.4);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(157, 112, 255, 0.6);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
.hover-float:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(157, 112, 255, 0.2);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.focus-in-contract {
  animation: focusInContract 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes focusInContract {
  0% {
    letter-spacing: 1em;
    filter: blur(12px);
    opacity: 0;
  }
  100% {
    filter: blur(0px);
    opacity: 1;
  }
}

.shrink-border-anim {
  animation: floatUpDown 6s ease-in-out infinite;
}

@keyframes floatUpDown {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

/* Mockup Perspective Frame */
.perspective-frame {
  transform: perspective(1000px) rotateX(10deg);
  transition: transform 0.5s ease;
}
.perspective-frame:hover {
  transform: perspective(1000px) rotateX(0deg);
}

.glass-board {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
}

/* Specific elements */
.faq-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

/* Utils */
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }

/* Section alt background */
.section-alt { background-color: #0a0a0c; }
[class*="bg-[#0a0a0c]"] { background-color: #0a0a0c; }
[class*="bg-[#050506]"] { background-color: #050506; }

/* ═══════════════════════════════════════════════════════════════════
   THEME SYSTEM — 4 themes matching Flutter app_theme.dart exactly
   Cycle: Modern Dark → Softpaper Dark → Modern Light → Softpaper Light
   ═══════════════════════════════════════════════════════════════════ */

/* ── Theme 1: Modern Dark (default — OLED black, high contrast) ── */
/* Already the base :root variables — no extra class needed */

/* ── Theme 2: Softpaper Dark (warm dark, scholarly) ────────────── */
.theme-softpaper-dark {
  --primary: #D4B483;
  --primary-hover: #E0C498;
  --accent: #E09B5C;
  --surface: #1C1814;
  --surface-hover: #2A2420;
  --on-surface: #F0E9DF;
  --nav-blur: rgba(28, 24, 20, 0.88);
}
.theme-softpaper-dark .section-alt,
.theme-softpaper-dark [class*="bg-[#0a0a0c]"] { background-color: #1C1814 !important; }
.theme-softpaper-dark [class*="bg-[#050506]"] { background-color: #151210 !important; }
.theme-softpaper-dark .glass-nav { background: var(--nav-blur); border-bottom-color: rgba(240,233,223,0.06); }
.theme-softpaper-dark .glass-card, .theme-softpaper-dark .glass-pill {
  background: rgba(240,233,223,0.03); border-color: rgba(240,233,223,0.08);
}
.theme-softpaper-dark .glass-board { background: linear-gradient(135deg, rgba(240,233,223,0.04), rgba(240,233,223,0.01)); }
.theme-softpaper-dark .text-gray-200 { color: #F0E9DF; }
.theme-softpaper-dark .text-gray-300 { color: #D4C8B8; }
.theme-softpaper-dark .text-gray-400 { color: #A09080; }
.theme-softpaper-dark .text-gray-500 { color: #7A6C5C; }
.theme-softpaper-dark .text-gray-600 { color: #5A4E40; }
.theme-softpaper-dark .text-gradient { background: linear-gradient(135deg, #D4B483, #E09B5C); -webkit-background-clip: text; background-clip: text; }
.theme-softpaper-dark .btn-primary { background-color: #D4B483; color: #1C1814; box-shadow: 0 0 20px rgba(212,180,131,0.3); }
.theme-softpaper-dark .btn-primary:hover { background-color: #E0C498; box-shadow: 0 0 30px rgba(212,180,131,0.5); }
.theme-softpaper-dark .btn-secondary { background-color: rgba(240,233,223,0.05); border-color: rgba(240,233,223,0.1); }
.theme-softpaper-dark .hover-float:hover { background: rgba(240,233,223,0.04); border-color: rgba(212,180,131,0.2); }

/* ── Theme 3: Modern Light (pure white, ultra-crisp) ───────────── */
.theme-modern-light {
  --primary: #D4893A;
  --primary-hover: #C07A30;
  --accent: #8E6FA0;
  --surface: #FFFFFF;
  --surface-hover: #F7F7F7;
  --on-surface: #000000;
  --nav-blur: rgba(255, 255, 255, 0.92);
}
.theme-modern-light .section-alt,
.theme-modern-light [class*="bg-[#0a0a0c]"] { background-color: #F7F7F7 !important; }
.theme-modern-light [class*="bg-[#050506]"] { background-color: #F0F0F0 !important; }
.theme-modern-light .glass-nav { background: var(--nav-blur); border-bottom-color: rgba(0,0,0,0.08); }
.theme-modern-light .glass-card, .theme-modern-light .glass-pill {
  background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.1); box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.theme-modern-light .glass-board { background: linear-gradient(135deg, rgba(0,0,0,0.03), rgba(0,0,0,0.01)); }
.theme-modern-light .text-gray-200 { color: #1a1a1a; }
.theme-modern-light .text-gray-300 { color: #333333; }
.theme-modern-light .text-gray-400 { color: #555555; }
.theme-modern-light .text-gray-500 { color: #71717A; }
.theme-modern-light .text-gray-600 { color: #A1A1AA; }
.theme-modern-light .text-gradient { background: linear-gradient(135deg, #D4893A, #8E6FA0); -webkit-background-clip: text; background-clip: text; }
.theme-modern-light .btn-primary { background-color: #000; color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.theme-modern-light .btn-primary:hover { background-color: #222; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.theme-modern-light .btn-secondary { background-color: rgba(0,0,0,0.04); color: #000; border-color: rgba(0,0,0,0.12); }
.theme-modern-light .btn-secondary:hover { background-color: rgba(0,0,0,0.08); }
.theme-modern-light .hover-float:hover { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); }
.theme-modern-light footer { background-color: #F0F0F0 !important; border-top-color: rgba(0,0,0,0.06) !important; }
.theme-modern-light .faq-btn { color: #000; }
.theme-modern-light .pointer-events-none { opacity: 0.06 !important; }

/* ── Theme 4: Softpaper Light (warm cream, scholarly elegance) ─── */
.theme-softpaper-light {
  --primary: #6B5A4A;
  --primary-hover: #5A4A3A;
  --accent: #E09B5C;
  --surface: #FCFBF9;
  --surface-hover: #F5F3F0;
  --on-surface: #1A1816;
  --nav-blur: rgba(252, 251, 249, 0.92);
}
.theme-softpaper-light .section-alt,
.theme-softpaper-light [class*="bg-[#0a0a0c]"] { background-color: #F5F3F0 !important; }
.theme-softpaper-light [class*="bg-[#050506]"] { background-color: #EBE7E2 !important; }
.theme-softpaper-light .glass-nav { background: var(--nav-blur); border-bottom-color: rgba(0,0,0,0.06); }
.theme-softpaper-light .glass-card, .theme-softpaper-light .glass-pill {
  background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.06); box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.theme-softpaper-light .glass-board { background: linear-gradient(135deg, rgba(0,0,0,0.03), rgba(0,0,0,0.01)); }
.theme-softpaper-light .text-gray-200 { color: #1A1816; }
.theme-softpaper-light .text-gray-300 { color: #3D352D; }
.theme-softpaper-light .text-gray-400 { color: #6B5A4A; }
.theme-softpaper-light .text-gray-500 { color: #9C9080; }
.theme-softpaper-light .text-gray-600 { color: #BEB4A6; }
.theme-softpaper-light .text-gradient { background: linear-gradient(135deg, #E09B5C, #B5A0C4); -webkit-background-clip: text; background-clip: text; }
.theme-softpaper-light .btn-primary { background-color: #6B5A4A; color: #FCFBF9; box-shadow: 0 2px 12px rgba(107,90,74,0.2); }
.theme-softpaper-light .btn-primary:hover { background-color: #5A4A3A; box-shadow: 0 4px 20px rgba(107,90,74,0.3); }
.theme-softpaper-light .btn-secondary { background-color: rgba(0,0,0,0.03); color: #1A1816; border-color: rgba(0,0,0,0.08); }
.theme-softpaper-light .btn-secondary:hover { background-color: rgba(0,0,0,0.06); }
.theme-softpaper-light .hover-float:hover { background: rgba(255,255,255,0.9); border-color: rgba(224,155,92,0.2); }
.theme-softpaper-light footer { background-color: #EBE7E2 !important; border-top-color: rgba(0,0,0,0.05) !important; }
.theme-softpaper-light .faq-btn { color: #1A1816; }
.theme-softpaper-light .pointer-events-none { opacity: 0.06 !important; }

/* ── Shared overrides for both light themes ────────────────────── */
.theme-modern-light #theme-toggle-btn, .theme-modern-light #theme-toggle-btn-mobile,
.theme-softpaper-light #theme-toggle-btn, .theme-softpaper-light #theme-toggle-btn-mobile {
  border-color: rgba(0, 0, 0, 0.15) !important;
}
.theme-modern-light #mobile-drawer, .theme-softpaper-light #mobile-drawer {
  border-top-color: rgba(0, 0, 0, 0.06) !important;
}

/* ── Smooth transitions on theme change ────────────────────────── */
body { transition: background-color 0.4s ease, color 0.4s ease; }
.glass-nav, .glass-card, .glass-pill, footer, .section-alt,
[class*="bg-[#0a0a0c]"], [class*="bg-[#050506]"] {
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.btn-primary, .btn-secondary { transition: all 0.3s ease; }

/* ── Responsive: Pricing Grid ──────────────────────────────────── */
@media (max-width: 1023px) {
  #pricing .container > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  #pricing .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  #themes .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  #pricing .text-4xl { font-size: 1.75rem !important; }
}

