:root {
  --bg: #f4efe7;
  --paper: rgba(255, 252, 247, 0.82);
  --ink: #1f2b2b;
  --muted: #596565;
  --line: rgba(31, 43, 43, 0.1);
  --accent: #d15d2b;
  --accent-dark: #8c3011;
  --teal: #0f6d65;
  --shadow: 0 24px 80px rgba(25, 38, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(209, 93, 43, 0.2), transparent 28%),
    radial-gradient(circle at right, rgba(15, 109, 101, 0.16), transparent 24%),
    linear-gradient(180deg, #fcf8f2 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 32px clamp(20px, 4vw, 48px) 48px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.7;
  animation: drift 14s ease-in-out infinite alternate;
}

.ambient-left {
  top: 84px;
  left: -64px;
  width: 220px;
  height: 220px;
  background: rgba(209, 93, 43, 0.2);
}

.ambient-right {
  top: 220px;
  right: -72px;
  width: 260px;
  height: 260px;
  background: rgba(15, 109, 101, 0.14);
  animation-duration: 18s;
}

.site-header,
.hero,
.metrics,
.modules,
.notes,
.site-footer,
.not-found {
  position: relative;
  z-index: 1;
}

.site-header,
.metrics,
.hero,
.modules,
.notes,
.site-footer,
.not-found {
  max-width: 1120px;
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 600;
}

.eyebrow,
.kicker,
.panel-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--teal);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

.hero-copy,
.hero-panel,
.module-card,
.note-card,
.not-found {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy {
  padding: clamp(28px, 4vw, 56px);
}

.hero-panel {
  padding: 28px;
  align-self: end;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.98;
}

h1 {
  margin-top: 14px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  max-width: 10ch;
}

h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 12ch;
}

h3 {
  font-size: 1.45rem;
}

.lead,
.hero-copy p,
.module-card p,
.note-card p,
.panel-list,
.site-footer,
.not-found p {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  margin: 18px 0 0;
  font-size: 1.05rem;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff8f1;
  box-shadow: 0 12px 28px rgba(140, 48, 17, 0.26);
}

.button-secondary {
  border: 1px solid rgba(15, 109, 101, 0.18);
  background: rgba(255, 255, 255, 0.5);
  color: var(--teal);
}

.panel-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.panel-list li + li {
  margin-top: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.metrics article {
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}

.metrics strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
}

.metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.modules,
.notes {
  margin-top: 52px;
}

.section-heading {
  margin-bottom: 18px;
}

.module-grid,
.note-grid {
  display: grid;
  gap: 18px;
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-card,
.note-card {
  padding: 24px;
  animation: rise 480ms ease both;
}

.module-card:nth-child(2),
.note-card:nth-child(2) {
  animation-delay: 90ms;
}

.module-card:nth-child(3),
.note-card:nth-child(3) {
  animation-delay: 180ms;
}

.module-card p,
.note-card p {
  margin: 14px 0 0;
}

.note-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(15, 109, 101, 0.1);
  color: var(--teal);
  font-weight: 700;
}

.site-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.not-found-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.not-found {
  width: min(680px, 100%);
  padding: clamp(28px, 5vw, 54px);
}

.not-found .button {
  margin-top: 14px;
}

code {
  padding: 0.12rem 0.36rem;
  border-radius: 0.45rem;
  background: rgba(15, 109, 101, 0.08);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.94em;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(26px, -22px, 0) scale(1.08);
  }
}

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

@media (max-width: 960px) {
  .hero,
  .module-grid,
  .note-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-inline: 16px;
    padding-bottom: 32px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    max-width: 100%;
  }

  .hero-copy,
  .hero-panel,
  .module-card,
  .note-card,
  .not-found {
    border-radius: 22px;
  }
}
