.section {
  padding-block: var(--space-section);
}

.section--beige {
  background: var(--beige);
}

.section--dark {
  background: var(--charcoal);
  color: #efebe3;
}

.section--dark h2,
.section--dark h3,
.section--dark a {
  color: var(--white);
}

.section--dark .kicker,
.hero-board .kicker {
  color: #d9bd6e;
}

.section--dark .depth {
  color: #efebe3;
}

.section--dark .callout .kicker {
  color: #71550d;
}

.section--dark .card,
.section--dark .callout,
.section--dark .next {
  color: var(--ink);
}

.section--dark .card h3,
.section--dark .callout h2 {
  color: var(--charcoal);
}

.intro {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.zig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.zig--flip .zig-copy {
  order: 2;
}

.type-panel {
  position: relative;
  min-height: 22rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.type-panel::after {
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  color: #eee6d8;
  content: attr(data-mark);
  font-family: var(--serif);
  font-size: 13rem;
  font-weight: 700;
  line-height: 1;
}

.type-panel > * {
  position: relative;
  z-index: 1;
}

.type-panel--gold {
  background: #e7d7aa;
}

.type-panel--ink {
  background: var(--charcoal);
  color: var(--white);
}

.type-panel--ink h2,
.type-panel--ink h3 {
  color: var(--white);
}

.type-panel .big {
  max-width: 10ch;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.page-hero {
  padding-block: clamp(4rem, 9vw, 7rem);
  background: var(--beige);
  border-bottom: 1px solid #d4c9b9;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
}

.page-hero .lead {
  max-width: 60ch;
  font-size: 1.125rem;
}

.summary-note {
  padding: 1.5rem;
  border-top: 3px solid var(--gold-line);
  border-radius: 0 0 8px 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.compare-layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid #c9c1b6;
  border-radius: 16px;
  background: var(--beige);
}

.filter-panel a {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  border-bottom: 1px solid #d3c8b7;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.listing {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid #c9c1b6;
  border-top: 2px solid var(--gold-line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.listing .where {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
}

.listing .where::before {
  color: #71550d;
  content: "◇";
}

.listing .features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.listing .features li {
  padding: 0.25rem 0.55rem;
  border: 1px solid #bdb5aa;
  border-radius: 999px;
  background: var(--paper);
  font-size: 1rem;
}

.listing .button {
  margin-top: auto;
}

.steps {
  counter-reset: guide-step;
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: guide-step;
  display: grid;
  max-width: none;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid #c9c1b6;
  border-radius: 8px;
  background: var(--white);
}

.steps li::before {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--white);
  content: counter(guide-step);
  font-family: var(--mono);
  font-size: 1.25rem;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.definition-grid div {
  padding: 1.25rem;
  border-left: 2px solid var(--gold-line);
  background: var(--white);
}

.callout {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: #fbf7ec;
}

.next {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #aaa298;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.next::after {
  content: "→";
  color: #71550d;
  font-size: 1.5rem;
}

.error-page {
  display: grid;
  min-height: calc(100vh - 4.75rem);
  place-items: center;
  padding-block: 4rem;
}

.error-box {
  max-width: 42rem;
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--gold-line);
  border-radius: 24px;
  background: var(--beige);
  text-align: center;
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .page-hero-grid > *,
  .card,
  .listing {
    animation: rise-in 420ms both;
  }

  .card:nth-child(2),
  .listing:nth-child(2) {
    animation-delay: 80ms;
  }

  .card:nth-child(3),
  .listing:nth-child(3) {
    animation-delay: 160ms;
  }

  .card:nth-child(4),
  .listing:nth-child(4) {
    animation-delay: 240ms;
  }
}

@media (max-width: 47.99rem) {
  .zig,
  .page-hero-grid,
  .compare-layout,
  .listing-grid,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .zig--flip .zig-copy {
    order: initial;
  }

  .filter-panel {
    position: static;
  }

  .type-panel {
    min-height: 18rem;
  }

  .steps li {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  .steps li::before {
    width: 2.75rem;
    height: 2.75rem;
  }
}
