:root {
  --bg: #f4e8ee;
  --paper: #fdf5f7;
  --text: #1f0a1b;
  --muted: #6e5564;
  --accent: #5b1d54;
  --accent-soft: #f0dce8;
  --berry: #9b1c3d;
  --line: #e2ccd6;
  --shadow: 0 14px 28px rgba(58, 14, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 0% 0%, #f6d2de 0%, transparent 42%),
    radial-gradient(circle at 100% 100%, #e3cfe6 0%, transparent 45%),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 14px;
}

code,
pre {
  font-family: "IBM Plex Mono", "Menlo", "Consolas", monospace;
}

.shell {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.5;
}

.bg-shape-one {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: #5b1d54;
  top: 6rem;
  right: 5vw;
}

.bg-shape-two {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: #9b1c3d;
  bottom: 2rem;
  left: -4rem;
}

.hero {
  padding: 1.2rem 0 3.5rem;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.nav-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 220px;
  padding: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 6;
}

.nav-links[hidden] {
  display: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.hero-inner {
  margin-top: 2rem;
  background: linear-gradient(145deg, rgba(253, 245, 247, 0.92), rgba(247, 232, 238, 0.72));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 2.4vw, 2.4rem);
  animation: rise-in 550ms ease-out both;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7a4a68;
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
}

h1 {
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

h3.subhead {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a4a68;
  margin: 1.6rem 0 0.5rem;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 65ch;
  color: #4a2b40;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  transition: transform 0.18s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(120deg, #3a0f36, #9b1c3d);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}

.section {
  margin: 2.2rem 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1rem, 2vw, 1.8rem);
  box-shadow: var(--shadow);
  animation: rise-in 540ms ease-out both;
}

.section:nth-of-type(2) {
  animation-delay: 80ms;
}

.section:nth-of-type(3) {
  animation-delay: 120ms;
}

.section:nth-of-type(4) {
  animation-delay: 160ms;
}

.section:nth-of-type(5) {
  animation-delay: 200ms;
}

.section:nth-of-type(6) {
  animation-delay: 240ms;
}

.section-head {
  margin-bottom: 0.8rem;
}

.kicker {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: #7a4a68;
}

.blockquote-card p {
  margin: 0;
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  font-weight: 500;
}

.diagram {
  margin: 1rem 0 0;
}

.diagram figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.split .full-col {
  grid-column: 1 / -1;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 0.4rem;
}

.callout {
  margin-top: 1.2rem;
  padding: 0.9rem 1.1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.4rem;
}

.callout-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a4a68;
  background: rgba(240, 220, 232, 0.5);
}

.data-table code {
  font-size: 0.85em;
  background: rgba(91, 29, 84, 0.1);
  padding: 0.08em 0.35em;
  border-radius: 4px;
}

.feature-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.code-card {
  margin-top: 1rem;
  border: 1px solid #d9c2cf;
  background: #fbf1f5;
  border-radius: 14px;
  overflow-x: auto;
}

.code-card pre {
  margin: 0;
  padding: 0.9rem;
  font-size: 0.9rem;
}

.milestones {
  margin: 0;
  padding-left: 1.3rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0 2rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem;
  }

  .nav {
    position: sticky;
    top: 0;
    backdrop-filter: blur(9px);
    z-index: 4;
  }
}

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

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

  .hero-inner,
  .section,
  .btn {
    animation: none;
    transition: none;
  }
}
