/* upMVC — framework-style landing (IBM Plex, steel accent, no chrome) */

:root {
  --ink: #14202b;
  --ink-soft: #3a4a58;
  --muted: #5c6b78;
  --paper: #f3f1eb;
  --paper-2: #e8e6df;
  --line: #c9c5bb;
  --accent: #0f6b6b;
  --accent-ink: #0a4f4f;
  --code-bg: #1a2430;
  --code-fg: #e6edf3;
  --code-dim: #8b9aab;
  --focus: #c45c26;
  --max: 42rem;
  --wide: 52rem;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(15, 107, 107, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 92, 38, 0.05), transparent 50%),
    linear-gradient(180deg, #f7f5f0 0%, var(--paper) 40%, #efece5 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 70%);
  z-index: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(243, 241, 235, 0.88);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  outline: none;
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.25rem;
  animation: rise 0.55s ease-out both;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 34rem;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #f7fffe;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-ink);
  outline: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-ink);
  outline: none;
}

.hero-code {
  margin: 2rem 0 0;
  max-width: 28rem;
  animation: rise 0.55s ease-out 0.12s both;
}

/* Sections */

.section {
  padding: 3rem 0;
  animation: rise 0.5s ease-out both;
}

.section-alt {
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line);
}

.section h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.section h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.section-lede {
  margin: 0.5rem 0 1.25rem;
  color: var(--ink-soft);
  max-width: var(--max);
}

.install-note {
  margin: 0 0 0.65rem;
  max-width: var(--max);
  font-size: 0.95rem;
  color: var(--muted);
}

/* Code */

pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--code-fg);
  background: var(--code-bg);
  border: 1px solid #0d141c;
  border-radius: 2px;
}

pre code {
  font-family: inherit;
  color: inherit;
}

.stack-diagram {
  max-width: 100%;
}

.piece-list code,
.facts code,
.more code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

/* Pieces — list, not cards */

.piece-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--max);
}

.piece-list li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.piece-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.piece-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.piece-list h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.piece-list h3 a:hover,
.piece-list h3 a:focus-visible {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  outline: none;
}

.piece-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.facts {
  margin: 0;
  padding-left: 1.2rem;
  max-width: var(--max);
  color: var(--ink-soft);
}

.facts li + li {
  margin-top: 0.4rem;
}

.more {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.more a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner p {
  margin: 0 0 0.5rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--accent-ink);
}

.archive .hint {
  display: inline;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.85;
}

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

@media (max-width: 560px) {
  .hero {
    padding-top: 3rem;
  }

  nav {
    gap: 0.5rem 0.85rem;
  }

  .archive .hint {
    display: block;
    margin-top: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero,
  .hero-code,
  .section {
    animation: none;
  }
}
