/* tailwindcss */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply font-display bg-background-light dark:bg-background-dark text-navy-brand dark:text-gray-100 antialiased;
  }
}

@layer components {

  /* --- GLOBAL UI COMPONENTS --- */
  .glass-effect {
    @apply bg-white/70 dark:bg-background-dark/70 backdrop-blur-md border border-white/20 dark:border-gray-800/50;
  }

  .premium-gradient {
    background: linear-gradient(135deg, #d49561 0%, #b87333 50%, #8b4513 100%);
  }

  .copper-shine {
    @apply relative overflow-hidden;
  }

  .copper-shine::after {
    content: '';
    @apply absolute top-0 -left-full w-full h-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-all duration-700;
  }

  .copper-shine:hover::after {
    @apply left-full;
  }

  .technical-box {
    margin: 2.5rem 0;
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 2rem;
    border-left: 4px solid #b87333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  }

  .dark .technical-box {
    background: #0f172a;
    border-color: #b87333;
  }

  .technical-box h3 {
    color: #002a3a;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
  }

  .dark .technical-box h3 {
    color: white;
  }

  .technical-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .technical-box li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569;
  }

  .dark .technical-box li {
    color: #94a3b8;
  }

  .technical-box li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #b87333;
    font-weight: 900;
  }

  /* --- ARTICLE TYPOGRAPHY & CONTENT --- */
  #art-content {
    @apply leading-relaxed text-base;
  }

  #art-content h2 {
    @apply text-navy-brand dark:text-white text-xl font-black mt-12 mb-6 uppercase tracking-wide;
  }

  #art-content h3 {
    @apply text-navy-brand dark:text-gray-100 text-lg font-black mt-10 mb-5 tracking-normal;
  }

  #art-content p {
    @apply mb-6 text-gray-700 dark:text-gray-300;
    text-indent: 1.5rem;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  @media (max-width: 768px) {
    #art-content p {
      @apply mb-5 text-[0.95rem] leading-relaxed;
      text-indent: 0;
      text-align: left;
    }
  }

  #art-content p:first-of-type {
    text-indent: 0;
    @apply text-base font-bold text-navy-brand dark:text-gray-200;
  }

  #art-content ul,
  #art-content ol {
    @apply my-8 space-y-4 pl-6;
  }

  #art-content li {
    @apply text-gray-700 dark:text-gray-300 relative;
  }

  #art-content ul li::before {
    content: "•";
    @apply absolute -left-6 text-copper-primary font-black;
  }

  /* Specific override for Technical Box to avoid double bullets */
  .technical-box ul li::before {
    content: "→" !important;
    @apply absolute -left-6 text-copper-primary font-black;
  }

  /* Fix indentation for technical box paragraphs */
  .technical-box p {
    text-indent: 0 !important;
    @apply mb-2;
  }

  .active-section {
    @apply text-navy-brand dark:text-white bg-white dark:bg-gray-800 shadow-lg scale-[1.02] border-l-4 border-copper-primary pl-8 !important;
  }
}

/* --- HERO & BANNER SPECIFICS --- */
#hero-main-card,
#hero-side-1,
#hero-side-2 {
  color: #ffffff !important;
  background-color: #0b1220;
}

#hero-main-card h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
  line-height: 1.15 !important;
  margin-bottom: 1.5rem !important;
}

#hero-side-1 h3,
#hero-side-2 h3 {
  font-size: clamp(1rem, 2vw, 1.25rem) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

#hero-main-card p {
  font-size: 0.95rem !important;
  max-width: 90% !important;
}

#hero-main-card h1,
#hero-side-1 h3,
#hero-side-2 h3,
#hero-main-card p,
#hero-side-1 p,
#hero-side-2 p,
#hero-main-card span,
#hero-side-1 span,
#hero-side-2 span,
#hero-main-card button,
#hero-side-1 button,
#hero-side-2 button {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
}

#hero-main-card p,
#hero-side-1-desc,
#hero-side-2-desc {
  color: rgba(255, 255, 255, 0.75) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.premium-hero-gradient {
  background: linear-gradient(to top, rgba(11, 18, 32, 0.95) 0%, rgba(11, 18, 32, 0.85) 30%, rgba(11, 18, 32, 0.4) 70%, rgba(11, 18, 32, 0) 100%) !important;
}

/* --- NON-TAILWIND HELPERS --- */
.copper-gradient {
  background: linear-gradient(135deg, #d49561 0%, #b87333 100%);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html {
  scroll-behavior: smooth;
}

/* --- BANNER CONTRAST HELPERS --- */
.banner-dark-mode h1,
.banner-dark-mode h2,
.banner-dark-mode h3,
.banner-dark-mode h4,
.banner-dark-mode p,
.banner-dark-mode span:not(.animate-pulse) {
  color: #ffffff !important;
}

.banner-dark-mode .text-gray-300,
.banner-dark-mode .text-gray-400,
.banner-dark-mode .text-navy-brand\/50 {
  color: rgba(255, 255, 255, 0.7) !important;
}

.banner-light-mode h1,
.banner-light-mode h2,
.banner-light-mode h3,
.banner-light-mode h4,
.banner-light-mode p {
  color: #0b1220 !important;
}