/* JASPR Consulting Group: shared site styles.
   Layout concept: the four-tile quadrant from the logo is the organizing device.
   Pillars always sit in the same positions (Strategy top-left in maroon,
   Systems top-right, Projects bottom-left, Governance bottom-right with the curved corner). */

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --ink: #13233A;
  --ink-2: #4A5669;
  --line: #DCE1E8;
  --maroon: #7A1F2B;
  --maroon-ink: #FFFFFF;
  --link: #7A1F2B;
  --tile: #13233A;
  --mark: #13233A;
  --chrome: #F3EEE6;
  --chrome-line: #E3DACB;
  --on-tile: #F3F5F8;
  --on-tile-2: #B9C4D2;
  --band: #13233A;
  --on-band: #F3F5F8;
  --on-band-2: #B9C4D2;
  --ok: #1F6B45;   --ok-bg: #E3F1E8;
  --watch: #8A5A00; --watch-bg: #FBF0D9;
  --risk: #9B1C1C; --risk-bg: #F9E2E2;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.6rem + 3vw, 3.6rem);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1624; --surface: #13213A; --ink: #E8EDF3; --ink-2: #A9B5C4; --line: #263752;
    --maroon: #A63A47; --maroon-ink: #FFFFFF; --link: #E58A94;
    --chrome: #1F1C18; --chrome-line: #38322A; --mark: #E8EDF3; --tile: #1D3150; --on-tile: #EEF2F7; --on-tile-2: #AFBDCE;
    --band: #172A45; --on-band: #EEF2F7; --on-band-2: #AFBDCE;
    --ok: #7BD3A1; --ok-bg: #133325; --watch: #F2C46B; --watch-bg: #3A2C0E; --risk: #F29B9B; --risk-bg: #3D1717;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1624; --surface: #13213A; --ink: #E8EDF3; --ink-2: #A9B5C4; --line: #263752;
  --maroon: #A63A47; --maroon-ink: #FFFFFF; --link: #E58A94;
  --chrome: #1F1C18; --chrome-line: #38322A; --mark: #E8EDF3; --tile: #1D3150; --on-tile: #EEF2F7; --on-tile-2: #AFBDCE;
  --band: #172A45; --on-band: #EEF2F7; --on-band-2: #AFBDCE;
  --ok: #7BD3A1; --ok-bg: #133325; --watch: #F2C46B; --watch-bg: #3A2C0E; --risk: #F29B9B; --risk-bg: #3D1717;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.025em; }
h3 { letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 38em; line-height: 1.55; }
.muted { color: var(--ink-2); }
.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.prose { max-width: 40em; display: flex; flex-direction: column; gap: 1rem; }

.wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2.5rem; max-width: 46em; }

.sr-skip { position: absolute; left: -9999px; top: 0; }
.sr-skip:focus { left: 16px; top: 16px; z-index: 5; background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; border-radius: 6px; }

/* Header */
.site-header { background: var(--chrome); border-bottom: 1px solid var(--chrome-line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark .t { fill: var(--mark); }
.brand-mark .m { fill: var(--maroon); }
.brand-words { display: inline-flex; flex-direction: column; gap: 4px; }
.brand-name { font-size: 25px; font-weight: 600; letter-spacing: 0.16em; line-height: 0.9; margin-right: -0.16em; }
.brand-sub { display: flex; justify-content: space-between; font-size: 7px; font-weight: 500; line-height: 1; color: var(--ink-2); }
.brand-sub .sp { width: 0.5em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem; padding-block: 0.6rem; display: inline-block; }
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] { color: var(--link); box-shadow: inset 0 -2px 0 var(--link); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.7rem 1.4rem; border-radius: 6px; font: 600 1rem/1.2 var(--font-body); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--maroon); color: var(--maroon-ink); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.band .btn-ghost { border-color: var(--on-band); color: var(--on-band); }
.band .btn-ghost:hover { background: var(--on-band); color: var(--band); }
.nav .btn { padding-block: 0.55rem; min-height: 44px; color: var(--maroon-ink); box-shadow: none; }
.nav .btn:hover { color: var(--maroon-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.page-hero { padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 2vw, 3.5rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero .wrap { display: flex; flex-direction: column; gap: 1.25rem; }

/* The quadrant */
.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; width: 100%; justify-self: end; }
.quad-tile { background: var(--tile); color: var(--on-tile); border-radius: 14px; padding: clamp(1rem, 0.6rem + 1.4vw, 1.6rem); aspect-ratio: 1 / 1; max-width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.4rem; text-decoration: none; transition: transform 160ms ease; }
.quad-tile:first-child { background: var(--maroon); color: #FFFFFF; }
.quad-tile:first-child p { color: rgba(255,255,255,0.82); }
.quad-tile:last-child { border-bottom-right-radius: 46%; }
.quad-tile:hover { transform: translateY(-3px); }
.quad-tile .q-name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.1; }
.quad-tile p { font-size: 0.92rem; line-height: 1.4; color: var(--on-tile-2); }
.quad-tile:last-child p { padding-right: 18%; }

.mini-quad { display: grid; grid-template-columns: repeat(2, 14px); gap: 3px; flex: none; }
.mini-quad span { width: 14px; height: 14px; border-radius: 3px; background: var(--line); }
.mini-quad span:nth-child(4) { border-bottom-right-radius: 9px; }
.mini-quad span.on { background: var(--ink); }
.mini-quad span.on:first-child { background: var(--maroon); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); display: flex; flex-direction: column; gap: 1rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ticks li { padding-left: 1.4rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--maroon); }

/* Situations list */
.situations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.situation { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.situation:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.situation h3 { font-family: var(--font-display); font-size: var(--step-1); }

/* Navy band */
.band { background: var(--band); color: var(--on-band); }
.band .muted, .band .lede { color: var(--on-band-2); }
.band .eyebrow { color: var(--on-band-2); }
.band a:not(.btn) { color: var(--on-band); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,0.14); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--band); padding: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.fact b { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.1; }
.fact span { font-size: 0.92rem; color: var(--on-band-2); line-height: 1.4; }

/* Principles */
.principle { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.1rem; border-top: 3px solid var(--ink); }
.principle:first-child { border-top-color: var(--maroon); }

/* Pillar detail (services) */
.pillar { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.5rem; }
.pillar-head { display: flex; flex-direction: column; gap: 1rem; }
.pillar-title { display: flex; align-items: center; gap: 0.9rem; }
.subhead { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 0.6rem; }

/* Engagement table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
thead th { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); background: var(--bg); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }

/* Process steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.steps .when { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--link); }

/* Scorecard */
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-watch { color: var(--watch); background: var(--watch-bg); }
.chip-risk { color: var(--risk); background: var(--risk-bg); }
.score { font-variant-numeric: tabular-nums; font-weight: 600; }
.caption { font-size: 0.9rem; color: var(--ink-2); margin-top: 0.75rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 1.1rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); list-style-position: outside; }
.faq details p { margin-top: 0.75rem; color: var(--ink-2); max-width: 40em; }

/* About */
.portrait { aspect-ratio: 4 / 5; max-width: 100%; width: 100%; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 0.95rem; text-align: center; padding: 1rem; }
.namecard { display: flex; flex-direction: column; gap: 0.25rem; }
.stone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.strata { width: 100%; max-width: 360px; aspect-ratio: 1 / 1; justify-self: center; }

/* Contact form */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-weight: 400; color: var(--ink-2); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 0.85rem; min-height: 48px; width: 100%; }
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.form-status { padding: 1rem 1.2rem; border-radius: 6px; background: var(--ok-bg); color: var(--ink); }
.form-status.err { background: var(--risk-bg); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-list b { display: block; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.15rem; }
.next-steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }

/* CTA strip */
.cta-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* Footer */
.site-footer { background: var(--chrome); border-top: 1px solid var(--chrome-line); padding-block: 3rem 2rem; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 2rem; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 3rem; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.foot-cols a { color: var(--ink); text-decoration: none; }
.foot-cols a:hover { color: var(--link); text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--ink-2); border-top: 1px solid var(--chrome-line); padding-top: 1.5rem; }

@media (max-width: 900px) {
  .hero .wrap, .band .wrap, .pillar, .stone { grid-template-columns: minmax(0, 1fr); }
  .quad { justify-self: start; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-4, .situations, .facts { grid-template-columns: minmax(0, 1fr); }
  .situation, .situation:nth-child(even) { padding: 1.25rem 0; border-left: 0; }
  .quad { gap: 8px; }
  .quad-tile p { display: none; }
  .quad-tile .q-name { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.contact-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.portrait-initials { max-width: 340px; border: 0; background: var(--tile); color: var(--on-tile); font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 2rem + 4vw, 5rem); letter-spacing: 0.06em; border-bottom-right-radius: 38%; }
.portrait-photo { display: block; max-width: 340px; height: auto; padding: 0; border: 0; object-fit: cover; background: var(--tile); border-bottom-right-radius: 38%; }
.founder-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
@media (max-width: 640px) { .founder-grid { grid-template-columns: minmax(0, 1fr); } }
