/* ============================================
   ILMHUB — Global Stylesheet
   ============================================ */

/* ---- Variables ---- */
:root {
  --bg:           #f7f6f2;
  --bg-card:      #ffffff;
  --bg-nav:       rgba(247, 246, 242, 0.92);
  --border:       #e8e5df;
  --border-card:  #ede9e2;

  --text:         #1a1a18;
  --text-muted:   #7a7670;
  --text-light:   #b0aca4;

  --accent:       #2d6a4f;
  --accent-light: #e8f5ee;
  --accent-hover: #235a41;

  --blue:         #1d4ed8;
  --blue-light:   #eff6ff;
  --teal:         #0f766e;
  --teal-light:   #f0fdfa;
  --amber:        #b45309;
  --amber-light:  #fffbeb;
  --coral:        #c2410c;
  --coral-light:  #fff7ed;
  --purple:       #7c3aed;
  --purple-light: #f5f3ff;
  --green:        #15803d;
  --green-light:  #f0fdf4;
  --gray:         #4b5563;
  --gray-light:   #f9fafb;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    18px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);

  --font-body:    'DM Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;

  --nav-h:        60px;
  --max-w:        1100px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.logo span {
  color: var(--accent);
}

.nav-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 60px;
  text-align: center;
  background: var(--bg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-bg-shape {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45,106,79,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Search ---- */
.search-wrap {
  display: flex;
  justify-content: center;
  padding: 0 24px 48px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  padding: 0 16px;
  width: 100%;
  max-width: 440px;
  height: 48px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

.search-icon {
  color: var(--text-light);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-hint {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-body);
  white-space: nowrap;
}

/* ---- Main ---- */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-count {
  font-size: 12px;
  color: var(--text-light);
}

/* ---- Grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ---- Card ---- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: var(--radius-lg);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.card-arrow {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  gap: 4px;
  margin-top: 4px;
  transition: color 0.2s, gap 0.2s;
}

.card:hover .card-arrow {
  color: var(--accent);
  gap: 8px;
}

/* ---- Card Icon ---- */
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.icon-blue   { background: var(--blue-light);   color: var(--blue); }
.icon-teal   { background: var(--teal-light);   color: var(--teal); }
.icon-amber  { background: var(--amber-light);  color: var(--amber); }
.icon-coral  { background: var(--coral-light);  color: var(--coral); }
.icon-purple { background: var(--purple-light); color: var(--purple); }
.icon-green  { background: var(--green-light);  color: var(--green); }
.icon-gray   { background: var(--gray-light);   color: var(--gray); }

/* ---- Badge ---- */
.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}

.badge-new {
  background: var(--accent-light);
  color: var(--accent);
}

/* ---- Skeleton ---- */
.skeleton {
  height: 160px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- No Results ---- */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.no-results svg {
  color: var(--text-light);
}

.hidden {
  display: none !important;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-muted);
}

.footer-logo span {
  color: var(--accent);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero {
    padding: 52px 20px 44px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .search-wrap {
    padding: 0 20px 36px;
  }

  .main {
    padding: 0 20px 60px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card {
    padding: 18px;
  }

  .search-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 16px 36px;
  }

  .search-wrap {
    padding: 0 16px 28px;
  }

  .main {
    padding: 0 16px 48px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ---- Card entrance animation ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeUp 0.3s ease both;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.20s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.30s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.40s; }