/* Buildwell Partners site styles */
/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --navy: #0f1f33;
  --navy-2: #172b45;
  --navy-3: #22395a;
  --ink: #1a2433;
  --muted: #5b6776;
  --line: #e4e8ed;
  --paper: #f7f6f2;
  --white: #ffffff;
  --copper: #c4692c;
  --copper-2: #a85520;
  --copper-soft: #fbeee3;
  --copper-light: #f0b98a;
  --sage: #3d7a5f;
  --sage-soft: #e6f1eb;
  --error: #b3261e;
  --error-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 31, 51, 0.07);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
section { padding: 5.5rem 0; }
.eyebrow { display: inline-block; font-family: var(--font-body); line-height: 1.6; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.9rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; text-wrap: balance; }
.muted { color: var(--muted); }
.section-head { margin-bottom: 2.5rem; }
h1.page-title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.96rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease; font-family: var(--font-body); line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--copper); color: var(--white); }
.btn-primary:hover { background: var(--copper-2); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn-outline:hover { border-color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-3); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.9rem; }

/* ============================================================
   HEADER
   ============================================================ */
header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: flex-start; height: 72px; gap: 1.6rem; width: min(1300px, 100% - 2.5rem); }
.nav-cta { margin-left: auto; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--navy); white-space: nowrap; }
.brand-logo { height: 44px; width: auto; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-2); line-height: 1; margin-top: 4px; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.93rem; color: var(--ink); white-space: nowrap; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--copper); }
.nav-links a[aria-current="page"] { color: var(--copper-2); border-bottom-color: var(--copper); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.nav-cta .btn { white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; flex-direction: column; gap: 0; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 0.5rem 1.25rem 1rem; box-shadow: var(--shadow); }
  .nav-links.open li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav-links.open li:last-child { border: 0; }
}
@media (max-width: 520px) {
  .nav { gap: 0.5rem; }
  .brand { font-size: 1rem; gap: 0.5rem; } .brand small { display: none; } .brand-logo { height: 36px; }
  .nav-cta { gap: 0.3rem; }
  .nav-toggle { padding: 0.3rem 0 0.3rem 0.3rem; }
  .nav-toggle span { width: 22px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { background: radial-gradient(1100px 560px at 88% -10%, rgba(196,105,44,0.28), transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #1b2f4c 100%); color: var(--white); padding: 5.5rem 0 5rem; position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow { display: block; text-align: center; color: var(--copper-light); font-family: var(--font-head); font-weight: 700; text-transform: none; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 1.4rem; text-wrap: balance; }
.hero h1 { color: var(--white); margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--copper-light); }
.hero .lead { color: rgba(255,255,255,0.8); font-size: 1.15rem; max-width: none; }
.hero-points { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.9rem; }
.hero-points li { position: relative; padding-left: 1.6rem; color: rgba(255,255,255,0.92); font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.55; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--copper-light); }

@media (max-width: 900px) { .hero { padding: 4rem 0 3.5rem; } }

/* ============================================================
   STATS
   ============================================================ */
.stats { background: var(--paper); border-bottom: 1px solid var(--line); padding: 2.4rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { border-left: 3px solid var(--copper); padding-left: 1rem; }
.stat .num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .lbl { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }

/* ============================================================
   INDUSTRIES
   ============================================================ */
.industries { background: var(--paper); }
.industries-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.ind { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.2rem; background: var(--white); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; }
.ind .icon { width: 58px; height: 58px; border-radius: 14px; background: var(--copper-soft); color: var(--copper-2); display: grid; place-items: center; }
.ind .icon svg { width: 28px; height: 28px; }
.ind h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0; text-wrap: balance; }
@media (max-width: 1000px) { .industries-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .industries-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { background: var(--navy); color: var(--white); }
.pricing .eyebrow { color: var(--copper-light); }
.pricing h1, .pricing h2 { color: var(--white); }
.pricing .lead { color: rgba(255,255,255,0.78); }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.price-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 2rem; }
.price-box h3 { color: var(--white); font-size: 1.45rem; }
.price-box .kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; }
.price-box.gain .kicker { color: #8fd3b2; }
.price-box.flat .kicker { color: var(--copper-light); }
.price-box p { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin: 0; }
.quote { margin: 2.5rem 0 0; padding: 1.6rem 2rem; border-left: 4px solid var(--copper); background: rgba(255,255,255,0.04); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-head); font-size: 1.2rem; font-style: italic; line-height: 1.5; color: rgba(255,255,255,0.92); }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } }

/* ============================================================
   EXIT CALLOUT
   ============================================================ */
.exit { padding: 0 0 5.5rem; }
.exit-box { background: linear-gradient(135deg, var(--copper) 0%, #d9834a 100%); color: var(--white); border-radius: 20px; padding: 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.exit-box h2 { color: var(--white); }
.exit-box p { color: rgba(255,255,255,0.92); }
.exit-box .eyebrow { color: rgba(255,255,255,0.85); }
@media (max-width: 800px) { .exit-box { grid-template-columns: 1fr; padding: 2rem; } }

/* ============================================================
   ABOUT
   ============================================================ */
.about-intro { margin-bottom: 2.5rem; text-align: left; }
.about-intro .lead { max-width: none; }
.founders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.founder { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; }
.founder-head { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1rem; }
.founder .avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--copper); background: var(--navy); }
.founder .avatar-initial { display: grid; place-items: center; color: var(--copper-light); font-family: var(--font-head); font-weight: 700; font-size: 1.8rem; line-height: 1; }
.founder h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin: 0 0 0.15rem; }
.founder .role { font-size: 0.78rem; color: var(--copper-2); font-weight: 600; line-height: 1.35; }
.founder ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.55rem; font-size: 0.9rem; color: var(--muted); flex: 1; }
.founder li { padding-left: 1rem; position: relative; }
.founder li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); }
.founder li b { color: var(--ink); font-weight: 600; }
.founder .owns { border-top: 1px solid var(--line); padding-top: 0.8rem; font-size: 0.82rem; color: var(--navy-3); }
.founder .owns b { font-weight: 700; color: var(--navy); }
.founder-email { display: inline-block; margin-top: 0.7rem; font-size: 0.86rem; font-weight: 600; color: var(--copper-2); text-decoration: none; }
.founder-email:hover, .founder-email:focus-visible { text-decoration: underline; }
@media (max-width: 1000px) { .founders { grid-template-columns: 1fr; } }
/* ============================================================
   CONTACT
   ============================================================ */
.contact .container { display: grid; grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: start; }
.contact-info ul { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.9rem; }
.contact-info li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--muted); font-size: 0.95rem; }
.contact-info li svg { width: 20px; height: 20px; flex: none; color: var(--copper); margin-top: 3px; }
.contact-info li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.contact-info li a:hover { color: var(--copper); }
form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 0.35rem; }
.field .req { color: var(--copper); font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; color: var(--ink); background: var(--white); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(196,105,44,0.35); border-color: var(--copper); }
.field textarea { min-height: 96px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: 0.8rem; color: var(--muted); margin: 0.8rem 0 0; }
.form-note .req { color: var(--copper); font-weight: 700; }
/* Error states */
.form-alert { display: none; background: var(--error-soft); color: var(--error); border: 1px solid rgba(179,38,30,0.25); border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.88rem; font-weight: 600; margin-bottom: 1.2rem; }
.form-alert.show { display: block; }
.form-alert a { color: var(--error); }
.field.has-error label { color: var(--error); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); background: #fffafa; }
.field.has-error input:focus, .field.has-error select:focus, .field.has-error textarea:focus { outline-color: rgba(179,38,30,0.35); border-color: var(--error); }
.field-error { margin: 0.35rem 0 0; font-size: 0.8rem; font-weight: 500; color: var(--error); display: flex; gap: 0.4rem; align-items: flex-start; }
.field-error:empty { display: none; }
.field-error::before { content: "!"; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--error); color: var(--white); font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
/* Loading state */
.btn.is-loading { cursor: progress; opacity: 0.9; }
.btn.is-loading:hover { transform: none; }
.btn.is-loading::before { content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45); border-top-color: var(--white); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation-duration: 2s; } }
.form-success { display: none; background: var(--sage-soft); color: var(--sage); padding: 1rem; border-radius: 8px; font-weight: 600; margin-top: 1rem; }
.hp { position: absolute; left: -9999px; }
/* Wording that depends on whether the form sits beside or below the text */
.narrow-only { display: none; }
@media (max-width: 900px) { .contact .container { grid-template-columns: 1fr; gap: 2.5rem; } .row { grid-template-columns: 1fr; } .wide-only { display: none; } .narrow-only { display: inline; } }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 22px 0 10px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 2.5rem 4rem; text-align: left; }
footer h4 { color: var(--white); font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.5rem; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; line-height: 1.4; }
footer a { text-decoration: none; color: rgba(255,255,255,0.7); }
footer a:hover { color: var(--white); }
.footer-brand { display: flex; align-items: center; }
.footer-logo { display: inline-block; background: var(--white); border-radius: 12px; padding: 0.9rem 1.1rem; }
.footer-logo img { width: 220px; height: auto; display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 0.5rem; padding-top: 0.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.78rem; color: rgba(255,255,255,0.5); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   POLICY PAGES
   ============================================================ */
.panel > section.legal { padding: 2.5rem 0 3.5rem; }
.legal .container { max-width: 760px; }
.legal h1 { margin-bottom: 0.4rem; }
.legal h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; margin: 1.8rem 0 0.4rem; }
.legal p, .legal li { color: var(--muted); font-size: 0.96rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal a { color: var(--copper-2); }
.legal .updated { font-size: 0.85rem; margin-bottom: 0.5rem; }
.legal .notice { border-left: 3px solid var(--copper); background: var(--paper); padding: 0.9rem 1.1rem; color: var(--ink); border-radius: 0 8px 8px 0; }
.sitemap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 2rem; margin-top: 1.5rem; }
.sitemap-grid h3 { margin-top: 0; }
.sitemap-grid ul { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.sitemap-grid a { text-decoration: none; font-weight: 500; }
.sitemap-grid a:hover { text-decoration: underline; }
.prefs { margin-top: 1.5rem; display: grid; gap: 0.8rem; }
.pref { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--white); }
.pref h3 { margin: 0 0 0.2rem; }
.pref p { margin: 0; font-size: 0.9rem; }
.pref input { width: 22px; height: 22px; accent-color: var(--copper); flex: none; }
.prefs .btn { justify-self: start; margin-top: 0.4rem; }
.pref-status { font-size: 0.88rem; color: var(--sage); font-weight: 600; margin: 0; min-height: 1.3em; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.legal-links span { color: rgba(255,255,255,0.3); }

/* Page wrapper and Back / Next bars */
.panel-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1rem 0 1.5rem; }
/* Tighter section spacing: the Back/Next bars already frame each section */
.panel > section { padding: 22px 0; }
.panel > section.hero { padding: 22px 0; }
.panel > section.exit { padding: 0 0 22px; }
.panel > .stats { padding: 22px 0; }
.panel-nav .back { justify-self: start; }
.panel-nav .next { justify-self: end; }
.panel-nav .cta { justify-self: center; }
.panel-nav-top { padding: 1rem 0 0.75rem; }
@media (max-width: 640px) {
  .panel-nav { grid-template-columns: 1fr 1fr; }
  .panel-nav .cta { grid-column: 1 / -1; order: -1; }
  /* On phones, content starts right under the header; Back/Next stays at the bottom */
  .panel-nav-top { display: none; }
}

/* Sticky call to action on phones */
.mobile-cta { display: none; }
@media (max-width: 640px) {
  .mobile-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,31,51,0.08); transition: transform 0.25s ease, visibility 0s; }
  .mobile-cta .btn { width: 100%; }
  .mobile-cta.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform 0.25s ease, visibility 0s 0.25s; }
  body.has-mobile-cta { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { .mobile-cta, .mobile-cta.is-hidden { transition: none; } }

/* Reveal */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.pending { opacity: 0; transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) { .reveal.pending { opacity: 1; transform: none; } .reveal { transition: none; } html { scroll-behavior: auto; } }
