/* Klinck Software LLC — marketing site shared styles.
   Same palette family as the legal-pages site, richer treatment:
   hero gradients, cards, elevation. Dark-mode aware via prefers-color-scheme. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8f7;
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --accent: #2f6f4f;
  --accent-strong: #23573e;
  --accent-on: #2f6f4f;
  --accent-on-strong: #23573e;
  --accent-soft: #eef2ef;
  --border: #e4e4e4;
  --card: #f7f8f7;
  --card-border: #e4e4e4;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.04), 0 8px 24px rgba(20, 30, 25, 0.06);
  --hero-grad: linear-gradient(135deg, #eaeeec 0%, #f7f8f7 42%, #ecf1ee 70%, #f2f4f2 100%);
  --hero-blob-1: rgba(47, 111, 79, 0.14);
  --hero-blob-2: rgba(47, 111, 79, 0.09);
  --hero-blob-3: rgba(47, 111, 79, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --bg-alt: #171c19;
    --fg: #eef1ee;
    --muted: #a3aca6;
    --accent: #4da375;
    --accent-strong: #3f8f63;
    --accent-on: #3a8259;
    --accent-on-strong: #327050;
    --accent-soft: rgba(77, 163, 117, 0.10);
    --border: #2a312c;
    --card: #181e1a;
    --card-border: #2a312c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --hero-grad: linear-gradient(135deg, #171c19 0%, #121614 42%, #171d1a 70%, #141814 100%);
    --hero-blob-1: rgba(77, 163, 117, 0.16);
    --hero-blob-2: rgba(77, 163, 117, 0.09);
    --hero-blob-3: rgba(77, 163, 117, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Selection + focus-visible */
::selection { background: var(--accent-on); color: #fff; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  /* Serif-only typography (2026-07-09 direction). Charter/Georgia stack — widely
     installed, renders well at UI sizes; keep any future additions serif. */
  font: 16px/1.65 Charter, "Bitstream Charter", "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

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

img, svg { max-width: 100%; }

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  z-index: 20;
}

header.site .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  gap: 16px;
}

a.brand {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.primary a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

nav.primary a:hover { color: var(--fg); background: var(--accent-soft); }
nav.primary a.active { color: var(--accent); background: var(--accent-soft); }

nav.primary a.cta {
  color: #fff;
  background: var(--accent-on);
  margin-left: 6px;
}
nav.primary a.cta:hover { background: var(--accent-on-strong); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  color: var(--fg);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* Main content rhythm */
main { display: block; }
section { padding: 64px 0; }
section.tight { padding: 40px 0; }

h1 { font-size: 44px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 20px; margin: 0 0 8px; }
p, li { color: var(--fg); }
p { margin: 0 0 14px; }
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; transition: text-decoration-color 0.15s ease, color 0.15s ease; }
a:hover { text-decoration-color: currentColor; }
.muted { color: var(--muted); }
.lede { font-size: 19px; color: var(--muted); max-width: 640px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  border-bottom: 1px solid var(--border);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(32px);
  z-index: 0;
}
.hero::before {
  width: 520px; height: 520px;
  background: var(--hero-blob-1);
  top: -200px; right: -160px;
}
.hero::after {
  width: 420px; height: 420px;
  background: var(--hero-blob-2);
  bottom: -180px; left: -120px;
}
.hero .blob-3 {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(32px);
  z-index: 0;
  width: 300px; height: 300px;
  background: var(--hero-blob-3);
  top: 40%; left: 55%;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 84px; padding-bottom: 84px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.hero-inner { max-width: 680px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Hero visual composition (phone outline + floating code card) */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.hero-visual .phone {
  filter: drop-shadow(0 20px 40px rgba(20, 30, 25, 0.14));
  animation: hero-float 6s ease-in-out infinite;
}
.hero-visual .code-card {
  position: absolute;
  right: 4%;
  bottom: 6%;
  width: 210px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  /* Serifed monospace (Courier is slab-serif) to match the serif-only rule. */
  font: 12.5px/1.7 "Courier New", Courier, "Nimbus Mono PS", monospace;
  animation: hero-float-alt 7s ease-in-out infinite;
}
.hero-visual .code-card .dots { display: flex; gap: 5px; margin-bottom: 10px; }
.hero-visual .code-card .dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
}
.hero-visual .code-card .ln { white-space: pre; }
.hero-visual .code-card .tok-kw { color: var(--accent); }
.hero-visual .code-card .tok-fn { color: #4a90d9; }
.hero-visual .code-card .tok-str { color: #c9834a; }
.hero-visual .code-card .tok-muted { color: var(--muted); }

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes hero-float-alt {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(8px) translateX(-4px); }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn-primary { background: var(--accent-on); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-on-strong); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Cards / grids */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(20, 30, 25, 0.06), 0 18px 40px rgba(20, 30, 25, 0.10);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--card-border));
}
.card h3 { margin-bottom: 8px; }
.card .icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}
.card .icon svg { width: 22px; height: 22px; }

.card ul { margin: 10px 0 0; padding-left: 20px; }
.card li { margin-bottom: 4px; color: var(--muted); font-size: 15px; }

/* Generic inline icon (24px stroke style, currentColor) used across cards/lists/contact rows */
.icon-svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Section header */
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Alternating section backgrounds for page rhythm */
section.bg-alt { background: var(--bg-alt); }

/* Process steps ("How we work" 4-step row) */
.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}
.process-row::before {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(12.5% + 22px);
  right: calc(12.5% + 22px);
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent-soft) 20%, var(--accent-soft) 80%, var(--border));
  z-index: 0;
}
.process-step { position: relative; z-index: 1; text-align: left; }
.process-step .num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-on);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.process-step h3 { margin-bottom: 6px; }
.process-step p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

/* Tech-stack pill strip */
.pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Principles list (about page) */
.principle-list { display: flex; flex-direction: column; gap: 20px; }
.principle {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.principle .icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.principle .icon svg { width: 20px; height: 20px; }
.principle h3 { margin-bottom: 4px; font-size: 17px; }
.principle p { color: var(--muted); margin-bottom: 0; font-size: 15px; }

/* Quote / callout block */
.callout {
  position: relative;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 26px 28px;
  margin: 36px 0;
}
.callout p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg);
  margin: 0;
  font-style: italic;
}
.callout cite {
  display: block;
  margin-top: 12px;
  font-size: 13.5px;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
}

/* Portfolio strip / app cards */
.app-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(20, 30, 25, 0.06), 0 18px 40px rgba(20, 30, 25, 0.10);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--card-border));
}
.app-card .app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Divider band / CTA */
.band {
  background: var(--accent-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band-cta { text-align: center; }
.band-cta h2 { margin-bottom: 10px; }
.band-cta p { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Contact */
.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.contact-row:first-of-type { border-top: none; padding-top: 4px; }
.contact-row .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row a { font-size: 17px; font-weight: 600; text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }
.contact-row .label { font-size: 13px; color: var(--muted); margin-bottom: 2px; }

/* Timeline / about */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat .num {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent);
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat .label { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  background: var(--bg-alt);
}
footer.site .wrap { padding-top: 40px; padding-bottom: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin: 0 0 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 860px) {
  .grid, .grid.cols-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .hero .wrap { padding-top: 56px; padding-bottom: 56px; }
  .hero-visual { min-height: 260px; margin-top: 8px; }

  .process-row { grid-template-columns: 1fr; gap: 32px; }
  .process-row::before { display: none; }

  .nav-toggle { display: inline-flex; }
  nav.primary {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 16px;
    display: none;
    box-shadow: var(--shadow);
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 12px 8px; }
  nav.primary a.cta { margin-left: 0; text-align: center; margin-top: 6px; }
  header.site .bar { position: relative; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
}
