@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

/*
 * Design system definition.
 *
 * The @theme inline block maps CSS custom properties to Tailwind utility
 * classes (e.g. --color-primary -> bg-primary, text-primary).
 *
 * The :root and .dark blocks define the actual color values using oklch.
 * All colors MUST use oklch format.
 *
 * To add a new semantic color:
 * 1. Add the variable to :root (light value) and .dark (dark value)
 * 2. Register it in @theme inline as --color-<name>: var(--<name>)
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

:root {
  --radius: 0.625rem;
  --background: oklch(0.984 0.003 247.858); /* brand-light */
  --foreground: oklch(0.129 0.042 264.695); /* brand-dark */
  --card: oklch(1 0 0); /* brand-light-card */
  --card-foreground: oklch(0.129 0.042 264.695);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.129 0.042 264.695);
  --primary: oklch(0.536 0.165 242.34); /* Selas Blue */
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.968 0.007 247.896);
  --secondary-foreground: oklch(0.536 0.165 242.34);
  --muted: oklch(0.968 0.007 247.896);
  --muted-foreground: oklch(0.475 0.015 252.12); /* Slate 600 */
  --accent: oklch(0.968 0.007 247.896);
  --accent-foreground: oklch(0.536 0.165 242.34);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(0.929 0.013 255.508); /* Slate 200 */
  --input: oklch(0.929 0.013 255.508);
  --ring: oklch(0.536 0.165 242.34 / 20%);
  --chart-1: oklch(0.536 0.165 242.34);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.984 0.003 247.858);
  --sidebar-foreground: oklch(0.129 0.042 264.695);
  --sidebar-primary: oklch(0.536 0.165 242.34);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.968 0.007 247.896);
  --sidebar-accent-foreground: oklch(0.536 0.165 242.34);
  --sidebar-border: oklch(0.929 0.013 255.508);
  --sidebar-ring: oklch(0.536 0.165 242.34 / 20%);
}

.dark {
  --background: oklch(0.129 0.042 264.695);
  --foreground: oklch(0.984 0.003 247.858);
  --card: oklch(0.16 0.035 264.695);
  --card-foreground: oklch(0.984 0.003 247.858);
  --popover: oklch(0.16 0.035 264.695);
  --popover-foreground: oklch(0.984 0.003 247.858);
  --primary: oklch(0.65 0.18 244); /* Light vivid blue for dark mode */
  --primary-foreground: oklch(0.129 0.042 264.695);
  --secondary: oklch(0.279 0.041 260.031);
  --secondary-foreground: oklch(0.984 0.003 247.858);
  --muted: oklch(0.279 0.041 260.031);
  --muted-foreground: oklch(0.704 0.04 256.788);
  --accent: oklch(0.279 0.041 260.031);
  --accent-foreground: oklch(0.984 0.003 247.858);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.65 0.18 244 / 30%);
  --sidebar: oklch(0.16 0.035 264.695);
  --sidebar-foreground: oklch(0.984 0.003 247.858);
  --sidebar-primary: oklch(0.65 0.18 244);
  --sidebar-primary-foreground: oklch(0.129 0.042 264.695);
  --sidebar-accent: oklch(0.279 0.041 260.031);
  --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.65 0.18 244 / 30%);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
  }
}

/* ==========================================================================
   Premium Brand Interactions & Micro-animations
   ========================================================================== */

/* Smooth page transitions and selections */
::selection {
  background-color: rgba(0, 119, 194, 0.15);
  color: #0077c2;
}

html {
  scroll-behavior: smooth;
}

/* Subtle logo hover spin timing adjustment */
svg {
  transform-origin: center;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Elegant staggered animation delays for sequential elements */
li.reveal {
  transition-delay: 50ms;
}

p.reveal {
  transition-delay: 100ms;
}

img.reveal {
  transition-delay: 150ms;
}

/* --- Interactive RICS Survey Accordion --- */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.accordion-content.is-open {
  opacity: 1;
}

/* --- Premium Glassmorphic & Zoom Utilities --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

.glass-panel-hover {
  transition: all 0.3s ease;
}

.glass-panel-hover:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px 0 rgba(0, 119, 194, 0.15);
}

/* Custom visual framing */
.offset-border-frame {
  position: relative;
}

.offset-border-frame::after {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 2px solid var(--primary);
  border-radius: 1rem;
  z-index: -10;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.offset-border-frame:hover::after {
  transform: translate(-4px, 4px);
}

/* ==========================================================================
   Cookie Consent System CSS Rules
   ========================================================================== */

/* Custom Scrollbar for Preferences panel */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 119, 194, 0.15);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 119, 194, 0.3);
}

/* Modal states for entrance and persistent widget */
.cookie-consent-open {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.cookie-widget-visible {
  transform: scale(1) !important;
}

/* Custom Peer switch transitions for checkboxes */
#cookieConsent .peer:checked ~ div {
  background-color: var(--primary) !important;
}
#cookieConsent .peer:checked ~ div::after {
  transform: translateX(16px) !important;
}
#cookieConsent .peer ~ div {
  position: relative;
  transition: background-color 0.3s ease;
}
#cookieConsent .peer ~ div::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 9999px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Mobile Hamburg Glass & Panel Transitions
   ========================================================================== */

.line-top, .line-mid, .line-bot {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

#navToggle.is-active .line-top {
  transform: translateY(6px) rotate(45deg);
}

#navToggle.is-active .line-mid {
  opacity: 0;
}

#navToggle.is-active .line-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   Premium Staggered Load-Time Animation Cascade
   ========================================================================== */

/* Keyframes */
@keyframes navFadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animations Assignments */
.animate-nav-fade-down {
  animation: navFadeDown 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.animate-hero-fade-up-1 {
  animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.18s forwards;
}

.animate-hero-fade-up-2 {
  animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.animate-hero-fade-up-3 {
  animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards;
}

.animate-hero-fade-up-4 {
  animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.54s forwards;
}


