/* ==========================================================================
   Anold Mulaisho Consultancy — Custom Design System
   Overrides the Next.js bundled CSS with new palette and components
   ========================================================================== */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Light Mode Palette (warm cream / deep purple) --- */
:root {
  --background: 36 67% 97%;        /* #FDF8F0 warm cream */
  --foreground: 230 20% 12%;       /* #1C1C28 charcoal */
  --card: 36 40% 95%;              /* warm off-white card */
  --card-foreground: 230 20% 12%;
  --popover: 36 40% 95%;
  --popover-foreground: 230 20% 12%;
  --primary: 270 67% 40%;          /* #6B21A8 deep purple */
  --primary-foreground: 0 0% 100%;
  --secondary: 270 50% 92%;        /* light purple tint */
  --secondary-foreground: 270 67% 30%;
  --accent: 270 40% 94%;
  --accent-foreground: 270 67% 30%;
  --muted: 36 20% 92%;
  --muted-foreground: 230 10% 42%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 98%;
  --border: 36 20% 88%;
  --input: 36 20% 88%;
  --ring: 270 67% 40%;
}

/* --- Dark Mode Palette (refined purple-tinted dark) --- */
.dark {
  --background: 260 30% 7%;        /* #0C0A14 deep charcoal-purple */
  --foreground: 36 30% 93%;        /* #F5F0E8 warm off-white */
  --card: 260 25% 12%;             /* dark purple surface */
  --card-foreground: 36 30% 93%;
  --popover: 260 25% 12%;
  --popover-foreground: 36 30% 93%;
  --primary: 270 70% 65%;          /* #A855F7 brighter purple for contrast */
  --primary-foreground: 0 0% 100%;
  --secondary: 270 30% 20%;
  --secondary-foreground: 270 50% 85%;
  --accent: 270 25% 18%;
  --accent-foreground: 270 50% 85%;
  --muted: 260 20% 16%;
  --muted-foreground: 36 15% 65%;
  --destructive: 0 63% 31%;
  --destructive-foreground: 0 0% 98%;
  --border: 260 15% 20%;
  --input: 260 15% 20%;
  --ring: 270 70% 65%;
}

/* --- Typography --- */
body,
html {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Override muted-foreground to use CSS custom properties properly */
.text-muted-foreground {
  color: hsl(var(--muted-foreground)) !important;
}
:is(.dark .text-muted-foreground) {
  color: hsl(var(--muted-foreground)) !important;
}

/* --- Sticky Header Background --- */
header.sticky {
  background-color: hsl(var(--background) / 0.85) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}

/* --- Persistent CTA Button --- */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff !important;
  background-color: hsl(var(--primary));
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.3);
}
.nav-cta:hover {
  background-color: hsl(270 67% 35%);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.4);
  transform: translateY(-1px);
}
.dark .nav-cta {
  background-color: hsl(var(--primary));
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.25);
}
.dark .nav-cta:hover {
  background-color: hsl(270 70% 58%);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.35);
}

/* --- Services Dropdown --- */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.nav-dropdown-trigger svg.dropdown-chevron {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 260px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 10px 40px -8px rgba(0,0,0,0.12), 0 4px 16px -4px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}
.dark .nav-dropdown-menu {
  box-shadow: 0 10px 40px -8px rgba(0,0,0,0.4), 0 4px 16px -4px rgba(0,0,0,0.3);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease;
}
.nav-dropdown-item:hover {
  background-color: hsl(var(--accent));
}
.nav-dropdown-item .dropdown-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.nav-dropdown-item .dropdown-icon svg {
  width: 1rem;
  height: 1rem;
}
.nav-dropdown-item .dropdown-label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}
.nav-dropdown-item .dropdown-desc {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.4;
  margin-top: 0.125rem;
}

/* --- Rainbow Divider --- */
.rainbow-divider {
  height: 2px;
  background: linear-gradient(90deg, #eb4763, #f5993d, #fada38, #28bd28, #2badee, #994de6, #eb4763);
  background-size: 200% 100%;
  border: none;
  margin: 2rem 0;
  border-radius: 1px;
  animation: rainbow-slide 6s linear infinite;
}
@keyframes rainbow-slide {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* --- Hero Split Layout --- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.hero-content {
  text-align: center;
}
@media (min-width: 768px) {
  .hero-content {
    text-align: left;
  }
}
.hero-image-wrapper {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}
.hero-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  object-fit: cover;
  box-shadow: 0 20px 50px -12px rgba(107, 33, 168, 0.2);
}
.dark .hero-image-wrapper img {
  box-shadow: 0 20px 50px -12px rgba(168, 85, 247, 0.15);
}
.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, #eb4763, #f5993d, #fada38, #28bd28, #2badee, #994de6);
  z-index: -1;
  opacity: 0.4;
  filter: blur(12px);
}
.hero-tagline {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
}

/* --- Expanded Footer --- */
.site-footer {
  background-color: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  margin-top: auto;
}
.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}
.footer-tagline {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
  margin: 1.5rem 0;
}
.footer-nav a {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav a:hover {
  color: hsl(var(--primary));
}
.footer-legal {
  margin-top: 1.5rem;
}
.footer-legal-item {
  margin-bottom: 1rem;
}
.footer-legal-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}
.footer-legal-text {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  max-width: 72ch;
}
.footer-bin {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}
.footer-copyright {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
  margin-top: 1.5rem;
  text-align: center;
}

/* --- Mobile Menu Styles --- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: hsl(var(--background) / 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
}
.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  transition: color 0.15s ease;
}
.mobile-menu a:hover {
  color: hsl(var(--primary));
}
.mobile-menu .mobile-sub-item {
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
}
.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  border: none;
}

/* --- Smooth scroll for anchor links --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* --- Service Section Anchors --- */
[id="life-coaching"],
[id="immigration"],
[id="newcomer"] {
  scroll-margin-top: 5rem;
}

/* --- Card hover refinement for light mode --- */
.card-hover-effect {
  border: 1px solid hsl(var(--border));
}

/* --- Animation Keyframes --- */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out both;
}
.animation-delay-200 {
  animation-delay: 200ms;
}
.animation-delay-300 {
  animation-delay: 300ms;
}
.animation-delay-400 {
  animation-delay: 400ms;
}

/* --- Book Page Styles --- */
.book-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}
.book-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .book-options {
    grid-template-columns: 1fr 1fr;
  }
}
.book-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -8px hsl(var(--primary) / 0.12);
  border-color: hsl(var(--primary) / 0.3);
}
.dark .book-card:hover {
  box-shadow: 0 12px 30px -8px hsl(var(--primary) / 0.2);
}
.book-card-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.book-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* --- Theme Toggle Button --- */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: hsl(var(--accent));
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.4);
  transform: scale(1.05);
}
.theme-toggle-btn:active {
  transform: scale(0.95);
}
.theme-toggle-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.3s ease;
}
.sun-icon { display: none; }
.moon-icon { display: block; }
.dark .sun-icon { display: block; }
.dark .moon-icon { display: none; }

