:root {
  --background: 36 38% 96%;
  --foreground: 24 22% 16%;
  --primary: 28 40% 42%;
  --secondary: 34 26% 82%;
  --muted: 32 18% 90%;
  --destructive: 4 70% 52%;
  --border: 28 20% 78%;
  --card: 0 0% 100%;
  --shadow-sm: 0 10px 24px rgba(60, 38, 20, 0.08);
  --shadow-md: 0 20px 50px rgba(42, 28, 16, 0.14);
  --shadow-lg: 0 32px 100px rgba(22, 14, 10, 0.2);
  --transition-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 500ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
}

.dark {
  --background: 28 18% 8%;
  --foreground: 34 30% 92%;
  --primary: 29 46% 58%;
  --secondary: 28 14% 18%;
  --muted: 28 12% 16%;
  --destructive: 4 78% 62%;
  --border: 28 16% 24%;
  --card: 28 16% 11%;
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 32px 100px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html, body, #root {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, hsla(var(--primary), 0.12), transparent 28%),
    radial-gradient(circle at bottom right, hsla(var(--primary), 0.08), transparent 24%),
    hsl(var(--background));
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: hsla(var(--primary), 0.2);
}

.glass {
  background: linear-gradient(180deg, hsla(var(--card), 0.72), hsla(var(--card), 0.52));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid hsla(var(--border), 0.55);
  box-shadow: var(--shadow-md);
}

.dark .glass {
  background: linear-gradient(180deg, hsla(var(--card), 0.72), hsla(var(--card), 0.44));
}

.hero-grid {
  perspective: 1200px;
}

.photo-depth {
  transform-style: preserve-3d;
  transition: transform var(--transition-smooth), box-shadow var(--transition-fast), opacity var(--transition-fast);
  box-shadow: var(--shadow-lg);
}

.photo-depth:hover {
  box-shadow: var(--shadow-lg);
}

.section-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

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

.page-enter {
  animation: pageIn 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

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

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.range-thumb {
  appearance: none;
  width: 100%;
  background: transparent;
}

.range-thumb::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: hsl(var(--primary));
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.range-thumb::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: hsl(var(--primary));
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.lightbox-backdrop {
  background: rgba(10, 8, 7, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.loading-ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 2px solid hsla(var(--primary), 0.18);
  border-top-color: hsl(var(--primary));
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.focus-ring:focus-visible {
  outline: 2px solid hsla(var(--primary), 0.9);
  outline-offset: 3px;
}

.map-frame {
  filter: sepia(0.22) saturate(0.82) contrast(0.98);
}

.dark .map-frame {
  filter: grayscale(0.25) brightness(0.8) contrast(1.05);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}