/* BridgeTies — site-wide styles */
:root {
  --navy:#1B2B4B; --navy-deep:#14213D; --gold:#C9A84C; --gold-soft:#E4D5A8;
  --cream:#F7F5F0; --paper:#FFFFFF; --text:#2C2C2C; --muted:#6B6B6B; --line:#D9D5CC;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto;} *{transition:none!important;animation:none!important;} }
body { font-family:'DM Sans',sans-serif; color:var(--text); background:var(--cream); line-height:1.6; }
a { color:var(--navy); }
.wrap { max-width:1060px; margin:0 auto; padding:0 28px; }
.narrow { max-width:780px; }

header { border-bottom:1px solid var(--line); background:var(--cream); }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:18px 0; flex-wrap:wrap; gap:10px; }
.wordmark { font-family:'DM Serif Display',serif; font-size:24px; color:var(--navy); text-decoration:none; }
.wordmark span { color:var(--gold); }
nav { display:flex; align-items:center; flex-wrap:wrap; }
nav a { font-size:14px; color:var(--muted); text-decoration:none; margin-left:24px; }
nav a:hover { color:var(--navy); }
nav a.active { color:var(--navy); font-weight:600; }
nav a.nav-btn { background:var(--navy); color:#fff; padding:9px 18px; border-radius:6px; font-weight:600; }
nav a.nav-btn:hover { background:var(--navy-deep); }
a:focus-visible, .btn:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }

h1 { font-family:'DM Serif Display',serif; font-weight:400; font-size:clamp(32px,4.4vw,48px); line-height:1.12; color:var(--navy); margin-bottom:20px; }
h2 { font-family:'DM Serif Display',serif; font-weight:400; font-size:29px; color:var(--navy); margin-bottom:30px; }
h3 { font-size:16px; font-weight:600; color:var(--navy); }
.eyebrow { font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color:var(--gold); font-weight:600; margin-bottom:16px; }
section { padding:64px 0; }
.lede { font-size:17px; color:var(--muted); max-width:54ch; }

.btn { display:inline-block; background:var(--navy); color:#fff; font-weight:600; font-size:15px; padding:15px 34px; border-radius:6px; text-decoration:none; transition:background .15s; border:none; cursor:pointer; font-family:inherit; }
.btn:hover { background:var(--navy-deep); }
.dl-meta { font-size:12.5px; color:var(--muted); margin-top:12px; }

.hero { display:grid; grid-template-columns:1.1fr .9fr; gap:56px; align-items:center; padding:80px 0 64px; }
.plate { background:var(--navy); border-radius:10px; padding:44px 40px 36px; color:var(--cream); box-shadow:0 24px 60px rgba(27,43,75,.28); position:relative; }
.plate::before { content:""; position:absolute; inset:10px; border:1px solid rgba(201,168,76,.35); border-radius:6px; pointer-events:none; }
.plate .cite { font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); margin-bottom:22px; }
.plate .formula { font-family:'DM Mono',monospace; font-size:clamp(20px,2.6vw,27px); color:#fff; margin-bottom:24px; white-space:nowrap; }
.plate .formula .g { color:var(--gold-soft); }
.plate dl { display:grid; grid-template-columns:auto 1fr; gap:4px 14px; font-size:12.5px; color:rgba(247,245,240,.78); }
.plate dt { font-family:'DM Mono',monospace; color:var(--gold-soft); }

.status { background:var(--paper); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.status .inner { display:flex; gap:18px; align-items:baseline; padding:22px 0; }
.status .mark { font-family:'DM Serif Display',serif; font-size:22px; color:var(--gold); line-height:1; }
.status p { font-size:14px; color:var(--muted); max-width:84ch; }
.status strong { color:var(--text); }

.cols { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.cols-2 { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.card { background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:28px 26px; }
.card .ref { display:block; font-family:'DM Mono',monospace; font-size:11.5px; color:var(--gold); margin:8px 0 14px; }
.card p { font-size:14px; color:var(--muted); }

.band { background:var(--paper); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.list-flat { list-style:none; }
.list-flat li { padding:13px 0; border-bottom:1px solid var(--line); font-size:14.5px; display:flex; justify-content:space-between; gap:18px; }
.list-flat li:last-child { border-bottom:none; }
.list-flat .stat { font-family:'DM Mono',monospace; font-size:12.5px; color:var(--gold); white-space:nowrap; }

.req-table { width:100%; border-collapse:collapse; font-size:14.5px; background:var(--paper); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.req-table th, .req-table td { text-align:left; padding:13px 18px; border-bottom:1px solid var(--line); }
.req-table th { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); background:#FBFAF7; font-weight:600; width:220px; }
.req-table tr:last-child th, .req-table tr:last-child td { border-bottom:none; }

/* Documentation */
.doc-layout { display:grid; grid-template-columns:230px 1fr; gap:48px; padding:56px 0; }
.doc-nav { position:sticky; top:24px; align-self:start; font-size:13.5px; }
.doc-nav a { display:block; padding:7px 0; color:var(--muted); text-decoration:none; border-left:2px solid var(--line); padding-left:14px; }
.doc-nav a:hover { color:var(--navy); border-left-color:var(--gold); }
.doc h2 { font-size:25px; margin:52px 0 16px; padding-top:8px; }
.doc h2:first-of-type { margin-top:0; }
.doc p, .doc li { font-size:15px; color:var(--text); }
.doc p { margin-bottom:14px; max-width:72ch; }
.doc ul, .doc ol { margin:0 0 16px 22px; }
.doc li { margin-bottom:8px; }
.doc .tip { background:#FBF8EF; border:1px solid var(--gold-soft); border-radius:8px; padding:14px 18px; font-size:14px; color:var(--text); margin:18px 0; max-width:72ch; }
.doc .tip strong { color:var(--navy); }
.doc code { font-family:'DM Mono',monospace; font-size:13px; background:#F0EDE5; padding:2px 6px; border-radius:4px; }
.fig { border:1px dashed var(--line); border-radius:8px; background:var(--paper); padding:34px 20px; text-align:center; color:var(--muted); font-size:13px; margin:18px 0; max-width:72ch; }

/* Developer */
.dev-grid { display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:start; }
.cred-strip { display:flex; gap:14px; flex-wrap:wrap; margin:22px 0; }
.cred { background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:14px 20px; text-align:center; min-width:120px; }
.cred .big { font-family:'DM Serif Display',serif; font-size:21px; color:var(--navy); }
.cred .small { font-size:11.5px; color:var(--muted); }
blockquote { border-left:3px solid var(--gold); padding:6px 0 6px 22px; font-family:'DM Serif Display',serif; font-style:italic; font-size:19px; color:var(--navy); margin:28px 0; max-width:56ch; }
blockquote footer { font-family:'DM Sans',sans-serif; font-style:normal; font-size:13px; color:var(--muted); background:none; padding:8px 0 0; }

/* Contact */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:48px; }
.field { margin-bottom:16px; }
label { display:block; font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px; }
input, textarea, select { width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:6px; font-size:14px; font-family:inherit; color:var(--text); background:var(--paper); outline:none; }
input:focus, textarea:focus, select:focus { border-color:var(--navy); }
.form-msg { display:none; margin-top:14px; padding:11px 14px; border-radius:6px; font-size:13.5px; }
.form-msg.ok { display:block; background:#edfaf3; color:#1d7a45; border:1px solid #b7e8cc; }
.form-msg.err { display:block; background:#fdf0ef; color:#C0392B; border:1px solid #f5c6c2; }

/* Confirmed */
.confirm-card { background:var(--paper); border:1px solid var(--line); border-radius:12px; max-width:480px; margin:90px auto; padding:48px 44px; text-align:center; }
.confirm-card .check { width:54px; height:54px; border-radius:50%; background:var(--navy); color:var(--gold-soft); font-size:26px; line-height:54px; margin:0 auto 22px; }

footer.site { background:var(--navy); color:rgba(247,245,240,.75); padding:42px 0; font-size:13.5px; margin-top:40px; }
footer.site .frow { display:flex; justify-content:space-between; gap:28px; flex-wrap:wrap; }
footer.site .fbrand { font-family:'DM Serif Display',serif; font-size:19px; color:#fff; }
footer.site .fbrand span { color:var(--gold); }
footer.site a { color:var(--gold-soft); text-decoration:none; }
footer.site .legal { margin-top:22px; font-size:12px; color:rgba(247,245,240,.5); max-width:88ch; }

@media (max-width:840px){
  .hero,{grid-template-columns:1fr;}
  .hero,.cols,.cols-2,.dev-grid,.contact-grid{grid-template-columns:1fr;gap:36px;}
  .doc-layout{grid-template-columns:1fr;}
  .doc-nav{position:static;display:flex;flex-wrap:wrap;gap:4px 16px;border-bottom:1px solid var(--line);padding-bottom:14px;}
  .doc-nav a{border-left:none;padding-left:0;}
  .plate .formula{white-space:normal;}
  nav a{margin-left:14px;}
}

/* Download-help modal */
.dl-overlay { display:none; position:fixed; inset:0; background:rgba(20,33,61,.55); z-index:100;
  align-items:center; justify-content:center; padding:20px; }
.dl-overlay.open { display:flex; }
.dl-modal { background:var(--paper); border-radius:12px; max-width:680px; width:100%;
  max-height:90vh; overflow:auto; padding:34px 36px 28px; position:relative;
  box-shadow:0 30px 80px rgba(20,33,61,.4); }
.dl-close { position:absolute; top:12px; right:16px; background:none; border:none;
  font-size:26px; color:var(--muted); cursor:pointer; line-height:1; }
.dl-close:hover { color:var(--navy); }
.dl-head { display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.dl-head h3 { font-family:'DM Serif Display',serif; font-weight:400; font-size:23px; color:var(--navy); }
.dl-spinner { width:22px; height:22px; border:3px solid var(--gold-soft); border-top-color:var(--gold);
  border-radius:50%; animation:dlspin 1s linear infinite; flex:none; }
@keyframes dlspin { to { transform:rotate(360deg); } }
.dl-lede { font-size:14.5px; color:var(--muted); margin-bottom:20px; }
.dl-steps { display:grid; gap:14px; }
.dl-step { border:1px solid var(--line); border-radius:8px; padding:16px 18px; background:var(--cream); }
.dl-step h4 { font-size:14px; color:var(--navy); margin-bottom:8px; }
.dl-step ol { margin-left:18px; font-size:13.5px; }
.dl-step li { margin-bottom:5px; }
.dl-foot { font-size:12.5px; color:var(--muted); margin-top:18px; }
@media (prefers-reduced-motion: reduce){ .dl-spinner{ animation:none; } }
