@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f4efe6;
  --bg-deep: #e8dfd0;
  --ink: #1f1b16;
  --muted: #6a6258;
  --accent: #b48a2d;
  --accent-soft: rgba(180, 138, 45, 0.18);
  --accent-2: #1f5c47;
  --card: rgba(255, 248, 237, 0.9);
  --card-border: rgba(180, 138, 45, 0.35);
  --shadow: 0 24px 40px rgba(25, 18, 10, 0.18);
  --shadow-soft: 0 12px 24px rgba(25, 18, 10, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Avenir", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(180, 138, 45, 0.2), transparent 45%),
    radial-gradient(circle at 88% 8%, rgba(31, 92, 71, 0.18), transparent 42%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(90deg, rgba(25, 18, 10, 0.035) 0, rgba(25, 18, 10, 0.035) 1px, transparent 1px, transparent 140px);
  z-index: -2;
}

.ambient {
  position: fixed;
  inset: 12% 10% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(180, 138, 45, 0.28), transparent 70%);
  filter: blur(12px);
  z-index: -1;
  animation: drift 14s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-30px, 25px);
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px 10px;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-family: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 27, 22, 0.08);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill.ok {
  background: rgba(31, 92, 71, 0.12);
  color: var(--accent-2);
  border-color: rgba(31, 92, 71, 0.25);
  box-shadow: 0 0 12px rgba(31, 92, 71, 0.18);
}

.pill.warn {
  background: rgba(180, 138, 45, 0.12);
  color: var(--accent);
  border-color: rgba(180, 138, 45, 0.3);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.hero-card {
  background: var(--card);
  border-radius: 28px;
  padding: 28px 32px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: rise 0.9s ease both;
}

.hero-head h1 {
  font-family: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  margin: 0 0 4px;
  font-size: 32px;
}

.hero-head .lead {
  margin: 0;
  color: var(--muted);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(31, 27, 22, 0.08);
}

.meta span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.meta strong {
  font-size: 15px;
}

.hero-metrics {
  display: grid;
  gap: 16px;
}

.metric {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(31, 27, 22, 0.06);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: rise 1s ease both;
}

.metric.big {
  padding: 22px;
}

.metric.subtle {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.metric .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric .value {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.metric.big .value {
  font-size: 32px;
  color: var(--accent);
  font-family: "Playfair Display", "Iowan Old Style", "Georgia", serif;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.section-title h2 {
  margin: 0;
  font-family: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  font-size: 24px;
}

.section-title span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 1.1s ease both;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-head h3 {
  margin: 0;
  font-family: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  font-size: 20px;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 27, 22, 0.1);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.panel {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.sensor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sensor {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 27, 22, 0.12);
}

.sensor.ok {
  border-color: rgba(31, 92, 71, 0.4);
  color: var(--accent-2);
  background: rgba(31, 92, 71, 0.12);
}

.sensor.bad {
  border-color: rgba(160, 43, 43, 0.4);
  color: #a02b2b;
  background: rgba(160, 43, 43, 0.12);
}

.raw-block {
  min-height: 140px;
  background: rgba(31, 27, 22, 0.04);
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  font-family: "Source Sans 3", "Avenir", "Helvetica Neue", sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.note {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 10px 20px 40px;
  }
  .hero-card {
    padding: 22px;
  }
  .brand-mark {
    font-size: 22px;
  }
}
