/* Helderkruin Veterinary Clinic — Shared Visual System, Animations & Dark Mode */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --brand-lime: #8CC626;
  --brand-lime-dark: #4E750B;
}

/* Smooth theme transition */
html,
body {
  overflow-x: hidden;
}

body,
header,
section,
article,
aside,
figure,
footer {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.22s ease;
}

/* Smooth page enter */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: pageEnter 0.55s var(--ease-out-expo) both;
}

/* Gentle floating decorative blobs */
@keyframes floatSlow {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -14px, 0) scale(1.03);
  }
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-slower {
  animation: floatSlow 11s ease-in-out infinite reverse;
}

/* Live status soft pulse (logo lime green) */
@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(166, 209, 56, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(166, 209, 56, 0);
  }
}

.status-pulse {
  animation: statusPulse 2.2s ease-in-out infinite;
}

/* Scroll reveal system */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s var(--ease-out-expo),
    transform 0.65s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* Interactive card hover lift */
.card-hover {
  transition:
    transform 0.32s var(--ease-out-expo),
    box-shadow 0.32s var(--ease-out-expo),
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -12px rgba(19, 31, 46, 0.14);
}

/* Nav link animated underline (logo lime green) */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2.5px;
  background-color: var(--brand-lime);
  border-radius: 9999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease-out-expo);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--brand-lime-dark);
  font-weight: 600;
}

/* Accordion smooth grid transition */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease-out-expo);
}

.accordion-item[data-open="true"] .accordion-content {
  grid-template-rows: 1fr;
}

.accordion-inner {
  overflow: hidden;
}

.accordion-item[data-open="true"] .accordion-chevron {
  transform: rotate(180deg);
}

/* Slideshow smooth fade */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* =========================================================
   DARK MODE SYSTEM (html.dark)
   Cohesive Deep Navy (#0B131E) + Surface (#131F2E) + Logo Lime (#A6D138)
   ========================================================= */
html.dark body {
  background-color: #0B131E !important;
  color: #E2E8F0 !important;
}

html.dark header {
  background-color: rgba(15, 25, 38, 0.94) !important;
  border-color: #24354B !important;
}

html.dark header img[src*="logo-horizontal"] {
  background-color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 10px;
}

html.dark .bg-warm-50,
html.dark .bg-warm-100 {
  background-color: #0F1A28 !important;
}

html.dark .bg-white,
html.dark .bg-white\/95 {
  background-color: #152336 !important;
}

/* Keep brand logo cards crisp white in dark mode so logos stay legible */
html.dark .brand-logo-card {
  background-color: #FFFFFF !important;
  border-color: #2A3D56 !important;
}

html.dark .bg-gradient-to-b {
  background-image: linear-gradient(to bottom, #132233, #0B131E) !important;
}

html.dark .bg-clinic-50,
html.dark .bg-clinic-100 {
  background-color: rgba(140, 198, 38, 0.14) !important;
}

html.dark .bg-urgent-50 {
  background-color: rgba(194, 65, 12, 0.16) !important;
  border-color: rgba(251, 146, 60, 0.3) !important;
}

html.dark .border-warm-200,
html.dark .border-warm-100,
html.dark .divide-warm-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #24354B !important;
}

html.dark .border-clinic-200 {
  border-color: rgba(166, 209, 56, 0.35) !important;
}

html.dark .text-slate-900,
html.dark .text-slate-800 {
  color: #F8FAFC !important;
}

html.dark .text-slate-700,
html.dark .text-slate-600 {
  color: #CBD5E1 !important;
}

html.dark .text-slate-500 {
  color: #94A3B8 !important;
}

html.dark .text-clinic-900,
html.dark .text-clinic-800,
html.dark .text-clinic-700 {
  color: #B4DF4B !important;
}

html.dark .text-urgent-700 {
  color: #FDBA74 !important;
}

html.dark .nav-link.is-active {
  color: #B4DF4B !important;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: #0F1A28 !important;
  color: #F8FAFC !important;
  border-color: #2C4059 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748B !important;
}

html.dark .bg-slate-100 {
  background-color: #24354B !important;
  color: #E2E8F0 !important;
}

html.dark .card-hover:hover {
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
  border-color: rgba(166, 209, 56, 0.45) !important;
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .page-enter,
  .animate-float-slow,
  .animate-float-slower,
  .status-pulse {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card-hover:hover {
    transform: none !important;
  }
}
