/* The public site. It sits on top of afterclose-design.css (the app's own stylesheet) and adds only layout
   for marketing pages and the login card. Same rules as the app: glass for navigation only, content on solid
   cards, one accent, pills, 44px targets. No inline styles anywhere, so a strict content policy holds. */

html { scroll-behavior: smooth; scroll-padding-top: calc(96px + var(--safe-top)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- floating bar ---------- */
.site-bar { position: fixed; z-index: 20; top: calc(var(--edge) + var(--safe-top)); left: var(--edge); right: var(--edge); max-width: 1160px; margin: 0 auto; height: var(--bar); border-radius: 28px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; transition: background 220ms var(--ease); }
.site-bar.scrolled { background: var(--glass-strong); }
.site-bar .brand { padding: 0; }
.site-bar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-bar nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--text); font-size: 14.5px; font-weight: 500; transition: background 200ms var(--ease); }
.site-bar nav a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.site-bar .btn { margin-left: 8px; }
.site-bar .back { margin-left: auto; }
.bar-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.bar-actions .btn { margin-left: 0; }

/* ---------- page ---------- */
.site { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: calc(var(--bar) + var(--edge) + 72px + var(--safe-top)) 24px 48px; display: flex; flex-direction: column; gap: 104px; min-width: 0; }
.site > * { animation: rise 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.site > :nth-child(2) { --i: 1; }
.site > :nth-child(3) { --i: 2; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-glass); }
.sec-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.sec-head p { font-size: 17px; color: var(--text-glass); }

/* ---------- hero ---------- */
.hero-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.hero-copy h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.03; letter-spacing: -0.035em; }
.lede { font-size: 19px; line-height: 1.5; color: var(--text-glass); max-width: 33em; }
.hero-copy .row { gap: 10px; }

.mock { display: flex; flex-direction: column; padding: 20px 22px 10px; }
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.mock-head h2 { font-size: 17px; }
.mock-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); min-width: 0; }
.mock-row .who { flex: 1; min-width: 0; }
.mock-row .who b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.mock-row .who span { display: block; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.mock-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 12px 0 8px; }

/* ---------- the two figures ---------- */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.figure { display: flex; flex-direction: column; gap: 10px; padding: 28px; }
.figure .hero { color: var(--accent-text); }
.figure p { font-size: 17px; line-height: 1.45; max-width: 26em; }
.source { margin-top: 14px; max-width: 760px; }
.source a { text-decoration: underline; text-underline-offset: 2px; }
.takeaway { margin-top: 22px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; max-width: 30em; text-wrap: balance; }

/* ---------- what it does ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature .glyph, .payoff .glyph { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-text); margin-bottom: 6px; }
.feature h3 { font-size: 17px; }
.feature p { font-size: 15px; line-height: 1.5; color: var(--text-2); }

/* ---------- how it helps: one card, three columns split by hairlines ---------- */
.payoffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.payoff { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-left: 1px solid var(--line); }
.payoff:first-child { border-left: 0; }
.payoff h3 { font-size: 19px; letter-spacing: -0.01em; }
.payoff p { font-size: 15px; line-height: 1.5; color: var(--text-2); }

/* ---------- control ---------- */
.control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; }
.control .sec-head { margin-bottom: 0; }
.checks { list-style: none; margin: 0; padding: 8px 24px; display: flex; flex-direction: column; }
.checks li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.checks li:first-child { border-top: 0; }
.checks .ic { color: var(--ok); margin-top: 2px; }

/* ---------- closing card and footer ---------- */
.closing { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 32px; }
.closing h2 { font-size: 26px; }
.closing p { color: var(--text-2); margin-top: 6px; }
.site-foot { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 0 24px calc(40px + var(--safe-bottom)); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-foot p { max-width: 44em; }
.site-foot a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- login ---------- */
.auth { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--bar) + var(--edge) + 32px + var(--safe-top)) 16px calc(40px + var(--safe-bottom)); }
.auth-card { width: 100%; max-width: 432px; padding: 32px; animation: rise 420ms var(--ease) both; }
.auth-card section { display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 28px; outline: none; }
.auth-card > .notice { margin-bottom: 18px; }
.auth-card h1:focus-visible { box-shadow: none; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .lead { color: var(--text-2); margin-top: -8px; }
.btn.block { width: 100%; }
.pw { position: relative; }
.pw input { padding-right: 50px !important; }
.pw .iconbtn { position: absolute; right: 0; top: 0; color: var(--text-2); }
.pw .iconbtn .ic-hide { display: none; }
.pw .iconbtn[aria-pressed="true"] .ic-show { display: none; }
.pw .iconbtn[aria-pressed="true"] .ic-hide { display: block; }
.linkbtn { color: var(--accent-text); font-size: 14.5px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; align-self: center; padding: 0 8px; border-radius: 8px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 2px; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 13.5px; color: var(--text-2); }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules .ic { width: 16px; height: 16px; }
.rules .ic-yes { display: none; }
.rules li.met { color: var(--ok); font-weight: 500; }
.rules li.met .ic-no { display: none; }
.rules li.met .ic-yes { display: block; }
.notice.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.signed { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--text) 4%, var(--surface)); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.signed .grow { min-width: 0; }
.signed .grow b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.signed .grow span { display: block; font-size: 13px; color: var(--text-2); }

/* ---------- sign-up ---------- */
.auth-alt { text-align: center; }
.auth-alt a { font-weight: 600; }
.signup-card { max-width: 480px; }
.signup-card .fields { gap: 12px; }
.signup-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.signup-steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.signup-steps li::before { content: ""; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.signup-steps li.done::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.signup-steps li.now { color: var(--accent-text); }
.signup-steps li.now::before { background: var(--accent); }
.plan { box-shadow: 0 0 0 2px var(--accent); }
.signup-card .steps { margin-top: 4px; }

/* ---------- not found ---------- */
.lost { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1023px) {
  .hero-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 767px) {
  .site-bar nav { display: none; }
  .site-bar .btn { margin-left: auto; }
  .bar-actions { margin-left: auto; gap: 6px; }
  .bar-actions .btn { margin-left: 0; padding: 0 12px; }
  .site { padding-left: 16px; padding-right: 16px; gap: 72px; padding-top: calc(var(--bar) + var(--edge) + 40px + var(--safe-top)); }
  .site-foot { padding-left: 16px; padding-right: 16px; }
  .lede { font-size: 17.5px; }
  .figures, .features { grid-template-columns: minmax(0, 1fr); }
  .figure { padding: 22px; }
  .payoffs { grid-template-columns: minmax(0, 1fr); }
  .payoff { border-left: 0; border-top: 1px solid var(--line); padding: 22px; }
  .payoff:first-child { border-top: 0; }
  .checks { padding: 4px 18px; }
  .closing { padding: 24px; }
  .auth-card { padding: 24px 20px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .site > *, .auth-card { animation: fade 200ms linear both; }
}
