/*
 * joerankuschel.de – stylesheet
 * No external resources (fonts, CDNs) are loaded on purpose: this keeps the
 * site free of third-party data transfers (DSGVO) and fast.
 *
 * Design: "strip header" – a teal band with the name and the language link,
 * a menu below it, two-column sections with airy Helvetica typography, and a
 * teal contact band at the end. Sunflower yellow is reserved for the primary
 * button; pale yellow tints the panels.
 */

:root {
  --bg: #ffffff;
  --text: #1d2b2d;         /* 14.6:1 on --bg, 13.2:1 on --tint */
  --muted: #4a5759;        /* 7.5:1 on --bg, 6.8:1 on --tint */
  --accent: #0e6b73;       /* teal – 6.2:1 on --bg, 5.6:1 on --tint */
  --accent-contrast: #ffffff; /* 6.2:1 on --accent */
  --line: #e1e9ea;
  --focus: #b45309;        /* 5.0:1 on --bg */
  --tint: #fdf3d0;         /* pale sunflower: portrait and tag panels */

  /* Coloured bands (header, contact) */
  --band: #0f5f66;
  --on-band: #ffffff;      /* 7.4:1 on --band */
  --band-muted: #c4e4e6;   /* 5.5:1 on --band */
  --band-focus: #f5c84c;   /* 4.7:1 on --band */

  /* Primary button */
  --button: #f5c84c;       /* sunflower – 4.7:1 against --band */
  --on-button: #1d2b2d;    /* 9.2:1 on --button */

  /* Form fields keep page colours, also inside a band */
  --field-bg: #ffffff;
  --field-text: #1d2b2d;

  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --measure: 68ch;
  --gutter: clamp(1rem, 5vw, 5rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1718;
    --text: #e4eced;       /* 15.2:1 on --bg, 10.6:1 on --tint */
    --muted: #a7b7b9;      /* 8.8:1 on --bg, 6.1:1 on --tint */
    --accent: #6fd3db;     /* 10.4:1 on --bg, 7.3:1 on --tint */
    --accent-contrast: #0e1718;
    --line: #22393c;
    --focus: #f5c84c;      /* 11.5:1 on --bg */
    --tint: #3a3217;       /* dark ochre */

    --band: #0d4146;
    --on-band: #ffffff;    /* 11.3:1 on --band */
    --band-muted: #b3d8db; /* 7.4:1 on --band */
    --band-focus: #f5c84c; /* 7.1:1 on --band */

    --button: #f5c84c;
    --on-button: #0e1718;  /* 11.5:1 on --button */

    --field-bg: #0e1718;
    --field-text: #e4eced;
  }
}

/* Inside a band the page colours are swapped for light-on-teal ones, so
   everything in it (links, muted text, lines, focus) adapts automatically. */
.strip,
.section-contact {
  --text: var(--on-band);
  --muted: var(--band-muted);
  --accent: var(--on-band);
  --line: var(--band-muted);
  --focus: var(--band-focus);
  background: var(--band);
  color: var(--text);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: 0.03em;
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
}

p,
ul,
ol,
address {
  margin: 0 0 1.5rem;
  max-width: var(--measure);
}

address {
  font-style: normal;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 84.5rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header: one-line strip + menu, aligned with the content ---------- */

.strip-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  margin: 0;
  max-width: none;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.brand-sep {
  color: var(--muted);
}

.tagline {
  color: var(--muted);
  font-size: 0.9375rem;
}

.lang-switch {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  margin-inline-end: -0.5rem; /* larger tap area, text still flush with the content edge */
  color: var(--accent);
  font-size: 0.9375rem;
}

/* Too narrow for one line: tagline moves under the name */
@media (max-width: 40rem) {
  .brand-sep {
    display: none;
  }

  .tagline {
    flex-basis: 100%;
    line-height: 1.4;
  }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(1.25rem, 3vw, 2.5rem);
  margin: 0 auto;
  padding-block: 0.5rem;
  list-style: none;
  max-width: 84.5rem;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--accent);
}

/* ---------- Sections ---------- */

main {
  display: block;
}

.section {
  border-top: 1px solid var(--line);
}

.section.hero {
  border-top: 0;
}

/* Contact is a coloured band (see top of file) as the closing call to action */
.section-contact {
  border-top: 0;
}

/* Second line of the hero heading in the accent colour */
.highlight {
  color: var(--accent);
}

.section h1,
.section h2 {
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.split > * {
  min-width: 0;
}

.subtitle {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  letter-spacing: 0.05em;
  margin: 0 0 2rem;
}

.text {
  max-width: 32rem;
}

.panel {
  background: var(--tint);
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
}

.panel-tags {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.panel-tags h3 {
  margin-bottom: 1rem;
  text-align: center;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 0.6rem 1.75rem;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.button:hover {
  background: var(--text);
  color: var(--bg);
}

.button-primary {
  background: var(--button);
  border-color: var(--button);
  color: var(--on-button);
  font-weight: 700;
}

.button-primary:hover {
  background: transparent;
  color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- Lists ---------- */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rows li {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.rows p {
  margin: 0;
  color: var(--muted);
}

ol.rows {
  counter-reset: step;
}

ol.rows li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
}

ol.rows li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-weight: 700;
  line-height: 1.15;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Tinted, borderless chips so they don't read as buttons */
.tags li {
  padding: 0.15rem 0.75rem;
  background: var(--bg);
  font-size: 0.875rem;
}

.contact-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.25rem;
}

.contact-list strong {
  display: inline-block;
  min-width: 5.5rem;
}

/* ---------- Contact form ---------- */

.contact-form {
  margin-top: 2.5rem;
  max-width: 32rem;
}

.contact-form p {
  margin: 0 0 1.25rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--muted);  /* 3:1+ against the surrounding colour */
  border-radius: 0;
  background: var(--field-bg);
  color: var(--field-text);
  font: inherit;
  letter-spacing: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline-offset: 0;
}

.contact-form .form-note {
  color: var(--muted);
  font-size: 0.875rem;
}

.contact-form button {
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

/* Honeypot: hidden from people and assistive tech, still submitted by bots */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Legal pages ---------- */

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

.legal h1 {
  text-transform: uppercase;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal p,
.legal ul,
.legal address {
  margin-bottom: 1rem;
}

.legal dl {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

.legal dt {
  font-weight: 700;
}

.legal dd {
  margin: 0 0 0.75rem;
}

/* ---------- Footer ---------- */

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Small screens ---------- */

@media (max-width: 48rem) {
  .split {
    grid-template-columns: 1fr;
  }

  /* Keep the portrait compact so the services follow soon after the intro */
  .portrait {
    max-width: 16rem;
  }

  .portrait img {
    aspect-ratio: 1;
    object-position: 50% 20%;
  }
}

/* ---------- Motion & print ---------- */

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

@media print {
  .site-nav,
  .lang-switch,
  .skip-link,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .strip,
  .section-contact {
    --text: #000;
    --muted: #000;
    --accent: #000;
    background: none;
    color: #000;
  }

  a[href^="http"]::after,
  a[href^="mailto"]::after {
    content: " (" attr(href) ")";
  }
}
