/* ==========================================================================
   PropPairAI  public website
   Warm paper stock, deep green ink, one clay accent. Serif display type,
   ruled layouts instead of boxed cards.
   ========================================================================== */
:root {
  --canvas: #F3F0E8;
  --surface: #FBFAF6;
  --paper: #FFFFFF;
  --subtle: #ECE8DC;
  --subtle-2: #E3DECF;
  --line: #DDD7C8;
  --line-strong: #C3BCA8;
  --ink: #1B1A16;
  --ink-2: #4B493F;
  --muted: #837E6F;
  --brand: #1D4A33;
  --brand-hover: #143726;
  --brand-deep: #12291D;
  --clay: #A8482A;
  --accent-bg: #E6EFE3;
  --accent-fg: #1D4A33;
  --accent-line: #BCD3B8;
  --rent-bg: #E9EEF3;
  --rent-fg: #25476B;
  --rent-line: #CBD7E3;
  --sale-bg: #EFEBE0;
  --sale-fg: #3A382F;
  --sale-line: #D8D2C0;
  --warn-bg: #F7EBD3;
  --warn-fg: #8A5A12;
  --warn-line: #E6D0A0;
  --err-bg: #F6E2DC;
  --err-fg: #9A2F1B;
  --err-line: #E4BDB2;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow-subtle: 0 1px 0 rgba(27, 26, 22, 0.04);
  --shadow-elevated: 0 30px 60px -28px rgba(27, 26, 22, 0.28), 0 2px 0 rgba(27, 26, 22, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: #CFE3C9; color: var(--ink); }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 450;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.12;
  font-variation-settings: 'opsz' 72, 'SOFT' 30;
}

h3, h4 { font-weight: 500; letter-spacing: -0.012em; }

code, .mono, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

code {
  font-size: 0.84em;
  background: var(--subtle);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--ink);
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(243, 240, 232, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
}

.brand-logo { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; color: var(--brand); }
.brand-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.brand-sub { display: none; }

.nav-links { display: flex; align-items: center; gap: 28px; }

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover { color: var(--ink); border-color: var(--line-strong); }
.nav-link.active { color: var(--ink); border-color: var(--ink); }

.nav-divider { width: 1px; height: 16px; background: var(--line-strong); }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
}

@media (max-width: 980px) {
  .mobile-menu-btn { display: inline-flex; }
  .nav-divider { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--line-strong);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 28px 24px;
    gap: 14px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 550;
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-lg { padding: 14px 26px; font-size: 14.5px; }

.btn-primary, .btn-emerald { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-emerald:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #34322B; border-color: #34322B; }

.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--paper); border-color: var(--ink-2); }

.btn-subtle { background: var(--subtle); border-color: var(--subtle); color: var(--ink); }
.btn-subtle:hover { background: var(--subtle-2); border-color: var(--subtle-2); }

.btn-link {
  background: none; border: none; padding: 0;
  color: var(--brand); font-weight: 550; font-size: 14px;
  border-bottom: 1px solid var(--accent-line);
  border-radius: 0; cursor: pointer;
}
.btn-link:hover { border-color: var(--brand); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Layout primitives ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-band {
  background: var(--brand-deep);
  color: #E9E5D6;
}
.section-band h2, .section-band h3 { color: #F6F3E8; }
.section-band .lead { color: #BFC8BC; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow-dot { display: none; }

.hero-title {
  font-size: clamp(2.7rem, 6.2vw, 5rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.026em;
  margin-bottom: 0;
}
.hero-accent { font-style: italic; color: var(--brand); font-weight: 400; }

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.016em;
  line-height: 1.08;
  margin-bottom: 14px;
}

.lead { font-size: 17px; color: var(--ink-2); max-width: 640px; line-height: 1.6; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

@media (max-width: 920px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card-subtle {
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
}

/* Legacy feature classes kept so inner pages keep working */
.feature-grid-ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--ink); }
.feature-cell { padding: 24px 0 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.icon-box { display: none; }
@media (max-width: 920px) { .feature-grid-ledger { grid-template-columns: 1fr; } }

/* ---------- Editorial components (home page) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: end;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 12.5px; color: var(--muted); margin-top: 18px;
}

.rule-top { border-top: 1px solid var(--ink); }

.step-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--ink); }
.step { padding: 28px 0 8px; }
.step .num-serif {
  font-family: var(--serif);
  font-size: 54px; line-height: 1; font-weight: 300;
  color: var(--clay); letter-spacing: -0.04em; margin-bottom: 18px; display: block;
}
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 14.5px; max-width: 34ch; }
@media (max-width: 920px) { .step-list { grid-template-columns: 1fr; } .step { border-bottom: 1px solid var(--line); padding-bottom: 28px; } }

.spec-list { border-top: 1px solid var(--ink); }
.spec-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec-row .idx { font-family: var(--mono); font-size: 12px; color: var(--clay); font-weight: 500; }
.spec-row h3 { font-size: 22px; }
.spec-row p { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 820px) { .spec-row { grid-template-columns: 40px 1fr; } .spec-row p { grid-column: 2; } }

/* Message -> rows comparison */
.convert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1.25fr);
  gap: 0;
  align-items: stretch;
}
.convert-arrow { display: flex; align-items: center; justify-content: center; color: var(--clay); font-family: var(--serif); font-size: 28px; }
.raw-msg {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.raw-msg .hl { background: #F4E3A8; color: var(--ink); padding: 0 2px; }
.raw-label, .out-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; display: block;
}
@media (max-width: 920px) { .convert { grid-template-columns: 1fr; gap: 14px; } .convert-arrow { transform: rotate(90deg); height: 28px; } }

.dl-list { border-top: 1px solid rgba(255,255,255,0.22); }
.dl-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,0.14);
}
.dl-row h3 { font-size: 22px; }
.dl-row .meta { font-size: 13px; color: #A7B3A5; }
.dl-row .btn-outline { border-color: rgba(255,255,255,0.35); color: #F6F3E8; }
.dl-row .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #F6F3E8; }
@media (max-width: 640px) { .dl-row { grid-template-columns: 1fr; gap: 10px; } }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.price-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.price-table .plan { font-family: var(--serif); font-size: 22px; font-weight: 450; }
.price-table .amt { font-family: var(--serif); font-size: 30px; letter-spacing: -0.02em; }
.price-table .amt small { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-left: 4px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 2px;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--line);
  background: var(--subtle); color: var(--ink-2);
  white-space: nowrap;
}
.badge-sale { background: var(--sale-bg); color: var(--sale-fg); border-color: var(--sale-line); }
.badge-rent { background: var(--rent-bg); color: var(--rent-fg); border-color: var(--rent-line); }
.badge-match, .badge-ok { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); }

/* ---------- Product frame ---------- */
.workspace-frame {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.workspace-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 11px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.window-controls { display: none; }

/* ---------- Ledger table ---------- */
.ledger-wrap { width: 100%; overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: left; }
.ledger-table th {
  background: var(--surface); color: var(--muted);
  font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.ledger-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.ledger-table tbody tr { transition: background 0.12s ease; }
.ledger-table tbody tr:hover { background: var(--surface); }
.ledger-table tbody tr.selected-row { background: var(--accent-bg); box-shadow: inset 2px 0 0 var(--brand); }

/* ---------- Pricing cards ---------- */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 24px; position: relative;
}
.pricing-card.featured { background: var(--paper); border-top: 2px solid var(--clay); box-shadow: var(--shadow-elevated); }

.popular-ribbon, .popular-ribbon {
  position: absolute; top: -1px; right: 22px;
  background: var(--clay); color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 0 0 3px 3px;
}

.price-big {
  font-family: var(--serif);
  font-size: 46px; font-weight: 350; letter-spacing: -0.035em;
  color: var(--ink); line-height: 1.05;
}

.check-list { list-style: none; margin-top: 18px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.check-list li { position: relative; padding-left: 22px; line-height: 1.55; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.82em; width: 11px; height: 1px; background: var(--clay); }

/* ---------- Forms ---------- */
.segmented-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-bottom: 1px solid var(--line-strong); margin-bottom: 24px;
}
.seg-btn {
  padding: 11px 12px; background: transparent; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); font-family: var(--sans); font-size: 13.5px; font-weight: 550;
  cursor: pointer; transition: color 0.14s ease, border-color 0.14s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { color: var(--ink); border-bottom-color: var(--brand); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.form-input {
  width: 100%; padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 14px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.form-input::placeholder { color: #A29D8D; }
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 74, 51, 0.12); }

.alert-box { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--line); background: var(--subtle); color: var(--ink); margin-bottom: 14px; }
.alert-ok { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-fg); }
.alert-err { background: var(--err-bg); border-color: var(--err-line); color: var(--err-fg); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }

/* ---------- Modal ---------- */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(18, 41, 29, 0.5);
  z-index: 120; align-items: center; justify-content: center; padding: 18px;
}
.modal-panel {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto;
  padding: 28px; box-shadow: var(--shadow-elevated);
}

/* ---------- Legal pages ---------- */
.legal-container, .legal-box-wrap { padding: 72px 24px 96px; }
.legal-box { max-width: 760px; margin: 0 auto; padding: 0; background: transparent; border: none; }
.legal-box h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 10px; }
.legal-box h2 { font-size: 22px; margin: 36px 0 8px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.legal-box p { color: var(--ink-2); margin: 12px 0; font-size: 15px; }
.legal-box ul { margin: 12px 0 12px 20px; color: var(--ink-2); display: grid; gap: 8px; font-size: 15px; }
.legal-container .legal-box { background: transparent; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--brand-deep);
  color: #C9D1C5;
  padding: 72px 0 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer .brand-title { color: #F6F3E8; }
.site-footer .brand-mark { color: #8DBF9E; }

.footer-heading {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: #8DBF9E; margin-bottom: 16px;
}
.footer-desc { font-size: 13.5px; color: #A9B4A6; line-height: 1.65; max-width: 36ch; margin: 14px 0 0; }
.footer-address-box { font-size: 13px; color: #A9B4A6; line-height: 1.7; }
.footer-address-box a { color: #E9E5D6; border-bottom: 1px solid rgba(255,255,255,0.25); }
.footer-list { list-style: none; display: grid; gap: 10px; font-size: 13.5px; }
.footer-list a { color: #D3D9CF; }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px; font-size: 12px; color: #8A9788;
}
.footer-bottom a { color: #A9B4A6; }

/* Founding-cohort seat counter */
.seat-strip{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 16px;background:var(--brand-deep);color:#EDE8DA;font-size:13px;text-decoration:none;text-align:center}
.seat-strip strong{color:#fff;font-family:'JetBrains Mono',monospace;font-weight:600}
.seat-strip:hover .seat-go{border-color:#fff}
.seat-go{border-bottom:1px solid #E3A78F;color:#E3A78F;padding-bottom:1px}
.seat-dot{width:7px;height:7px;border-radius:50%;background:#E3A78F;animation:seatpulse 1.8s ease-in-out infinite}
@keyframes seatpulse{50%{opacity:.25}}
.seat-card{border:1px solid var(--line,#D9D3C3);border-left:3px solid var(--clay);background:#FBF9F3;padding:16px 18px;margin:4px 0 20px;border-radius:3px}
.seat-card-top{display:flex;align-items:center;gap:16px}
.seat-num{font-family:Fraunces,serif;font-size:56px;line-height:1;color:var(--clay);font-weight:500}
.seat-label{font-size:14px;font-weight:600;color:var(--brand-deep);line-height:1.35}
.seat-label small{font-weight:400;color:#5d6358;font-size:12.5px}
.seat-track{height:5px;background:#E6E0D0;margin:14px 0 8px;border-radius:2px;overflow:hidden}
.seat-fill{height:100%;background:var(--clay)}
.seat-note{font-size:12.5px;color:#5d6358}
.seat-note span:last-child{color:var(--clay);font-weight:600}
