/* Portfolio (www.mr-development.de) — plain CSS, no Tailwind.
   Tokens follow docs/brand/tokens.json. Concept "Werkverzeichnis": the project index is the hero;
   the index typography is the one loud thing, everything else stays calm. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/plus-jakarta-400.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/plus-jakarta-500.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/plus-jakarta-600.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/plus-jakarta-700.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); }

:root {
  --teal: #2e9789;          /* Tide Teal — rules, focus, non-text accents (3.3:1 on sand) */
  --teal-ink: #236f65;      /* Tide Teal darkened for text: 5.5:1 on Sand 97, 4.9:1 on Sand 93 */
  --harbor: #1f5352;        /* Harbor — links, primary button */
  --harbor-deep: #173e3d;
  --coral: #ec6b4d;         /* Signal Coral — only the wordmark dot */
  --sand-97: #f9f6f1;
  --sand-93: #ece8e2;
  --sand-88: #dcd5cb;
  --graphite: #1c2029;
  --midgrey: #5e6371;       /* Midgrey nudged darker so small text stays AA on Sand 93 (4.9:1) */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: 16px;
  --measure: 72ch;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--sand-97);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--harbor); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--graphite); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
/* left-aligned with the page grid, text column capped at the measure */
.narrow > * { max-width: var(--measure); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--graphite); color: #fff; padding: 8px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; color: #fff; }

.muted { color: var(--midgrey); }

/* ------------------------------------------------------------------ header & footer */

.site-header { border-bottom: 1px solid var(--sand-88); }
.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav login";
  align-items: center;
  gap: 8px 32px;
  min-height: 72px;
  padding-block: 12px;
}
.brand { grid-area: brand; text-decoration: none; color: var(--graphite); }
.wordmark { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; white-space: nowrap; }
.wordmark-dot { color: var(--coral); }
.site-nav { grid-area: nav; justify-self: end; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; list-style: none; }
.site-nav a, .login { color: var(--graphite); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.site-nav a:hover { color: var(--harbor); text-decoration: underline; }
.login {
  grid-area: login;
  border: 1px solid var(--sand-88); border-radius: 8px; padding: 6px 14px;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease);
}
.login:hover { background: var(--sand-93); border-color: var(--midgrey); color: var(--graphite); }
@media (max-width: 719px) {
  .site-header-inner { grid-template-columns: 1fr auto; grid-template-areas: "brand login" "nav nav"; }
  .site-nav { justify-self: start; }
  .site-nav ul { gap: 4px 20px; }
}

.site-footer { border-top: 1px solid var(--sand-88); margin-top: 96px; padding-block: 48px 64px; font-size: 0.875rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-id p { margin-top: 8px; color: var(--midgrey); line-height: 1.6; }
.footer-links { list-style: none; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 40px; }
.footer-links a { color: var(--graphite); }
.footer-links a:hover { color: var(--harbor); }

/* ------------------------------------------------------------------ type */

.hero { padding-block: 40px 8px; }
@media (min-width: 720px) { .hero { padding-block: 72px 24px; } }
.hero h1, .page-head h1, .project-head h1, .article h1 {
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
}
.hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem); }
.page-head { padding-block: 48px 24px; }
.page-head h1, .project-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); }
.lead { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem); line-height: 1.5; max-width: 60ch; margin-top: 20px; color: var(--graphite); }

.section { padding-top: 72px; }
.section-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.section-intro { max-width: var(--measure); margin-top: 12px; }
.text-link { font-weight: 600; }

/* ------------------------------------------------------------------ jump links */

.jump { margin-top: 40px; }
.jump ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; }
.jump a { color: var(--graphite); font-weight: 500; text-decoration: underline; text-decoration-color: var(--sand-88); text-underline-offset: 0.3em; }
.jump a:hover { text-decoration-color: var(--teal); }

/* ------------------------------------------------------------------ the index (Werkverzeichnis) */

.index-group { padding-top: 48px; }
.index-group-title {
  display: flex; align-items: center; gap: 16px;
  font-size: 0.9375rem; font-weight: 600; color: var(--midgrey); letter-spacing: 0;
}
.index-group-title::after { content: ""; flex: 1; height: 1px; background: var(--sand-88); }
.rows { list-style: none; margin-top: 4px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name status" "desc desc" "domain domain";
  column-gap: 16px;
  row-gap: 2px;
  padding: 14px 12px;
  margin-inline: -12px;
  border-bottom: 1px solid var(--sand-93);
  border-radius: 8px;
  transition: background-color 120ms var(--ease);
}
.row:hover, .row:focus-within { background: var(--sand-93); }
.row-name {
  grid-area: name;
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--graphite); text-decoration: none;
}
.row-name:hover { color: var(--graphite); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--teal); }
.row-desc { grid-area: desc; color: var(--midgrey); font-size: 0.9375rem; line-height: 1.45; }
.row-stack { display: block; margin-top: 2px; font-size: 0.8125rem; }
.row-domain { grid-area: domain; justify-self: start; }
.row .status { grid-area: status; align-self: center; }
@media (min-width: 900px) {
  .row {
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr) minmax(12rem, 16rem) 3rem;
    grid-template-areas: "name desc domain status";
    column-gap: 24px;
    align-items: baseline;
    padding-block: 18px;
  }
  .row-desc { align-self: baseline; }
  .row .status { align-self: baseline; justify-self: end; }
}
.index-more { margin-top: 32px; }
.index-more a { font-weight: 600; }

.domain {
  font-family: var(--mono); font-size: 0.875rem; letter-spacing: -0.01em;
  color: var(--harbor); text-decoration: underline; text-decoration-color: var(--sand-88);
  overflow-wrap: anywhere;
}
.domain:hover { color: var(--graphite); text-decoration-color: var(--teal); }

.status { font-size: 0.8125rem; font-weight: 600; }
.status-live { color: var(--teal-ink); }
.status-beta { color: var(--midgrey); }

/* ------------------------------------------------------------------ home sections */

.band { background: var(--sand-93); margin-top: 96px; padding-block: 72px; }
.band .domain, .band a { text-decoration-color: currentColor; }
.services { display: grid; gap: 40px 48px; margin-top: 40px; }
@media (min-width: 720px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.service p { margin-top: 8px; max-width: 52ch; }
.service ul { margin-top: 12px; list-style: none; border-top: 1px solid var(--sand-88); }
.service li { padding-block: 6px; border-bottom: 1px solid var(--sand-88); font-size: 0.9375rem; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); } }
.steps li { counter-increment: step; border-top: 2px solid var(--graphite); padding-top: 16px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--mono); font-size: 0.875rem; color: var(--teal-ink); margin-bottom: 8px;
}
.steps h3 { font-size: 1.125rem; font-weight: 700; }
.steps p { margin-top: 6px; color: var(--graphite); }

.about-grid { display: grid; gap: 40px; margin-top: 24px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 64px; } }
.prose { max-width: var(--measure); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 16px; }
.prose h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 40px; margin-bottom: 12px; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.stack-list > div { display: grid; grid-template-columns: 6rem 1fr; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--sand-88); }
.stack-list > div:first-child { border-top: 1px solid var(--sand-88); }
.stack-list dt { color: var(--midgrey); font-size: 0.875rem; padding-top: 2px; }

.funding .section-intro { max-width: 60ch; }

.band-contact .section-intro { max-width: 60ch; }
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.mail-plain { font-family: var(--mono); font-size: 0.9375rem; }
.band-contact .muted { margin-top: 20px; }
.band-contact .checklist { margin-top: 20px; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px;
  border-radius: 8px; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease);
}
.btn-primary { background: var(--harbor); color: #fff; border: 1px solid var(--harbor); }
.btn-primary:hover { background: var(--harbor-deep); color: #fff; }
.btn-secondary { background: transparent; color: var(--graphite); border: 1px solid var(--sand-88); }
.btn-secondary:hover { background: var(--sand-93); border-color: var(--midgrey); color: var(--graphite); }
.band .btn-secondary { border-color: var(--midgrey); }

/* ------------------------------------------------------------------ breadcrumb */

.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; font-size: 0.875rem; color: var(--midgrey); }
.breadcrumb li + li::before { content: "/"; padding-inline: 8px; color: var(--sand-88); }
.breadcrumb a { color: var(--midgrey); }
.breadcrumb a:hover { color: var(--harbor); }
.page-head .breadcrumb, .project-head .breadcrumb, .article .breadcrumb { margin-bottom: 32px; }

/* ------------------------------------------------------------------ project page */

.project-head { padding-block: 48px 40px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 20px; }
.badges li { font-size: 0.8125rem; line-height: 1.4; padding: 3px 8px; border: 1px solid var(--sand-88); border-radius: 4px; color: var(--graphite); }
.badges .badge-status { border-color: transparent; padding-left: 0; }
.tagline { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); line-height: 1.35; letter-spacing: -0.01em; margin-top: 16px; max-width: 40ch; font-weight: 500; }
.intro { max-width: var(--measure); margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.live-line { margin-top: 16px; font-size: 0.9375rem; color: var(--midgrey); }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--sand-88); border-bottom: 1px solid var(--sand-88);
}
.facts > div { padding: 20px 16px 20px 0; }
.facts > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--sand-88); }
.facts > div:nth-child(n + 3) { border-top: 1px solid var(--sand-88); }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div { padding: 24px 24px 24px 0; border-top: 0 !important; }
  .facts > div + div { padding-left: 24px; border-left: 1px solid var(--sand-88); }
}
@media (max-width: 899px) {
  .facts.facts-3 { grid-template-columns: 1fr; }
  .facts.facts-3 > div { padding-left: 0; border-left: 0; }
  .facts.facts-3 > div + div { border-top: 1px solid var(--sand-88); }
}
.facts dt { font-size: 0.8125rem; color: var(--midgrey); }
.facts dd { margin-top: 4px; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.facts dd span { display: block; font-size: 0.875rem; font-weight: 400; color: var(--midgrey); margin-top: 2px; }

.shots { display: grid; gap: 40px; margin-top: 24px; }
.shots-phone { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 260px)); gap: 32px; }
.shot img { border: 1px solid var(--sand-88); border-radius: 8px; background: #fff; }
.shot figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--midgrey); max-width: 60ch; }
.shots:not(.shots-phone) .shot-portrait { max-width: 360px; }

.feature-groups { display: grid; gap: 40px 64px; margin-top: 32px; }
@media (min-width: 900px) { .feature-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature-group h3 { font-size: 1.125rem; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--graphite); }
.feature-group dl > div, .feature-dl > div { padding-block: 12px; border-bottom: 1px solid var(--sand-88); }
.feature-group dt, .feature-dl dt { font-weight: 600; }
.feature-group dd, .feature-dl dd { color: var(--graphite); margin-top: 2px; max-width: 60ch; }
.feature-dl { grid-column: 1 / -1; display: grid; gap: 0 64px; border-top: 1px solid var(--sand-88); }
@media (min-width: 900px) { .feature-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.checklist { list-style: none; margin-top: 20px; max-width: var(--measure); }
.checklist li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--sand-88); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.95em; width: 12px; height: 7px;
  border-left: 2px solid var(--teal-ink); border-bottom: 2px solid var(--teal-ink); transform: rotate(-45deg);
}
.plain-list { margin-top: 20px; padding-left: 1.25em; max-width: var(--measure); }
.plain-list li + li { margin-top: 6px; }

.tech { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 20px; }
.tech li { font-family: var(--mono); font-size: 0.8125rem; padding: 4px 10px; background: var(--sand-93); border-radius: 4px; }
.meta-list { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-top: 20px; font-size: 0.9375rem; }
.meta-list dt { color: var(--midgrey); font-size: 0.8125rem; }
.meta-list dd { font-weight: 600; }

.faq { margin-top: 20px; max-width: var(--measure); border-top: 1px solid var(--sand-88); }
.faq details { border-bottom: 1px solid var(--sand-88); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 1.35em; width: 8px; height: 8px;
  border-right: 2px solid var(--midgrey); border-bottom: 2px solid var(--midgrey); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6em; }
.faq details p { padding-bottom: 16px; }

.related { list-style: none; margin-top: 16px; border-top: 1px solid var(--sand-88); }
.related li { display: grid; gap: 2px 24px; padding-block: 14px; border-bottom: 1px solid var(--sand-88); }
@media (min-width: 720px) { .related li { grid-template-columns: minmax(12rem, 16rem) 1fr; align-items: baseline; } }
.related a { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--graphite); }
.related a:hover { color: var(--harbor); }
.related span { color: var(--midgrey); font-size: 0.9375rem; }

.closing { padding-top: 96px; }
.closing p { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.closing .muted { display: block; }

/* ------------------------------------------------------------------ news */

.news-list { list-style: none; margin-top: 16px; border-top: 1px solid var(--sand-88); }
.news-list li { padding-block: 24px; border-bottom: 1px solid var(--sand-88); }
.news-list h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin-top: 4px; }
.news-list h3 a { color: var(--graphite); text-decoration: none; }
.news-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
.news-list li > p:last-child { margin-top: 6px; color: var(--graphite); max-width: var(--measure); }
.news-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8125rem; color: var(--midgrey); }

.article { padding-top: 48px; }
.article h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); margin-top: 8px; }
.article-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--sand-88); }
.article-links a:first-child { font-weight: 600; }
.article .prose { margin-top: 32px; }
.article .prose > section:first-child p:first-child { font-size: 1.0625rem; }
.contact-cta { margin-top: 72px; padding: 32px; background: var(--sand-93); border-radius: 12px; }
.contact-cta h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.contact-cta p { margin-top: 12px; }

/* ------------------------------------------------------------------ legal */

.legal { padding-top: 48px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.legal section { margin-top: 32px; }
.legal h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.legal h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 4px; }
.legal p + p { margin-top: 8px; }
.legal ul { padding-left: 1.25em; margin-block: 8px; }

/* ------------------------------------------------------------------ motion & print */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .skip, .jump, .cta-row { display: none; }
  body { background: #fff; }
}
