:root {
  /* Premium Light Theme */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-color-hover: rgba(243, 113, 33, 0.5);

  /* Brand Colors from Logo */
  --primary: #f37121;
  --primary-light: #ea580c;
  /* slightly darker for light theme contrast */
  --primary-glow: rgba(243, 113, 33, 0.2);

  /* Accent Colors for Ambient Gradients */
  --accent-1: rgba(243, 113, 33, 0.08);
  --accent-2: rgba(56, 189, 248, 0.06);
  --accent-3: rgba(167, 139, 250, 0.06);

  --text-main: #0f172a;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #fff2e8 40%, rgba(243, 113, 33, 0.4) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Premium Ambient Background */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.8), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(243, 113, 33, 0.25), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3), transparent 50%);
  filter: blur(60px);
  animation: pulseBg 15s ease-in-out infinite alternate;
}

@keyframes pulseBg {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1) translate(2%, 2%);
    opacity: 1;
  }

  100% {
    transform: scale(1) translate(-2%, -2%);
    opacity: 0.8;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: clamp(3rem, 8vh, 5rem);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero img {
  width: clamp(120px, 15vw, 160px);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 25px var(--primary-glow));
  transition: transform 0.3s ease;
}

.hero img:hover {
  transform: scale(1.05);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
  /* extra margin for search box */
  line-height: 1.6;
}

/* Search Box */
.search-container {
  display: flex;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-2px);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

.search-container:focus-within .search-icon {
  color: var(--primary);
}

#searchInput {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

#searchInput::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Sections */
section {
  margin-bottom: clamp(3rem, 8vh, 5rem);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

section:nth-child(2) {
  animation-delay: 0.1s;
}

section:nth-child(3) {
  animation-delay: 0.2s;
}

section:nth-child(4) {
  animation-delay: 0.3s;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.section-header h2::before {
  content: '';
  display: block;
  width: 6px;
  height: 28px;
  background: linear-gradient(to bottom, var(--primary-light), var(--primary));
  border-radius: 6px;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Grid - Highly Responsive */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 30vw, 320px), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

/* Premium Cards */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  /* Subtle light shadow */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(243, 113, 33, 0.08);
  /* Faint orange */
  border: 1px solid rgba(243, 113, 33, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 20px var(--primary-glow);
}

.card:hover .icon-wrapper {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 16px var(--primary-glow);
}

.content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.card:hover .content h3 {
  color: var(--primary-light);
}

.content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  /* Pushes content down if card heights vary */
}

/* Card Glow Effect on Hover */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.card:hover::after {
  opacity: 0.5;
}

/* Animations */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
footer {
  text-align: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--border-color);
  margin-top: clamp(2rem, 6vh, 4rem);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive specific overrides (for extremely small devices) */
@media (max-width: 480px) {
  .card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .content p {
    font-size: 0.9rem;
  }
}