/* Die Code Chaoten — plain static rebuild
   Reproduces the look of the former WordPress site (Bricks theme + AutomaticCSS).
   Hand-written, no framework, no web fonts, no JavaScript.
   Fluid type / spacing values are lifted verbatim from the original AutomaticCSS build
   (root font-size 62.5%, so 1rem = 10px). */

:root {
  /* Fluid type scale */
  --h1: clamp(2.7648rem, calc(1.5611119444vw + 2.2652441778rem), 4.2634674666rem);
  --h2: clamp(2.304rem, calc(0.931666875vw + 2.0058666rem), 3.1984002rem);
  --h3: clamp(1.92rem, calc(0.499375vw + 1.7602rem), 2.3994rem);
  --text-m: clamp(1.6rem, calc(0.2083333333vw + 1.5333333333rem), 1.8rem);

  /* Fluid spacing */
  --space-m: clamp(2.4rem, calc(0.625vw + 2.2rem), 3rem);
  --space-xl: clamp(4.2645336rem, calc(2.5890275vw + 3.4360448rem), 6.75rem);
  --section-space-s: clamp(5.4013503376rem, calc(2.7069267317vw + 4.5351337834rem), 8rem);
  --section-space-m: clamp(7.2rem, calc(5vw + 5.6rem), 12rem);

  --gutter: 3rem;
  --content-width: 110rem;

  /* Palette (AutomaticCSS: --base / --primary / --neutral-light) */
  --text: #282525;
  --primary: #9e0720;
  --divider: #d9d9d9;
  --bg: #fff;
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: var(--text-m);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1,
h2 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }

p {
  margin: 0;
}

a {
  color: var(--primary);
}

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

.section {
  width: 100%;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
}

/* --- Skip links --------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.8rem 1.6rem;
  background: var(--text);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

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

/* --- Header ----------------------------------------------------- */

.site-header {
  padding-block: var(--space-m);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: var(--space-m);
}

.site-header__logo {
  display: inline-flex;
  line-height: 0;
}

.site-header__logo img {
  height: 6rem;
  width: auto;
}

@media (max-width: 767px) {
  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* --- Main ------------------------------------------------------ */

main {
  flex: 1 0 auto;
}

/* --- Hero ----------------------------------------------------- */

.hero {
  padding-top: 0;
  padding-bottom: var(--section-space-m);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: var(--space-m);
  text-align: center;
}

.hero h1 {
  color: var(--text);
}

.hero__lede {
  font-size: var(--text-m);
  color: var(--text);
}

/* --- Projects ----------------------------------------------- */

.projects {
  padding-top: 0;
  padding-bottom: var(--section-space-m);
}

.projects__heading {
  color: var(--text);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
  text-align: start;
}

.cta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
}

.cta-list__item {
  display: flex;
  flex-direction: column;
  row-gap: var(--space-m);
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--divider);
}

.cta-list__item:first-child {
  border-top: 1px solid var(--divider);
}

.cta-list__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  text-decoration: none;
  color: var(--primary);
}

.cta-list__link > * {
  transition: transform 0.3s ease;
}

.cta-list__label {
  font-size: var(--h3);
  font-weight: 400;
}

.cta-list__icon {
  width: 2em;
  min-width: 2em;
  height: auto;
  fill: var(--text);
}

.cta-list__link:hover .cta-list__label {
  transform: translateX(0.5em);
}

.cta-list__link:hover .cta-list__icon {
  transform: translateX(-0.5em);
}

.cta-list__desc {
  color: var(--text);
}

/* --- Impressum --------------------------------------------- */

.legal {
  padding-block: var(--section-space-m);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legal__body {
  max-width: 48rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  row-gap: 1.2em;
}

.legal a {
  color: var(--primary);
  text-decoration: underline;
}

.legal a:hover {
  text-decoration: none;
}

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

.site-footer {
  flex-shrink: 0;
  padding-block: var(--section-space-m);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: calc(var(--space-m) / 2);
  text-align: center;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1em;
  row-gap: 1em;
}

.site-footer__link {
  color: var(--primary);
  text-decoration: underline;
}

.site-footer__link:hover {
  text-decoration: none;
}

.site-footer__copyright {
  color: var(--text);
}

/* --- Reduced motion ------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cta-list__link > * {
    transition: none;
  }
  .cta-list__link:hover .cta-list__label,
  .cta-list__link:hover .cta-list__icon {
    transform: none;
  }
}
