/* Sideline Partners — shared stylesheet */

:root {
  --navy: #0e1c2b;
  --navy-2: #16293b;
  --green: #1f7a54;
  --green-deep: #14503a;
  --green-ink: #0f3a2b;
  --gold: #c69a46;
  --paper: #f6f5f1;
  --paper-2: #edeae1;
  --ink: #141f29;
  --muted: #5b6a75;
  --muted-light: #9fb0bd;
  --line: #e3e0d7;
  --line-dark: rgba(255,255,255,.14);
  --max: 1140px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 20px; }
.hero .eyebrow, .section-dark .eyebrow { color: var(--gold); }

.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; padding: 13px 24px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #24895e; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); transform: translateY(-1px); }

header.site { position: sticky; top: 0; z-index: 60; background: rgba(246,245,241,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; border-radius: 7px; flex: 0 0 auto; position: relative; background: linear-gradient(150deg, var(--navy), var(--navy-2)); }
.brand .mark::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; background: var(--gold); transform: translateX(-50%); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a.cta { color: #fff; background: var(--green); padding: 9px 16px; border-radius: 9px; }
.nav-links a.cta:hover { background: #24895e; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; color: var(--ink); }

section { padding: 96px 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: linear-gradient(165deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 62ch; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 19px; }
.section-dark .section-head p { color: #c5d2dd; }

.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px); background-size: 100% 48px; opacity: .5; }
.hero .wrap { position: relative; z-index: 1; padding-top: 92px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); max-width: 16ch; color: #fff; }
.hero .lede { margin-top: 24px; max-width: 60ch; font-size: clamp(17px, 2.2vw, 20px); color: #c5d2dd; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 66px; }
.hero-card { border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px; background: rgba(255,255,255,.03); }
.hero-card .k { font-family: 'Fraunces', serif; font-size: 22px; color: #fff; }
.hero-card .v { margin-top: 8px; font-size: 15px; color: #9fb0bd; }
.hero-card .k::before { content: ""; display: block; width: 26px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 14px; }

.prose { max-width: 68ch; }
.prose p { font-size: 18px; color: var(--ink); }
.prose p + p { margin-top: 20px; }
.section-dark .prose p { color: #cdd8e2; }
.lead-quote { font-family: 'Fraunces', serif; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: var(--green-deep); }

.connector-line { margin-top: 26px; font-family: 'Fraunces', serif; font-style: italic; font-size: clamp(17px, 2.2vw, 21px); color: var(--gold); max-width: 46ch; }

.diagram { margin-top: 48px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 30px; }
.diagram .cap-row { text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.t-node { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; }
.t-node .cap { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-deep); }
.t-node .big { font-family: 'Fraunces', serif; font-size: 19px; margin-top: 5px; color: var(--ink); }
.diagram .rests { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 18px 0; }
.diagram .rests::before, .diagram .rests::after { content: ""; height: 1px; flex: 1; background: var(--line); max-width: 120px; }
.engines-base { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.e-node { background: var(--green-deep); color: #fff; border-radius: 12px; padding: 20px; text-align: center; }
.e-node .cap { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a9d6c3; }
.e-node .big { font-family: 'Fraunces', serif; font-size: 20px; margin-top: 5px; color: #fff; }
.diagram .foot { margin-top: 18px; font-size: 14.5px; color: var(--muted); text-align: center; }

.engines-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.engines-2 .engine { margin-bottom: 0; }

.engine { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 40px; margin-bottom: 22px; position: relative; }
.engine.lead { border-color: rgba(31,122,84,.35); box-shadow: 0 20px 50px -30px rgba(20,80,58,.4); }
.engine .tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 14px; }
.engine h3 { font-size: clamp(24px, 3vw, 32px); }
.engine p { margin-top: 14px; color: var(--muted); font-size: 17.5px; max-width: 68ch; }
.engine .more { margin-top: 20px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--green-deep); }
.engine .more:hover { gap: 11px; }

.foundation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 6px; }
.fcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 26px; }
.fcard h4 { font-size: 19px; }
.fcard p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

.intro-line { max-width: 60ch; margin-bottom: 40px; color: #c5d2dd; font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.step { padding-top: 20px; border-top: 2px solid var(--gold); }
.step .k { font-family: 'Fraunces', serif; font-size: 15px; color: var(--gold); font-weight: 600; letter-spacing: .04em; }
.step h3 { font-size: 21px; margin: 10px 0 8px; }
.step p { color: #c5d2dd; font-size: 15.5px; }

.contact-card { text-align: center; max-width: 720px; margin: 0 auto; }
.contact-card h2 { font-size: clamp(28px, 4.4vw, 44px); }
.contact-card p { margin: 18px auto 0; max-width: 54ch; font-size: 18px; color: #c5d2dd; }
.contact-card .btn { margin-top: 30px; }

.page-hero { padding: 78px 0 66px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); color: #fff; max-width: 20ch; }
.page-hero .lede { margin-top: 20px; max-width: 60ch; color: #c5d2dd; font-size: 19px; }

footer.site { background: var(--navy); color: #aebecb; padding: 56px 0 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Fraunces', serif; font-size: 19px; }
.foot-tag { margin-top: 14px; font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; color: var(--gold); max-width: 30ch; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: #aebecb; font-size: 15px; font-weight: 600; }
.foot-links a:hover { color: #fff; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 14px; color: #7f92a1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

[hidden] { display: none !important; }

@media (max-width: 880px) {
  .hero-cards, .foundation, .steps, .engines-base, .engines-2, .triad { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav-links.open { display: flex; position: absolute; left: 0; right: 0; top: 74px; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 28px 22px; }
  .nav-links.open a { padding: 8px 0; }
  section { padding: 66px 0; }
  .engine { padding: 28px; }
}

/* ---- Visual QA addendum (v3): orphans, connector line, footer ---- */
h1, h2, h3, h4 { text-wrap: balance; }
.section-head p, .prose p, .lede, .contact-card p { text-wrap: pretty; }

.connector-line {
  margin: 20px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 18px;
  line-height: 1.4;
  text-wrap: balance;
}

.hero .wrap { padding-top: 76px; padding-bottom: 88px; }

footer.site { padding: 44px 0 30px; }
.foot-top { gap: 40px; align-items: center; }
.foot-tag { text-wrap: balance; max-width: 30ch; margin-top: 12px; }
.foot-links { gap: 22px; }
.foot-links a { font-size: 14px; color: #93a5b3; font-weight: 500; }
.foot-links a:hover { color: #fff; }
.foot-bottom { margin-top: 34px; padding-top: 18px; }
@media (max-width: 880px) {
  .foot-top { flex-direction: column; align-items: flex-start; gap: 20px; }
}
