/* SelfLaw marketing site. Loads after tokens.css and components.css.
   Only site layout lives here; buttons, doors, receipts, forms and the
   pleading paper come from components.css. */

@layer components {
  .site-wrap { max-width: var(--page-max); margin-inline: auto; padding: clamp(40px, 6vw, 80px) var(--page-gutter); }
  .site-section { border-top: var(--rule-ink); }
  .site-lede { margin: 0; max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; color: var(--text-secondary); }

  /* Header and footer */
  .site-header { border-bottom: var(--rule-ink); }
  .site-header__in { max-width: var(--page-max); margin-inline: auto; padding: 12px var(--page-gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; }
  .site-header .ps-wordmark { font-size: 1.75rem; }
  .site-hide { background: var(--border-ink); color: var(--bg-canvas); }
  .site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: 1rem; font-weight: 600; }
  .site-nav a { padding: 11px 0; text-decoration: none; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
  @media (max-width: 767px) {
    /* Phone: logo and actions on one row, the links in a single swipeable row below. */
    .site-header .site-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 22px; margin-inline: calc(var(--page-gutter) * -1); padding-inline: var(--page-gutter); }
  }
  .site-footer__in { max-width: var(--page-max); margin-inline: auto; padding: 28px var(--page-gutter) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px; }
  .site-footer .ps-help { max-width: 40em; font-size: 0.875rem; }

  /* Hero */
  .site-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px; padding-top: clamp(32px, 5vw, 72px); }
  .site-hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
  .site-hero__mark { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
  .site-hero__doors { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
  .site-hero__paper { flex: 0 1 430px; min-width: 0; margin-inline: auto; transform: rotate(2deg); font-size: 0.875rem; }
  .site-hero__paper .ps-pleading__lines { width: 34px; padding-block: 18px; }
  .site-hero__paper .ps-pleading__body { padding-block: 18px; }
  .site-hero__paper .ps-pleading__stamp-box { width: 112px; height: 100px; top: 14px; right: 10px; }

  /* Five steps */
  .site-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 28px 20px; }
  .site-steps li { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 6px solid var(--accent-primary); }
  .site-steps .ps-numeral { font-size: 4.5rem; line-height: 0.95; color: var(--accent-primary); }
  .site-steps p { margin: 0; font-size: 1rem; color: var(--text-secondary); }
  .site-aside { margin: 0; max-width: 34em; font-size: clamp(1.1875rem, 1.7vw, 1.5rem); line-height: 1.4; font-weight: 600; }

  /* Both sides of the "v." */
  .site-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 10px; padding-top: 0; }
  .site-side { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 3vw, 36px); border-radius: var(--radius-md); background: #1B4332; color: #FFFFFF; }
  .site-side--ink { background: #181715; }
  .site-side h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.875rem, 3.4vw, 2.875rem); line-height: 1; font-weight: 900; letter-spacing: -0.035em; }
  .site-side ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 1.1875rem; font-weight: 600; }
  .site-side li { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.32); }
  .site-side .ps-mono { opacity: 0.8; font-size: 0.875rem; letter-spacing: var(--tracking-mono-caps); }

  /* Feature trio */
  .site-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
  .site-feature { display: flex; flex-direction: column; gap: 14px; }
  .site-feature > p { margin: 0; font-size: 1rem; color: var(--text-secondary); }
  .site-feature__demo { min-height: 228px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; background: var(--bg-surface); border: var(--rule-ink); border-radius: var(--radius-md); }
  .site-feature__demo .ps-receipt { font-size: 0.875rem; }
  .site-feature__demo--night { background: var(--bg-canvas); color: var(--text-primary); }
  .site-feature__demo--night .ps-cue__say { font-size: var(--text-podium); line-height: 1.2; }

  /* Guides and big doors */
  .site-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 10px; }
  .site-doors .ps-door { min-height: 230px; padding: 18px 20px 20px; }
  .site-doors .ps-door::after { border-top-width: 32px; border-left-width: 32px; }
  .site-doors .ps-door__title { max-width: 9em; font-size: clamp(2.125rem, 3.6vw, 3.125rem); line-height: 0.94; font-weight: 900; letter-spacing: -0.04em; }
  .site-doors__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
  .site-doors__go { font-size: 1.0625rem; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
  .site-split-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 48px; }

  /* Privacy band (wrap in data-theme="night") */
  .site-privacy { background: var(--bg-canvas); color: var(--text-primary); }
  .site-privacy__in { display: flex; flex-wrap: wrap; gap: 36px 64px; }
  .site-privacy h2 { flex: 1 1 380px; }
  .site-privacy dl { margin: 0; flex: 1 1 420px; }
  .site-privacy dl > div { display: flex; gap: 20px; padding: 16px 0; border-top: 1px solid var(--border-strong); }
  .site-privacy dt { flex: 0 0 132px; padding-top: 3px; font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; color: var(--status-verified-fg); }
  .site-privacy dd { margin: 0; color: var(--text-secondary); }

  /* Closing call to action */
  .site-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: clamp(48px, 7vw, 104px); }
  .site-cta .ps-btn { min-height: 60px; padding-inline: 22px; font-size: 1.3125rem; gap: 28px; }

  /* Guide capture pages */
  .guide-hero { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; padding-top: clamp(28px, 4vw, 56px); }
  .guide-hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .guide-hero h1 { font-size: clamp(3rem, 7.6vw, 6.75rem); line-height: 0.9; letter-spacing: -0.05em; }
  @media (max-width: 767px) {
    /* Phone: the form comes right after the intro, before the chapter list. */
    .guide-hero { flex-direction: column; gap: 20px; }
    .guide-hero__copy { display: contents; }
    .guide-capture { order: 2; width: 100%; margin-block: 12px; }
    .guide-chapters { order: 3; }
  }
  .guide-chapters { width: 100%; font-size: 1.125rem; font-weight: 600; }
  .guide-chapters > li { gap: 16px; }
  .guide-capture { flex: 0 1 440px; min-width: 0; margin-inline: auto; display: flex; flex-direction: column; }
  .guide-capture .ps-guide-cover > div:last-child { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; }
  .guide-cover__lines { flex: none; width: 30px; padding: 10px 6px 0 0; border-right: 3px double rgba(255, 255, 255, 0.4); text-align: right; font-family: var(--font-mono); font-size: 0.75rem; line-height: 23px; opacity: 0.8; }
  .guide-cover__title { font-family: var(--font-display); font-size: 2.75rem; line-height: 0.92; font-weight: 900; letter-spacing: -0.045em; }
  .guide-capture .ps-capture { border-top: 0; }
  .guide-capture .ps-capture h2 { font-size: 1.625rem; }
  .guide-capture .ps-field label span { font-weight: 400; color: var(--text-secondary); }
  .guide-urgent { margin: 14px 0 0; padding: 12px 14px; background: var(--status-attention-bg); color: var(--status-attention-fg); font-size: 0.9375rem; line-height: 1.4; }
  .guide-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px 40px; }
  .guide-faq h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.625rem; line-height: 1.08; font-weight: 800; letter-spacing: -0.025em; }
  .guide-faq p { margin: 0; color: var(--text-secondary); }
  .guide-more { display: flex; flex-wrap: wrap; gap: 28px 64px; }
  .guide-more h2 { flex: 1 1 320px; }
  .guide-more ul { flex: 2 1 480px; margin: 0; padding: 0; list-style: none; border-top: var(--rule-ink); font-size: 1.1875rem; font-weight: 600; }
  .guide-more li { border-bottom: var(--rule-hairline); }
  .guide-more li > * { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; text-decoration: none; }
  .guide-more li > span { color: var(--text-muted); font-weight: 500; }
  .guide-more a:hover { text-decoration: underline; }
}
