/* benkoe.ch – gemeinsames Stylesheet für alle Seiten */

@view-transition { navigation: auto; }

:root {
  --paper: #FBFBF9;
  --ink: #141414;
  --ink-soft: #5c5c58;
  --line: #E3E3DE;
  --rot: #E5261F;        /* Flächen, Deko */
  --rot-text: #C81E17;   /* Text: 5.5:1 auf --paper */
  --max: 1080px;
  --pad: clamp(28px, 7vw, 64px);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--rot); color: #fff; }

a { color: inherit; }

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

/* ---------- Header ---------- */
header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.bar {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.wordmark .dot { color: var(--rot); }

nav { display: flex; gap: 4px; }
nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color .2s, background .2s;
}
nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 55%, transparent); }
nav a[aria-current="page"] { color: #fff; background: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rot);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Handy: Navigation auf eigene Zeile, horizontal scrollbar statt Seitenüberlauf */
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; row-gap: 8px; }
  nav {
    width: calc(100% + 20px);
    margin-left: -10px;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 2px;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { padding: 7px 10px; letter-spacing: 0.05em; }
}

/* ---------- Views ---------- */
main { flex: 1; }
main > section { view-transition-name: page; }

.wrap {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Hero mit Velolaufrad-Umlaut ---------- */
/* padding-block statt padding: sonst überschreibt .hero das seitliche Padding von .wrap */
.hero { padding-block: clamp(48px, 9vh, 110px) clamp(32px, 6vh, 72px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rot-text);
  display: block;
  margin-bottom: 20px;
}

.bigname {
  font-weight: 850;
  font-variation-settings: "wdth" 118;
  font-size: clamp(4.5rem, 22vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  display: inline-flex;
  align-items: flex-start;
  user-select: none;
}
.bigname .visual { display: inline-flex; align-items: flex-start; }
.oe { position: relative; display: inline-block; }
.wheels {
  position: absolute;
  top: 0.02em;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.09em;
}
.wheel {
  width: 0.155em;
  height: 0.155em;
  animation: spin 7s linear infinite;
}
.wheel:last-child { animation-duration: 9s; animation-direction: reverse; }
.wheel circle { stroke: var(--ink); }
.wheel .spoke { stroke: var(--ink); stroke-width: 5; }
.wheel .hub { fill: var(--rot); stroke: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.lede {
  max-width: 620px;
  margin-top: clamp(28px, 5vh, 56px);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  font-weight: 450;
  text-wrap: pretty;
}
.lede a {
  text-decoration: none;
  background-image: linear-gradient(var(--rot), var(--rot));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .2s;
}
.lede a:hover { color: var(--rot-text); }
.lede p + p { margin-top: 1em; }

/* ---------- Porträt ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(260px, 380px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(28px, 5vh, 56px);
}
.intro .lede { margin-top: 0; }
.portrait { margin: 0; position: relative; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.portrait::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  background: var(--rot);
}
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
}

/* ---------- Fakten-Zeile ---------- */
/* Feste Spaltenzahl statt auto-fit: sonst bricht das Raster auf Tablets
   in 3+1 oder 2+2 um und Trennlinien und Einzüge stimmen nicht mehr */
.facts {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: clamp(40px, 8vh, 88px);
}
.facts .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fact {
  padding: 28px 24px;
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: none; padding-left: 0; }
@media (max-width: 960px) {
  .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(odd) { border-left: none; padding-left: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .facts .wrap { grid-template-columns: 1fr; }
  .fact, .fact:nth-child(odd) {
    border-left: none;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .fact:last-child { border-bottom: none; }
}
.fact .k {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}
.fact .v { font-weight: 600; font-size: 1.02rem; }
.fact .v a { text-decoration: none; }
.fact .v a:hover { color: var(--rot-text); }

/* ---------- Scroll-Reveal ---------- */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Innenseiten ---------- */
.page { padding-block: clamp(48px, 8vh, 96px); }
h1.pagetitle {
  font-weight: 850;
  font-variation-settings: "wdth" 115;
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: clamp(32px, 6vh, 64px);
}
h1.pagetitle .punkt { color: var(--rot); }

/* Kontakt */
.contact-list { max-width: 720px; }
.row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row:first-child { border-top: 1px solid var(--line); }
.row .k {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.row .v { font-size: 1.15rem; font-weight: 550; overflow-wrap: anywhere; }
.row .v a { text-decoration: none; }
.row .v a:hover { color: var(--rot-text); }
.row .note {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 4px;
}
.row .note a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; gap: 4px; }
}

/* Links */
.linkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.linkgrid.narrow { max-width: 340px; }
.linkgrid.medium { max-width: 720px; }
.linkcard {
  background: var(--paper);
  padding: 26px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .2s;
  position: relative;
}
.linkcard:hover { background: #fff; }
.linkcard .name {
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.linkcard .name::after {
  content: "→";
  color: var(--rot);
  transition: transform .2s;
}
.linkcard:hover .name::after { transform: translateX(4px); }
.linkcard .url {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.aside {
  max-width: 640px;
  margin-top: 40px;
  padding-left: 20px;
  border-left: 3px solid var(--rot);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.aside a { color: var(--ink); }

.sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin: 48px 0 16px;
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vh, 96px); }
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  padding-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
footer a { text-decoration: none; }
footer a:hover { color: var(--rot-text); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .wheel { animation: none; }
  html { scroll-behavior: auto; }
  .reveal { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}
