/* Krupnick Consulting Group — site styles.
   Layout concept: white pages punctuated by full-bleed Krupnick Blue fields; the logo's
   round-capped strokes become pill buttons and tags, and its mint dot becomes the
   "point marker" that leads every eyebrow. All values come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: inherit; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.field :focus-visible { outline-color: var(--kcg-mint); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--action); color: var(--on-action); padding: 8px 16px; border-radius: var(--radius-pill); }
.skip-link:focus { left: 16px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--space-8); }
.section { padding-block: var(--space-24); }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--surface-alt); border-top: 0; }
.section.alt + .section { border-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.measure { max-width: var(--measure); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; }
.section-head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-12); max-width: 760px; }
.section-head .lede { color: var(--ink-muted); }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
}
@media (max-width: 720px) {
  .wrap { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-16); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .display-xl { font-size: 40px; }
  .display-l { font-size: 34px; }
  .heading { font-size: 26px; }
  .lede { font-size: 18px; }
}

/* ---------- point marker + eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; color: var(--ink-muted); }
.point { position: relative; display: inline-block; width: 26px; height: 10px; flex: none; }
.point::before { content: ""; position: absolute; inset: 0 0 0 4px; border-radius: var(--radius-pill); background: var(--accent); }
.point::after { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--kcg-mint); }
.field .eyebrow { color: var(--on-field-muted); }
.field .point::before { background: var(--on-field-muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-mint { background: var(--kcg-mint); color: var(--on-mint); }
.btn-mint:hover { background: var(--on-field); color: var(--on-mint); }
.btn-ghost-field { background: transparent; color: var(--on-field); border-color: var(--on-field-muted); }
.btn-ghost-field:hover { border-color: var(--on-field); color: var(--on-field); background: var(--field-stroke); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.text-link { font-family: var(--font-display); font-weight: 800; text-decoration: none; }
.text-link::after { content: ""; display: inline-block; vertical-align: 0.1em; margin-left: 8px; width: 7px; height: 7px; border-right: 2.5px solid currentColor; border-top: 2.5px solid currentColor; transform: rotate(45deg); border-radius: 1px; transition: transform .15s; }
.text-link:hover::after { transform: translateX(3px) rotate(45deg); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
.tag { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--ink); background: var(--surface); white-space: nowrap; }
.tag-status { border-color: var(--accent); color: var(--accent); }
.tag-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kcg-mint); box-shadow: 0 0 0 2px var(--accent); margin-right: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-height: var(--header-height); }
.brand { display: inline-flex; color: var(--kcg-blue); line-height: 0; }
.brand svg { height: 46px; width: auto; }
.logo-ink { fill: var(--kcg-blue); }
.logo-dot { fill: var(--kcg-mint); }

.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav ul { display: flex; gap: var(--space-6); list-style: none; }
.nav a:not(.btn) { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; padding-block: 8px; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a:not(.btn)[aria-current="page"] { color: var(--accent); }
.nav .btn[aria-current="page"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--kcg-mint); }
.nav a:not(.btn)[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--kcg-mint); box-shadow: 0 0 0 2px var(--accent); }
.nav .btn { min-height: 42px; padding: 10px 20px; font-size: 15px; }
.nav-toggle { display: none; background: none; border: 2px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--ink); font: 700 15px var(--font-display); padding: 8px 16px; cursor: pointer; }

@media (max-width: 820px) {
  .brand svg { height: 38px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-6); }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a:not(.btn) { display: block; padding-block: 12px; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)[aria-current="page"]::after { left: auto; right: 4px; bottom: 50%; margin: 0 0 -4px; }
}

/* ---------- field (blue band) ---------- */
.field { position: relative; overflow: hidden; background: var(--field); color: var(--on-field); }
.field .lede { color: var(--on-field-muted); }
.field a:not(.btn) { color: var(--on-field); }
.field-art { position: absolute; pointer-events: none; }
.field-art .stroke { fill: none; stroke: var(--field-stroke); stroke-width: 40; stroke-linecap: round; stroke-linejoin: round; }
.field-art .dot { fill: var(--kcg-mint); }

/* Brand art never overlaps the copy. Wide screens: it sits in the empty space to the right.
   Narrower screens: it drops into the flow below the copy, aligned right, fully visible. */
.field { display: flex; flex-direction: column; }
.field > .wrap { position: relative; z-index: 1; width: 100%; }

.hero { padding-block: 112px 120px; }
.hero-copy { display: flex; flex-direction: column; gap: var(--space-6); max-width: 660px; }
.hero .field-art { right: max(24px, calc((100% - var(--content-max)) / 2)); top: 50%; transform: translateY(-50%); width: 480px; }
@media (max-width: 1320px) {
  .hero { padding-block: 96px 56px; }
  .hero .field-art { position: relative; order: 2; align-self: flex-end; top: auto; right: auto; transform: none; width: 300px; margin: var(--space-8) var(--space-8) 0 0; }
}

.page-hero { padding-block: 88px 80px; }
.page-hero .hero-copy { max-width: 680px; }
.page-hero .field-art { right: max(32px, calc((100% - var(--content-max)) / 2 + 32px)); top: 50%; transform: translateY(-50%); width: 200px; }
@media (max-width: 1100px) { .page-hero .field-art { width: 140px; right: 24px; } }
@media (max-width: 900px) {
  .page-hero { padding-block: 64px 40px; }
  .page-hero .field-art { position: relative; order: 2; align-self: flex-end; top: auto; right: auto; transform: none; width: 110px; margin: var(--space-4) var(--space-8) 0 0; }
}

.cta-band { padding-block: var(--space-24); }
.cta-band .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-8); }
.cta-band .field-art { right: max(32px, calc((100% - var(--content-max)) / 2 + 32px)); top: 50%; transform: translateY(-50%); width: 220px; }
@media (max-width: 1100px) {
  .cta-band { padding-block: var(--space-16) var(--space-8); }
  .cta-band .field-art { position: relative; order: 2; align-self: flex-end; top: auto; right: auto; transform: none; width: 110px; margin: var(--space-4) var(--space-8) 0 0; }
}

@media (max-width: 720px) {
  .hero { padding-block: 56px 40px; }
  .hero .field-art { width: 200px; margin: var(--space-8) var(--space-4) 0 0; }
  .page-hero .field-art, .cta-band .field-art { width: 90px; margin-right: var(--space-4); }
}

/* ---------- domain strip ---------- */
.domains { padding-block: var(--space-8); border-bottom: 1px solid var(--line); }
.domains .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }
.domains ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; }
.domains li { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink); }

.career-strip li { color: var(--ink-muted); font-weight: 700; }
.founder-chip { display: flex; align-items: center; gap: var(--space-4); }
.founder-chip img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.founder-chip strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.founder-chip span { color: var(--ink-muted); font-size: 15px; }

/* ---------- cards ---------- */
.card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.card .text-link { margin-top: auto; padding-top: var(--space-2); }
.card p { color: var(--ink-muted); }
.service-card .service-num { color: var(--accent); }
.service-card h3 { font-size: 26px; }

.project-feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-12); align-items: center; }
@media (max-width: 900px) { .project-feature { grid-template-columns: minmax(0, 1fr); } }

/* screenshot placeholder: swap for real exports from the Study Matcher design repo */
.shot { display: grid; place-items: center; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius-md); background: var(--surface-alt); border: 1px dashed var(--line-strong); color: var(--ink-muted); text-align: center; padding: var(--space-6); }
.shot.tall { aspect-ratio: 9 / 16; max-height: 560px; margin-inline: auto; width: 100%; max-width: 320px; }

/* ---------- project list: one row per project, screenshot left, facts right ---------- */
.project-list { display: grid; gap: var(--space-12); }
.project { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; padding-bottom: var(--space-12); border-bottom: 1px solid var(--line); }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project-shot { aspect-ratio: 4 / 5; }
.project-body { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.project-body > p { max-width: var(--measure); }
.project-highlights { display: grid; gap: var(--space-2); padding-left: 1.1em; color: var(--ink-muted); max-width: var(--measure); }
.project-highlights li::marker { color: var(--accent); }
@media (max-width: 820px) { .project { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .project-shot { aspect-ratio: 16 / 10; } }

.contact-cards .card { gap: var(--space-4); }
.contact-cards .value { font-size: 20px; }

/* ---------- definition lists (service detail) ---------- */
.def-list { list-style: none; display: grid; gap: 0; }
.def-list li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-6); padding-block: var(--space-6); border-top: 1px solid var(--line); }
.def-list li:last-child { border-bottom: 1px solid var(--line); }
.def-list p { color: var(--ink-muted); }
@media (max-width: 720px) { .def-list li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } }

.domain-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-6); }
.domain-grid > * { grid-column: span 2; }
.domain-grid > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 900px) { .domain-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .domain-grid > *, .domain-grid > :nth-child(n+4) { grid-column: auto; } .domain-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .domain-grid { grid-template-columns: minmax(0, 1fr); } .domain-grid > :last-child { grid-column: auto; } }
.domain-grid .card { gap: var(--space-3); }
.domain-grid .tags { margin-top: auto; padding-top: var(--space-2); }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: 3px solid var(--accent); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.steps p { color: var(--ink-muted); font-size: 15.5px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.callout { padding: var(--space-8); border-radius: var(--radius-md); background: var(--surface-alt); display: flex; flex-direction: column; gap: var(--space-3); }

/* ---------- facts + meta ---------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); list-style: none; }
.facts li { display: flex; flex-direction: column; gap: 4px; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.facts strong { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.facts span { color: var(--ink-muted); font-size: 15px; }
@media (max-width: 720px) { .facts { grid-template-columns: minmax(0, 1fr); } }

.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
.meta dt { color: var(--ink-muted); text-transform: uppercase; }
.meta dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- team ---------- */
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.headshot { position: relative; aspect-ratio: 1; max-width: 100%; }
.headshot img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.headshot::after { content: ""; position: absolute; right: 9%; bottom: 9%; width: 13%; height: 13%; border-radius: 50%; background: var(--kcg-mint); box-shadow: 0 0 0 5px var(--surface); }
.profile-side { display: flex; flex-direction: column; gap: var(--space-4); }
.profile-body { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.profile-body p { max-width: var(--measure); }
@media (max-width: 820px) { .profile { grid-template-columns: minmax(0, 1fr); } .headshot { max-width: 300px; } }

.timeline { list-style: none; display: grid; }
.timeline li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--space-6); padding-block: var(--space-4); border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--font-mono); font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.timeline span { color: var(--ink-muted); }
@media (max-width: 520px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.contact-line .value { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); overflow-wrap: anywhere; }
.copy-btn { font: 500 13px var(--font-mono); padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.form { display: grid; gap: var(--space-4); padding: var(--space-8); background: var(--surface-alt); border-radius: var(--radius-md); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 560px) { .form { padding: var(--space-6); } .form .row { grid-template-columns: minmax(0, 1fr); } }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form textarea, .form select { font: 400 16px var(--font-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; width: 100%; }
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline-offset: 1px; }
.form-note { font-size: 14px; color: var(--ink-muted); }
.form-note[data-state="warn"] { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; }

/* ---------- footer ---------- */
.site-footer { padding-block: var(--space-16) var(--space-8); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: var(--space-8); }
.footer-grid h2 { margin-bottom: var(--space-3); color: var(--ink-muted); text-transform: uppercase; }
.footer-grid ul { list-style: none; display: grid; gap: 6px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-brand svg { width: 64px; height: auto; }
.footer-brand p { color: var(--ink-muted); max-width: 36ch; }
.footer-legal { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line); color: var(--ink-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid li { overflow-wrap: anywhere; }

.muted { color: var(--ink-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- project tags: the three services, then expertise ---------- */
.project-tags { display: grid; gap: var(--space-6); }
a.tag-service { border-color: var(--accent); color: var(--accent); text-decoration: none; font-weight: 600; }
a.tag-service:hover { background: var(--surface-alt); }
/* a project shown as several phone screens */
.project-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); aspect-ratio: auto; align-items: start; }
.project-shots img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-alt); }
@media (max-width: 820px) { .project-shots { aspect-ratio: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .project-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a project shown as one phone screen */
.project-shot-img { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-alt); }
.project-shot-frame { display: flex; justify-content: center; }
.project-shot-frame .project-shot-img { max-width: 300px; }
/* cleanup 2026-10-13: long service names wrap on narrow phones; phone screenshots stay a sensible size; the contact email never breaks mid-word */
a.tag-service { white-space: normal; }
.project-shot-frame .project-shot-img { max-width: 260px; }
@media (max-width: 820px) { .project-shot-img { max-width: 240px; } .project-shot-frame .project-shot-img { max-width: 220px; } }
.contact-line .value { font-size: clamp(16px, 4.4vw, 18px); overflow-wrap: normal; }
