/* Lahr Solutions: styles. System fonts only; no external requests. */

:root {
  /* Color */
  --paper: #f6f7f5;
  --paper-tint: #eaeeed;
  --white: #ffffff;
  --ink: #0e1b2c;
  --ink-soft: #46566a;
  --line: #ccd4d9;
  --teal: #0a6661;
  --teal-bright: #5fd1c8;
  --hub: #e8501e; /* from the existing logo; used only for the hub node */
  --on-dark: #e6ecf1;
  --on-dark-soft: #aebac6;
  --line-dark: #2b3c52;

  /* Type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;

  /* Space and layout */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
  --gutter: 1.25rem;
  --max-width: 1180px;
  --header-h: 4.25rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { max-width: 65ch; }

a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm { min-height: 2.75rem; padding: 0.5rem 1.1rem; font-size: var(--text-sm); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--ink); color: var(--white); }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.link-arrow { font-weight: 600; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--teal); flex: none; }
.brand-hub { fill: var(--hub); }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 600 var(--text-sm)/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--white); }

.site-nav ul { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.site-nav a:not(.btn) {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--teal); text-decoration: underline; }

@media (max-width: 62rem) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--space-2) var(--gutter) var(--space-3);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li { border-bottom: 1px solid var(--line); }
  .js .site-nav li.nav-cta { border: 0; padding-top: var(--space-2); }
  .js .site-nav a:not(.btn) { display: block; padding: 0.9rem 0; font-size: var(--text-base); }
}
@media (max-width: 62rem) {
  /* Without JavaScript the menu simply wraps below the wordmark. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: var(--space-1); }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) var(--space-section); }
.hero-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 6.4vw, 4rem);
  line-height: 1.08;
}
.hero .beat { display: block; }
.hero .beat + .beat { margin-top: 0.15em; }
.lede {
  margin-top: var(--space-3);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--ink-soft);
}
.hero .btn-row { margin-top: var(--space-4); }
.credibility {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); }
}

/* Hero diagram */
.hero-visual figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.flow { width: 100%; height: auto; overflow: visible; }
.flow-lines path { stroke: var(--teal); stroke-width: 2; }
.flow-nodes rect { fill: var(--white); stroke: var(--line); stroke-width: 1.5; }
.flow-nodes text {
  fill: var(--ink);
  font: 600 14px/1 var(--font-body);
  text-anchor: middle;
  dominant-baseline: central;
}
.flow-ring { stroke: var(--teal); stroke-width: 1.5; stroke-dasharray: 3 5; }
.flow-hub { fill: var(--hub); }

/* One orchestrated moment: the connections draw in once on load. */
@media (prefers-reduced-motion: no-preference) {
  .flow-lines path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 0.9s ease-out forwards;
  }
  .flow-lines path:nth-child(-n+4) { animation-delay: 0.2s; }
  .flow-lines path:nth-child(n+5) { animation-delay: 0.9s; }
  .flow-nodes g { opacity: 0; animation: appear 0.5s ease-out forwards; }
  .flow-nodes g:nth-child(-n+4) { animation-delay: 0s; }
  .flow-nodes g:nth-child(n+5) { animation-delay: 1.5s; }
  .flow-hub { transform-origin: 180px 180px; animation: pop 0.5s ease-out 0.7s backwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
  @keyframes pop { from { transform: scale(0); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Sections */
.section { padding-block: var(--space-section); }
.section-tint { background: var(--paper-tint); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark .lede,
.section-dark .section-intro { color: var(--on-dark-soft); }
.section-dark a:not(.btn) { color: var(--teal-bright); }
.section-dark :focus-visible { outline-color: var(--teal-bright); }

.section-title { margin-bottom: var(--space-2); }
.section-intro { margin-bottom: var(--space-5); color: var(--ink-soft); font-size: 1.125rem; }

/* Two-column pattern: heading left, content right */
.split { display: grid; gap: var(--space-4); }
.split-head p { margin-top: var(--space-2); color: var(--ink-soft); }
@media (min-width: 62rem) {
  .split { grid-template-columns: 4fr 7fr; gap: var(--space-5); }
  .split-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}

/* Challenges and reasons: ruled lists */
.challenge-list li,
.reason-list li { padding-block: var(--space-3); border-top: 1px solid var(--line); }
.challenge-list li:last-child,
.reason-list li:last-child { border-bottom: 1px solid var(--line); }
.challenge-list h3,
.reason-list h3 { font-size: 1.1875rem; }
.challenge-list p,
.reason-list p { margin-top: 0.35rem; color: var(--ink-soft); }
@media (min-width: 48rem) {
  .reason-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-4); }
  .reason-list li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
}

/* Services */
.service { display: grid; gap: var(--space-2); padding-block: var(--space-4); border-top: 1px solid var(--ink); }
.service:last-child { border-bottom: 1px solid var(--ink); }
.service-head h3 { font-size: 1.5rem; }
.service-head p { margin-top: var(--space-1); color: var(--ink-soft); }
.service-body h4 { font-size: var(--text-sm); font-weight: 700; margin-bottom: 0.6rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  padding: 0.3rem 0.7rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.benefit { margin-top: var(--space-2); }
@media (min-width: 62rem) {
  .service { grid-template-columns: 4fr 7fr; gap: var(--space-5); }
}

/* Approach */
.steps { display: grid; gap: var(--space-4); counter-reset: none; }
.steps li { position: relative; padding-left: 4rem; }
.steps li::before {
  /* the connecting line between steps */
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 2.75rem;
  bottom: calc(-1 * var(--space-4) + 0.25rem);
  width: 2px;
  background: var(--line-dark);
}
.steps li:last-child::before { display: none; }
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--teal-bright);
  border-radius: 50%;
  font: 700 1.125rem/1 var(--font-display);
  color: var(--teal-bright);
}
.steps h3 { padding-top: 0.35rem; color: var(--white); }
.steps p { margin-top: 0.4rem; color: var(--on-dark-soft); }
@media (min-width: 62rem) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
  .steps li { padding: 4rem 0 0; }
  .steps li::before { left: 3rem; right: -0.75rem; top: 1.25rem; bottom: auto; width: auto; height: 2px; }
}

/* About */
.about-body > * + * { margin-top: var(--space-2); }
.about-lead { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.4; }

/* Engagement models */
.engagement-list > div { padding-block: var(--space-2); border-top: 1px solid var(--ink); }
.engagement-list > div:last-child { border-bottom: 1px solid var(--ink); }
.engagement-list dt { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; }
.engagement-list dd { margin-top: 0.25rem; color: var(--ink-soft); }

/* Final CTA */
.cta-grid { display: grid; gap: var(--space-4); }
.cta-final h2 { color: var(--white); font-size: clamp(1.875rem, 4.4vw, 3rem); }
.cta-final .btn-row { margin-top: var(--space-3); }
.section-dark .btn-primary { background: var(--teal-bright); color: var(--ink); }
.section-dark .btn-primary:hover { background: var(--white); color: var(--ink); }
.placeholder-note { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--on-dark-soft); }
.cta-list-title { font-weight: 600; color: var(--white); }
.cta-list { margin-top: var(--space-1); }
.cta-list li { padding-block: 0.7rem; border-bottom: 1px solid var(--line-dark); }
.cta-list li:first-child { border-top: 1px solid var(--line-dark); }
@media (min-width: 62rem) {
  .cta-grid { grid-template-columns: 6fr 5fr; gap: var(--space-5); align-items: center; }
}

/* Footer */
.site-footer {
  padding-block: var(--space-4);
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.footer-grid { display: grid; gap: var(--space-3); }
.footer-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.site-footer li + li { margin-top: 0.4rem; }
.placeholder { padding: 0 0.25rem; background: #fff3c4; color: var(--ink); border-radius: 3px; }
.footer-legal p + p { margin-top: 0.5rem; }
@media (min-width: 62rem) {
  .footer-grid { grid-template-columns: 1fr 1fr 1.4fr; gap: var(--space-4); }
}

/* Small screens */
@media (max-width: 30rem) {
  .btn-row .btn { width: 100%; }
  .brand-text { font-size: 1.25rem; }
}
