/* ============================================================
   Forgedown — page layout: nav, sections, footer, legal pages
   ============================================================ */

/* No overflow clipping here: any non-visible overflow on an ancestor
   stops the sticky nav from sticking. The decorative glows clip
   themselves instead (.aurora, .free-card) or are sized to the viewport. */
.page { position: relative; }
.page > .wrap { position: relative; z-index: 1; }

/* --- Nav ------------------------------------------------------ */
.site-header { padding-top: var(--s-5); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  max-width: 900px;
  margin-inline: auto;
  padding: 10px 12px 10px 20px;
  border-radius: var(--r-pill);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur-2)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-2)) saturate(150%);
  box-shadow: inset 0 1px 0 var(--hi);
  position: sticky;
  top: 16px;
  z-index: 50;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: var(--s-3); }

/* --- Sections -------------------------------------------------- */
.section { padding-top: var(--s-10); scroll-margin-top: 90px; }
.section--center { text-align: center; }
.section--narrow { max-width: 720px; margin-inline: auto; }

.section__head { margin-bottom: var(--s-7); }
.section__head .h2 { margin-top: var(--s-3); max-width: 22ch; }
.section--center .section__head .h2 { margin-inline: auto; }

/* --- Hero ------------------------------------------------------ */
.hero { text-align: center; padding-top: var(--s-9); }

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.hero__pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--ember);
  box-shadow: 0 0 8px rgba(255, 138, 61, .8);
}

.hero .display { margin: var(--s-5) auto 0; max-width: 15ch; }
.hero__sub { margin: 22px auto 0; max-width: 58ch; }
.hero__sub code { font-family: var(--mono); font-size: 17px; color: var(--text); }
.hero .badges { margin-top: var(--s-6); }

/* --- Feature grid ---------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-4);
}

.feature {
  padding: var(--s-5);
  border-radius: var(--r-card);
}
.feature__tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ember);
  margin-bottom: var(--s-3);
}
.feature__title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.feature__body { font-size: 14.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* --- Showcase: wide card, copy one side, screenshot the other -- */
.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-6);
  align-items: center;
  padding: var(--s-6);
  border-radius: var(--r-card-lg);
  margin-top: var(--s-4);
}
.showcase--flip .showcase__media { order: -1; }
/* No screenshot: keep the copy at a readable measure rather than
   letting it stretch the full card width. */
.showcase--text { display: block; }
.showcase--text .showcase__title,
.showcase--text .showcase__body { max-width: 62ch; }
.showcase__title { font-size: 20px; font-weight: 600; margin-bottom: var(--s-2); }
.showcase__body { font-size: 15px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.showcase__body code { font-family: var(--mono); font-size: 13.5px; color: var(--text); }

/* --- Actually free -------------------------------------------- */
.free-card {
  max-width: 620px;
  margin-inline: auto;
  padding: var(--s-7) var(--s-6);
  border-radius: var(--r-card-lg);
  background: var(--glass-2);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(var(--blur-2)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-2)) saturate(150%);
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--hi);
  position: relative;
  overflow: hidden;
}
.free-card__glow {
  position: absolute;
  left: 50%;
  bottom: -180px;
  width: 480px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 94, 44, .22), transparent 75%);
  filter: blur(30px);
  pointer-events: none;
}
.free-card__inner { position: relative; }
.free-card__figure {
  font-size: clamp(56px, 8vw, 84px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  background: var(--ember-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.free-card .h2 { margin-top: var(--s-3); }
.free-card__body { margin: var(--s-3) auto 0; max-width: 44ch; }
.free-card .chips { margin-top: var(--s-5); }
.free-card .badges { margin-top: var(--s-6); }

.why-free {
  font-size: 14px;
  line-height: 1.6;
  color: var(--faint);
  max-width: 52ch;
  margin: 20px auto 0;
  text-wrap: pretty;
}

/* --- Privacy split --------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-7);
  align-items: center;
}
.split .h2 { max-width: 20ch; text-wrap: balance; }
.split__body { margin-top: var(--s-4); max-width: 50ch; }

.label-card {
  padding: var(--s-6);
  border-radius: var(--r-card);
  max-width: 380px;
  justify-self: center;
  width: 100%;
}
.label-card__head { font-size: 14px; font-weight: 600; color: var(--muted); }
.label-card__row { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.label-card__tick {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--ember);
  flex-shrink: 0;
}
.label-card__tick svg { width: 20px; height: 20px; }
.label-card__title { font-size: 16px; font-weight: 600; }
.label-card__sub { font-size: 13px; color: var(--faint); line-height: 1.45; }
.label-card__rule { height: 1px; background: var(--border); margin: var(--s-4) 0; }
.label-card__list {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  line-height: 1.9;
  margin: 0;
}
.label-card__list dt { display: inline; }
.label-card__list dd { display: inline; margin: 0; }
.label-card__list div + div { display: block; }

/* --- Final CTA -------------------------------------------------- */
.final-cta { position: relative; padding-bottom: var(--s-10); }
.final-cta__glow {
  position: absolute;
  left: 50%;
  bottom: -240px;
  width: min(900px, 94vw);
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 94, 44, .2), transparent 75%);
  filter: blur(var(--blur-3));
  pointer-events: none;
}
.final-cta > * { position: relative; }
.final-cta .h2 { font-size: clamp(32px, 4.5vw, 46px); max-width: 18ch; margin-inline: auto; text-wrap: balance; }

/* --- Footer ------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--s-9);
  padding: var(--s-6) 0 var(--s-7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: var(--s-3); }
.site-footer__brand svg { width: 22px; height: 22px; }
.site-footer__brand span { font-size: 14px; color: var(--muted); }
.site-footer__links { display: flex; gap: 20px; font-size: 14px; }
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__legal {
  width: 100%;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
}

/* --- Legal / support pages --------------------------------------- */
.legal { max-width: 680px; margin-inline: auto; }
.legal h1 { margin-bottom: var(--s-2); }
.legal__meta { color: var(--faint); font-size: 14px; margin-bottom: var(--s-6); }
.legal h2 { font-size: 24px; margin: var(--s-6) 0 var(--s-3); }
.legal p, .legal li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: var(--s-4); }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: var(--s-2); }
.legal strong { color: var(--text); }
.legal a { color: var(--hot); }
.legal a:hover { text-decoration: underline; }
.legal code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text);
  word-break: break-word;
}
.legal pre {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  padding: var(--s-4);
  overflow-x: auto;
  color: var(--text);
  margin: var(--s-4) 0 0;
}
.legal pre code { background: none; border: 0; padding: 0; }

/* One narrow column for the whole page — wordmark, article and footer
   all share the same measure, as the design has it. Keeps .wrap's
   inline padding so the column still breathes on small screens. */
.legal-page {
  max-width: 728px;
  padding-block: var(--s-6) var(--s-9);
}
.legal-page .site-footer { margin-top: var(--s-9); }

.callout {
  padding: var(--s-5);
  border-radius: 18px;
  margin-top: var(--s-6);
}
.callout__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: var(--s-3);
}
.callout__title { font-size: 17px; font-weight: 600; }
.callout p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin-top: var(--s-3); text-wrap: pretty; }

/* --- Scroll reveal -------------------------------------------------
   Gated on .js (set by the inline head script) so that with JavaScript
   disabled the content is simply visible rather than permanently hidden. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* --- Responsive --------------------------------------------------- */
@media (max-width: 860px) {
  .nav { padding-left: 16px; }
  .nav__links { display: none; }
  .section { padding-top: var(--s-9); }
  .showcase--flip .showcase__media { order: 0; }
}

@media (max-width: 520px) {
  .wrap { padding-inline: var(--s-4); }
  .badge { padding: 10px 16px; }
  .site-footer { justify-content: center; text-align: center; }
  .site-footer__links { justify-content: center; flex-wrap: wrap; }
}
