@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400&display=swap');

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

@layer base {
  :root {
    --background: 0 0% 3%;
    --foreground: 0 0% 98%;

    --card: 0 0% 6%;
    --card-foreground: 0 0% 98%;

    --popover: 0 0% 6%;
    --popover-foreground: 0 0% 98%;

    --primary: 0 100% 50%;
    --primary-foreground: 0 0% 100%;

    --secondary: 0 0% 12%;
    --secondary-foreground: 0 0% 98%;

    --muted: 0 0% 15%;
    --muted-foreground: 0 0% 60%;

    --accent: 0 100% 50%;
    --accent-foreground: 0 0% 100%;

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

    --border: 0 0% 16%;
    --input: 0 0% 16%;
    --ring: 0 100% 50%;

    --radius: 0.75rem;

    --sidebar-background: 0 0% 5%;
    --sidebar-foreground: 0 0% 90%;
    --sidebar-primary: 0 100% 50%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 0 0% 12%;
    --sidebar-accent-foreground: 0 0% 90%;
    --sidebar-border: 0 0% 16%;
    --sidebar-ring: 0 100% 50%;

    --brand-red: 0 100% 50%;
    --brand-red-glow: 0 100% 60%;
    --brand-dark: 0 0% 3%;
    --brand-surface: 0 0% 8%;
    --glass: 0 0% 100% / 0.04;
    --glass-border: 0 0% 100% / 0.08;
    --glass-highlight: 0 0% 100% / 0.12;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground antialiased;
    font-family: 'Raleway', sans-serif;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
}

@layer components {
  /* === Glass Panels === */
  .glass-panel {
    background: hsl(var(--glass));
    border: 1px solid hsl(var(--glass-border));
    backdrop-filter: blur(20px) saturate(1.2);
  }

  .glass-panel-elevated {
    background: linear-gradient(
      135deg,
      hsl(0 0% 100% / 0.06) 0%,
      hsl(0 0% 100% / 0.02) 100%
    );
    border: 1px solid hsl(var(--glass-border));
    backdrop-filter: blur(24px) saturate(1.3);
    box-shadow:
      0 8px 32px hsl(0 0% 0% / 0.4),
      0 2px 8px hsl(0 0% 0% / 0.3),
      inset 0 1px 0 hsl(0 0% 100% / 0.06);
  }

  /* === Glow Effects === */
  .glow-red {
    box-shadow: 0 0 40px -10px hsl(var(--brand-red) / 0.4),
                0 0 80px -20px hsl(var(--brand-red) / 0.2);
  }

  .glow-red-subtle {
    box-shadow: 0 0 20px -8px hsl(var(--brand-red) / 0.25),
                0 0 40px -15px hsl(var(--brand-red) / 0.1);
  }

  .text-glow-red {
    text-shadow: 0 0 40px hsl(var(--brand-red) / 0.5);
  }

  /* === Gradients === */
  .gradient-red {
    background: linear-gradient(135deg, hsl(var(--brand-red)), hsl(var(--brand-red-glow)));
  }

  .gradient-dark {
    background: linear-gradient(180deg, hsl(var(--brand-dark)), hsl(0 0% 6%));
  }

  .gradient-border {
    position: relative;
  }

  .gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
      135deg,
      hsl(var(--brand-red) / 0.3),
      hsl(0 0% 100% / 0.08),
      hsl(var(--brand-red) / 0.15)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }

  /* === Hero === */
  .hero-overlay {
    background: linear-gradient(
      180deg,
      hsl(0 0% 0% / 0.3) 0%,
      hsl(0 0% 0% / 0.6) 50%,
      hsl(0 0% 3% / 0.95) 100%
    );
  }

  /* === Section Dividers === */
  .section-divider {
    background: linear-gradient(90deg, transparent, hsl(var(--brand-red) / 0.3), transparent);
    height: 1px;
  }

  .section-divider-glow {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsl(var(--brand-red) / 0.4), transparent);
  }

  .section-divider-glow::after {
    content: '';
    position: absolute;
    inset: -4px 20% -4px 20%;
    background: linear-gradient(90deg, transparent, hsl(var(--brand-red) / 0.15), transparent);
    filter: blur(8px);
  }

  /* === Premium Service Cards === */
  .service-card {
    @apply relative rounded-xl p-7 transition-all duration-700 overflow-hidden;
    background: linear-gradient(
      160deg,
      hsl(0 0% 100% / 0.05) 0%,
      hsl(0 0% 100% / 0.02) 50%,
      hsl(0 0% 0% / 0.1) 100%
    );
    border: 1px solid hsl(0 0% 100% / 0.07);
    backdrop-filter: blur(16px);
    box-shadow:
      0 4px 24px hsl(0 0% 0% / 0.3),
      inset 0 1px 0 hsl(0 0% 100% / 0.05);
  }

  .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      hsl(0 0% 100% / 0.12),
      transparent
    );
  }

  .service-card:hover {
    border-color: hsl(var(--brand-red) / 0.25);
    box-shadow:
      0 8px 40px hsl(0 0% 0% / 0.4),
      0 0 30px -10px hsl(var(--brand-red) / 0.15),
      inset 0 1px 0 hsl(0 0% 100% / 0.08);
    transform: translateY(-6px);
    background: linear-gradient(
      160deg,
      hsl(0 0% 100% / 0.07) 0%,
      hsl(0 0% 100% / 0.03) 50%,
      hsl(var(--brand-red) / 0.03) 100%
    );
  }

  /* === Premium Icon Containers === */
  .icon-container {
    @apply relative flex items-center justify-center;
    background: linear-gradient(
      135deg,
      hsl(var(--brand-red)),
      hsl(var(--brand-red-glow))
    );
    box-shadow:
      0 4px 16px hsl(var(--brand-red) / 0.3),
      inset 0 1px 0 hsl(0 0% 100% / 0.2);
  }

  .icon-container::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(
      135deg,
      hsl(var(--brand-red) / 0.3),
      transparent
    );
    z-index: -1;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.5s;
  }

  .group:hover .icon-container::after {
    opacity: 1;
  }

  /* === CTA Buttons === */
  .cta-button-primary {
    @apply gradient-red text-primary-foreground font-semibold px-8 py-4 rounded-lg transition-all duration-300;
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow:
      0 4px 16px hsl(var(--brand-red) / 0.3),
      inset 0 1px 0 hsl(0 0% 100% / 0.15);
  }

  .cta-button-primary:hover {
    box-shadow:
      0 8px 32px hsl(var(--brand-red) / 0.45),
      0 0 40px -10px hsl(var(--brand-red) / 0.3),
      inset 0 1px 0 hsl(0 0% 100% / 0.2);
    transform: translateY(-2px);
  }

  .cta-button-secondary {
    @apply border text-foreground font-semibold px-8 py-4 rounded-lg transition-all duration-300;
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: hsl(0 0% 100% / 0.04);
    border-color: hsl(0 0% 100% / 0.15);
    backdrop-filter: blur(8px);
  }

  .cta-button-secondary:hover {
    border-color: hsl(var(--brand-red));
    color: hsl(var(--brand-red));
    background: hsl(var(--brand-red) / 0.05);
    box-shadow: 0 0 20px -8px hsl(var(--brand-red) / 0.2);
  }

  /* === Section Backgrounds === */
  .section-dark {
    background: linear-gradient(
      180deg,
      hsl(0 0% 3%) 0%,
      hsl(0 0% 5%) 50%,
      hsl(0 0% 3%) 100%
    );
  }

  .section-elevated {
    position: relative;
    background: linear-gradient(
      180deg,
      hsl(0 0% 4%) 0%,
      hsl(0 0% 6%) 50%,
      hsl(0 0% 4%) 100%
    );
  }

  .section-elevated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsl(0 0% 100% / 0.06), transparent);
  }

  .section-elevated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsl(0 0% 100% / 0.06), transparent);
  }

  /* === Spotlight Effect (for hover cards) === */
  .spotlight-card {
    position: relative;
    overflow: hidden;
  }

  .spotlight-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, hsl(var(--brand-red) / 0.08) 0%, transparent 70%);
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
  }

  .spotlight-card:hover::after {
    opacity: 1;
  }

  /* === Premium Form Inputs === */
  .premium-input {
    @apply w-full rounded-lg px-4 py-3 font-body text-foreground transition-all duration-300;
    background: hsl(0 0% 100% / 0.04);
    border: 1px solid hsl(0 0% 100% / 0.08);
    backdrop-filter: blur(8px);
  }

  .premium-input::placeholder {
    color: hsl(0 0% 100% / 0.3);
  }

  .premium-input:focus {
    outline: none;
    border-color: hsl(var(--brand-red) / 0.5);
    box-shadow:
      0 0 0 3px hsl(var(--brand-red) / 0.08),
      0 0 20px -8px hsl(var(--brand-red) / 0.15);
    background: hsl(0 0% 100% / 0.06);
  }

  /* === Eyebrow Labels === */
  .eyebrow-label {
    @apply inline-block text-[10px] md:text-[11px] tracking-[0.3em] font-semibold uppercase;
    color: hsl(var(--brand-red));
    letter-spacing: 0.3em;
  }

  /* === Section Heading === */
  .section-heading {
    @apply font-display text-3xl md:text-5xl lg:text-6xl text-foreground mb-4;
    line-height: 1.1;
  }

  .section-subheading {
    @apply font-body text-muted-foreground max-w-2xl mx-auto text-sm md:text-base leading-relaxed;
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}
