/* home.css — homepage redesign (staging review build, 2026-11-19).
   Loaded only on the homepage (header.ejs, when the / route sets
   homeChrome). Every rule is scoped to .hp / .hp-header so no other
   page is affected. Brand palette tokens (the one-day teal set was retired 2026-11-19):
   bg #FAF6EE, surface #FFFDF8, ink #1E2A44, muted #5B6B82,
   action #0B1220, hover #24365C, soft #FDF3E0, border #E7DDC9,
   correct #15803D, incorrect #B91C1C. Inter for body/UI.
   Follow-up pass (2026-11-19): trust strip under the hero, free
   account consolidated into one card, and a de-AI pass — Fraunces
   headlines (the site-wide serif; @font-face lives in style.css and
   header.ejs already preloads the file), no scroll-reveal, cards
   only where they mean something, and a deliberately varied
   section rhythm.
   Layout pass (2026-11-20, staging): hero grouped as one
   composition, demo caption moved inside the preview card, compact
   product type inside the card, tighter sections, FAQ as open
   divider rows. Structure, spacing and type only — no copy changes. */

.hp, .hp-header {
  --hp-bg: #FAF6EE;
  --hp-surface: #FFFDF8;
  --hp-ink: #1E2A44;
  --hp-muted: #5B6B82;
  --hp-action: #0B1220;
  --hp-action-hover: #24365C;
  --hp-soft: #FDF3E0;
  --hp-line: #E7DDC9;
  --hp-correct: #15803D;
  --hp-correct-bg: #DCFCE7;
  --hp-wrong: #B91C1C;
  --hp-wrong-bg: #FEE2E2;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body:has(.hp) { background: #FAF6EE; }
main.container:has(.hp) {
  max-width: 1120px;
  padding: 0 2rem 4rem;
  background: #FAF6EE;
}
@media (max-width: 760px) {
  main.container:has(.hp) { padding: 0 1.25rem 3rem; }
}

.hp { color: var(--hp-ink); }
.hp h1, .hp h2, .hp h3 { color: var(--hp-ink); }
.hp h3 {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0;
}
.hp h1, .hp h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}
.hp h2 { font-size: 33px; line-height: 37px; font-weight: 600; margin: 0 0 .75rem; }
.hp h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.hp p { font-size: 18px; line-height: 29px; }
.hp a:not(.hp-btn) { color: var(--hp-action); }
.hp a:not(.hp-btn):hover { color: var(--hp-action-hover); }
.hp :focus-visible, .hp-header :focus-visible {
  outline: 3px solid var(--hp-action);
  outline-offset: 2px;
}
.hp section[id] { scroll-margin-top: 96px; }
/* De-AI pass: no scroll-reveal on the homepage. Sections are simply
   there when the page loads — neutralize the global .js-reveal
   styling (style.css / reveal.js) for anything inside .hp. */
.hp .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.hp .muted { color: var(--hp-muted); }
.hp .small { font-size: 14px; line-height: 20px; }

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hp .hp-btn-primary, .hp-header .hp-btn-primary {
  background: var(--hp-action);
  color: #FFFFFF;
}
.hp .hp-btn-primary:hover, .hp-header .hp-btn-primary:hover {
  background: var(--hp-action-hover);
  color: #FFFFFF;
}
.hp .hp-btn-secondary {
  background: var(--hp-surface);
  border-color: var(--hp-line);
  color: var(--hp-ink);
}
.hp .hp-btn-secondary:hover { border-color: var(--hp-action); color: var(--hp-ink); }
.hp-btn-lg { padding: 0 24px; font-size: 17px; }
.hp-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Header (homepage variant) */
.hp-header {
  background: var(--hp-surface);
  border-bottom: 1px solid var(--hp-line);
  position: sticky;
  top: 0;
  z-index: 60;
}
.hp-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hp-brand {
  font-size: 20px;
  font-weight: 700;
  color: #E07856;
  text-decoration: none;
  white-space: nowrap;
}
.hp-nav-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.hp-nav-links a {
  color: var(--hp-muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}
.hp-nav-links a:hover { color: var(--hp-ink); }
.hp-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.hp-login {
  color: var(--hp-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.hp-menu-btn { display: none; }
.hp-mobile-menu { display: none; }
/* Dark theme: style.css paints .site-header with the dark --bg
   (#17120d), which outranks the .hp-header surface rule above, so the
   header's ink-colored controls take the dark theme's cream ink
   (#f4ede0, style.css [data-theme="dark"] --ink) instead. The coral
   wordmark is unchanged in both themes. */
[data-theme="dark"] .hp-login { color: #F4EDE0; }
[data-theme="dark"] .hp-menu-btn { color: #F4EDE0; }
@media (max-width: 760px) {
  .hp-nav { padding: .5rem 1.25rem; min-height: 64px; flex-wrap: nowrap; gap: 1rem; }
  .hp-nav-links { display: none; }
  .hp-nav-signup { display: none; }
  .hp-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--hp-line);
    border-radius: 8px;
    color: var(--hp-ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .hp-mobile-menu:not([hidden]) {
    display: block;
    background: var(--hp-surface);
    border-top: 1px solid var(--hp-line);
  }
  .hp-mobile-menu a {
    display: block;
    padding: 12px 1.25rem;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--hp-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--hp-line);
  }
  .hp-mobile-menu a:last-child { border-bottom: none; }
}

/* Hero */
.hp-hero {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: 48px;
  align-items: center;
  padding: 3.25rem 0 2.25rem;
}
.hp h1 {
  font-size: 53px;
  line-height: 55px;
  font-weight: 700;
  margin: 0 0 .875rem;
}
.hp-hero-sub {
  color: var(--hp-muted);
  margin: 0 0 1.375rem;
  max-width: 34rem;
}
/* Quieter than body copy, and specific enough to beat the .hp p
   base rule (the old 14px note rule lost that fight and rendered
   at full body size). */
.hp .hp-hero-sub { font-size: 17px; line-height: 26px; }
.hp-hero-actions {
  display: flex;
  align-items: center;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
}
.hp-try-link { font-weight: 600; text-decoration: none; }
.hp-try-link:hover { text-decoration: underline; }
.hp .hp-hero-note {
  margin: .75rem 0 0;
  font-size: 13px;
  line-height: 19px;
  font-weight: 400;
  color: var(--hp-muted);
}
@media (max-width: 860px) {
  .hp-hero { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 0 1.5rem; }
  .hp h1 { font-size: 37px; line-height: 40px; }
  .hp .hp-hero-sub { font-size: 16px; line-height: 24px; }
  .hp-hero-actions { flex-direction: column; align-items: flex-start; gap: .625rem; }
  .hp-try-link { padding: .25rem 0; }
}

/* Today's Plan preview card — layout pass: the demo caption lives
   inside the card as a small header line beside the plan label, and
   the interior uses compact product type (Inter, smaller scale,
   tighter rows) so it reads like the dashboard, not a headline. */
.hp-plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hp-line);
  padding-bottom: .625rem;
  margin-bottom: .875rem;
}
.hp .hp-preview-caption {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--hp-muted);
  margin: 0;
}
.hp-plan-card {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(30, 42, 68, .07);
}
.hp .hp-plan-label {
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--hp-muted);
  margin: 0;
}
.hp .hp-plan-title {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 .25rem;
}
.hp .hp-plan-reason {
  font-size: 15px;
  line-height: 22px;
  color: var(--hp-muted);
  margin: 0 0 1rem;
}
.hp-plan-cta { width: 100%; }
.hp-plan-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--hp-line);
  margin-top: 1rem;
  padding-top: .875rem;
}
.hp .hp-plan-links a {
  color: var(--hp-muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}
.hp .hp-plan-links a:hover { color: var(--hp-ink); text-decoration: underline; }

/* Flow strip */
.hp-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-top: 1px solid var(--hp-line);
  border-bottom: 1px solid var(--hp-line);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--hp-ink);
  text-align: center;
}
.hp-strip-arrow { color: #E07856; }

/* Trust strip (sits close under the hero, above the flow strip) */
.hp-trust {
  display: flex;
  gap: 1rem 2.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid var(--hp-line);
}
.hp-trust-item {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--hp-ink);
}
.hp-trust-check { color: #E07856; font-weight: 700; }
@media (max-width: 760px) {
  .hp-trust { flex-direction: column; gap: .5rem; padding: 1rem 0; }
}

/* Sections — rhythm varies on purpose: tight where sections belong
   together, wide where the page should breathe. */
.hp-section { margin-top: 64px; }
.hp-section--tight { margin-top: 52px; }
.hp-section--snug { margin-top: 56px; }
.hp-section--wide { margin-top: 72px; }
.hp-reading { max-width: 680px; }
.hp-sample-sub {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--hp-muted);
  margin: 0 0 .5rem;
}
.hp-lawhub { color: var(--hp-muted); margin: 0; }
.hp .hp-lawhub { font-size: 16px; line-height: 25px; }
@media (max-width: 760px) {
  .hp-section { margin-top: 40px; }
  .hp-section--tight { margin-top: 32px; }
  .hp-section--snug { margin-top: 36px; }
  .hp-section--wide { margin-top: 44px; }
  .hp h2 { font-size: 28px; line-height: 32px; }
  .hp p { font-size: 17px; line-height: 27px; }
}

/* Sample question (try-it.js contract classes, restyled) */
.hp .try-card {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 44rem;
  margin-top: 1.25rem;
  box-shadow: none;
}
.hp .try-stem { font-size: 16px; line-height: 25px; margin: 0; }
.hp .try-q { margin: .75rem 0 0; font-size: 16px; line-height: 25px; }
.hp .try-choices { gap: .5rem; margin-top: .875rem; }
.hp .try-choices button {
  min-height: 50px;
  align-items: center;
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 8px;
  padding: .65rem .9rem;
  color: var(--hp-ink);
  font-size: 15px;
  line-height: 22px;
}
.hp .try-choices button:not(:disabled):hover { border-color: var(--hp-action); }
.hp .try-choices button:disabled { opacity: 1; }
.hp .try-choices button.try-selected {
  border-color: var(--hp-action);
  background: var(--hp-soft);
}
.hp .try-choices button.try-right {
  border-color: var(--hp-correct);
  background: var(--hp-correct-bg);
}
.hp .try-choices button.try-right::after {
  content: "✓ Correct answer";
  margin-left: auto;
  padding-left: .75rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-correct);
  white-space: nowrap;
}
.hp .try-choices button.try-picked-wrong {
  border-color: var(--hp-wrong);
  background: var(--hp-wrong-bg);
}
.hp .try-choices button.try-picked-wrong::after {
  content: "✗ Your answer";
  margin-left: auto;
  padding-left: .75rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-wrong);
  white-space: nowrap;
}
.hp .choice-letter { font-weight: 700; color: var(--hp-muted); }
.hp .try-check-row { margin: 1rem 0 0; }
.hp .try-feedback {
  border-top: 1px solid var(--hp-line);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.hp .try-feedback p { font-size: 16px; line-height: 25px; }
.hp .try-verdict { font-size: 17px; line-height: 26px; }
.hp .try-cta {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  text-align: left;
}
.hp .try-cta p:first-child { margin-top: 0; }
.hp .try-cta .muted.small { margin-bottom: 0; }
.hp .try-another-row { margin: .875rem 0 0; }
/* style.css styles button.try-another as a bare text link; the redesign
   makes it the secondary button the audit specifies. */
.hp button.try-another {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  box-shadow: none;
  color: var(--hp-ink);
  font-weight: 600;
  padding: 0 20px;
  text-decoration: none;
}
.hp button.try-another:hover {
  background: var(--hp-surface);
  border-color: var(--hp-action);
  text-decoration: none;
}
@media (max-width: 760px) {
  .hp .try-card { padding: 1.25rem; }
}

/* Free account — "Explore" is open text; the account itself is the
   one card in this section, with the free week as its bottom strip. */
.hp-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .5rem;
  font-size: 16px;
  line-height: 24px;
}
.hp-check-list li { padding-left: 1.6rem; position: relative; }
.hp-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #E07856;
  font-weight: 700;
}
.hp-explore { margin-top: 1rem; }
.hp-explore h3 { margin: 0 0 .75rem; }
.hp-free-card {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: 0 1px 3px rgba(30, 42, 68, .07);
}
.hp-free-card-body { padding: 1.5rem; }
.hp-free-card-body h3 { margin: 0 0 .75rem; }
.hp-free-card-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  margin-bottom: 1rem;
}
.hp-free-card-starter p { margin: 0 0 .5rem; font-size: 16px; line-height: 24px; }
.hp-free-card-body > p { font-size: 16px; line-height: 25px; }
.hp-week-line { font-weight: 600; }
.hp-free-cta { margin: 1rem 0 0; }
.hp-free-card-week {
  border-top: 1px solid var(--hp-line);
  background: var(--hp-soft);
  padding: 1.25rem 1.5rem;
}
.hp-free-card-week p { margin: 0 0 .75rem; font-size: 16px; line-height: 25px; }
.hp-free-card-week .hp-week-title { font-weight: 600; margin-top: 0; }
.hp-free-card-week .hp-week-btn { margin-bottom: 0; }
.hp-free-card + p { margin-top: 1.25rem; }
@media (max-width: 760px) {
  .hp-free-card-cols { grid-template-columns: 1fr; }
  .hp-free-card-body { padding: 1.25rem; }
  .hp-free-card-week { padding: 1.25rem; }
}

/* Founder + results */
.hp-founder {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.25rem;
}
.hp-founder-img {
  border-radius: 12px;
  width: 150px;
  height: 150px;
  object-fit: cover;
  flex: none;
}
.hp-founder-text p { margin: 0; }
@media (max-width: 760px) {
  .hp-founder { flex-direction: column; }
}
.hp-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
  max-width: 680px;
  border-top: 1px solid var(--hp-line);
  padding-top: 1.25rem;
}
.hp-result { padding: 0; }
.hp .hp-result-scores {
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.hp-result-name { font-weight: 600; margin: 0; font-size: 16px; line-height: 24px; }
.hp-result-note {
  color: var(--hp-muted);
  font-size: 14px;
  line-height: 20px;
  margin: .25rem 0 0;
}
@media (max-width: 760px) {
  .hp-results-grid { grid-template-columns: 1fr; }
}

/* FAQ — layout pass: open rows separated by thin divider rules
   instead of boxed cards. */
.hp-faq { max-width: 680px; margin-top: 1rem; border-bottom: 1px solid var(--hp-line); }
.hp-faq details {
  background: transparent;
  border: none;
  border-top: 1px solid var(--hp-line);
  border-radius: 0;
  padding: .25rem 0;
  margin-bottom: 0;
}
.hp-faq summary {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  padding: .8rem 0;
  margin: 0;
  color: var(--hp-ink);
}
.hp-faq details p {
  color: var(--hp-muted);
  font-size: 16px;
  line-height: 25px;
  margin: .25rem 0 1rem;
}

/* Final CTA */
.hp-cta {
  background: var(--hp-soft);
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  text-align: center;
  padding: 2.25rem 1.5rem;
  margin-top: 88px;
}
.hp-cta h2 { margin: 0 0 .75rem; }
.hp-cta p {
  color: var(--hp-muted);
  max-width: 36rem;
  margin: 0 auto 1.5rem;
}
@media (max-width: 760px) {
  .hp-cta { margin-top: 52px; padding: 1.75rem 1.25rem; }
}
