/* ============================================================
   GDPM Design System — "Compost & Clay" Hybrid
   Direction 2 layout + Direction 3 Hindi-first type + Direction 1 photography
   Approved GATE 2A — 2026-10-17
   ============================================================ */

/* --- Tokens --- */
:root {
  --primary: #4A6741;
  --primary-dark: #35502E;
  --secondary: #BF6A30;
  --accent: #D4A843;
  --dark: #2C2416;
  --bg: #FDFBF7;
  --surface: #F5F0E8;
  --surface-alt: #EDE7DA;
  --text: #2C2416;
  --text-secondary: #6B5E4F;
  --border: #D9D0C1;
  --white: #FFFFFF;
  --badge-held: #4A6741;
  --badge-planned: #D4A843;
  --badge-confirm: #BF6A30;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 8px rgba(44,36,22,0.08);
  /* Font sizes (EN defaults, overridden by .hindi-first) */
  --body: 15px;
  --body-lg: 16px;
  --h1: 36px;
  --h2: 24px;
  --h3: 18px;
  --nav: 14px;
  --caption: 13px;
  --cta: 15px;
}

/* Hindi-first sizing: Hindi body 17px, headings >= EN */
.hindi-first {
  --body: 17px;
  --body-lg: 18px;
  --h1: 38px;
  --h2: 26px;
  --h3: 20px;
  --cta: 16px;
}

/* --- Fonts (self-hosted, no Google CDN) --- */
@font-face {
  font-family: 'Noto Sans Devanagari';
  src: url('/static/fonts/NotoSansDevanagari.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: 'Noto Sans Devanagari';
  src: url('/static/fonts/NotoSansDevanagari-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('/static/fonts/NotoSans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans', 'Noto Sans Devanagari', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: var(--body);
}
.hindi-first body,
.hindi-first .hi-text {
  font-family: 'Noto Sans Devanagari', 'Noto Sans', system-ui, sans-serif;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* --- Utility Bar --- */
.utility-bar {
  background: var(--dark);
  color: var(--white);
  font-size: var(--caption);
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.utility-bar a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.utility-bar a:hover { text-decoration-thickness: 2px; }
.utility-right { display: flex; gap: 16px; align-items: center; }
.lang-toggle {
  background: rgba(255,255,255,0.12);
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 500;
}
.lang-toggle .active { color: var(--accent); }

/* --- Main Nav --- */
.main-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-weight: 700;
  font-size: 24px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--nav);
  font-weight: 500;
  padding: 20px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { border-bottom-color: var(--primary); color: var(--primary); }
.nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 24px; color: var(--text); }

/* --- Material Journey Line (signature visual) --- */
.journey-line {
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--secondary) 25%,
    var(--primary) 50%,
    var(--primary-dark) 75%,
    var(--dark) 100%
  );
}
.journey-dots {
  display: flex;
  justify-content: space-between;
  padding: 0 48px;
  margin-top: -8px;
  position: relative;
  z-index: 2;
}
.journey-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--white);
}
.journey-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 32px 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Section layouts --- */
.section { padding: 48px 24px; max-width: 1200px; margin: 0 auto; }
.section-alt { background: var(--surface); padding: 48px 24px; }
.section-alt .section-inner { max-width: 1200px; margin: 0 auto; }
.section h2 { font-size: var(--h2); margin-bottom: 24px; text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--cta);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-secondary { background: #A85A28; color: var(--white); }
.btn-secondary:hover { background: #8F4C22; color: var(--white); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.5); color: var(--white); }
.btn-outline:hover { border-color: var(--white); }
.btn-ghost { background: var(--surface); color: var(--primary-dark); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-block { display: block; width: 100%; }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card h3 { font-size: var(--h3); margin-bottom: 8px; color: var(--primary-dark); }
.card p { font-size: var(--body); color: var(--text-secondary); margin-bottom: 12px; }
.card a { font-size: var(--body); font-weight: 600; text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* --- Audience cards --- */
.audience-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.audience-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.audience-card:nth-child(1)::before { background: var(--secondary); }
.audience-card:nth-child(2)::before { background: var(--primary); }
.audience-card:nth-child(3)::before { background: var(--accent); }
.audience-card:nth-child(4)::before { background: var(--primary-dark); }
.audience-card:hover { box-shadow: 0 4px 16px rgba(44,36,22,0.1); }
.card-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.audience-card:nth-child(1) .card-icon { background: rgba(191,106,48,0.12); }
.audience-card:nth-child(2) .card-icon { background: rgba(74,103,65,0.12); }
.audience-card:nth-child(3) .card-icon { background: rgba(212,168,67,0.12); }
.audience-card:nth-child(4) .card-icon { background: rgba(53,80,46,0.12); }
.card-hi { font-family: 'Noto Sans Devanagari', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.card-en { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.4; }
.card-cta {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--nav);
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
}
.audience-card:nth-child(1) .card-cta { background: var(--secondary); }
.audience-card:nth-child(2) .card-cta { background: var(--primary); }
.audience-card:nth-child(3) .card-cta { background: var(--accent); color: var(--dark); }
.audience-card:nth-child(4) .card-cta { background: var(--primary-dark); }

/* --- Hero --- */
.hero {
  position: relative;
  background: var(--surface);
  min-height: 400px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #5a7a4e 0%, #3d5a32 40%, #8B7355 100%);
  opacity: 0.92;
}
.hero-photo::after {
  content: attr(data-label);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  text-align: center;
  width: 80%;
  font-style: italic;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 48px;
  color: var(--white);
}
.hero-content h1 { font-size: var(--h1); font-weight: 700; line-height: 1.15; margin-bottom: 8px; }
.hero-content .hero-sub { font-size: 20px; opacity: 0.9; margin-bottom: 16px; }
.hero-content p { font-size: var(--body-lg); opacity: 0.85; max-width: 520px; margin-bottom: 24px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Status strip --- */
.status-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.status-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.status-label { font-size: var(--nav); font-weight: 600; }
.status-items { display: flex; gap: 10px; flex-wrap: wrap; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-badge.held { background: rgba(74,103,65,0.12); color: var(--primary-dark); }
.status-badge.planned { background: rgba(212,168,67,0.15); color: #8B6914; }
.status-badge.confirm { background: rgba(191,106,48,0.12); color: #8F4C22; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.held .status-dot { background: var(--badge-held); }
.planned .status-dot { background: var(--badge-planned); }
.confirm .status-dot { background: var(--badge-confirm); }
.status-link { font-size: var(--caption); color: var(--primary); text-decoration: none; font-weight: 600; }

/* --- Photo placeholder --- */
.photo-placeholder {
  background: linear-gradient(135deg, #7a9a6e 0%, #5a7a4e 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  min-height: 240px;
}

/* --- Marketplace listings --- */
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.listing-icon {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.listing-content { flex: 1; }
.listing-content h3 { font-size: 16px; margin-bottom: 4px; }
.listing-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.listing-badge.plastic { background: rgba(74,103,65,0.1); color: var(--primary-dark); }
.listing-badge.metal { background: rgba(191,106,48,0.1); color: var(--secondary); }
.listing-badge.paper { background: rgba(212,168,67,0.15); color: #8B6914; }
.listing-badge.ewaste { background: rgba(44,36,22,0.1); color: var(--dark); }
.listing-qty { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.listing-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.listing-contact { font-size: 13px; color: var(--primary); font-weight: 600; text-decoration: none; }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 48px 24px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer h4 { color: var(--white); font-size: var(--nav); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: var(--caption); }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px; margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }

/* --- Mobile sticky CTA (context-aware) --- */
.mobile-sticky { display: none; }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: var(--nav); font-weight: 600; margin-bottom: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--body);
  color: var(--text);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

/* --- Tabs --- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tab {
  padding: 14px 24px;
  font-size: var(--nav);
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--text); }

/* --- Search --- */
.search-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.search-bar select,
.search-bar input {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--nav);
  font-family: inherit;
  min-width: 160px;
}
.search-bar .btn { padding: 10px 24px; }

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state h3 { font-size: var(--h3); margin-bottom: 12px; color: var(--text); }

/* --- Category grid --- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.cat-item:hover { border-color: var(--primary); }
.cat-icon { font-size: 28px; margin-bottom: 8px; }
.cat-label { font-size: var(--caption); font-weight: 500; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --h1: 26px;
    --h2: 20px;
    --h3: 16px;
  }
  .hindi-first {
    --h1: 28px;
    --h2: 22px;
    --h3: 18px;
  }
  .utility-bar { font-size: 11px; padding: 4px 12px; }
  .utility-left { display: none; }
  .main-nav { padding: 0 12px; height: 56px; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .hero { min-height: 280px; }
  .hero-content { padding: 24px 16px; }
  .hero-content p { font-size: 14px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; }
  .journey-labels { font-size: 9px; padding: 4px 8px 0; }
  .journey-dots { padding: 0 16px; }
  .section { padding: 24px 12px; }
  .section-alt { padding: 24px 12px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 12px; }
  .audience-card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 16px;
  }
  .card-icon { margin: 0; flex-shrink: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .search-bar { flex-direction: column; }
  .search-bar select, .search-bar input, .search-bar .btn { width: 100%; min-width: 0; }
  .tabs { overflow-x: auto; }
  .tab { padding: 12px 16px; font-size: 13px; white-space: nowrap; }
  .listing-card { flex-direction: column; gap: 8px; }
  .status-inner { flex-direction: column; align-items: flex-start; }

  /* Mobile sticky CTA */
  .mobile-sticky {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    z-index: 200;
    justify-content: center;
  }
  .mobile-sticky .btn { width: 100%; font-size: 16px; padding: 14px; }
  .footer { padding-bottom: 80px; }
}

/* --- Focus visible (a11y) --- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Skip link (a11y) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* --- Print --- */
@media print {
  .utility-bar, .main-nav, .journey-line, .journey-dots, .journey-labels,
  .mobile-sticky, .footer { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
}
