:root {
  --bg: #f3efe5;
  --bg-deep: #113528;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffaf2;
  --line: rgba(21, 52, 40, 0.12);
  --text: #173126;
  --muted: #607366;
  --leaf: #27664b;
  --leaf-soft: #8ca77d;
  --moss: #173c2c;
  --amber: #d18b38;
  --clay: #bf6445;
  --teal: #397d86;
  --white: #fffdf9;
  --shadow: 0 26px 60px rgba(17, 53, 40, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(209, 139, 56, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(57, 125, 134, 0.14), transparent 24rem),
    linear-gradient(180deg, #f7f4ec 0%, #f1ece1 46%, #ede5d6 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.site-orb {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(22px);
  pointer-events: none;
  opacity: 0.55;
}

.orb-one {
  top: -12rem;
  left: -9rem;
  background: radial-gradient(circle, rgba(39, 102, 75, 0.22), transparent 68%);
}

.orb-two {
  right: -10rem;
  top: 18rem;
  background: radial-gradient(circle, rgba(209, 139, 56, 0.16), transparent 68%);
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 1.2rem 0 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-copy {
  display: grid;
  gap: 0.15rem;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-mark {
  width: 1rem;
  height: 1.7rem;
  display: inline-block;
  border-radius: 78% 22% 68% 32% / 28% 72% 28% 72%;
  transform: rotate(-28deg);
  background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-soft) 100%);
  box-shadow: 0 10px 18px rgba(39, 102, 75, 0.2);
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.topbar-links > a {
  color: var(--muted);
  font-weight: 700;
}

.language-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(23, 60, 44, 0.06);
}

.language-switch a,
.metric-picker button,
.toggle {
  border: none;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.language-switch a {
  padding: 0.55rem 0.7rem;
}

.language-switch a.is-active,
.language-switch a:hover {
  color: var(--moss);
  background: var(--white);
  box-shadow: 0 8px 20px rgba(23, 60, 44, 0.08);
}

.button-link,
.primary-button {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--leaf), var(--moss));
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(23, 60, 44, 0.24);
  cursor: pointer;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 420px);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.stat-card,
.chart-card,
.insight-card,
.log-card,
.impact-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 3rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 13rem;
  height: 13rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), transparent 34%),
    linear-gradient(180deg, rgba(39, 102, 75, 0.14), rgba(209, 139, 56, 0.18));
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--leaf);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.92;
  max-width: 10ch;
}

.hero-text {
  max-width: 38rem;
  margin: 1.1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--moss);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(23, 60, 44, 0.08);
}

.hero-panel {
  padding: 2rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(17, 53, 40, 0.96) 0%, rgba(23, 60, 44, 0.92) 100%);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.08);
}

.panel-kicker {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-metrics {
  display: grid;
  gap: 1rem;
}

.hero-metrics div {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-metrics span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.hero-metrics strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.hero-status {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.hero-status.is-good {
  background: rgba(112, 193, 124, 0.16);
  color: #d6f2db;
}

.hero-status.is-warning {
  background: rgba(209, 139, 56, 0.14);
  color: #ffe2bd;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  min-height: 10.5rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
}

.stat-card p,
.impact-card span {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.stat-card strong,
.impact-card strong {
  display: block;
  margin-top: 1rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1;
}

.stat-card span,
.impact-card em {
  display: block;
  margin-top: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: normal;
}

.stat-card.accent {
  background: linear-gradient(180deg, rgba(209, 139, 56, 0.12), rgba(255, 251, 245, 0.92));
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 1rem;
  margin-top: 1rem;
}

.chart-card,
.insight-card,
.log-card,
.impact-card {
  border-radius: var(--radius-xl);
  padding: 1.6rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2,
.insight-card h2,
.log-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.section-head.compact {
  margin-bottom: 0.7rem;
}

.toggle-group {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(23, 60, 44, 0.06);
}

.toggle {
  background: transparent;
  padding: 0.7rem 1rem;
}

.toggle.is-active,
.metric-picker button.is-active {
  background: var(--white);
  color: var(--moss);
  box-shadow: 0 8px 20px rgba(23, 60, 44, 0.08);
}

.metric-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 1rem;
}

.metric-picker button {
  padding: 0.68rem 0.92rem;
  background: rgba(23, 60, 44, 0.06);
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.chart-summary span {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
}

.chart-summary strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.25rem;
}

.chart-shell {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: calc(var(--radius-xl) - 10px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(23, 60, 44, 0.08);
}

#trendChart {
  width: 100%;
  height: auto;
  display: block;
}

#trendChart .chart-bg {
  fill: rgba(255, 255, 255, 0.22);
}

#trendChart .chart-gridline {
  stroke: rgba(23, 60, 44, 0.12);
  stroke-width: 1;
}

#trendChart .chart-bar {
  fill: url("#barGradient");
}

#trendChart .chart-line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#trendChart .chart-target {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-dasharray: 10 10;
}

#trendChart .chart-dot {
  fill: var(--amber);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3;
}

#trendChart .chart-label,
#trendChart .chart-axis-label,
#trendChart .chart-axis-title,
#trendChart .chart-empty {
  fill: var(--muted);
  font-size: 13px;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
}

#trendChart .chart-axis-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.legend-swatch {
  width: 1.3rem;
  height: 0.8rem;
  border-radius: 999px;
  display: inline-block;
}

.legend-swatch.waste {
  background: linear-gradient(180deg, #2f7b59, var(--moss));
}

.legend-swatch.diners {
  height: 0.2rem;
  background: var(--amber);
}

.legend-swatch.target {
  height: 0.2rem;
  background: repeating-linear-gradient(90deg, var(--teal), var(--teal) 7px, transparent 7px, transparent 12px);
}

.insight-stack {
  display: grid;
  gap: 1rem;
}

.insight-card h2 {
  line-height: 1.1;
}

.insight-card p {
  color: var(--muted);
  line-height: 1.65;
}

.progress-ring {
  --size: 11.5rem;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  margin: 1.2rem auto 1rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle closest-side, rgba(255, 251, 245, 0.95) 73%, transparent 74% 100%),
    conic-gradient(var(--leaf) calc(min(var(--progress), 100) * 1%), rgba(23, 60, 44, 0.08) 0);
}

.progress-ring div {
  display: grid;
  text-align: center;
}

.progress-ring strong {
  font-size: 2rem;
}

.progress-ring span {
  color: var(--muted);
}

.metric-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.metric-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

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

.insight-card.warm {
  background: linear-gradient(180deg, rgba(209, 139, 56, 0.12), rgba(255, 251, 245, 0.9));
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.impact-card {
  min-height: 9rem;
}

.impact-card:nth-child(1) {
  background: linear-gradient(145deg, rgba(236, 248, 231, 0.92), rgba(255, 251, 245, 0.86));
}

.impact-card:nth-child(2) {
  background: linear-gradient(145deg, rgba(226, 242, 244, 0.92), rgba(255, 251, 245, 0.86));
}

.impact-card:nth-child(3) {
  background: linear-gradient(145deg, rgba(255, 235, 224, 0.92), rgba(255, 251, 245, 0.86));
}

.impact-card:nth-child(4) {
  background: linear-gradient(145deg, rgba(255, 242, 216, 0.92), rgba(255, 251, 245, 0.86));
}

.log-card {
  margin-top: 1rem;
}

.log-list {
  display: grid;
  gap: 0.8rem;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(23, 60, 44, 0.08);
}

.log-item strong {
  display: block;
}

.log-item span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
}

.log-metrics {
  text-align: right;
}

.site-footer {
  padding: 1.8rem 0 3rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .topbar,
  .section-head,
  .chart-summary,
  .log-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    justify-content: start;
  }

  .hero-grid,
  .stats-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .chart-card,
  .insight-card,
  .log-card,
  .impact-card {
    border-radius: 24px;
    padding: 1.25rem;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .topbar-links {
    align-items: flex-start;
  }
}
