@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f6f0e7;
  --ink: #30221d;
  --muted: #69564b;
  --line: #d8cabd;
  --clay: #934b32;
  --travertine: #ebcba8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
a:focus-visible { outline: 3px solid #b56743; outline-offset: 6px; }
p { font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; font-weight: 500; margin: 0; }
h1 { font-size: clamp(42px, 4.5vw, 64px); line-height: 1.12; letter-spacing: -2.6px; }
h2 { font-size: 32px; line-height: 1.25; letter-spacing: -1px; }
h3 { font-size: 17px; line-height: 1.5; font-weight: 600; }
.shell { max-width: 1360px; margin: auto; padding: 0 6%; }
header {
  min-height: 104px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 800 28px 'Manrope', sans-serif;
  letter-spacing: -1.4px;
}
.mark {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  font: italic 32px/31px Georgia, serif;
  width: 34px;
  height: 37px;
  border-radius: 7px;
  text-align: center;
  letter-spacing: -3px;
  padding-right: 6px;
}
.mark span { color: var(--travertine); font-size: 19px; position: absolute; right: 6px; bottom: -1px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 13px; font-weight: 500; }
nav a { white-space: nowrap; }
nav a span { margin-left: 8px; }
.nav-github { border: 1px solid #b6a294; padding: 11px 19px; border-radius: 5px; }
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
}
.hero-copy { min-width: 0; }
.intro { font-size: 17px; line-height: 1.85; margin: 28px 0; max-width: 540px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
}
.button:hover { text-decoration: none; background: #793c29; }
.primary { background: var(--clay); color: white; }
.text-link { font-size: 13px; font-weight: 500; }
.text-link span { margin-left: 8px; }
.goal-map {
  margin: 0;
  padding: 27px;
  border: 1px solid #614535;
  border-radius: 10px;
  color: var(--paper);
  background: linear-gradient(to bottom, #26191020 35%, #26191038 60%, #261910eb 84%),
    url("./emperador-marble.jpg") center / cover no-repeat, #38261f;
}
.goal-map figcaption, .child-goals h3 {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--ink);
}
.goal-map figcaption { font-size: 12px; color: var(--travertine); margin-bottom: 25px; }
.parent-goal {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  border: 1px solid #ceb9a7;
  border-radius: 6px;
  background: var(--paper);
}
.parent-goal p { color: var(--ink); font-size: 16px; line-height: 1.6; }
.goal-symbol { color: var(--clay); font-size: 25px; line-height: 1; margin-top: 3px; }
.parent-goal h2, .child-goals h3, .map-eval strong {
  display: block;
  color: var(--muted);
  font: 600 12px/1.5 'DM Sans', sans-serif;
  letter-spacing: normal;
  margin: 0 0 5px;
}
.child-goals { padding: 16px 0 0 35px; margin-left: 17px; }
.related-goals { list-style: none; position: relative; padding: 0; margin: 0; }
.related-goals li::after { content: ''; position: absolute; left: -36px; top: -14px; bottom: -1px; border-left: 1px solid #c4a991; }
.related-goals li:first-child::after { top: -47px; }
.related-goals li:last-child::after { bottom: 50%; }
.child-goals h3, .map-eval strong { color: var(--travertine); }
.map-eval { margin: 18px 0 12px; color: var(--paper); font-size: 14px; line-height: 1.6; }
code { font-size: .94em; }
.related-goals li {
  position: relative;
  padding: 13px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #ceb9a7;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.5;
}
.related-goals li + li { margin-top: 12px; }
.related-goals li::before { content: ''; position: absolute; width: 35px; left: -36px; top: 50%; border-top: 1px solid #c4a991; }
.map-link { font-size: 12px; display: inline-flex; align-items: center; gap: 12px; }
.library {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  padding: 40px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
}
.library-heading h2 { margin-bottom: 16px; }
.library-heading p, .library-entries dd { color: #e2d4c8; }
.library-source { color: var(--travertine); font-size: 14px; }
.library-entries { margin: 0; }
.library-entries dt { color: var(--travertine); }
.library-entries dd { margin: 5px 0 0; font-size: 15px; line-height: 1.6; }
.library-entries dt:not(:first-child) { margin-top: 16px; border-top: 1px solid #ffffff30; padding-top: 16px; }
.text-section { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; padding: 72px 0; }
.text-section h2 { max-width: 370px; }
.testbed-examples { border-top: 1px solid var(--line); }
.testbed-examples p a { color: var(--clay); text-decoration: underline; }
footer { border-top: 1px solid var(--line); padding: 30px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
footer .wordmark { font-size: 23px; gap: 0; }
.footer-dot { color: var(--clay); }
footer > span { font-size: 12px; color: var(--muted); }
footer > div { display: flex; gap: 25px; font-size: 12px; }
.skip { position: absolute; left: 10px; top: -100px; background: var(--ink); color: white; padding: 10px; z-index: 10; }
.skip:focus { top: 10px; }

@media (max-width: 1050px) {
  .hero { gap: 35px; }
  h1 { font-size: 48px; letter-spacing: -1.8px; }
  h2 { font-size: 28px; }
  .goal-map { padding: 22px; }
  .library, .text-section { gap: 32px; }
  .library { padding: 32px; }
}

@media (max-width: 760px) {
  header { min-height: 85px; }
  .wordmark { font-size: 24px; }
  nav { gap: 18px; font-size: 12px; }
  .library-link { display: none; }
  .nav-github { padding: 9px 11px; }
  h1 { font-size: clamp(36px, 7.5vw, 52px); letter-spacing: -1.5px; }
  h2 { font-size: 28px; }
  .hero { grid-template-columns: 1fr; padding: 48px 0; gap: 36px; }
  .intro { font-size: 16px; max-width: none; margin: 23px 0; }
  .actions { gap: 20px; }
  .goal-map { max-width: 500px; width: 100%; justify-self: center; }
  .library { grid-template-columns: 1fr; gap: 28px; padding: 25px; }
  .text-section { grid-template-columns: 1fr; gap: 22px; padding: 48px 0; }
  .text-section h2 { max-width: none; }
  footer { flex-wrap: wrap; }
  footer > div { width: 100%; justify-content: space-between; }
}

@media (max-width: 540px) {
  header { flex-wrap: wrap; gap: 10px; padding: 16px 0 12px; }
  header > nav { width: 100%; flex-wrap: wrap; gap: 4px clamp(10px, 3.4vw, 18px); }
  header > nav a { padding-block: 8px; }
}

@media (max-width: 360px) {
  header { gap: 12px; }
  nav { gap: 12px; }
  .library { padding: 20px; }
  .goal-map { padding: 18px; }
  .parent-goal { padding: 16px; }
}

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