/* golang-agents.com: the palette and type of the book cover. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --night: #040e19;
  --page: #071321;
  --panel: #0d1d30;
  --panel-deep: #0a1828;
  --line: #1e3550;
  --ivory: #f3ead6;
  --stone: #dad4c6;
  --soft: #9aa4af;
  --amber: #e9ae55;
  --amber-dim: rgba(233, 174, 85, 0.55);
  --amber-ink: #1a1206;
  --link: #7ccde8;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --label: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--stone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { color: var(--ivory); line-height: 1.2; margin: 0; text-wrap: balance; }

h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  font-feature-settings: normal;
  letter-spacing: 0.01em;
}
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); margin-bottom: 1.25rem; }
h3 { font-family: var(--label); font-weight: 600; font-size: 1.15rem; }
h4 { font-family: var(--label); font-weight: 600; font-size: 1.05rem; }

p { margin: 0 0 1rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--ivory);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ivory);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

cite { font-style: italic; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow > * { max-width: 44rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* Labels: the cover subtitle's letterspaced amber capitals. */
.eyebrow, .part-label, .cite, .subtitle {
  font-family: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber);
}
.eyebrow { font-size: 0.8rem; margin-bottom: 0.75rem; }

/* The cover's ring ornament between two hairlines. */
.ornament {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 15rem;
  margin: 1.25rem 0;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--amber-dim);
}
.ornament span {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.ornament span::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

/* Header */
.site-header {
  border-bottom: 1px solid rgba(30, 53, 80, 0.7);
  background: var(--night);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-feature-settings: normal;
  color: var(--ivory);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.site-header ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header nav a {
  font-family: var(--label);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--stone);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--ivory); text-decoration: underline; }
.site-header nav a.nav-buy {
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
}
.site-header nav a.nav-buy:hover { background: rgba(233, 174, 85, 0.12); text-decoration: none; }
@media (max-width: 47.99rem) {
  .nav-extra { display: none; }
}
@media (max-width: 29.99rem) {
  .brand { font-size: 0.86rem; white-space: nowrap; }
  .site-header nav a.nav-buy { padding: 0.3rem 0.65rem; font-size: 0.875rem; }
}
@media (max-width: 23rem) {
  .brand { font-size: 0.78rem; letter-spacing: 0; }
}

/* Hero: the cover's navy with a soft blue glow and a sparse star field. */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 6.5rem);
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, rgba(18, 48, 84, 0.55), transparent 70%),
    linear-gradient(180deg, #030b14 0%, var(--night) 50%, var(--page) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--ivory), transparent),
    radial-gradient(1px 1px at 31% 8%, var(--stone), transparent),
    radial-gradient(1px 1px at 47% 27%, var(--ivory), transparent),
    radial-gradient(1.5px 1.5px at 63% 12%, var(--ivory), transparent),
    radial-gradient(1px 1px at 82% 6%, var(--stone), transparent),
    radial-gradient(1px 1px at 92% 31%, var(--ivory), transparent),
    radial-gradient(1px 1px at 7% 62%, var(--stone), transparent),
    radial-gradient(1px 1px at 22% 84%, var(--ivory), transparent),
    radial-gradient(1px 1px at 54% 92%, var(--stone), transparent),
    radial-gradient(1.5px 1.5px at 38% 55%, var(--stone), transparent);
}
.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 7.4vw, 4.25rem);
  line-height: 1.08;
}
.hero .subtitle {
  font-size: clamp(0.8rem, 2.4vw, 0.98rem);
  margin: 1rem 0 0;
  letter-spacing: 0.22em;
}
.hook {
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--ivory);
  max-width: 30ch;
}
.lede { color: var(--stone); max-width: 38rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.75rem 0;
}
@media (max-width: 29.99rem) {
  .actions .button { flex: 1 1 100%; }
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--label);
  font-size: 0.9rem;
  color: var(--soft);
}
.facts li { display: flex; align-items: center; gap: 0.5rem; }
.facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}
.hero-cover { order: -1; justify-self: center; width: min(210px, 56vw); }
.hero-cover img {
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(233, 174, 85, 0.25),
    0 24px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 90px rgba(40, 90, 150, 0.22);
}
@media (min-width: 37.5rem) {
  .hero-cover { width: 300px; }
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 420px; }
  .hero h1 { font-size: clamp(2.6rem, 4.6vw, 4.25rem); }
  .hero-cover { order: 0; width: 420px; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.button.primary { background: var(--amber); color: var(--amber-ink); }
.button.primary:hover { background: #f2c079; }
.button.secondary { color: var(--ivory); border-color: rgba(243, 234, 214, 0.5); background: transparent; }
.button.secondary:hover { border-color: var(--ivory); background: rgba(243, 234, 214, 0.06); }
.button.block { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 0.15s, border-color 0.15s; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.alt {
  background: var(--panel-deep);
  border-top: 1px solid rgba(30, 53, 80, 0.6);
  border-bottom: 1px solid rgba(30, 53, 80, 0.6);
}
.big { font-size: clamp(1.08rem, 2.2vw, 1.2rem); }
.note { color: var(--soft); font-size: 0.95rem; margin-top: 1.5rem; }
.small { font-size: 0.875rem; color: var(--soft); }

/* The four stages */
.stages-title { margin: 2.5rem 0 1.25rem; }
.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.stages li {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 4px;
  padding: 1.25rem 1.25rem 1rem;
}
.stage-n {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--amber);
  border-radius: 50%;
  color: var(--amber);
  font-family: var(--label);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.stages h4 { margin-bottom: 0.4rem; }
.stages p { margin: 0; font-size: 0.97rem; }
@media (max-width: 39.99rem) {
  .stages li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    column-gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-top-width: 1px;
    border-left: 3px solid var(--amber);
  }
  .stage-n { grid-row: span 2; margin: 0; }
}

/* Parts and the checklist */
.parts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.parts li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem;
}
.part-label { font-size: 0.75rem; margin-bottom: 0.4rem; }
.parts h3 {
  font-family: var(--display);
  font-feature-settings: normal;
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}
.parts p:last-child { margin: 0; }
.checklist-title { margin: 2.75rem 0 1rem; }
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.checklist li {
  position: relative;
  padding-left: 1.6rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(233, 174, 85, 0.18);
}

/* Findings */
.findings {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
}
.findings li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.findings .figure {
  font-family: var(--display);
  font-feature-settings: normal;
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 2.8rem);
  line-height: 1;
  color: var(--amber);
  margin-bottom: 0.9rem;
}
.findings .figure span {
  font-family: var(--label);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}
.findings h3 { font-size: 1.12rem; line-height: 1.4; margin-bottom: 0.75rem; }
.findings p { font-size: 0.97rem; }
.findings .cite { font-size: 0.72rem; margin: auto 0 0; padding-top: 0.5rem; }

/* Contents */
.toc { display: grid; gap: 1.25rem; margin-top: 1rem; }
.toc-part {
  display: grid;
  gap: 1rem 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.toc-head h3 {
  font-family: var(--display);
  font-feature-settings: normal;
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}
.toc-head p:last-child { color: var(--soft); font-size: 0.9rem; margin: 0; }
.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: chapter;
  display: grid;
  gap: 0.25rem;
}
.toc-list[start="7"] { counter-reset: chapter 6; }
.toc-list[start="11"] { counter-reset: chapter 10; }
.toc-list li {
  counter-increment: chapter;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(30, 53, 80, 0.55);
}
.toc-list li:last-child { border-bottom: 0; }
.toc-list li::before {
  content: counter(chapter, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--label);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--amber);
  line-height: 1.35;
}
.toc-list h4 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.toc-list p { margin: 0; color: var(--soft); font-size: 0.95rem; }
@media (min-width: 52rem) {
  .toc-part { grid-template-columns: 14rem minmax(0, 1fr); }
}

/* What you get */
.get-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
.formats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.formats li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem;
}
.formats li.wide { grid-column: 1 / -1; }
.formats h3 { margin-bottom: 0.4rem; }
.formats p { margin: 0; font-size: 0.97rem; }
.buy-box {
  background: linear-gradient(180deg, #102440, var(--panel));
  border: 1px solid var(--amber-dim);
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}
.buy-title {
  font-family: var(--display);
  font-feature-settings: normal;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ivory);
  margin-bottom: 0.3rem;
}
.buy-formats { color: var(--soft); font-size: 0.95rem; }
.price {
  margin: 1.25rem 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--ivory);
}
.buy-box .small { margin: 1rem 0 0; }
@media (min-width: 60rem) {
  .get-grid { grid-template-columns: minmax(0, 1fr) 20rem; }
  .buy-box { position: sticky; top: 1.5rem; }
}

/* Sample */
.sample-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.sample-list li {
  border-left: 3px solid var(--amber);
  background: var(--panel);
  border-radius: 0 4px 4px 0;
  padding: 1rem 1.25rem;
}
.sample-list h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.sample-list p { margin: 0; font-size: 0.97rem; }

/* Author */
.author .ornament { margin: 0 0 1.5rem; }
.ring-only { max-width: 9rem; }

/* FAQ */
.faq { display: grid; gap: 0.75rem; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 3rem 1rem 1.25rem;
  position: relative;
  font-family: var(--label);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ivory);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--amber);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding: 0 1.25rem; }
.faq details > p:last-child { padding-bottom: 0.25rem; }

/* Footer */
.site-footer {
  background: var(--night);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--soft);
}
.site-footer p { margin: 0 0 0.5rem; }
.footer-title {
  font-family: var(--display);
  font-feature-settings: normal;
  font-weight: 600;
  color: var(--ivory);
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
