/* Agentic Builder — site styles v2 */
:root {
  --navy: #07101F;
  --navy-mid: #0D1A2D;
  --navy-card: #112039;
  --navy-line: #1F3352;
  --gold: #C8A951;
  --gold-light: #E2C97E;
  --gold-wash: rgba(200, 169, 81, 0.10);
  --text: #DCE4EF;
  --muted: #93A3BA;
  --white: #FFFFFF;
  --ok: #3FCF9A;
  --err: #F07A6A;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 66ch;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--navy); color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--white); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--text); max-width: 54ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(64px, 10vw, 120px) 0; }
section + section { border-top: 1px solid var(--navy-line); }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 16, 31, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--navy-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; color: var(--white); text-decoration: none; letter-spacing: 0.01em; }
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-light); }
.nav-toggle { display: none; background: none; border: 1px solid var(--navy-line); color: var(--white); border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy-mid); border-bottom: 1px solid var(--navy-line); padding: 8px var(--gutter) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--navy-line); }
  .nav .btn { margin-top: 14px; text-align: center; }
}

/* ── Buttons ── */
.btn { display: inline-block; font: 600 0.98rem/1 var(--sans); padding: 15px 24px; border-radius: 8px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-line { border-color: var(--gold); color: var(--gold-light); background: transparent; }
.btn-line:hover { background: var(--gold-wash); color: var(--white); }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ── Hero ── */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero-note { margin-top: 22px; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The one bold element: a broker demo site assembling itself in a browser frame */
.browser { background: var(--navy-mid); border: 1px solid var(--navy-line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(200, 169, 81, .08); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--navy-line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--navy-line); }
.browser-url { flex: 1; margin-left: 10px; background: var(--navy); border-radius: 6px; padding: 6px 12px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo { background: #F7F5F0; color: #1B2433; font-family: var(--sans); }
.demo-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: .8rem; border-bottom: 1px solid #E5E0D4; }
.demo-nav b { font-family: var(--serif); font-size: 1.15rem; color: #1B2433; }
.demo-nav span { color: #6A7486; }
.demo-hero { padding: 26px 20px 20px; background: linear-gradient(180deg, #24364F, #1B2A40); color: #fff; }
.demo-hero h4 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; margin: 0 0 8px; font-weight: 600; }
.demo-hero p { font-size: .82rem; margin: 0 0 14px; color: #D3DCE8; }
.demo-search { display: flex; background: #fff; border-radius: 6px; overflow: hidden; font-size: .78rem; }
.demo-search span { flex: 1; padding: 10px 12px; color: #6A7486; }
.demo-search em { font-style: normal; background: #B8963E; color: #fff; padding: 10px 14px; font-weight: 600; }
.demo-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 18px 20px 22px; font-size: .78rem; }
.demo-list div { padding: 9px 0; border-bottom: 1px solid #E5E0D4; display: flex; justify-content: space-between; }
.demo-list div:last-child { border-bottom: 0; }
.demo-list b { color: #1B2433; font-weight: 600; }
.demo-list span { color: #6A7486; }
.demo-chat { background: #fff; border: 1px solid #E5E0D4; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.demo-chat p { margin: 0; padding: 7px 9px; border-radius: 8px; font-size: .74rem; line-height: 1.4; max-width: 92%; }
.demo-chat .q { background: #EEF1F6; align-self: flex-end; }
.demo-chat .a { background: #24364F; color: #fff; }
.demo-call { margin-top: 4px; text-align: center; background: #B8963E; color: #fff; border-radius: 6px; padding: 8px; font-weight: 600; font-size: .76rem; }
/* assemble once on load */
.assemble > * { opacity: 0; transform: translateY(8px); animation: rise .6s cubic-bezier(.2, .7, .2, 1) forwards; }
.assemble > *:nth-child(1) { animation-delay: .15s; }
.assemble > *:nth-child(2) { animation-delay: .45s; }
.assemble > *:nth-child(3) { animation-delay: .8s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.browser-caption { margin-top: 14px; font-size: .88rem; color: var(--muted); }

/* ── Content blocks ── */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--navy-line); }
.ledger li { padding: 22px 0; border-bottom: 1px solid var(--navy-line); display: grid; grid-template-columns: 1fr; gap: 4px; }
.ledger b { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--white); }
.ledger li > span { color: var(--muted); max-width: 60ch; }
.ledger a.row { text-decoration: none; color: inherit; display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline; }
.ledger a.row:hover b { color: var(--gold-light); }
.ledger a.row em { font-style: normal; color: var(--gold); grid-row: 1 / span 2; grid-column: 2; align-self: center; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--gold); }
.steps li { counter-increment: step; padding: 24px 24px 8px 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.4rem; color: var(--gold); line-height: 1; margin-bottom: 14px; }
.steps b { display: block; color: var(--white); font-size: 1.05rem; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.feature-band { background: var(--navy-mid); }
.checks { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; }
.checks li { break-inside: avoid; padding: 8px 0 8px 26px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 17px; width: 12px; height: 2px; background: var(--gold); }
@media (max-width: 640px) { .checks { columns: 1; } }

/* ── Pricing ── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--navy-line); border-radius: 14px; overflow: hidden; }
.plan { padding: 34px 30px; display: flex; flex-direction: column; background: var(--navy); }
.plan + .plan { border-left: 1px solid var(--navy-line); }
.plan.featured { background: var(--navy-card); box-shadow: inset 0 3px 0 var(--gold); }
.plan h3 { margin-bottom: 4px; }
.plan .for { color: var(--muted); font-size: .95rem; min-height: 3em; }
.price { font-family: var(--serif); font-size: 3.2rem; font-weight: 700; color: var(--white); line-height: 1; margin: 18px 0 6px; }
.retainer { color: var(--gold-light); font-size: .95rem; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; flex: 1; }
.plan li { padding: 7px 0; border-bottom: 1px solid var(--navy-line); font-size: .95rem; }
.plan .btn { width: 100%; text-align: center; margin-top: 10px; }
.plan .tag { color: var(--gold); font-size: .9rem; font-weight: 600; margin-bottom: 10px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan + .plan { border-left: 0; border-top: 1px solid var(--navy-line); } }

/* ── Forms ── */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .9rem; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--white); background: var(--navy-mid);
  border: 1px solid var(--navy-line); border-radius: 8px; padding: 13px 14px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-wash); }
.field [aria-invalid="true"] { border-color: var(--err); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; min-height: 1.5em; font-size: .95rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.seg { display: flex; border: 1px solid var(--navy-line); border-radius: 10px; overflow: hidden; margin-bottom: 26px; }
.seg button { flex: 1; background: transparent; color: var(--text); border: 0; padding: 14px; font: 500 .98rem var(--sans); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--navy-line); }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--navy); }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ── Modal (checkout) ── */
dialog { background: var(--navy-mid); color: var(--text); border: 1px solid var(--navy-line); border-radius: 14px; padding: 32px; width: min(520px, 92vw); }
dialog::backdrop { background: rgba(3, 8, 16, .75); }
dialog h3 { margin-bottom: 6px; }
.choice { display: grid; gap: 10px; margin: 20px 0; }
.choice label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--navy-line); border-radius: 10px; padding: 14px; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--gold); background: var(--gold-wash); }
.choice input { margin-top: 4px; accent-color: var(--gold); }
.choice b { display: block; color: var(--white); }

/* ── FAQ ── */
details { border-bottom: 1px solid var(--navy-line); padding: 18px 0; }
details summary { cursor: pointer; font-family: var(--serif); font-size: 1.35rem; color: var(--white); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--gold); font-family: var(--sans); }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* ── CTA band + footer ── */
.cta-band { background: linear-gradient(135deg, var(--navy-card), var(--navy-mid)); }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; max-width: 20ch; }
footer { border-top: 1px solid var(--navy-line); padding: 56px 0 40px; font-size: .92rem; color: var(--muted); }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { font: 600 .95rem var(--sans); color: var(--white); margin: 0 0 12px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { padding: 4px 0; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold-light); }
footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--navy-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr; } }

/* ── Chat widget ── */
.chat-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 60; background: var(--gold); color: var(--navy); border: 0; border-radius: 999px; padding: 14px 20px; font: 600 .95rem var(--sans); cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.chat-panel { position: fixed; right: 20px; bottom: 80px; z-index: 60; width: min(380px, calc(100vw - 40px)); height: min(520px, calc(100vh - 120px)); background: var(--navy-mid); border: 1px solid var(--navy-line); border-radius: 14px; display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--navy-line); display: flex; justify-content: space-between; align-items: center; }
.chat-head b { color: var(--white); }
.chat-head button { background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-log p { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: .93rem; line-height: 1.5; max-width: 88%; white-space: pre-wrap; }
.chat-log .bot { background: var(--navy-card); align-self: flex-start; }
.chat-log .me { background: var(--gold); color: var(--navy); align-self: flex-end; }
.chat-form { display: flex; border-top: 1px solid var(--navy-line); }
.chat-form input { flex: 1; background: transparent; border: 0; color: var(--white); padding: 14px; font: inherit; }
.chat-form button { background: transparent; border: 0; color: var(--gold-light); padding: 0 16px; font: 600 .95rem var(--sans); cursor: pointer; }

/* ── Legal pages ── */
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; }
.prose li { margin-bottom: .4em; max-width: var(--measure); }
