:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5f6875;
  --line: rgba(23, 32, 51, 0.13);
  --paper: #f8f4ec;
  --paper-strong: rgba(255, 255, 255, 0.82);
  --blue: #154a7d;
  --blue-soft: #d7e5ef;
  --gold: #c7962e;
  --green: #1d7b64;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(22px, 4vw, 56px);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(248, 244, 236, 0.99) 0%, rgba(248, 244, 236, 0.78) 37%, rgba(248, 244, 236, 0.18) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(11, 35, 61, 0.1)),
    url("assets/hero-architecture.png") center / cover no-repeat;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(23, 32, 51, 0.16) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(199, 150, 46, 0.22) 0 1px, transparent 1px);
  background-size: 32px 32px, 46px 46px;
  mix-blend-mode: multiply;
}

.civic-grid,
.light-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.civic-grid {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(21, 74, 125, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 74, 125, 0.13) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent, #000 48%, #000 100%);
}

.light-field {
  opacity: 0.7;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 81% 58%, rgba(199, 150, 46, 0.24), transparent 22%),
    radial-gradient(circle at 58% 72%, rgba(21, 74, 125, 0.16), transparent 24%);
  animation: fieldBreathe 9s ease-in-out infinite alternate;
}

.content,
.system-panel {
  position: relative;
  z-index: 3;
}

.content {
  max-width: 820px;
  padding-top: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: clamp(28px, 5vh, 48px);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(21, 74, 125, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 18px 46px rgba(21, 74, 125, 0.12);
}

.brand-name {
  max-width: 430px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  color: rgba(23, 32, 51, 0.78);
}

.headline-block {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6.7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 610px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.48;
}

.status-panel {
  width: min(100%, 560px);
  margin-top: clamp(28px, 5vh, 48px);
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.status-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(23, 32, 51, 0.86);
  font-size: 15px;
  font-weight: 750;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(29, 123, 100, 0.42);
  animation: pulse 2s ease-out infinite;
}

.system-panel {
  align-self: end;
  padding: 18px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(247, 241, 229, 0.54));
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.14);
}

.maintenance-visual {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin: -8px -6px 4px;
}

#maintenanceAnimation {
  width: min(100%, 300px);
  aspect-ratio: 1;
}

#maintenanceAnimation svg {
  display: block;
  width: 100%;
  height: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.11);
  color: rgba(23, 32, 51, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.panel-code {
  color: var(--gold);
  font-size: 11px;
  text-align: right;
}

.metrics {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
}

.metrics div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
}

.metrics dt,
.metrics dd {
  margin: 0;
}

.metrics dt {
  color: var(--muted);
  font-size: 13px;
}

.metrics dd {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

@keyframes fieldBreathe {
  from {
    opacity: 0.46;
  }

  to {
    opacity: 0.76;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 123, 100, 0.42);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(29, 123, 100, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(29, 123, 100, 0);
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .content {
    padding-top: 0;
  }

  .system-panel {
    max-width: 520px;
    justify-self: start;
  }

  .maintenance-visual {
    min-height: 210px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 22px;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(248, 244, 236, 0.98) 0%, rgba(248, 244, 236, 0.82) 48%, rgba(248, 244, 236, 0.28) 100%),
      url("assets/hero-architecture.png") 62% center / cover no-repeat;
  }

  .brand-row {
    align-items: flex-start;
    margin-bottom: 40px;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    font-size: 16px;
  }

  .brand-name {
    max-width: 250px;
    font-size: 12px;
  }

  h1 {
    font-size: clamp(42px, 15vw, 64px);
    line-height: 0.98;
  }

  .lead {
    font-size: 17px;
  }

  .system-panel {
    padding: 18px;
  }

  .maintenance-visual {
    min-height: 190px;
    margin-top: -14px;
  }

  #maintenanceAnimation {
    width: min(100%, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
