/* PageForge case-study layout — consumes the homepage V4 tokens. */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 12px 24px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: min(calc(100% - 96px), var(--content-max));
  margin-inline: auto;
}

.campaign-bar {
  min-height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 24px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.campaign-bar strong {
  color: #fff;
}

.campaign-bar span {
  color: var(--accent);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-cta {
  padding: 9px 20px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: rgba(17, 16, 8, 0.82);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.2s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-orange);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: none;
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--border-hover);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 48px 88px;
  background: var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--accent-border);
  border-radius: 9999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

.hero h1 {
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: var(--hero-h1);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

.hero-sub {
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.4vw + 0.85rem, 1.125rem);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-friction {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--text-xmuted);
  font-size: 0.8125rem;
}

.hero-friction::before {
  content: '✓';
  flex: 0 0 auto;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-friction strong {
  color: var(--text-muted);
}

.ledger {
  overflow: hidden;
  align-self: start;
  margin-top: 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.ledger-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.ledger-kicker {
  color: var(--accent);
  font-size: var(--overline);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ledger-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-light);
}

.ledger h2 {
  padding: 30px 24px 24px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ledger-rows {
  border-top: 1px solid var(--border);
}

.ledger-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.ledger-row span:first-child {
  color: var(--text-xmuted);
}

.ledger-row span:last-child {
  color: var(--text);
  font-weight: 600;
}

.ledger-stamp {
  display: inline-flex;
  margin: 20px 24px 24px;
  padding: 7px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fact-strip {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.fact {
  padding: 26px 28px;
  border-right: 1px solid var(--border);
}

.fact:last-child {
  border-right: 0;
}

.fact strong {
  display: block;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fact span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.section {
  padding: var(--section-pad) 0;
  background: var(--bg);
}

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

.section.dark {
  background: var(--ink);
  color: #fff;
}

.section-label {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: var(--overline);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section h2 {
  max-width: 790px;
  margin-bottom: 20px;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: var(--section-h2);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-lead {
  max-width: 740px;
  color: var(--text-muted);
  font-size: var(--body);
  line-height: 1.7;
}

.dark .section-label {
  color: var(--accent);
}

.dark h2 {
  color: #fff;
}

.dark .section-lead {
  color: rgba(255, 255, 255, 0.62);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 72px;
}

.plain-list {
  margin: 30px 0;
  list-style: none;
}

.plain-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.plain-list li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.6875rem;
  font-weight: 700;
}

.exchange {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.exchange-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.exchange-card.receive {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.exchange-card.contribute {
  border-color: var(--accent-border);
  background: var(--accent-light);
}

.exchange-tag {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.exchange-card h3 {
  margin-bottom: 8px;
  color: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.exchange-card p {
  color: inherit;
  font-size: 0.875rem;
  opacity: 0.7;
}

.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.fit-card,
.project-card,
.term-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-xs);
}

.fit-card {
  padding: 28px;
}

.fit-card.no {
  background: var(--surface);
}

.fit-card h3,
.term-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.fit-card ul {
  margin-top: 20px;
  list-style: none;
}

.fit-card li {
  position: relative;
  padding: 11px 0 11px 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.fit-card li::before {
  position: absolute;
  top: 11px;
  left: 0;
  font-weight: 700;
}

.fit-card.yes li::before {
  content: '✓';
  color: var(--success);
}

.fit-card.no li::before {
  content: '×';
  color: var(--danger);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.project-card {
  min-height: 210px;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.25s var(--spring), transform 0.25s var(--spring);
}

.project-card:nth-child(4),
.project-card:nth-child(5) {
  grid-column: span 3;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-num {
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.project-card h3 {
  margin: 32px 0 10px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.scope-note {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.scope-note strong {
  color: var(--text);
}

.steps {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

.step {
  min-height: 265px;
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.step:last-child {
  border-right: 0;
}

.step-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
}

.step h3 {
  margin: 62px 0 12px;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8125rem;
}

.terms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.term-card {
  padding: 28px;
  border-top: 4px solid var(--accent);
}

.term-card.choice {
  border-top-color: var(--success);
}

.term-card p {
  margin-top: 10px;
  color: var(--text-muted);
}

.term-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.term-card li {
  margin: 8px 0;
}

.permission {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 12px;
  background: var(--success-light);
}

.permission-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--success);
  color: #fff;
  font-weight: 700;
}

.permission h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.permission p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.boundary {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.boundary-col {
  padding: 28px;
  background: var(--bg);
}

.boundary-col + .boundary-col {
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.boundary h3 {
  margin-bottom: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.boundary p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.faq {
  max-width: 900px;
  margin: 40px auto 0;
  border-top: 1px solid var(--border);
}

details {
  border-bottom: 1px solid var(--border);
}

summary {
  position: relative;
  padding: 21px 44px 21px 0;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  top: 18px;
  right: 4px;
  color: var(--accent);
  font-size: 1.35rem;
}

details[open] summary::after {
  content: '−';
}

.answer {
  padding: 0 52px 22px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.final {
  padding: var(--section-pad) 48px;
  background: var(--ink);
  color: #fff;
}

.final-inner {
  max-width: 820px;
  text-align: center;
}

.final h2 {
  margin-bottom: 18px;
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: var(--section-h2);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.final p {
  max-width: 650px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.62);
}

.final small {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.48);
}

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer a:hover {
  color: var(--text);
}

@media (max-width: 940px) {
  .nav-links {
    display: none;
  }

  .hero-inner,
  .two-col {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .ledger {
    width: min(100%, 620px);
    margin-top: 0;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .fact:nth-child(2) {
    border-right: 0;
  }

  .fact:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .project-card {
    grid-column: span 3;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .step:nth-child(2) {
    border-right: 0;
  }

  .step:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .terms-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(calc(100% - 48px), var(--content-max));
  }

  .campaign-bar {
    gap: 5px;
    padding-inline: 14px;
    font-size: 0.6875rem;
  }

  .nav {
    padding: 12px 14px;
  }

  .nav-inner {
    gap: 12px;
  }

  .nav-logo {
    flex: 0 0 auto;
    font-size: 1rem;
  }

  .nav-logo-mark {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .nav-cta {
    max-width: 174px;
    padding: 9px 12px;
    font-size: 0.75rem;
    line-height: 1.25;
  }

  .hero {
    padding: 64px 24px 56px;
  }

  .hero h1 {
    font-size: var(--hero-h1);
  }

  .hero-ctas {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-outline,
  .section .btn-primary {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .ledger-row {
    grid-template-columns: 94px 1fr;
    gap: 10px;
  }

  .facts,
  .fit-grid,
  .project-grid,
  .steps,
  .boundary {
    grid-template-columns: 1fr;
  }

  .fact {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 72px 0;
  }

  .project-card,
  .project-card:nth-child(4),
  .project-card:nth-child(5) {
    min-height: 0;
    grid-column: 1;
  }

  .step {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .step h3 {
    margin-top: 36px;
  }

  .boundary-col + .boundary-col {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .permission {
    grid-template-columns: 1fr;
  }

  .final {
    padding: 72px 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
