/* Mondrian – the whole page as one De Stijl composition.
   Every section is a CSS grid on a black ground; the gaps are the black lines,
   the cells are white or pure primary colour. */

:root {
  --k: #111111;
  --white: #fbfbf9;
  --red: #d42a20;
  --blue: #1f4aa8;
  --yellow: #f5c400;
  --rule: 12px;
  --pad: clamp(20px, 3.2vw, 52px);
  --bg: var(--white);
  --ink: #111111;
  --ink-2: #3d3d42;
  --line: #111111;
  --accent: var(--blue);
  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "League Spartan", "Futura", "Century Gothic", system-ui, sans-serif;
}

html { background: var(--k); }
body {
  background: var(--k);
  padding: var(--rule);
  display: flex;
  flex-direction: column;
  gap: var(--rule);
  font-size: 1.0625rem;
  line-height: 1.6;
}
:focus-visible { outline: 4px solid var(--yellow); outline-offset: -4px; }
.mo-yellow :focus-visible, .mo-yellow:focus-visible { outline-color: var(--blue); }

/* ---------- Cells ---------- */
.mo-cell { background: var(--white); color: var(--ink); padding: var(--pad); min-width: 0; }
span.mo-cell { padding: 0; }
.mo-red { background: var(--red); color: #fff; }
.mo-blue { background: var(--blue); color: #fff; }
.mo-yellow { background: var(--yellow); color: var(--k); }
.mo-black { background: var(--k); }
.mo-grid {
  display: grid;
  gap: var(--rule);
  background: var(--k);
}
.mo-main { display: flex; flex-direction: column; gap: var(--rule); }

/* ---------- Type ---------- */
.mo-h2 {
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.mo-h2--long { font-size: clamp(2.1rem, 3.9vw, 3.8rem); line-height: 1; }
.mo-h3 {
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.mo-intro { font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.5; max-width: 34ch; }
.mo-cell p { max-width: 62ch; }
.mo-cell p + p { margin-top: 0.9rem; }
.mo-meta { font-weight: 600; font-size: 0.95rem; margin-top: 1rem; }
.mo-small { display: block; font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; letter-spacing: 0; }
.mo-list { margin-top: 1.2rem; display: grid; gap: 0.6rem; }
.mo-list li { position: relative; padding-left: 1.5rem; }
.mo-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.7rem; height: 0.7rem; background: var(--k); }
.mo-svc__con .mo-list li:nth-child(1)::before { background: var(--red); }
.mo-svc__con .mo-list li:nth-child(2)::before { background: var(--blue); }
.mo-svc__con .mo-list li:nth-child(3)::before { background: var(--yellow); }
.mo-svc__coa .mo-list li:nth-child(1)::before { background: var(--blue); }
.mo-svc__coa .mo-list li:nth-child(2)::before { background: var(--red); }
p, li, dd { hyphens: auto; }

/* Links that are whole cells */
a.mo-cell { text-decoration: none; transition: background-color .15s, color .15s; }

/* ---------- Header ---------- */
.mo-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto 72px;
  gap: var(--rule);
  background: var(--k);
}
.mo-head .mo-cell { padding: 18px 26px; display: flex; align-items: center; }
.mo-brand { gap: 0.9rem; flex-wrap: wrap; }
.mo-brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; letter-spacing: -0.04em; line-height: 1; padding-top: 0.15em; }
.mo-brand__sub { font-size: 0.86rem; line-height: 1.25; max-width: 15ch; color: var(--ink-2); }
.mo-nav { display: grid; grid-auto-flow: column; gap: var(--rule); }
.mo-nav a { font-weight: 600; font-size: 0.98rem; }
.mo-nav a:nth-child(1):hover { background: var(--red); color: #fff; }
.mo-nav a:nth-child(2):hover { background: var(--yellow); }
.mo-nav a:nth-child(3):hover { background: var(--blue); color: #fff; }
.mo-nav a:nth-child(4):hover { background: var(--k); color: #fff; }
.mo-lang { background: var(--yellow); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; justify-content: center; }
.mo-lang:hover { background: var(--blue); color: #fff; }

/* ---------- Hero ---------- */
.mo-hero {
  grid-template-columns: 4fr 2.4fr 0.9fr 2.2fr;
  grid-template-rows: auto auto minmax(104px, auto);
  grid-template-areas:
    "title title red red"
    "lead  facts w1  yel"
    "cta   phone blk yel";
}
.mo-hero__title { grid-area: title; padding-block: clamp(32px, 4.4vw, 64px); }
.mo-hero__title h1 {
  font-size: clamp(2.9rem, 6.6vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  max-width: 11ch;
  hyphens: manual;
}
.mo-hero__red { grid-area: red; }
.mo-hero__w1 { grid-area: w1; }
.mo-hero__lead { grid-area: lead; }
.mo-hero__lead p { font-size: clamp(1.08rem, 1.35vw, 1.28rem); max-width: 46ch; }
.mo-hero__facts { grid-area: facts; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem; font-weight: 600; }
.mo-hero__facts span:first-child { font-family: var(--font-display); font-size: clamp(2rem, 3vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.35rem; }
.mo-hero__yel { grid-area: yel; }
.mo-hero__cta {
  grid-area: cta;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.1vw, 2rem); letter-spacing: -0.02em;
  padding-block: 20px;
}
.mo-hero__cta::after { content: ""; flex: none; width: 1.1em; height: 1.1em; background: var(--yellow); transition: transform .2s; }
.mo-hero__cta:hover { background: var(--red); }
.mo-hero__cta:hover::after { transform: translateX(6px); }
.mo-hero__phone { grid-area: phone; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -0.01em; display: flex; flex-direction: column; justify-content: center; padding-block: 18px; }
.mo-hero__phone:hover { background: var(--yellow); }
.mo-hero__blk { grid-area: blk; }

/* ---------- Services ---------- */
.mo-svc {
  grid-template-columns: 2.2fr 2fr 2fr 1.6fr 0.7fr;
  grid-template-areas:
    "t   i   i   i   y"
    "t   dev dev dev dev"
    "w   dev dev dev dev"
    "con con coa coa y2";
}
.mo-svc__title { grid-area: t; display: flex; align-items: flex-end; }
.mo-svc__intro { grid-area: i; padding-block: clamp(40px, 5vw, 72px); }
.mo-svc__intro .mo-intro { max-width: 40ch; }
.mo-svc__y { grid-area: y; }
.mo-svc__w { grid-area: w; }
.mo-svc__dev { grid-area: dev; display: grid; gap: var(--rule); background: var(--k); grid-template-columns: 1fr 1fr 1fr 0.42fr; }
.mo-svc__devhead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2rem; align-items: start; }
.mo-svc__devhead .mo-h3 { font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: 1; }
.mo-svc__focus { grid-column: 1 / 4; display: grid; grid-template-columns: subgrid; gap: var(--rule); }
.mo-svc__focus li { display: flex; flex-direction: column; gap: 0.4rem; }
.mo-svc__focus strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.1; }
.mo-mark { display: block; width: 28px; height: 28px; margin-bottom: 1rem; }
.mo-svc__r { grid-column: 4; }
.mo-svc__note { grid-column: 1 / -1; padding-block: 22px; font-weight: 600; display: flex; align-items: center; gap: 1rem; }
.mo-svc__note::before { content: ""; flex: none; width: 44px; height: 12px; background: var(--k); }
.mo-svc__con { grid-area: con; }
.mo-svc__coa { grid-area: coa; }
.mo-svc__y2 { grid-area: y2; }

/* ---------- Approach ---------- */
.mo-app {
  grid-template-columns: 0.45fr 1.3fr 1fr 1.2fr 1fr;
  grid-template-areas:
    "title title title intro intro"
    "b     steps steps steps steps"
    "y     small small faq   faq";
}
.mo-app__title { grid-area: title; display: flex; align-items: flex-end; min-height: clamp(200px, 22vw, 320px); }
.mo-app__intro { grid-area: intro; display: flex; align-items: flex-end; }
.mo-app__b { grid-area: b; }
.mo-app__y { grid-area: y; }
.mo-app__steps { grid-area: steps; display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: var(--rule); background: var(--k); }
.mo-app__steps li { padding-top: 0; }
.mo-num {
  display: flex; align-items: flex-end;
  width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)) var(--pad);
  height: clamp(84px, 9vw, 130px);
  padding: 0 var(--pad) 10px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 5vw, 4.6rem); line-height: 0.8;
  border-bottom: var(--rule) solid var(--k);
}
.mo-num.mo-black { color: var(--white); }
.mo-app__small { grid-area: small; }
.mo-app__small p { max-width: 52ch; }
.mo-app__faq { grid-area: faq; display: flex; flex-direction: column; }
.mo-app__faq details { border-top: 6px solid var(--k); }
.mo-app__faq details:last-child { border-bottom: 6px solid var(--k); }
.mo-app__faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; font-weight: 700; font-size: 1.05rem; line-height: 1.35;
}
.mo-app__faq summary::-webkit-details-marker { display: none; }
.mo-app__faq summary::after { content: ""; flex: none; width: 18px; height: 18px; margin-top: 0.15rem; background: var(--red); transition: background-color .15s; }
.mo-app__faq details[open] summary::after { background: var(--blue); }
.mo-app__faq summary:hover { color: var(--blue); }
.mo-app__faq details p { padding-bottom: 1.1rem; color: var(--ink-2); }

/* ---------- Products ---------- */
.mo-prod {
  grid-template-columns: 1.4fr 2fr 1.6fr 1fr;
  grid-template-areas:
    "title intro intro b"
    "p1    p1    p2    p2"
    "r     p3    p3    p3";
}
.mo-prod__title { grid-area: title; display: flex; align-items: flex-end; min-height: clamp(180px, 18vw, 260px); }
.mo-prod__intro { grid-area: intro; display: flex; align-items: flex-end; }
.mo-prod__intro .mo-intro { max-width: 44ch; }
.mo-prod__b { grid-area: b; }
.mo-prod__p1 { grid-area: p1; }
.mo-prod__p2 { grid-area: p2; }
.mo-prod__r { grid-area: r; }
.mo-prod__p3 { grid-area: p3; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--pad); align-items: center; }
.mo-viz { width: 100%; max-width: 360px; height: auto; margin-bottom: 1.6rem; }
.mo-viz--wide { margin: 0 0 0 auto; max-width: 420px; }
.mo-link {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.2rem;
  font-weight: 700; text-decoration: none; border-bottom: 4px solid var(--k); padding-bottom: 2px;
}
.mo-link:hover { border-color: var(--red); color: var(--red); }

/* ---------- Contact ---------- */
.mo-con {
  grid-template-columns: 2fr 2fr 1.7fr 0.6fr;
  grid-template-areas:
    "title title lead lead"
    "list  list  list y";
}
.mo-con__title { grid-area: title; display: flex; align-items: flex-end; min-height: clamp(260px, 26vw, 380px); }
.mo-con__title h2 { max-width: 14ch; }
.mo-con__lead { grid-area: lead; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.mo-con__y { grid-area: y; }
.mo-btn {
  align-self: flex-start; display: inline-block; padding: 0.9rem 1.4rem;
  background: var(--k); color: var(--white); font-weight: 700; text-decoration: none;
  box-shadow: inset 0 -6px 0 var(--yellow);
}
.mo-btn:hover { background: var(--blue); }
.mo-con__list { grid-area: list; display: grid; grid-template-columns: 2fr 2fr 1.7fr; gap: var(--rule); background: var(--k); }
.mo-con__list dt { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; }
.mo-con__list dd { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 1.6vw, 1.5rem); letter-spacing: -0.015em; line-height: 1.25; }
.mo-con__list dd address { font-family: var(--font-body); font-weight: 500; font-size: 1rem; letter-spacing: 0; line-height: 1.55; }
.mo-con__list a { text-decoration: none; border-bottom: 3px solid currentColor; }
.mo-con__list a:hover { color: var(--red); }

/* ---------- Footer ---------- */
.mo-foot {
  display: grid;
  grid-template-columns: 2.4fr 0.6fr 2fr 1.6fr 0.5fr;
  gap: var(--rule);
  background: var(--k);
}
.mo-foot .mo-cell { padding-block: 28px; font-size: 0.95rem; }
.mo-foot__name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.5rem; }
.mo-foot__links { display: flex; flex-wrap: wrap; align-content: center; gap: 0.5rem 1.5rem; }
.mo-foot__links a { font-weight: 600; text-decoration: none; border-bottom: 3px solid var(--k); }
.mo-foot__links a:hover { border-color: var(--red); }
.mo-foot__copy { display: flex; align-items: center; }

/* ---------- Legal pages ---------- */
.page-imprint .mo-main, .page-privacy .mo-main {
  display: grid; gap: var(--rule);
  grid-template-columns: 0.5fr minmax(0, 4fr) 1fr;
  background: var(--k);
}
.page-imprint .mo-main::before, .page-privacy .mo-main::before { content: ""; background: var(--red); }
.page-imprint .mo-main::after, .page-privacy .mo-main::after { content: ""; background: linear-gradient(var(--yellow) 0 34%, var(--k) 34% calc(34% + var(--rule)), var(--white) 0); }
.legal { background: var(--white); grid-column: 2; grid-row: 1; }
.page-imprint .mo-main::before, .page-privacy .mo-main::before { grid-column: 1; grid-row: 1; }
.page-imprint .mo-main::after, .page-privacy .mo-main::after { grid-column: 3; grid-row: 1; }
.legal__inner { margin-inline: 0; max-width: 46rem; }
.legal h1 { font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; font-size: clamp(2.6rem, 6vw, 4.8rem); padding-bottom: 1.4rem; border-bottom: var(--rule) solid var(--k); }
.legal h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--ink-2); hyphens: auto; }
.legal a { color: var(--blue); font-weight: 600; }

/* ---------- Medium ---------- */
@media (max-width: 1100px) {
  .mo-head { grid-template-columns: 1fr auto 64px; }
  .mo-head .mo-head__fill { display: none; }
  .mo-nav { grid-column: 1 / -1; grid-row: 2; grid-auto-columns: 1fr; }
  .mo-nav a { justify-content: center; }
  .mo-svc { grid-template-columns: 1.6fr 2fr 2fr 1.4fr 0.6fr; }
  .mo-svc__dev { grid-template-columns: 1fr 1fr 1fr 0.3fr; }
  .mo-svc__devhead { grid-template-columns: 1fr; gap: 0.5rem; }
  .mo-app { grid-template-columns: 0.3fr 1.3fr 1fr 1.2fr 1fr; }
  .mo-app__steps { grid-template-columns: 1fr 1fr; }
}

/* ---------- Small: a vertical composition ---------- */
@media (max-width: 760px) {
  :root { --rule: 8px; --pad: 20px; }
  .mo-head { grid-template-columns: 1fr auto 40px; }
  .mo-head .mo-cell { padding: 14px 16px; }
  .mo-brand__name { font-size: 1.5rem; }
  .mo-brand__sub { font-size: 0.78rem; }
  .mo-nav { grid-template-columns: 1fr 1fr; grid-auto-flow: row; }
  .mo-nav a { justify-content: flex-start; font-size: 0.95rem; }

  .mo-hero {
    grid-template-columns: 1fr 1fr 56px;
    grid-template-rows: auto;
    grid-template-areas:
      "title title title"
      "red   red   w1"
      "lead  lead  lead"
      "facts facts yel"
      "cta   cta   cta"
      "phone phone blk";
  }
  .mo-hero__red, .mo-hero__w1 { min-height: 44px; }
  .mo-hero__title h1 { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .mo-hero__facts { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 0.2rem 0.9rem; }
  .mo-hero__facts span:first-child { width: 100%; }

  .mo-svc {
    grid-template-columns: 56px 1fr 1fr;
    grid-template-areas:
      "y   t   t"
      "i   i   i"
      "dev dev dev"
      "con con con"
      "w   coa coa"
      "y2  y2  y2";
  }
  .mo-svc__title { min-height: 150px; }
  .mo-svc__y2 { min-height: 40px; }
  .mo-svc__dev { grid-template-columns: 1fr 48px; }
  .mo-svc__focus { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .mo-svc__r { grid-column: 2; grid-row: 2; display: none; }
  .mo-svc__note { align-items: flex-start; }
  .mo-svc__note::before { width: 24px; margin-top: 0.4rem; }

  .mo-app {
    grid-template-columns: 1fr 1fr 48px;
    grid-template-areas:
      "title title b"
      "intro intro intro"
      "steps steps steps"
      "small small small"
      "y     y     y"
      "faq   faq   faq";
  }
  .mo-app__title { min-height: 150px; }
  .mo-app__y { min-height: 40px; }
  .mo-app__steps { grid-template-columns: 1fr; }
  .mo-num { height: 64px; font-size: 2.6rem; }

  .mo-prod {
    grid-template-columns: 1fr 1fr 64px;
    grid-template-areas:
      "title title title"
      "intro intro b"
      "p1    p1    p1"
      "r     p2    p2"
      "p3    p3    p3";
  }
  .mo-prod__title { min-height: 130px; }
  .mo-prod__r { min-width: 0; }
  .mo-prod__p2 { grid-column: 1 / -1; }
  .mo-prod__r { display: none; }
  .mo-prod__p3 { grid-template-columns: 1fr; }
  .mo-viz--wide { margin: 0; order: -1; }

  .mo-con {
    grid-template-columns: 1fr 1fr 48px;
    grid-template-areas:
      "title title title"
      "lead  lead  lead"
      "list  list  list"
      "y     y     y";
  }
  .mo-con__title { min-height: 200px; }
  .mo-con__y { min-height: 40px; }
  .mo-con__list { grid-template-columns: 1fr; }

  .mo-foot { grid-template-columns: 1fr 48px; }
  .mo-foot__brand { grid-column: 1; }
  .mo-foot__c1 { grid-column: 2; }
  .mo-foot__links, .mo-foot__copy { grid-column: 1 / -1; }
  .mo-foot__c2 { grid-column: 1 / -1; min-height: 28px; }

  .page-imprint .mo-main, .page-privacy .mo-main { grid-template-columns: 1fr 48px; grid-template-rows: auto 40px; }
  .legal { grid-column: 1 / -1; grid-row: 1; }
  .page-imprint .mo-main::before, .page-privacy .mo-main::before { grid-column: 1; grid-row: 2; }
  .page-imprint .mo-main::after, .page-privacy .mo-main::after { grid-column: 2; grid-row: 2; background: var(--yellow); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
