/* markmunte.com: self-hosted fonts, no external requests, light and dark */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/Barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/Barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/Barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/Barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 400; font-display: swap; src: url("fonts/BarlowCondensed-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/BarlowCondensed-600.woff2") format("woff2"); }

/* Tokens */

:root {
  --bg: #f2f2f3;
  --text: #1d1f20;
  --accent: #416180;
  --accent-strong: #1d2d3d;
  --button: #5980a6;
  --button-hover: #416180;
  --tag-bg: #f5f5f8;
  --tag-text: #424244;
  --divider: color-mix(in srgb, var(--text) 16%, transparent);
  --divider-soft: color-mix(in srgb, var(--text) 8%, transparent);
  --muted: color-mix(in srgb, var(--text) 72%, transparent);
  --body-muted: color-mix(in srgb, var(--text) 82%, transparent);

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --section-gap: clamp(80px, 10vw, 128px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141618;
    --text: #e6e7e9;
    --accent: #94bce3;
    --accent-strong: #d6ebff;
    --button: #749dc4;
    --button-hover: #94bce3;
    --tag-bg: #26282b;
    --tag-text: #d4d4d7;
    --divider: color-mix(in srgb, var(--text) 20%, transparent);
    --divider-soft: color-mix(in srgb, var(--text) 10%, transparent);
  }
}

/* Base */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  hyphens: auto;
  overflow-wrap: break-word;
}

h3 { font-size: 24px; }
p { margin: 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--button) 30%, transparent); }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 20; background: var(--bg); padding: 8px 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--body-muted); }

/* Header and footer */

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-tag { font-size: 13px; color: var(--muted); }

.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.back-link { font-size: 15px; }

.site-footer { border-top: 1px solid var(--divider); }

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 24px;
  font-size: 15px;
  color: var(--muted);
}

.site-footer nav { display: flex; gap: 24px; }
.footer-note { flex-basis: 100%; font-size: 13px; }

/* Shared section parts */

.section { padding-top: var(--section-gap); }

.kicker {
  display: block;
  font-size: 13px;
  line-height: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.rule { height: 1px; border: 0; margin: 0 0 32px; background: var(--divider); }

.display {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.section-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px 64px;
  align-items: end;
  margin-bottom: 48px;
}

.section-head p { font-size: 18px; max-width: 52ch; color: var(--body-muted); }

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--divider);
  color: var(--text);
}

.btn-primary { background: var(--button); border-color: var(--button); color: var(--bg); }
.btn-primary:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--bg); }
.btn-secondary:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.btn-ghost { border-color: transparent; color: var(--accent); padding-inline: 14px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--button) 10%, transparent); }

/* Hero */

.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.hero .rule { margin-bottom: 36px; }

.hero h1 {
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-left: -0.052em;
}

.hero h1 span { display: block; }
:lang(de) .hero h1 { font-size: clamp(40px, 6.1vw, 80px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}

.portrait { margin: 8px 0 0; }
.portrait-frame { position: relative; }

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s ease;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 78%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 78%, transparent);
  mask-composite: intersect;
}

.portrait-frame:hover img { filter: grayscale(0); }

.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.portrait figcaption span:last-child { color: var(--accent); }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(300px, 100%); }
  .portrait figcaption { font-size: 12px; letter-spacing: 0.08em; }
}
.hero h1 .accent { color: var(--accent); }

.lead {
  font-size: 19px;
  max-width: 56ch;
  margin-top: 32px;
  color: color-mix(in srgb, var(--text) 85%, transparent);
}

/* What I do */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 3vw, 44px);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

/* How I work */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 40px 32px;
}

.principle {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--text);
}

.principle-num {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}

/* Typical engagements */

.engagements { margin-top: 64px; border-top: 2px solid var(--text); }

.engagements-head {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
  line-height: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.engagements-head h3 {
  flex: 1 1 260px;
  padding: 14px 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 24px;
  letter-spacing: 0.08em;
}

.engagements-head span { padding: 14px 0 14px 28px; color: var(--muted); }

.engagement {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--divider-soft);
}

.engagement:last-child { border-bottom: 0; }
.engagement h4 {
  flex: 1 1 260px;
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.engagement p { flex: 2 1 360px; }

/* Why work with me */

.why { display: flex; flex-wrap: wrap; gap: 40px clamp(32px, 6vw, 96px); }

.why > h2 {
  flex: 1 1 280px;
  align-self: flex-start;
  position: sticky;
  top: 96px;
}

.why-list { flex: 2 1 520px; min-width: 0; }

.why-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--divider);
}

.why-item:first-child { padding-top: 0; }
.why-item:last-child { padding-bottom: 0; border-bottom: 0; }
.why-item h3 { flex: 1 1 220px; line-height: 1.15; }
.why-item p { flex: 1.4 1 300px; }

/* Technologies */

.tech {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px 48px;
}

.tech > div { display: flex; flex-direction: column; gap: 10px; }

.tech dt {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tech dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* Proof bar */

.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px 32px;
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding-top: 24px;
  border-top: 2px solid var(--text);
}

.proof dt {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--accent);
}

.proof dd { margin: 6px 0 0; font-size: 15px; color: var(--muted); max-width: 28ch; }

/* Service questions */

.question {
  text-wrap: balance;
  font-family: var(--font-heading);
  font-size: 19px;
  font-style: italic;
  color: var(--accent);
}

/* INSIS card: two of three columns on wide screens, full width otherwise */

.service-wide { grid-column: 1 / -1; }

@media (min-width: 1100px) {
  .service-wide { grid-column: span 2; }
}

.checklist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }

/* Outcome cases */

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 3vw, 44px);
}

.case {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--text);
}

.case dl { margin: 4px 0 0; display: grid; gap: 4px; }

.case dt {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.case dd { margin: 0; color: var(--body-muted); }
.case dt:last-of-type + dd { color: var(--text); font-weight: 600; }

/* Contact */

.contact { padding-bottom: clamp(64px, 8vw, 104px); }
.contact .rule { margin-bottom: 40px; }

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px clamp(32px, 6vw, 96px);
}

.contact-intro { flex: 1 1 420px; min-width: 0; }

.contact-intro h2 {
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin-left: -0.052em;
}

.contact-intro .lead { max-width: 46ch; margin-top: 28px; }

.contact-list { margin: 40px 0 0; border-top: 2px solid var(--text); }

.contact-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
}

.contact-list > div:last-child { border-bottom: 0; }

.contact-list dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list dd { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; }

/* Contact form */

.contact-form { flex: 1 1 400px; min-width: 0; display: grid; gap: 22px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field label span { font-weight: 400; text-transform: none; letter-spacing: 0; }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--divider);
  border-radius: 0;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.field textarea { resize: vertical; min-height: 150px; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--text) 40%, transparent); }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--button) 25%, transparent);
}

.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 15px; color: var(--muted); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-actions .btn { cursor: pointer; }
.form-actions .btn:disabled { opacity: 0.6; cursor: wait; }
.form-status { font-size: 16px; }
.contact-form.is-sent .form-status { color: var(--accent); font-weight: 600; }
.contact-form.is-error .form-status { color: #b3261e; }

@media (prefers-color-scheme: dark) {
  .contact-form.is-error .form-status { color: #f2b8b5; }
}

/* Interaction */

.btn { transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
.btn:active { transform: translateY(1px); }
.btn-ghost:hover { transform: translateX(4px); }

.service { position: relative; }

.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.service:hover::before { transform: scaleX(1); }

.engagement { transition: background-color 0.25s, padding 0.25s; }
.engagement:hover { background: color-mix(in srgb, var(--button) 7%, transparent); padding-inline: 12px; }

.tag { transition: background-color 0.2s, color 0.2s; }
.tag:hover { background: var(--button); color: var(--bg); }

/* Hero blueprint grid */

.hero { position: relative; isolation: isolate; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  background-image:
    linear-gradient(var(--divider-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--divider-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 10%, transparent 75%);
}

/* Motion: load-in for the hero, scroll-driven reveals elsewhere. Without support, everything is simply visible. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(0.6em); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes draw { from { transform: scaleX(0); } }
  @keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
  @keyframes grid-drift { to { background-position: 48px 48px; } }

  .hero h1 span { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 span:nth-child(2) { animation-delay: 0.12s; }
  .hero h1 span:nth-child(3) { animation-delay: 0.24s; }
  .hero .kicker { animation: fade 0.6s ease-out both; }
  .hero .rule { transform-origin: left; animation: draw 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .lead { animation: rise 0.8s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .actions { animation: rise 0.8s 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .portrait img { animation: fade 1.2s 0.3s ease-out both; }
  .portrait figcaption { animation: rise 0.8s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero::before { animation: fade 1.6s ease-out both, grid-drift 30s linear infinite; }

  @supports (animation-timeline: view()) {
    .section .rule {
      transform-origin: left;
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }

    .section .display,
    .section-head p,
    .service,
    .principle,
    .engagement,
    .why-item,
    .case,
    .proof > div,
    .tech > div,
    .contact-intro,
    .contact-form {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }

    .contact-intro h2 {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
  }

  @supports (animation-timeline: scroll()) {
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    @keyframes lift { to { box-shadow: 0 6px 20px color-mix(in srgb, #000 12%, transparent); } }

    .site-header.sticky::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 2px;
      background: var(--accent);
      transform-origin: left;
      animation: progress linear both;
      animation-timeline: scroll(root);
    }

    .site-header.sticky {
      animation: lift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 160px;
    }
  }
}

/* Legal pages */

.legal { padding-block: clamp(56px, 8vw, 104px); }

.legal h1 {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 48px -0.04em;
}

.legal h2 { font-size: 22px; letter-spacing: 0.03em; margin-bottom: 10px; }
.legal p + h2 { margin-top: 28px; }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 40px 64px;
  max-width: 960px;
}

.legal-text { max-width: 72ch; display: flex; flex-direction: column; gap: 36px; }

/* Print */

@media print {
  :root {
    --bg: #ffffff;
    --text: #1d1f20;
    --accent: #416180;
    --tag-bg: #f0f0f2;
    --tag-text: #424244;
  }

  body { font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header.sticky { position: static; }
  .site-nav, .skip, .actions, .contact-form, .hero::before { display: none; }
  *, *::before, *::after { animation: none !important; }
  .why > h2 { position: static; }
  .service, .principle, .engagement, .why-item, .case, .tech > div { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
