/* ===========================================================================
   pentes.io — /how-it-works/ standalone page styles
   Builds on ../landing-page/styles.css (tokens) and ../landing-page/landing.css
   (typography, .sketch-card, .reveal, .wrap, .btn, .kicker, .step-num).
   All spacing values are multiples of 4 (4px grid).
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Minimal non-sticky nav
   --------------------------------------------------------------------------- */
.hiw-nav {
  border-bottom: 1px solid var(--border);
  position: static; /* explicit override — counters any inherited sticky rule */
}

/* nav-inner flex layout is already declared in landing.css — no override needed */

/* ---------------------------------------------------------------------------
   2. Page header
   --------------------------------------------------------------------------- */
.hiw-header {
  padding-top: clamp(48px, 7vh, 96px);
  padding-bottom: clamp(32px, 5vh, 64px);
}

.hiw-header h1 {
  max-width: 22ch;
  margin: 16px 0 8px;
}

/* ---------------------------------------------------------------------------
   3. Two-column layout: main content + sticky TOC
   --------------------------------------------------------------------------- */
.hiw-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 52px;
  align-items: start;
  padding: clamp(32px, 5vh, 64px) 0 clamp(64px, 9vh, 116px);
}

@media (max-width: 920px) {
  .hiw-layout {
    grid-template-columns: 1fr;
  }
  .hiw-toc-wrapper {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   4. Main content column
   --------------------------------------------------------------------------- */
.hiw-main {
  min-width: 0; /* prevents grid blowout on long content */
}

/* ---------------------------------------------------------------------------
   5. Pillar sections
   --------------------------------------------------------------------------- */
.hiw-pillar {
  padding: clamp(48px, 7vh, 80px) 0;
  border-bottom: 1px solid var(--border);
}

.hiw-pillar:last-child {
  border-bottom: none;
}

.hiw-pillar-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hiw-pillar-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hiw-pillar-copy p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.hiw-pillar-copy code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
  border: 1px solid var(--border);
}

.hiw-pillar-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------------------
   6. Callout block — "What this means in practice"
   --------------------------------------------------------------------------- */
.hiw-callout {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 2px solid var(--accent-line);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.hiw-callout .kicker {
  margin: 0 0 8px;
}

.hiw-callout ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hiw-callout li {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hiw-callout li::before {
  content: "→";
  color: var(--accent-text);
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------------
   7. Sticky right-rail TOC
   --------------------------------------------------------------------------- */
.hiw-toc-wrapper {
  position: relative;
}

.hiw-toc {
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.hiw-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hiw-toc-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 12px;
  border-left: 2px solid transparent;
  transition: color 0.14s, border-color 0.14s;
  text-decoration: none;
}

.hiw-toc-link:hover {
  color: var(--text);
}

.hiw-toc-link.active {
  color: var(--text);
  font-weight: 600;
  border-left: 2px solid var(--accent);
}

.hiw-toc-link:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 4px;
  border-radius: 3px;
}

/* ---------------------------------------------------------------------------
   8. Footer CTA section
   --------------------------------------------------------------------------- */
.hiw-footer-cta {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

/* ---------------------------------------------------------------------------
   9. Standalone-page sketch card override
   No hover lift on pillar cards — they are content containers, not interactive items.
   Keeps the seeded rotation; strips the translateY.
   --------------------------------------------------------------------------- */
.hiw-main .sketch-card:hover {
  transform: rotate(var(--card-rotation, 0deg));
}

/* ---------------------------------------------------------------------------
   10. Standalone-page figcaption hidden
   The pillar H2 + eyebrow perform the naming role — figcaption is redundant here.
   aria-hidden="true" is set in HTML; this rule enforces the visual hide.
   --------------------------------------------------------------------------- */
.hiw-main .sketch-card figcaption {
  display: none;
}
