:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #5d5d5d;
  --soft: #f7f7f5;
  --line: #e7e7e2;
  --accent: #23313f;
  --max: 1120px;
  --radius: 22px;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav a:hover { color: var(--ink); }

/* Sections */
.section-wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.narrow { max-width: 780px; }

.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 920px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 8vw, 7.25rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  font-weight: 720;
}

h2 {
  max-width: 740px;
  margin: 10px 0 18px;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 700;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 650;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg);
  color: var(--ink);
}

.button.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.premise {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.premise p {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.14;
  letter-spacing: -0.045em;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.card-index {
  margin-bottom: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.card h3 {
  margin: 0 0 10px;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

/* Layer stack */
.layer-stack {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: var(--soft);
}

.layer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}

.layer strong,
.layer span { display: block; }

.layer strong {
  margin-bottom: 4px;
  font-size: 1.04rem;
}

.layer div span {
  color: var(--muted);
}

.layer-tag {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Split panel */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.split-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.quiet-list {
  display: grid;
  gap: 12px;
}

.quiet-list div {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.quiet-list div:first-child { padding-top: 0; }
.quiet-list strong,
.quiet-list span { display: block; }
.quiet-list span { color: var(--muted); margin-top: 4px; }

/* Use cases */
.use-cases .section-intro p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--bg);
}

/* Final CTA */
.final-cta {
  margin-bottom: 40px;
  padding: 72px;
  border-radius: calc(var(--radius) + 14px);
  background: var(--soft);
}

.final-cta p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* Footer */
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 50px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.9rem;
}

/* Blazor-specific overrides */
#blazor-error-ui {
  background: var(--soft);
  border-top: 1px solid var(--line);
  color: var(--ink);
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0,0,0,.04);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

.loading-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--muted);
}

.loading-progress circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.6rem;
}

.loading-progress circle:last-child {
  stroke: var(--ink);
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  animation: loading-progress 1.5s ease-in-out infinite;
}

@keyframes loading-progress {
  0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; }
}

/* Responsive */
@media (max-width: 820px) {
  .site-header { align-items: flex-start; }
  .nav { display: none; }
  .section-wrap { padding: 64px 0; }
  .hero { min-height: 68vh; }
  .card-grid { grid-template-columns: 1fr; }
  .card { min-height: 210px; }
  .layer { flex-direction: column; }
  .split-panel { grid-template-columns: 1fr; }
  .final-cta { padding: 36px 24px; }
  .site-footer { flex-direction: column; }
}
