/* Keystone Solutions public website.
   Palette: deep navy (ink), harbor slate, mist and glacier blues, with one clear "keystone blue" accent
   used only for the keystone, primary actions and focus. */

@font-face { font-family: 'Unbounded'; src: url('/fonts/unbounded-var.woff') format('woff'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist-var.woff') format('woff'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0B1B33;          /* navy: hero, header, footer */
  --harbor: #16304F;       /* raised navy surfaces */
  --stone: #23466F;        /* arch stones */
  --mist: #F3F7FC;         /* page background */
  --glacier: #E1ECF8;      /* tinted sections */
  --line: #C9D7E8;         /* hairlines on light */
  --line-ink: #2A4669;     /* hairlines on navy */
  --text: #12233B;         /* body text on light */
  --muted: #4B5E78;        /* secondary text on light */
  --on-ink: #EAF2FC;       /* text on navy */
  --on-ink-muted: #A8BCD6; /* secondary text on navy */
  --blue: #1F6FEB;         /* keystone blue: buttons, links */
  --blue-deep: #1557C0;    /* pressed / hover */
  --sky: #5AB0FF;          /* keystone + accents on navy */
  --ok: #157F4F;
  --error: #B42318;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--mist); color: var(--text); font: 400 17px/1.6 var(--body); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
::selection { background: #BFDCFF; color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0; }
.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; max-width: 60ch; }
.section-intro { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 18px; }

/* ── Buttons ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: var(--radius);
  font: 600 16px/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-amber, .btn-blue { background: var(--blue); color: #fff; }
.btn-amber:hover, .btn-blue:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: var(--line-ink); }
.btn-ghost:hover { border-color: var(--sky); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ── Header ────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--line-ink); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 26px; height: 26px; fill: var(--sky); }
.brand-name { font: 600 16px/1 var(--display); letter-spacing: -0.01em; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a, .link-login { color: var(--on-ink-muted); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: 8px; }
.nav a:hover, .link-login:hover, .nav a[aria-current="page"] { color: #fff; background: var(--harbor); }
.header-actions { display: none; margin-left: auto; align-items: center; gap: 8px; }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--on-ink); font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-ink); border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: ''; width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; box-shadow: inset 0 4px 0 -2px transparent; background: linear-gradient(currentColor, currentColor) center/100% 2px no-repeat; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px)); background: var(--ink); border: 1px solid var(--line-ink); border-radius: 12px; padding: 10px; display: grid; gap: 2px; box-shadow: 0 18px 40px rgba(4, 12, 26, .45); }
.menu-panel a:not(.btn) { color: var(--on-ink); text-decoration: none; padding: 14px 12px; border-radius: 8px; font-weight: 500; }
.menu-panel a:not(.btn):hover { background: var(--harbor); }
.menu-panel .btn { margin-top: 8px; }
@media (min-width: 900px) {
  .nav, .header-actions { display: flex; }
  .menu { display: none; }
}

/* ── Hero ──────────────────────────────────────────── */
.hero { background: var(--ink); color: var(--on-ink); padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: var(--on-ink-muted); margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 28px; color: var(--on-ink-muted); font-size: 15px; max-width: 46ch; border-left: 2px solid var(--sky); padding-left: 14px; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; } }

.arch { width: 100%; height: auto; overflow: visible; }
.arch-stone { fill: var(--stone); stroke: #34598A; stroke-width: 1; }
.arch-key { fill: var(--sky); }
.arch-labels text { fill: var(--on-ink-muted); font: 500 19px var(--body); }
.arch-center { fill: var(--on-ink); font: 600 22px var(--display); }
.arch-ground { stroke: var(--line-ink); stroke-width: 2; }
.arch-keystone { animation: set-keystone .8s cubic-bezier(.2, .9, .25, 1.15) .35s both; }
@keyframes set-keystone { from { transform: translateY(-34px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .arch-keystone { animation: none; } html { scroll-behavior: auto; } }

/* ── Sections ──────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--glacier); }
.section-ink { background: var(--ink); color: var(--on-ink); }
.section-ink h2 { color: #fff; }
.section-ink .section-intro { color: var(--on-ink-muted); }
.section-head { max-width: 760px; margin-bottom: 44px; }

/* Evidence */
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.finding { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 22px 24px; }
.finding p { font-size: 19px; line-height: 1.45; color: var(--text); font-weight: 500; }
.finding cite { display: block; margin-top: 12px; font-style: normal; font-size: 14px; color: var(--muted); }
.findings-note { margin-top: 22px; font-size: 14px; color: var(--muted); max-width: 70ch; }
@media (min-width: 900px) { .findings { grid-template-columns: repeat(3, 1fr); } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; align-content: start; }
.step::before { content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; font: 600 20px/1 var(--display); }
.step p { color: var(--muted); margin-top: 8px; max-width: 60ch; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } .step { grid-template-columns: 1fr; } }

/* Services */
.services-grid { display: grid; gap: 28px; }
.flagship { background: var(--ink); color: var(--on-ink); border-radius: 16px; padding: clamp(26px, 4vw, 40px); }
.flagship h3 { color: #fff; font-size: clamp(22px, 2.6vw, 28px); }
.flagship > p { color: var(--on-ink-muted); margin-top: 12px; max-width: 52ch; }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
.flagship .checklist li::before { background-color: var(--sky); }
.flagship .btn { margin-top: 28px; }
.service-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.service-list div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.service-list dt { font: 600 18px/1.3 var(--display); color: var(--text); }
.service-list dd { margin: 6px 0 0; color: var(--muted); max-width: 56ch; }
@media (min-width: 960px) { .services-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; } }

/* Who it's for */
.trades { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }
.trades li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 500; font-size: 15px; }

/* Principles */
.principles { display: grid; gap: 28px; }
.principle { border-top: 2px solid var(--sky); padding-top: 18px; }
.principle h3 { color: #fff; }
.principle p { color: var(--on-ink-muted); margin-top: 8px; }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(2, 1fr); gap: 36px 48px; } }

/* Pricing teaser on the home page */
.teaser { display: grid; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 4vw, 40px); }
.teaser p { color: var(--muted); margin-top: 10px; max-width: 58ch; }
@media (min-width: 860px) { .teaser { grid-template-columns: 1fr auto; } }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative; font: 600 18px/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > p { padding: 0 0 22px; color: var(--muted); max-width: 68ch; }

/* Contact */
.contact-grid { display: grid; gap: 40px; }
.next-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; counter-reset: next; }
.next-steps li { counter-increment: next; display: grid; grid-template-columns: 36px 1fr; gap: 14px; color: var(--muted); }
.next-steps li::before { content: counter(next); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue); font: 600 14px/1 var(--display); }
.next-steps strong { color: var(--text); display: block; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; } }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px, 4vw, 36px); box-shadow: 0 1px 0 rgba(11, 27, 51, .04); }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field label, .field .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid #B7C7DB; border-radius: 9px; background: #fff; color: var(--text); font: 400 16px/1.4 var(--body); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 111, 235, .2); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14px; margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--muted); }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 24px; display: grid; gap: 14px; }
.form-actions .btn { width: 100%; }
.form-fine { font-size: 14px; color: var(--muted); }
.form-status { border-radius: 10px; padding: 14px 16px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { background: #FEF0EE; color: var(--error); border: 1px solid #F5C2BC; }
.form-success { text-align: left; }
.form-success h3 { font-size: 22px; }
.form-success p { color: var(--muted); margin-top: 10px; }
[data-form-state="unavailable"] .form-body { display: none; }
[data-form-state="ready"] .form-unavailable, .form-success[hidden] { display: none; }
.form-unavailable { color: var(--muted); }

/* ── Pricing page ──────────────────────────────────── */
.page-hero { background: var(--ink); color: var(--on-ink); padding: clamp(48px, 7vw, 80px) 0; }
.page-hero h1 { color: #fff; max-width: 18ch; }
.page-hero .lead { color: var(--on-ink-muted); margin-top: 18px; }
.tiers { display: grid; gap: 22px; margin-top: calc(-1 * clamp(28px, 4vw, 44px)); }
.tier { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px 28px; display: flex; flex-direction: column; }
.tier-featured { background: var(--harbor); color: var(--on-ink); border-color: var(--sky); box-shadow: 0 20px 44px rgba(11, 27, 51, .22); }
.tier-flag { position: absolute; top: -14px; left: 28px; background: var(--sky); color: var(--ink); font-weight: 700; font-size: 13px; line-height: 1; padding: 7px 12px; border-radius: 999px; }
.tier h2 { font-size: 24px; }
.tier-featured h2 { color: #fff; }
.tier-for { color: var(--muted); margin-top: 8px; }
@media (min-width: 980px) { .tier-for { min-height: 4.8em; } }
.tier-featured .tier-for { color: var(--on-ink-muted); }
.price { margin-top: 22px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-amount { font: 600 44px/1 var(--display); letter-spacing: -0.02em; }
.price-unit { color: var(--muted); font-weight: 500; }
.tier-featured .price-unit, .tier-featured .setup { color: var(--on-ink-muted); }
.setup { color: var(--muted); margin-top: 6px; font-size: 15px; }
.tier .btn { margin-top: 24px; width: 100%; }
.tier .checklist { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.tier-featured .checklist { border-top-color: var(--line-ink); }
.tier-featured .checklist li::before { background-color: var(--sky); }
.tier .includes-label { font-weight: 600; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.tier .includes-label + .checklist { margin-top: 12px; padding-top: 0; border-top: 0; }
.tier-featured .includes-label { border-top-color: var(--line-ink); color: #fff; }
.terms { margin-top: 22px; color: var(--muted); font-size: 15px; max-width: 80ch; }
@media (min-width: 980px) { .tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; } .tier-featured { transform: translateY(-12px); } }

.addons { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 860px; }
.addon { display: grid; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.addon-name { font-weight: 600; }
.addon-price { font: 600 17px/1.3 var(--display); color: var(--blue); }
.addon-desc { color: var(--muted); }
@media (min-width: 700px) { .addon { grid-template-columns: 1fr auto; column-gap: 24px; } .addon-desc { grid-column: 1; } .addon-price { grid-column: 2; grid-row: 1; text-align: right; } }

.compare { display: grid; gap: 18px; }
.compare-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.compare-row h3 { font-size: 17px; }
.compare-row p { color: var(--muted); margin-top: 8px; }
.compare-row cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--muted); }
.compare-row.is-us { border: 2px solid var(--blue); }
@media (min-width: 900px) { .compare { grid-template-columns: repeat(3, 1fr); } }

/* ── Prose pages (privacy, thanks) ─────────────────── */
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; margin-top: 40px; }
.prose p, .prose ul { margin-top: 14px; color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.updated { color: var(--on-ink-muted); margin-top: 14px; font-size: 15px; }

/* ── Footer ────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 56px 0 28px; }
.footer-grid { display: grid; gap: 32px; }
.footer-motto { margin-top: 14px; max-width: 40ch; }
.footer-cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-col { display: grid; align-content: start; gap: 2px; }
.footer-col a { color: var(--on-ink); text-decoration: none; padding: 5px 0; font-size: 15px; }
.footer-col a:hover { color: var(--sky); }
.footer-head { font: 600 14px/1 var(--display); color: var(--on-ink-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.footer-head a { color: inherit; padding: 0; font-size: inherit; }
.footer-base { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-ink); font-size: 14px; }
@media (min-width: 960px) { .footer-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 48px; } }
.section-flush { padding-top: 0; }
@media (max-width: 560px) { .hero-actions .btn, .teaser .btn { width: 100%; } }

/* Secondary sign-up link under each plan's main button. */
.plan-signup { display: block; margin-top: 10px; text-align: center; font-size: 14px; color: var(--blue-deep); }
.plan-signup:hover { color: var(--blue); }

/* ── Content pages (services, industries, company) ── */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--on-ink-muted); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-ink); }
.crumbs a { color: var(--on-ink-muted); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--on-ink); }
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 24px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.info-card:hover { border-color: #9DB6D6; box-shadow: 0 10px 26px rgba(11, 27, 51, .08); }
.info-card h3 { font-size: 18px; }
.info-card h3 a { color: var(--ink); text-decoration: none; }
.info-card h3 a::after { content: ' →'; color: var(--blue); }
.info-card h3 a:hover { color: var(--blue-deep); }
.info-card p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.checklist-wide { max-width: 72ch; }
.section-ink .form-card { color: var(--text); }
.section-ink .section-intro a { color: var(--sky); }
@media (prefers-reduced-motion: reduce) { .info-card { transition: none; } }
