/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Variables — dark mode first === */
:root {
  --navy:      #1a1a2e;   /* fixed dark surface (CTA, install pill) */
  --amber:     #c8773a;

  --bg:        #0d0d1a;
  --bg-alt:    #111120;
  --heading:   #e8e8f8;
  --body:      #9999bb;
  --muted:     #8888aa;
  --quiet:     #8080a8;   /* bumped for 4.5:1 on dark bg */
  --rule:      #2a2a3e;
  --rule-warm: #2a2a3e;
  --amber-bg:  #1e1208;
  --tag-bg:    #1e1e32;
  --install-bg:#1e1e32;

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #fff;
    --bg-alt:    #f7f5f2;
    --heading:   #1a1a2e;
    --body:      #555;
    --muted:     #666;
    --quiet:     #767676;  /* minimum passing grey for 4.5:1 on white */
    --rule:      #eee;
    --rule-warm: #e2ddd7;
    --amber-bg:  #fdf3ec;
    --tag-bg:    #edeae5;
    --install-bg:#1a1a2e;
  }
}

/* === Base === */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
}

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

/* === Focus styles (WCAG 2.4.7) === */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

h1 { font-size: 46px; font-weight: 800; }
h2 { font-size: 34px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }

p {
  font-family: var(--font-body);
  line-height: 1.65;
}

/* === Layout === */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 48px;
}

section {
  padding: 72px 0;
}

section.off-white {
  background: var(--bg-alt);
}

section.dark {
  background: var(--navy);
}

/* === Section label (small amber tag above heading) === */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

/* === Badge (hero pill) === */
.badge {
  display: inline-block;
  background: var(--amber-bg);
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
}

/* === Numbered list (shared by Problem + Methodology sections) === */
.numbered-list {
  display: flex;
  flex-direction: column;
}

.numbered-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.numbered-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.numbered-item.warm {
  border-top-color: var(--rule-warm);
}

.numbered-item.warm:last-child {
  border-bottom-color: var(--rule-warm);
}

.item-number {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  padding-top: 3px;
}

.item-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 6px;
}

.item-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.item-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--quiet);
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

/* === Section intro text === */
.section-intro {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 56px;
}

.section-intro--spaced {
  margin-top: 24px;
}

/* === Principles (inside methodology) === */
.principles {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule-warm);
}

.principles-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 28px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.principle-link,
.item-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.principle-link:hover,
.item-link:hover {
  color: var(--heading);
}

.item-link {
  display: block;
  width: fit-content;
}

@media (max-width: 640px) {
  .principles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* === Nav === */
.site-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--body);
}

.nav-links a {
  color: var(--body);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--heading);
}

.nav-cta {
  color: var(--amber) !important;
  font-weight: 600;
}

.nav-home {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--quiet);
  transition: color 0.15s;
}

.nav-home:hover {
  color: var(--heading);
}

@media (max-width: 640px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .nav-links {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* === Hero === */
.hero {
  padding: 80px 0 72px;
}

.hero-brand {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--quiet);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-brand span {
  color: var(--amber);
}

.hero-headline {
  font-size: 66px;
  margin-bottom: 22px;
}

.hero-headline .accent {
  color: var(--amber);
}

.hero-subtext {
  font-size: 17px;
  color: var(--body);
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.install-cmd {
  background: var(--install-bg);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--quiet);
  padding: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--amber);
}

.copy-btn.copied {
  color: #5a9e6f;
}

.copy-btn.copied .copy-label {
  visibility: hidden;
  position: relative;
}

.copy-btn.copied .copy-label::before {
  content: 'Copied!';
  visibility: visible;
  position: absolute;
  left: 0;
  top: 0;
}

/* Copy button on dark CTA background */
.copy-btn--dark {
  color: #9999bb;
}

.copy-btn--dark:hover {
  color: #9999bb;
}

.copy-btn--dark.copied {
  color: #5a9e6f;
}

.learn-link {
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.learn-link:hover {
  text-decoration: underline;
}

/* === Council === */
.council-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.council-member {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.council-member:nth-child(odd) {
  padding-right: 40px;
}

.council-member:nth-child(even) {
  padding-left: 40px;
  border-left: 1px solid var(--rule);
}

.council-member--full {
  grid-column: 1 / -1;
  padding-right: 0;
  border-bottom: 1px solid var(--rule);
}

.council-member--full:nth-child(odd) {
  padding-right: 0;
}

@media (max-width: 640px) {
  .council-grid {
    grid-template-columns: 1fr;
  }
  .council-member:nth-child(odd),
  .council-member:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: none;
  }
}

.member-number {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  padding-top: 2px;
}

.member-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 2px;
}

.member-role {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 8px;
}

/* === CTA section === */
.dark h2,
.dark p,
.dark a {
  color: #fff;
}

.cta-heading {
  color: #fff;
  max-width: 520px;
  margin-bottom: 16px;
}

.cta-subtext {
  color: #9999bb;
  max-width: 480px;
  font-size: 16px;
  margin-bottom: 36px;
}

.cta-install {
  background: #111122;
  border-radius: 6px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.cta-cmd {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}

.cta-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.cta-links a {
  font-family: var(--font-body);
  font-size: 14px;
  color: #9999bb;
  font-weight: 500;
  transition: color 0.15s;
}

.cta-links a:hover {
  color: #fff;
}

.cta-divider {
  border: none;
  border-top: 1px solid #2a2a44;
  margin-bottom: 28px;
}

.cta-attribution {
  font-family: var(--font-body);
  font-size: 12px;
  color: #8888aa;
  line-height: 1.7;
}

.cta-attribution a {
  color: #8888aa;
  text-decoration: underline;
}

.cta-attribution a:hover {
  color: #aaaacc;
}

/* === Commands === */
.commands-list {
  display: flex;
  flex-direction: column;
}

.command-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--rule-warm);
}

.command-item:last-child {
  border-bottom: 1px solid var(--rule-warm);
}

.cmd-name {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  background: var(--tag-bg);
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.cmd-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  padding-top: 4px;
}

.cmd-example {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--quiet);
  font-style: italic;
  margin-top: 6px;
  line-height: 1.5;
}

.cmd-tools {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
}

@media (max-width: 640px) {
  .command-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.no-cli-note {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--quiet);
  margin-top: 28px;
  line-height: 1.6;
}

.no-cli-note a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.no-cli-note a:hover {
  color: var(--heading);
}

/* === Canon (UX intellectual foundation) === */
.canon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 40px;
}

.canon-item {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.canon-item:nth-child(odd) {
  padding-right: 40px;
}

.canon-item:nth-child(even) {
  padding-left: 40px;
  border-left: 1px solid var(--rule);
}

.canon-author {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.canon-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

.canon-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.canon-cta {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}

.canon-cta a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.canon-cta a:hover {
  color: var(--heading);
}

@media (max-width: 640px) {
  .canon-grid {
    grid-template-columns: 1fr;
  }
  .canon-item:nth-child(odd),
  .canon-item:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: none;
  }
  .canon-item:last-child {
    border-bottom: 1px solid var(--rule);
  }
}
