/* ============================================================
   Meriva Impact — site styles
   Design system uses CSS variables so the Tweaks panel can
   swap palette, accent, headline font and density at runtime.
   ============================================================ */

:root {
  /* ── palettes (default: navy) ─────────────────────────── */
  --bg: #f6f4ef;            /* warm off-white */
  --bg-alt: #efece4;        /* slightly warmer band */
  --surface: #ffffff;
  --ink: #0f1d2e;           /* deep navy */
  --ink-2: #2a3a4f;         /* muted navy */
  --ink-3: #5b6573;         /* slate */
  --line: rgba(15, 29, 46, 0.12);
  --line-soft: rgba(15, 29, 46, 0.07);

  /* ── accent (default: petrol/teal) ────────────────────── */
  --accent: #2d6a6a;
  --accent-ink: #1f4a4a;

  /* ── type ─────────────────────────────────────────────── */
  --f-display: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --f-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* ── density (default: comfortable) ───────────────────── */
  --pad-section: 120px;
  --gap-lg: 64px;
  --gap-md: 32px;
  --gap-sm: 16px;
  --radius: 6px;
  --maxw: 1200px;
}

/* density modes */
:root[data-density="compact"]      { --pad-section: 84px; --gap-lg: 48px; --gap-md: 24px; }
:root[data-density="comfortable"]  { --pad-section: 120px; --gap-lg: 64px; --gap-md: 32px; }
:root[data-density="spacious"]     { --pad-section: 160px; --gap-lg: 88px; --gap-md: 40px; }

/* palette modes */
:root[data-palette="navy"] {
  --bg: #f6f4ef; --bg-alt: #efece4; --ink: #0f1d2e; --ink-2: #2a3a4f; --ink-3: #5b6573;
  --line: rgba(15,29,46,.12); --line-soft: rgba(15,29,46,.07);
}
:root[data-palette="charcoal"] {
  --bg: #f3f2ef; --bg-alt: #e9e7e2; --ink: #1a1a1a; --ink-2: #333333; --ink-3: #5e5e5e;
  --line: rgba(0,0,0,.12); --line-soft: rgba(0,0,0,.07);
}
:root[data-palette="bluegrey"] {
  --bg: #f4f6f8; --bg-alt: #e7ecf1; --ink: #1c2a38; --ink-2: #36465a; --ink-3: #6a7686;
  --line: rgba(28,42,56,.12); --line-soft: rgba(28,42,56,.07);
}
:root[data-palette="warmgrey"] {
  --bg: #f7f4ee; --bg-alt: #ede7da; --ink: #2a241c; --ink-2: #4a4036; --ink-3: #756a5e;
  --line: rgba(42,36,28,.13); --line-soft: rgba(42,36,28,.07);
}
:root[data-palette="midnight"] {
  --bg: #0e1622; --bg-alt: #131e2c; --surface: #182434; --ink: #f1eee5; --ink-2: #c8cfdb; --ink-3: #8a95a6;
  --line: rgba(255,255,255,.14); --line-soft: rgba(255,255,255,.07);
}

/* accent modes */
:root[data-accent="petrol"]   { --accent: #2d6a6a; --accent-ink: #1f4a4a; }
:root[data-accent="brass"]    { --accent: #8a6a2c; --accent-ink: #6a4f1c; }
:root[data-accent="oxblood"]  { --accent: #7a2c34; --accent-ink: #5a1d24; }
:root[data-accent="slate"]    { --accent: #3a5b8c; --accent-ink: #2a4368; }

/* headline font modes */
:root[data-headline="serif"] { --f-display: "Source Serif 4", "Source Serif Pro", Georgia, serif; }
:root[data-headline="sans"]  { --f-display: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif; }

/* motif modes */
:root[data-motif="off"] .hero__motif { display: none; }
:root[data-motif="off"] .hero__grid  { grid-template-columns: 1fr; }
:root[data-motif="prominent"] .hero__motif { background: var(--bg-alt); border: 1px solid var(--line); padding: 32px 28px; border-radius: 4px; }

/* ============================================================
   Reset-ish + base
   ============================================================ */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   Typography primitives
   ============================================================ */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--accent-ink);
  font-weight: 400;
}

.lede {
  font-size: clamp(17px, 1.45vw, 19.5px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: var(--gap-lg); max-width: 760px; }
.section-head--split {
  flex-direction: row; align-items: end; gap: 64px; max-width: none;
  justify-content: space-between;
}
.section-head--split > div { max-width: 660px; }
.section-head__eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-head__eyebrow .dash {
  display: inline-block; width: 24px; height: 1px; background: var(--accent);
}
.section-head__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.section-head__lede {
  font-size: 16.5px; color: var(--ink-3); max-width: 44ch; line-height: 1.55;
  text-wrap: pretty;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 16px 26px; font-size: 15px; }
.btn svg { transition: transform .18s ease; }
.btn:hover svg { transform: translateX(2px); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand__name-italic {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-ink);
}
.brand__name-impact {
  font-weight: 400;
  color: var(--ink-3);
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 400;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links .nav__cta {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.nav__links .nav__cta:hover { border-color: var(--ink); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(72px, 9vw, 132px) 0 var(--pad-section);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero__copy .eyebrow { margin-bottom: 4px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* Motif: Technology → Product → Market → Ecosystem (horizontal) */
.hero__motif {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px 28px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in oklab, var(--bg-alt) 60%, transparent);
}
.motif__eyebrow {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.motif-h {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 16px;
}
.motif-h__step {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.motif-h__num {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.motif-h__label {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.motif-h__arrow {
  flex: 0 0 auto;
  color: var(--ink-3);
  display: flex; align-items: center;
  padding-top: 14px;
}
.motif__caption {
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: italic;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin: 0;
}

/* ============================================================
   Generic block wrapper
   ============================================================ */
.block {
  padding: var(--pad-section) 0;
  position: relative;
}
.block--lined {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.block--alt {
  background: var(--bg-alt);
}

/* ============================================================
   "What we do" — three cards
   ============================================================ */
.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.three__card {
  background: var(--bg);
  padding: 40px 36px 44px;
  display: flex; flex-direction: column; gap: 14px;
}
.three__num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
  margin: 0;
}
.three__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.three__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ============================================================
   Services — 5 numbered, 2 columns then 3 columns
   ============================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.service {
  grid-column: span 2;
  padding: 36px 32px 36px 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  padding-left: 32px;
  position: relative;
}
.service:nth-child(3n) { border-right: none; }
.service:nth-child(4) { grid-column: 2 / span 2; }
.service:nth-child(5) { grid-column: 4 / span 2; border-right: none; }
.service:nth-child(4),
.service:nth-child(5) { border-bottom: none; }
.service__num {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0;
}
.service__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin: 0;
}
.service__sub {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}
.service__tags {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  line-height: 1.6;
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

/* coaching panel below services */
.coaching {
  margin-top: 40px;
  padding: 32px 36px;
  border: 1px dashed var(--line);
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.coaching__inner { display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.coaching__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0;
  color: var(--ink);
}
.coaching__body {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ============================================================
   Why
   ============================================================ */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.why__lede {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.why__points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
}
.why__point dt {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.why__point dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ============================================================
   Selected experience
   ============================================================ */
.exp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}
.exp__card {
  grid-column: span 2;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 28px 28px 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .18s ease, transform .18s ease;
}
.exp__card:nth-child(4) { grid-column: 2 / span 2; }
.exp__card:nth-child(5) { grid-column: 4 / span 2; }
.exp__card:hover { border-color: var(--ink-3); }
.exp__tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.exp__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.exp__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.exp__rel {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  margin-top: auto;
  text-wrap: pretty;
}

/* ============================================================
   About
   ============================================================ */
.about__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--gap-lg); max-width: 760px; }
.about__head .section-head__title { margin-top: 4px; }
.about__post {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.55em;
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}
.about__role {
  font-size: 16px;
  color: var(--ink-3);
  font-style: italic;
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
}
.about__bio { display: flex; flex-direction: column; gap: 18px; }
.about__portrait {
  margin: 0 0 8px 0;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.about__portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  filter: saturate(0.95);
}
.about__bio p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}
.about__bio strong {
  color: var(--ink);
  font-weight: 500;
}
.about__caveat {
  font-size: 13px !important;
  color: var(--ink-3) !important;
  font-style: italic;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: 6px;
}
.about__side { display: flex; flex-direction: column; gap: 32px; }
.about__col-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.about__list {
  display: flex; flex-direction: column; gap: 14px;
}
.about__list li {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}
.about__list li span {
  font-weight: 400;
  font-size: 13.5px;
  color: var(--ink-3);
}
.about__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0;
}
.about__chips span {
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg);
}
.about__connect {
  font-size: 14px;
  color: var(--accent-ink);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 0;
}
.about__connect a:hover { text-decoration: underline; }

/* ============================================================
   Contact
   ============================================================ */
.contact { background: var(--bg-alt); }
.contact__inner {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 880px;
  text-align: left;
}
.contact__eyebrow { margin-bottom: 4px; }
.contact__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.contact__lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 58ch;
  line-height: 1.55;
}
.contact__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.contact__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact__details dt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.contact__details dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}
.contact__details a:hover { color: var(--accent-ink); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 32px 0 36px;
  background: var(--bg);
}
.footer__row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.footer__legal, .footer__credit {
  font-size: 13px;
  color: var(--ink-3);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .three { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .service { grid-column: span 1 !important; border-right: none !important; }
  .service:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .service:nth-child(5) { border-bottom: none; }
  .why__grid { grid-template-columns: 1fr; gap: 40px; }
  .why__points { grid-template-columns: 1fr; }
  .exp { grid-template-columns: 1fr 1fr; }
  .exp__card { grid-column: span 1 !important; }
  .exp__card:last-child { grid-column: 1 / -1 !important; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .section-head--split { flex-direction: column; align-items: flex-start; gap: 24px; }
}
@media (max-width: 720px) {
  .container { padding: 0 22px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .services { grid-template-columns: 1fr; }
  .service { border-right: none !important; }
  .exp { grid-template-columns: 1fr; }
  .contact__details { grid-template-columns: 1fr; gap: 16px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
}


/* Footer utility links */
.footer__credit a {
  color: var(--accent-ink);
  border-bottom: 1px solid var(--line);
  transition: border-color .15s ease, color .15s ease;
}
.footer__credit a:hover {
  color: var(--ink);
  border-color: var(--ink);
}
