/* Bau11 GmbH — site styles */

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* brand, sampled from the logo */
  --petrol: #005960;
  --gold: #daa520;

  --ground: #f4f5f2;
  --text: #0b3a3f;
  --muted: #56706f;
  --rule: rgba(0, 89, 96, 0.2);
  --rule-soft: rgba(0, 89, 96, 0.34);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --font: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-soft);
  transition: text-decoration-color 160ms ease;
}
a:hover { text-decoration-color: var(--gold); }
a:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 2px;
}

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

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

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-inline: var(--gutter);
}

.stage {
  display: grid;
  align-content: center;
  justify-items: center;
  padding-block: clamp(4.5rem, 12vh, 8rem) clamp(3rem, 8vh, 5rem);
}

/* The logo stands between two levels, drawn like an elevation:
   ±0,00 at its base, +11,00 at the top of the tallest tower. */
.elevation {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.elevation h1 { margin: 0; line-height: 0; }

.logo {
  display: block;
  width: clamp(15rem, 58vw, 44rem);
  height: auto;
}

.level {
  position: absolute;
  left: calc(-1 * var(--gutter));
  right: calc(-1 * var(--gutter));
  height: 0;
  pointer-events: none;
}
.level--top { top: 0; border-top: 1px dashed var(--rule-soft); }
.level--ground { bottom: 0; border-top: 1px solid var(--petrol); }

/* level mark: gold triangle with its tip on the line, value beside it.
   Both marks sit outside the band so they never touch the logo. */
.kote {
  position: absolute;
  right: var(--gutter);
  display: flex;
  gap: 0.45em;
  color: var(--petrol);
  font-size: clamp(0.75rem, 1.1vw, 0.875rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.7;
  white-space: nowrap;
}
.kote::before {
  content: "";
  width: 0.8em;
  height: 0.7em;
  background: var(--gold);
}
.level--top .kote { bottom: 0; align-items: flex-end; }
.level--top .kote::before { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.level--ground .kote { top: -1px; align-items: flex-start; }
.level--ground .kote::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.statement {
  margin-top: clamp(3rem, 8vh, 4.75rem);
  text-align: center;
  max-width: 34rem;
}
.statement p { margin: 0; }
.statement .de {
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text);
}
.statement .en {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 1.3vw, 1.0625rem);
  font-weight: 300;
  color: var(--muted);
}

/* title block, as on a drawing sheet */
.titleblock {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr auto;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: clamp(1rem, 3vh, 2rem);
}
.titleblock > div {
  padding: 1rem 1.25rem 0.25rem 0;
}
.titleblock > div + div {
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
}
.titleblock p { margin: 0; }
.titleblock address { font-style: normal; }
.titleblock .name { color: var(--text); font-weight: 500; }
.titleblock nav a { display: inline-block; margin-right: 1.1rem; }
.titleblock nav a:last-child { margin-right: 0; }
.titleblock .year { font-variant-numeric: tabular-nums; }

@media (max-width: 52rem) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .titleblock > div:nth-child(n + 3) { border-top: 1px solid var(--rule); margin-top: 0.75rem; }
}
@media (max-width: 30rem) {
  .titleblock { grid-template-columns: 1fr; }
  .titleblock > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); margin-top: 0.75rem; }
  .logo { width: min(78vw, 22rem); }
}

/* one orchestrated moment: the ground is drawn, the building rises, the levels are marked */
@media (prefers-reduced-motion: no-preference) {
  .level--ground {
    transform-origin: left center;
    animation: draw 900ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }
  .logo {
    animation: rise 1100ms cubic-bezier(0.22, 1, 0.36, 1) 450ms both;
  }
  .level--top,
  .kote {
    animation: appear 700ms ease 1350ms both;
  }
  .statement {
    animation: appear 800ms ease 1600ms both;
  }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes rise {
    from { clip-path: inset(100% 0 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
}

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

.doc {
  padding-inline: var(--gutter);
  padding-block: clamp(1.5rem, 4vh, 2.5rem) 4rem;
}

.doc-head {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--petrol);
}
.doc-head .home-link { display: block; line-height: 0; border-radius: 2px; }
.doc-head .home-link img { width: 7.5rem; height: auto; }
.doc-head nav { font-size: 0.9375rem; }
.doc-head nav a { margin-left: 1.1rem; }
.doc-head nav a[aria-current="page"] { text-decoration-color: var(--gold); }

.doc main {
  max-width: 44rem;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: clamp(2.5rem, 7vh, 4rem) 0 0.4rem;
}
.doc .stand { margin: 0 0 2.5rem; color: var(--muted); font-size: 0.9375rem; }

.doc h2 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 2.5rem 0 0.6rem;
  color: var(--petrol);
}
.doc h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 1.5rem 0 0.4rem;
}
.doc p,
.doc address,
.doc ul { margin: 0 0 1rem; max-width: 37rem; }
.doc address { font-style: normal; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.3rem; }
.doc li::marker { color: var(--gold); }

.doc-foot {
  max-width: 44rem;
  margin: 4rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}
.doc-foot p { margin: 0; }

/* unfilled Impressum data, must not go live */
mark.todo {
  background: rgba(218, 165, 32, 0.28);
  color: var(--text);
  padding: 0.05em 0.3em;
  border-radius: 2px;
}
