/* emmics.de — black & white, mono, full-width surfaces */

@font-face {
  font-family: "Charis Wordmark";
  src: url("/fonts/charis-wordmark.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #595959;
  --accent: #0b6a4e;     /* forest green, dark & slightly bluish */
  --accent-inv: #43c694; /* accent for inverted surfaces */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #a6a6a6;
    --accent: #43c694;
    --accent-inv: #0b6a4e;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  line-height: 1.65;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 72ch;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* full-width surfaces, separated by hairlines */
section,
footer {
  border-top: 1px solid var(--fg);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.centered {
  text-align: center;
}

h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ---- hero ---- */

.hero {
  padding-block: clamp(4rem, 13vw, 8rem) clamp(3rem, 9vw, 5.5rem);
  text-align: center;
}

.wordmark {
  font-family: "Charis Wordmark", "Charis SIL", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(3.25rem, 13vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
}

.phon {
  font-family: "Charis Wordmark", "Charis SIL", Georgia, "Times New Roman", serif;
  font-size: clamp(1.125rem, 3.5vw, 1.5rem);
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* ---- tooltip on the wordmark ---- */

.tip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.tooltip {
  position: absolute;
  top: calc(100% + 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(56ch, 86vw);
  background: var(--fg);
  color: var(--bg);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.tip:hover .tooltip,
.tip:focus .tooltip {
  opacity: 1;
  visibility: visible;
  /* appear only after lingering a moment */
  transition: opacity 0.25s ease 0.5s, visibility 0s linear 0.5s;
}

/* ---- about line, deliberately quiet ---- */

.about {
  max-width: 58ch;
  margin: clamp(2.75rem, 8vw, 4.5rem) auto 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}

.about::before {
  content: "";
  display: block;
  width: 4ch;
  height: 1px;
  background: var(--muted);
  margin: 0 auto 1.5rem;
}

/* ---- services as dictionary senses, centered ---- */

.senses {
  list-style: none;
  counter-reset: sense;
  margin: 0;
  padding: 0;
}

.senses li {
  counter-increment: sense;
  margin-top: 2.75rem;
}

.senses li:first-child {
  margin-top: 1.75rem;
}

.senses li::before {
  content: counter(sense);
  display: block;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.senses h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.senses p {
  margin: 0;
}

/* ---- inverted contact band ---- */

.invert {
  background: var(--fg);
  color: var(--bg);
}

.invert a {
  color: var(--accent-inv);
}

.invert a:focus-visible {
  outline-color: var(--accent-inv);
}

.invert ::selection {
  background: var(--accent-inv);
  color: var(--fg);
}

.mail {
  font-size: clamp(1.125rem, 3.5vw, 1.375rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---- footer ---- */

footer {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- error page ---- */

.topbar {
  padding-block: 1rem;
  border-bottom: 1px solid var(--fg);
}

.brand {
  font-family: "Charis Wordmark", "Charis SIL", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.error {
  border-top: none;
  padding-block: clamp(4rem, 16vw, 9rem);
}

.code404 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.error p:last-child {
  margin-top: 1.5rem;
}

/* ---- subpages (imprint, privacy) ---- */

.page {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.page h1 {
  font-size: 1.5rem;
  margin: 0 0 2rem;
}

.page h2 {
  margin-top: 2.5rem;
}

.back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-family: "Charis Wordmark", "Charis SIL", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}

.back:hover {
  color: var(--accent);
}

address {
  font-style: normal;
  margin: 0 0 1rem;
}
