/* ============================================================
   Long-form pages (system.html, stack.html).
   Editorial reading layout. Optimized for legibility and AEO.
   ============================================================ */

.longform-main {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 32px) clamp(60px, 8vw, 120px);
  position: relative;
  z-index: 2;
}

.longform {
  color: var(--cream);
}

.longform-hero {
  margin-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}
.longform-hero .longform-eyebrow,
.longform-hero p.longform-eyebrow {
  text-align: center;
}
.longform-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 7vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 14px auto 22px;
  background: linear-gradient(90deg, var(--cream), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 18ch;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
@media (max-width: 420px) {
  .longform-h1 { font-size: clamp(26px, 8vw, 34px); }
}
.longform-lede {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  color: rgba(250, 248, 243, 0.88);
  margin: 0 auto;
  max-width: 56ch;
}

.longform-section {
  margin: clamp(40px, 5vw, 64px) 0;
}
.longform-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: 0.002em;
  margin: 0 0 20px;
  color: var(--cream);
}
.longform-h2-sub {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.3;
  color: rgba(250, 248, 243, 0.65);
  letter-spacing: 0;
  margin-top: 8px;
}
.longform p {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.65;
  color: rgba(250, 248, 243, 0.82);
  margin: 0 0 18px;
  max-width: 64ch;
}
.longform p strong {
  color: var(--cream);
  font-weight: 600;
}

.longform-pullquote {
  margin: clamp(48px, 7vw, 80px) 0;
  padding: clamp(28px, 4vw, 40px) 0;
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  text-align: center;
}
.pullquote p {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  margin: 0 auto;
  max-width: 22ch;
  background: linear-gradient(90deg, var(--cream), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.longform-next {
  margin-top: clamp(64px, 8vw, 96px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}
.longform-next-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.longform-next-list li {
  margin: 0;
}
.longform-next-list a {
  display: block;
  padding: 18px 22px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 6px;
  color: rgba(250, 248, 243, 0.85);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  transition:
    border-color 240ms var(--ease),
    background 240ms var(--ease),
    color 240ms var(--ease),
    transform 240ms var(--ease);
}
.longform-next-list a:hover {
  border-color: var(--flare);
  background: rgba(255, 82, 107, 0.04);
  color: var(--cream);
  transform: translateY(-1px);
}
.longform-next-list strong {
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  margin-right: 6px;
}

@media (max-width: 560px) {
  .longform-main { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .longform-next-list a { transition: none; }
}
