@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 220 25% 97%;
    --foreground: 215 50% 15%;

    --card: 0 0% 100%;
    --card-foreground: 215 50% 15%;

    --popover: 0 0% 100%;
    --popover-foreground: 215 50% 15%;

    --primary: 215 55% 18%;
    --primary-foreground: 0 0% 100%;

    --secondary: 38 45% 55%;
    --secondary-foreground: 0 0% 100%;

    --muted: 220 20% 94%;
    --muted-foreground: 215 15% 48%;

    --accent: 38 45% 55%;
    --accent-foreground: 0 0% 100%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --border: 220 15% 90%;
    --input: 220 15% 90%;
    --ring: 38 45% 55%;

    --radius: 0.75rem;
    --radius-sm: calc(0.75rem - 4px);
    --radius-lg: calc(0.75rem + 4px);
    --radius-full: 9999px;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;

    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.06);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.06), 0 2px 6px -2px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 12px 28px -6px rgb(0 0 0 / 0.08), 0 4px 8px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.12), 0 8px 16px -8px rgb(0 0 0 / 0.06);

    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    --chart-1: 215 55% 18%;
    --chart-2: 38 45% 55%;
    --chart-3: 170 55% 42%;
    --chart-4: 10 78% 60%;
    --chart-5: 45 80% 65%;

    --navy: #0d2137;
    --gold: #c9a355;
    --gold-light: #dfc48e;
    --navy-light: #1e4a6e;
    --navy-dark: #081526;
    --teal: #1a8a7a;
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
  }

  * {
    border-color: hsl(var(--border));
  }

  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "rlig" 1, "calt" 1;
  }

  ::selection {
    background-color: rgba(201, 163, 85, 0.2);
    color: #0d2137;
  }

  ::-webkit-scrollbar { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background-color: transparent; }
  ::-webkit-scrollbar-thumb { background-color: hsl(var(--border)); border-radius: 9999px; }
  ::-webkit-scrollbar-thumb:hover { background-color: hsl(var(--muted-foreground) / 0.5); }

  [data-hydration-error] { display: none !important; }
}

@layer utilities {
  .scrollbar-none::-webkit-scrollbar { display: none; }
  .scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

  .hero-gradient {
    background:
      radial-gradient(ellipse 70% 50% at 20% 80%, rgba(26, 138, 122, 0.08), transparent),
      radial-gradient(ellipse 80% 60% at 80% 20%, rgba(201, 163, 85, 0.12), transparent),
      radial-gradient(ellipse 50% 40% at 50% 0%, rgba(13, 33, 55, 0.06), transparent),
      linear-gradient(180deg, rgba(13, 33, 55, 0.02) 0%, transparent 50%);
  }

  .text-gradient-gold {
    background: linear-gradient(135deg, #c9a355 0%, #dfc48e 40%, #c9a355 70%, #e8d4a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .text-gradient-navy {
    background: linear-gradient(135deg, #0d2137 0%, #1e4a6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .card-3d {
    transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .card-3d:hover {
    transform: perspective(1200px) rotateX(2deg) rotateY(-2deg) translateY(-6px);
    box-shadow:
      0 25px 50px -15px rgba(13, 33, 55, 0.2),
      0 0 0 1px rgba(201, 163, 85, 0.08),
      inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  }

  .glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .glass-dark {
    background: rgba(13, 33, 55, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .glow-gold {
    box-shadow: 0 0 25px rgba(201, 163, 85, 0.2), 0 0 50px rgba(201, 163, 85, 0.06);
  }

  .glow-teal {
    box-shadow: 0 0 25px rgba(26, 138, 122, 0.15), 0 0 50px rgba(26, 138, 122, 0.05);
  }

  .bg-navy-gradient {
    background: linear-gradient(145deg, #081526 0%, #0d2137 30%, #1e4a6e 100%);
  }

  .bg-mesh {
    background:
      radial-gradient(at 20% 80%, rgba(201, 163, 85, 0.15) 0%, transparent 50%),
      radial-gradient(at 80% 20%, rgba(26, 138, 122, 0.1) 0%, transparent 50%),
      radial-gradient(at 50% 50%, rgba(30, 74, 110, 0.05) 0%, transparent 60%);
  }

  .animate-float {
    animation: float 6s ease-in-out infinite;
  }

  .animate-float-delayed {
    animation: float 8s ease-in-out 2s infinite;
  }

  .animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
  }

  @keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
  }

  .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
