:root {
  --bg: #ffffff;
  --surface: #f6f8f7;
  --surface-strong: #eef4f1;
  --text: #17211f;
  --muted: #5c6b66;
  --border: #dbe4e0;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --blue: #2563eb;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 45px rgba(15, 35, 30, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-dark);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff !important;
}

.language-link {
  color: var(--muted) !important;
}

.main {
  overflow: hidden;
}

.section,
.hero,
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 76px 24px;
}

.hero {
  max-width: none;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 76px;
  padding-bottom: 76px;
  background:
    linear-gradient(180deg, rgba(9, 24, 22, 0.5), rgba(9, 24, 22, 0.68)),
    url("assets/yerevan-ararat-hero.jpg");
  background-position: center 64%;
  background-size: cover;
}

.hero-night .hero {
  background:
    linear-gradient(180deg, rgba(9, 24, 22, 0.36), rgba(9, 24, 22, 0.56)),
    url("assets/yerevan-ararat-night-hero.jpg");
  background-position: center 54%;
  background-size: cover;
}

.hero > div {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.42);
}

.page-hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
}

.hero-copy,
.page-hero p,
.lead {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-copy {
  max-width: 670px;
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.36);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-actions {
  justify-content: center;
}

.hero .button {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.hero .button.primary {
  border-color: var(--accent);
  background: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button:hover {
  transform: translateY(-1px);
}

.recognition-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.recognition-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recognition-inner h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.05;
}

.recognition-inner p:not(.eyebrow) {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.text-link {
  display: inline-flex;
  margin-top: 14px;
  font-weight: 800;
}

.recognition-preview {
  display: block;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 35, 30, 0.08);
}

.recognition-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
}

.status-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fbfa 0%, #edf7f4 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sensor-status {
  margin-top: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(180, 83, 9, 0.12);
}

.status-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--border);
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff;
}

.status-list span {
  color: var(--muted);
}

.metric-grid,
.card-grid,
.donation-grid,
.sensor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sensor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric,
.card,
.sensor-card,
.donation-card,
.certificate-figure,
.notice,
.chart-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 35, 30, 0.05);
}

.metric,
.card,
.sensor-card,
.donation-card,
.notice {
  padding: 22px;
}

.certificate-figure {
  max-width: 680px;
  margin: 18px auto 44px;
  padding: 16px;
}

.certificate-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
}

.certificate-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.sensor-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 230px;
}

.sensor-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.purpleair-widget {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 154px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.purpleair-widget iframe {
  max-width: 100%;
}

.sensor-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid #f1c36d;
  border-left: 6px solid var(--warning);
  border-radius: var(--radius);
  background: #fff8eb;
  box-shadow: 0 14px 34px rgba(124, 45, 18, 0.08);
}

.sensor-note strong {
  display: block;
  color: #7c2d12;
  font-size: 22px;
  line-height: 1.2;
}

.sensor-note p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #4c3322;
  font-size: 17px;
}

@media (min-width: 821px) {
  .purpleair-widget .current-conditions {
    width: 100% !important;
    max-width: none !important;
  }

  .purpleair-widget .popup-time-stamp,
  .purpleair-widget .popup-conditions-container,
  .purpleair-widget .popup-value-message,
  .purpleair-widget .popup-sensor-name,
  .purpleair-widget .clearfix {
    width: 100% !important;
  }

  .purpleair-widget .popup-conditions,
  .purpleair-widget .popup-value {
    width: 50% !important;
  }
}

.metric strong,
.donation-card strong {
  display: block;
  color: var(--accent-dark);
  font-size: 34px;
  line-height: 1.1;
}

.metric span,
.card p,
.donation-card p {
  color: var(--muted);
}

.band {
  background: var(--surface);
}

.section-title {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-title h2,
.content h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.page-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 82px 24px 48px;
}

.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 76px;
}

.content-wide {
  max-width: 1120px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.status-table th,
.status-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.status-table th {
  background: var(--surface);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff4de;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 800;
}

.badge.neutral {
  background: var(--surface-strong);
  color: var(--accent-dark);
}

.chart-shell {
  padding: 18px;
}

.chart-container {
  width: 100%;
  max-width: 100%;
  min-height: 420px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #0f1f1c;
  color: #d9e6e2;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.site-footer a {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 820px) {
  .nav {
    min-height: 64px;
    padding: 0 18px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px 20px;
    border-bottom: 1px solid var(--border);
    background: #fff;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .nav-cta {
    margin-top: 4px;
  }

  .hero {
    min-height: 480px;
    padding-top: 56px;
    padding-bottom: 56px;
    background-position: center center;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 44px;
  }

  .hero-copy,
  .page-hero p,
  .lead {
    font-size: 18px;
  }

  .metric-grid,
  .card-grid,
  .donation-grid,
  .sensor-grid {
    grid-template-columns: 1fr;
  }

  .recognition-inner {
    grid-template-columns: 1fr;
  }

  .recognition-preview {
    max-width: 320px;
  }

  .sensor-note {
    align-items: stretch;
    flex-direction: column;
  }

  .status-list li {
    flex-direction: column;
    gap: 6px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
  }

  .status-table,
  .status-table tbody,
  .status-table tr,
  .status-table td {
    display: block;
    width: 100%;
  }

  .status-table thead {
    display: none;
  }

  .status-table td {
    border-bottom: 0;
    padding: 10px 16px;
  }

  .status-table tr {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
}

@media (max-width: 600px) {
  .section,
  .hero,
  .page-hero,
  .content,
  .footer-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-actions,
  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
