/* ==========================================================================
   Rosettastein Consulting GmbH - site styles
   Self-hosted, no external requests, no web fonts, no tracking.
   Design language derives from the brand mark: a bracket frame, geometric
   sans lettering, and a single teal accent.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */

:root {
  /* brand */
  --teal-900: #123f36;
  --teal-700: #185a4d;   /* text-safe: 7.0:1 on paper */
  --teal-600: #1f7060;   /* logo deep teal */
  --teal-500: #4c7f72;   /* logo mid teal */
  --teal-100: #e4efec;
  --teal-050: #f1f7f5;

  /* neutrals */
  --ink-900: #12211e;
  --ink-700: #3a4a46;    /* body text: 9.1:1 on paper */
  --ink-500: #5f6d69;    /* meta text: 5.4:1 on paper */
  --rule: #dcdfdd;
  --paper: #ffffff;
  --paper-warm: #f8f8f6;

  /* type */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.3vw, 1.32rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);

  /* space + layout */
  --gap: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section-y: clamp(3rem, 2rem + 5vw, 6rem);
  --measure: 68ch;
  --page: 1160px;
  --radius: 2px;
}

/* ---------------------------------------------------------------- reset */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-700);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.15em; }
p, li { text-wrap: pretty; }
:where(p, li, dd) { max-width: var(--measure); }

a {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--teal-900); }

strong { color: var(--ink-900); font-weight: 600; }

/* Browsers italicise <address>; postal addresses should read as plain text. */
address { font-style: normal; }

abbr[title] { text-decoration: underline dotted; cursor: help; }

/* Visible, high-contrast focus for keyboard users on every interactive element */
:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* --------------------------------------------------------- helpers */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.narrow { max-width: 78ch; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -120%;
  z-index: 100;
  background: var(--teal-700);
  color: #fff;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: translate 0.15s ease;
}
.skip-link:focus { translate: -50% 0; color: #fff; }

.eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 0.9rem;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-700);
  max-width: 60ch;
}

.section { padding-block: var(--section-y); }
.section + .section { padding-top: 0; }
.section--tint {
  background: var(--paper-warm);
  border-block: 1px solid var(--rule);
}
.section--tint + .section { padding-top: var(--section-y); }

.section-head { margin-bottom: clamp(1.75rem, 1rem + 2.5vw, 3rem); }

/* Bracket motif lifted from the logo */
.bracket {
  position: relative;
  padding-top: 1.75rem;
}
.bracket::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: min(100%, 320px);
  height: 3px;
  background: var(--teal-600);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--teal-700);
  border-radius: var(--radius);
  background: var(--teal-700);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--teal-700);
}
.btn--ghost:hover {
  background: var(--teal-050);
  color: var(--teal-900);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* -------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 76px;
  padding-block: 0.7rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 168px; }
@media (max-width: 26em) { .brand img { width: 132px; } }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-900);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.9rem, 0.3rem + 1.4vw, 1.9rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--ink-900);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--teal-700); border-bottom-color: var(--teal-500); }
.site-nav a[aria-current="page"] { color: var(--teal-700); border-bottom-color: var(--teal-600); }

.lang-switch {
  padding-left: clamp(0.9rem, 0.3rem + 1.4vw, 1.9rem);
  border-left: 1px solid var(--rule);
}
.lang-switch a { color: var(--ink-500); }

@media (max-width: 62em) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    padding-block: 0.5rem 1.1rem;
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a { padding-block: 0.85rem; border-bottom: 0; }
  .site-nav a[aria-current="page"] { border-bottom: 0; }
  .lang-switch { padding-left: 0; border-left: 0; }
  .site-header__inner { flex-wrap: wrap; }
}

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

.hero {
  padding-block: clamp(3rem, 2rem + 6vw, 7rem) var(--section-y);
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--teal-050) 0%, rgba(241, 247, 245, 0) 70%);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
}
@media (max-width: 58em) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 1rem; }

/* Framed panel echoing the logo brackets */
.frame {
  position: relative;
  container-type: inline-size;
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 4px;
  background: var(--teal-600);
}
.frame::before { top: -1px; left: -1px; }
.frame::after { bottom: -1px; right: -1px; }

.frame h2, .frame h3 { font-size: var(--step-1); }

/* -------------------------------------------------------------- grids */

.grid {
  display: grid;
  gap: clamp(1.25rem, 0.7rem + 2vw, 2.25rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.card {
  padding: clamp(1.25rem, 0.9rem + 1.2vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--teal-600);
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card__no {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal-600);
  margin-bottom: 0.6rem;
}

/* Definition-style service blocks */
.stack { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.75rem); }

.service {
  display: grid;
  gap: clamp(0.75rem, 0.4rem + 1.5vw, 2.5rem);
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  padding-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-top: 1px solid var(--rule);
}
@media (max-width: 52em) { .service { grid-template-columns: 1fr; } }
.service h2,
.service h3 { margin: 0; font-size: var(--step-1); }
.service > div > :last-child { margin-bottom: 0; }

/* Client / context line under a project heading */
.meta-note {
  margin: 0.5rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-500);
  max-width: none;
}

/* Numbered engagement stages */
.steps {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  counter-reset: step;
}
.steps li {
  margin-bottom: 0.6rem;
  padding-left: 0.2rem;
}
.steps li::marker {
  color: var(--teal-600);
  font-weight: 700;
}

/* Checklists */
.ticks { list-style: none; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
}
/* A check mark drawn from two borders: taller than wide, rotated 45deg. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.48em;
  width: 0.42rem;
  height: 0.8rem;
  border-right: 2px solid var(--teal-600);
  border-bottom: 2px solid var(--teal-600);
  rotate: 45deg;
}

/* Facts / figures */
.facts {
  display: grid;
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts dt, .facts .fact__label {
  font-size: var(--step--1);
  color: var(--ink-500);
  letter-spacing: 0.04em;
}
.facts dd, .facts .fact__value {
  margin: 0.15rem 0 0;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--teal-700);
  letter-spacing: -0.02em;
}

/* Definition list for legal / contact data */
.data-list {
  display: grid;
  grid-template-columns: minmax(8rem, 0.85fr) minmax(0, 1.15fr);
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
}
.data-list dt { color: var(--ink-500); }
.data-list dd { margin: 0; color: var(--ink-900); }

/* Stack the two columns whenever the *container* is narrow, not just the
   viewport: the same list appears full width on the Impressum and inside a
   ~370 px side panel on the home page, where two columns would be cramped.

   Container queries are Baseline 2023 (Chrome 105+, Firefox 110+, Safari 16+).
   The viewport media query below is the fallback: in a browser without
   container query support the panel simply keeps two tighter columns, which is
   still legible. Note that the W3C Nu validator's bundled CSS checker does not
   yet recognise `container-type` or `@container` and will report two false
   positives here. */
@media (max-width: 40em) {
  .data-list { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .data-list dd { margin-bottom: 0.85rem; }
}

@container (max-width: 30rem) {
  .data-list { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .data-list dd { margin-bottom: 0.85rem; }
}

/* Callout */
.note {
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  background: var(--teal-050);
  border-left: 4px solid var(--teal-600);
  font-size: var(--step--1);
}
.note :last-child { margin-bottom: 0; }
.note--plain { background: var(--paper-warm); border-left-color: var(--ink-500); }

/* Legal document typography */
.legal { max-width: 76ch; }
.legal h2 {
  font-size: var(--step-2);
  margin-top: 2.5em;
  padding-top: 0.6em;
  border-top: 1px solid var(--rule);
}
.legal h2:first-of-type { margin-top: 1.5em; }
.legal h3 { font-size: var(--step-0); margin-top: 1.9em; text-transform: none; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .toc { columns: 2 14rem; column-gap: 2rem; }
@media (max-width: 34em) { .legal .toc { columns: 1; } }

/* --------------------------------------------------------------- forms */

.form { max-width: 40rem; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--ink-900);
}
.field .hint {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--step--1);
  color: var(--ink-500);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #b9c1be;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-900);
  font: inherit;
}
.field input:hover,
.field textarea:hover,
.field select:hover { border-color: var(--teal-500); }
.field textarea { min-height: 9rem; resize: vertical; }
.req { color: #a8331f; }

.form__legal {
  padding: 1rem 1.15rem;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  font-size: var(--step--1);
  margin-bottom: 1.5rem;
}
.form__legal :last-child { margin-bottom: 0; }

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--teal-600);
  background: var(--teal-050);
  font-size: var(--step--1);
}
.form-status[hidden] { display: none; }
.form-status[data-state="error"] {
  border-left-color: #a8331f;
  background: #fdf2f0;
  color: #6d2013;
}

/* honeypot: hidden from users, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------- captcha */

/* Self-hosted arithmetic challenge. Deliberately a text question rather than
   a distorted image: it is readable by screen readers and needs no third-party
   service, so it changes nothing about the site's privacy position. */
.captcha { margin-bottom: 1.25rem; }

.captcha__question {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.15rem 0.5rem;
  background: var(--teal-050);
  border-bottom: 2px solid var(--teal-600);
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.captcha__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.captcha__row input {
  width: 7rem;
  flex: 0 0 auto;
}

.captcha__reload {
  padding: 0.5rem 0.8rem;
  border: 1px solid #b9c1be;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--teal-700);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.captcha__reload:hover { background: var(--teal-050); border-color: var(--teal-500); }

.field input[aria-invalid="true"],
.captcha input[aria-invalid="true"] {
  border-color: #a8331f;
  border-width: 2px;
}

.field-error {
  display: block;
  margin-top: 0.4rem;
  color: #8a2a19;
  font-size: var(--step--1);
  font-weight: 600;
}
.field-error[hidden] { display: none; }

/* Opt-in for reCAPTCHA. Presented as a plain, unpersuasive choice: no dark
   pattern, not pre-ticked, and declining leaves a working way to submit. */
.recaptcha-opt {
  padding: clamp(0.9rem, 0.8rem + 0.5vw, 1.15rem);
  background: var(--paper-warm);
  border: 1px solid var(--rule);
}

/* `.field label { display: block }` earlier in this file is more specific than a
   bare `.consent`, so it has to be qualified or the two-column layout is lost. */
.field label.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink-700);
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--teal-700);
  cursor: pointer;
}
.consent span { max-width: none; }
.consent strong { color: var(--ink-900); }

.recaptcha-opt .hint:empty { display: none; }
.recaptcha-opt .hint {
  margin: 0.6rem 0 0;
  padding-left: 1.85rem;
  color: var(--teal-700);
  font-weight: 600;
}

/* ------------------------------------------------------------- contact */

.contact-grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: start;
}
@media (max-width: 58em) { .contact-grid { grid-template-columns: 1fr; } }

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

.site-footer {
  margin-top: var(--section-y);
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 1.75rem;
  background: var(--teal-900);
  color: #cfdcd8;
  font-size: var(--step--1);
}
.site-footer h2 {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.45); }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer address { font-style: normal; }

.footer-grid {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #a9bdb7;
}
.footer-bottom p { margin: 0; max-width: none; }

/* ---------------------------------------------------------------- print */

@media print {
  .site-header, .site-footer, .skip-link, .btn-row, .nav-toggle { display: none !important; }
  body { color: #000; font-size: 11pt; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .section { padding-block: 0.5rem; }
}
