/* mvdlab.com — one stylesheet, mobile-first, light + dark. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f6fbf7;
  --pale: #eaf8ec;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #16a34a;        /* graphics and accents */
  --brand-text: #15803d;   /* green that passes AA as text on white / pale */
  --btn: #15803d;
  --btn-hover: #166534;
  --btn-fg: #ffffff;
  --blob: #eaf8ec;
  --dot: #bfe6c8;
  --bar: #e2e8f0;
  --bar2: #eef2f6;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .08);
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #131d30;
    --soft: #0f192a;
    --pale: #12301f;
    --text: #e8eef6;
    --muted: #a3b1c6;
    --line: #26344a;
    --brand: #22c55e;
    --brand-text: #4ade80;
    --btn: #22c55e;
    --btn-hover: #4ade80;
    --btn-fg: #052e16;
    --blob: #11281d;
    --dot: #1f4a31;
    --bar: #2a3a52;
    --bar2: #202d42;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 4vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.125rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }

a { color: var(--brand-text); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-fg);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  min-height: 44px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.mark { width: 32px; height: 32px; flex: none; }
.mark-bg { fill: #16a34a; }
.mark-m { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.lang {
  display: none; /* shown once main.js is running */
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.js .lang { display: inline-flex; }

.lang button {
  min-width: 44px;
  min-height: 38px;
  padding: 0 .75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] {
  background: var(--pale);
  color: var(--brand-text);
  font-weight: 700;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-fg);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.btn-ghost:hover { border-color: var(--brand-text); background: var(--soft); }

/* Hero */

.hero { padding-block: clamp(2.5rem, 8vw, 5.5rem); }

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--brand-text);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lead {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + .5vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

.v-blob { fill: var(--blob); }
.v-dot { fill: var(--dot); }
.v-surface { fill: var(--surface); stroke: var(--line); }
.v-brand { fill: #16a34a; }
.v-onbrand { fill: #ffffff; }
.v-soft { opacity: .6; }
.v-pale { fill: var(--pale); }
.v-bar { fill: var(--bar); }
.v-bar2 { fill: var(--bar2); }
.v-spark, .v-check, .v-vein { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.v-spark { stroke: #ffffff; stroke-width: 3; opacity: .9; }
.v-check { stroke: #ffffff; stroke-width: 3; }
.v-leaf { fill: var(--brand); opacity: .9; }
.v-vein { stroke: var(--bg); stroke-width: 2.5; opacity: .7; }
.v-shadow { filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .12)); }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
}

/* Sections */

.section { padding-block: clamp(3.5rem, 9vw, 6rem); scroll-margin-top: 64px; }

.section-lead {
  max-width: 36rem;
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card h3 { margin-top: 1.25rem; }
.card p { margin-top: .5rem; color: var(--muted); }

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pale);
  color: var(--brand-text);
}
.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.band { background: var(--soft); border-block: 1px solid var(--line); }

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 2rem 1.5rem;
  margin-top: 2.5rem;
}
.principles .num {
  display: block;
  color: var(--brand-text);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
}
.principles h3 { margin-top: .5rem; }
.principles p { margin-top: .375rem; color: var(--muted); }

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem);
  border-radius: calc(var(--radius) + 8px);
  background: var(--pale);
  text-align: center;
}
.contact p { max-width: 32rem; color: var(--muted); font-size: 1.0625rem; }
.contact .btn { margin-top: .5rem; }
.mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Link card to the Sprig page */

.section-tight { padding-top: 0; }

.app-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.app-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.app-card img { width: 72px; height: 72px; flex: none; border-radius: 22%; }
.app-card-copy { flex: 1 1 220px; min-width: 0; color: var(--muted); }
.app-card-copy strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--text);
  font-size: 1.125rem;
  letter-spacing: -.01em;
}
.app-card-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-text);
  font-weight: 700;
}
.app-card-cta::after { content: "\2192"; margin-left: .5rem; }

/* Text pages (privacy, 404) */

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(1.875rem, 1.4rem + 2.4vw, 2.75rem); margin-bottom: 1.5rem; }
.prose p { margin-top: 1rem; color: var(--muted); font-size: 1.0625rem; }
.prose p.eyebrow { margin: 0 0 1rem; color: var(--brand-text); font-size: .875rem; }
.prose .btn { margin-top: 1rem; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1.5rem;
  padding-block: 1.25rem;
}
.foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* Motion: only for people who have not asked for less of it */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .card:hover { transform: translateY(-2px); }

  .hero-copy > * { animation: rise .6s ease both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-art { animation: fade .8s ease .1s both; }

  .float-a { animation: drift 9s ease-in-out infinite alternate; }
  .float-b { animation: drift 7s ease-in-out -2s infinite alternate; }
  .float-c { animation: drift 6s ease-in-out -4s infinite alternate-reverse; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drift {
  from { transform: translateY(-5px); }
  to { transform: translateY(5px); }
}
