@import "tailwindcss";

/* ============================================
   Tailwind v4 Theme Configuration
   Brand Yellow (#FBCD08) + Gray (#E0E0E0)
   ============================================ */
@theme {
  /* Primary Colors - Brand Yellow (#FBCD08) */
  --color-primary-50: #fffbeb;
  --color-primary-100: #fef6c8;
  --color-primary-200: #fde98a;
  --color-primary-300: #fcdc4d;
  --color-primary-400: #fcd428;
  --color-primary-500: #fbcd08;
  --color-primary-600: #d4ac07;
  --color-primary-700: #a68506;
  --color-primary-800: #7a6205;
  --color-primary-900: #524104;
  --color-primary-950: #2a2102;

  /* Brand Navy — used for active nav text and dark accents */
  --color-navy-500: #2a77a8;
  --color-navy-600: #1f597e;
  --color-navy-700: #153b54;
  --color-navy-800: #0a1d2a;
  --color-navy-900: #050f15;
  --color-secondary-50: #fafafa;
  --color-secondary-100: #f5f5f5;
  --color-secondary-200: #eeeeee;
  --color-secondary-300: #e0e0e0;
  --color-secondary-400: #bdbdbd;
  --color-secondary-500: #e0e0e0;
  --color-secondary-600: #9e9e9e;
  --color-secondary-700: #757575;
  --color-secondary-800: #616161;
  --color-secondary-900: #424242;
  --color-secondary-950: #212121;
  
  /* Neutral Colors (anchored to brand gray #E0E0E0) */
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #e0e0e0;
  --color-neutral-300: #d4d4d4;
  --color-neutral-400: #a3a3a3;
  --color-neutral-500: #737373;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #171717;
  --color-neutral-950: #0a0a0a;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #fbcd08;
  --color-error: #ef4444;
  --color-info: #737373;
  
  /* Spacing */
  --spacing-section: 5rem;
}

/* Brand heading helpers — lean into yellow */
.heading-brand {
  color: var(--color-primary-500);
}

.heading-brand-gradient {
  background-image: linear-gradient(
    90deg,
    var(--color-primary-600),
    var(--color-primary-500),
    var(--color-primary-400),
    var(--color-primary-500)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.heading-accent {
  color: var(--color-primary-500);
}

/* ============================================
   Site navigation
   ============================================ */
.site-header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.site-header--scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border-bottom-color: var(--color-secondary-300);
}

.site-nav-pill {
  background: var(--color-secondary-200);
  border: 1px solid var(--color-secondary-300);
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0.125rem;
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-neutral-700);
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.site-nav-link:hover {
  color: var(--color-navy-800);
  background-color: rgba(255, 255, 255, 0.85);
}

.site-nav-link--active {
  background-color: var(--color-primary-500);
  color: var(--color-neutral-900);
  box-shadow: 0 2px 8px rgba(251, 205, 8, 0.35);
}

.site-nav-link--active:hover {
  background-color: var(--color-primary-400);
  color: var(--color-neutral-900);
}

.site-nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.site-nav-item:hover .site-nav-dropdown,
.site-nav-item:focus-within .site-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav-dropdown-panel {
  background: white;
  border: 1px solid var(--color-secondary-300);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.site-nav-dropdown-header {
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-400));
  color: var(--color-neutral-900);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-neutral-700);
  transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.site-nav-dropdown-link:hover {
  background-color: var(--color-primary-50);
  color: var(--color-neutral-900);
  padding-left: 1.25rem;
}

.site-nav-dropdown-link svg {
  color: var(--color-primary-600);
  flex-shrink: 0;
}

.site-nav-donate {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--color-navy-800);
  color: white;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(10, 29, 42, 0.25);
}

.site-nav-donate:hover {
  background: var(--color-navy-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 29, 42, 0.3);
}

/* Mobile nav overlay */
.site-mobile-nav {
  animation: siteMobileNavIn 0.28s ease forwards;
}

@keyframes siteMobileNavIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Base Styles
   ============================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  @apply antialiased;
  font-family: var(--font-inter), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================
   Custom Utility Classes
   ============================================ */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ============================================
   Smooth Animations for Page Transitions
   ============================================ */
@keyframes hero-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ============================================
   Hero: fit all content in one laptop viewport
   Scales type/spacing by viewport height (MacBooks ~700–980px usable)
   ============================================ */
.hero-section {
  height: 100svh;
  max-height: 100svh;
}

.hero-center-card {
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(251, 205, 8, 0.22),
    0 0 48px rgba(251, 205, 8, 0.12);
}

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

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Utility classes for animations */
.animate-slide-in-bottom {
  animation: slideInFromBottom 0.7s ease-out;
}

.animate-slide-in-left {
  animation: slideInFromLeft 0.7s ease-out;
}

.animate-slide-in-right {
  animation: slideInFromRight 0.7s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-zoom-in {
  animation: zoomIn 0.7s ease-out;
}

.animate-shimmer {
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  animation: gradient 3s ease infinite;
  background-size: 200% auto;
}

/* ============================================
   Prose Content Styling
   ============================================ */

/* Headings in prose */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--color-neutral-900);
  font-weight: 700;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.5rem; /* 24px */
  margin-top: 3rem; /* 48px */
  margin-bottom: 1.5rem; /* 24px */
  font-weight: 700;
}

.prose h3 {
  font-size: 1.25rem; /* 20px */
  margin-top: 2.5rem; /* 40px */
  margin-bottom: 1.25rem; /* 20px */
  font-weight: 700;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.75;
  color: var(--color-neutral-700);
}

/* Text justification for specific content areas */
.text-justified,
.text-justified p,
.text-justified .prose p,
.text-justified .prose {
  text-align: justify;
  text-align-last: left;
}

.text-justified p {
  text-align: justify;
  text-align-last: left;
}

/* Mobile: left-align for better readability on small screens */
@media (max-width: 768px) {
  .text-justified,
  .text-justified p,
  .text-justified .prose p {
    text-align: left;
    text-align-last: left;
  }
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0;
}

/* Strong/Bold text */
.prose strong {
  color: var(--color-neutral-900);
  font-weight: 700;
}

/* Links */
.prose a {
  color: var(--color-primary-600);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  padding-left: 1.625em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 0.375em;
  line-height: 1.75;
}

.prose ul > li,
.prose ol > li {
  position: relative;
  padding-left: 0.375em;
}

.prose ul > li::marker {
  color: var(--color-primary-600);
}

.prose ol > li::marker {
  color: var(--color-primary-600);
  font-weight: 600;
}

/* Nested lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose ul ul {
  list-style-type: circle;
}

.prose ul ul ul {
  list-style-type: square;
}

/* Blockquotes */
.prose blockquote {
  border-left: 4px solid var(--color-primary-500);
  padding-left: 1.5rem;
  font-style: italic;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  color: var(--color-neutral-700);
}

/* Code */
.prose code {
  background-color: var(--color-neutral-100);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}
