/* Züri Gümmeler – Design
   Idee: Passstrassen-Schild in dunklem Kobaltblau,
   Gelb wie die Kappe der Kilometersteine an französischen Cols,
   Höhenprofile als wiederkehrendes Motiv. Keine externen Schriften
   (Datenschutz): Avenir Next (Apple) bzw. Bahnschrift/Segoe (Windows). */

:root {
  --pass: #1E3A8A;        /* Kobalt dunkel */
  --pass-deep: #162B68;
  --borne: #F2C12E;       /* Kilometerstein-Gelb */
  --asphalt: #23272C;     /* Text */
  --granite: #646C75;     /* Sekundärtext */
  --chalk: #F3F5F6;       /* Hintergrund */
  --rule: #D5DBE0;
  --white: #FFFFFF;

  --display: "Avenir Next Condensed", "Bahnschrift Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", sans-serif;
  --text: "Avenir Next", "Segoe UI", "Frutiger", "Roboto", "Helvetica Neue", Arial, sans-serif;

  --s-1: .8125rem; --s0: 1.0625rem; --s1: 1.333rem; --s2: 1.777rem; --s3: 2.369rem; --s4: 3.157rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--chalk); color: var(--asphalt);
  font: 400 var(--s0)/1.6 var(--text);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--borne); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--borne); color: var(--asphalt); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -.005em; margin: 0; }

/* ---------- Kopf ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter); background: var(--pass); color: var(--white);
}
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
  font: 700 1.35rem/1 var(--display); letter-spacing: .01em;
}
.wordmark svg { width: 2.3rem; fill: none; stroke: var(--borne); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.masthead nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.masthead nav a { text-decoration: none; font-weight: 600; padding: .3rem 0; border-bottom: 2px solid transparent; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { border-bottom-color: var(--borne); }

/* ---------- Hero: das Passschild ---------- */
.hero {
  background: var(--pass); color: var(--white);
  padding: clamp(1.25rem, 3vw, 2.25rem) 0 0; position: relative; overflow: hidden;
}
.hero__motto {
  font-size: clamp(2rem, 5.2vw, 4.25rem); line-height: 1; letter-spacing: -.015em;
  max-width: 24ch; padding: 0 var(--gutter);
}
.hero__profile { color: var(--white); margin-top: .5rem; padding-top: 2.6rem; }
.hero__profile .profile { width: 100%; height: clamp(90px, 13vw, 170px); }
.profile { display: block; position: relative; }
.profile svg { display: block; width: 100%; height: 100%; overflow: visible; }
.profile .line { fill: none; stroke: currentColor; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.profile .col {
  position: absolute; transform: translate(-50%, calc(-100% - 10px)); text-align: center;
  font-size: var(--s-1); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums;
  padding-bottom: 14px; opacity: .92;
}
.profile .col::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 12px; border-left: 1.5px solid currentColor; }
.profile .col b { display: block; font-weight: 600; }
.profile .col--start { transform: translate(8px, calc(-100% - 10px)); text-align: left; }
.profile .col--start::after { left: 0; }
.profile .col--end { transform: translate(calc(-100% - 8px), calc(-100% - 10px)); text-align: right; }
.profile .col--end::after { left: auto; right: 0; }

/* einmaliger Auftritt: das Profil zeichnet sich beim Laden */
@media (prefers-reduced-motion: no-preference) {
  .hero .profile .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s cubic-bezier(.5,0,.2,1) .2s forwards; }
  .hero .profile .area, .hero .profile .col { opacity: 0; animation: fade .8s ease 2.2s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.hero__stage {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 2rem; align-items: end;
  background: var(--pass-deep); padding: 1.1rem var(--gutter) 1.25rem; text-decoration: none;
}
.hero__kicker { grid-column: 1 / -1; color: var(--borne); font-weight: 600; font-size: var(--s-1); }
.hero__title { font: 700 var(--s2)/1.1 var(--display); max-width: 30ch; }
.hero__stage:hover .hero__title { text-decoration: underline; text-decoration-color: var(--borne); text-underline-offset: .2em; }

/* ---------- Kennzahlen als Kilometersteine ---------- */
.stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.stats > div {
  background: var(--white); color: var(--asphalt); min-width: 6.5rem;
  border-top: 7px solid var(--borne); border-radius: 14px 14px 3px 3px;
  padding: .45rem .9rem .55rem; box-shadow: inset 0 0 0 1px var(--rule);
}
.stats dt { font-size: var(--s-1); color: var(--granite); }
.stats dd { margin: 0; font: 700 var(--s2)/1 var(--display); font-variant-numeric: tabular-nums; }
.stats dd span { font-size: .55em; margin-left: .2em; color: var(--granite); }
.stats--hero > div { box-shadow: none; }

/* ---------- Abschnitte ---------- */
.latest, .archive, .page-head, .post, .pager, .contact { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.latest { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.section-h { font-size: var(--s3); margin-bottom: 1.5rem; }
.meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--granite); font-size: var(--s-1); margin: 0 0 .5rem; }
.meta a { color: var(--pass); text-decoration: none; font-weight: 600; }

.latest__grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: 1.6fr 1fr; }
.teaser--lead { grid-row: span 2; }
.teaser a { text-decoration: none; display: block; }
.teaser h3 { font-size: var(--s1); margin-bottom: .4rem; }
.teaser--lead h3 { font-size: var(--s3); }
.teaser .excerpt { margin: 0; color: var(--granite); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 60ch; }
.teaser:not(.teaser--lead) .excerpt { -webkit-line-clamp: 2; }
.teaser__text { padding-top: 1rem; }
.teaser a:hover h3 { color: var(--pass); }

.cover { aspect-ratio: 3 / 2; overflow: hidden; background: var(--pass); border-radius: 4px; }
.teaser--lead .cover { aspect-ratio: 4 / 3; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.teaser a:hover .cover img { transform: scale(1.03); }
.cover--empty { display: flex; align-items: flex-end; color: rgba(255,255,255,.85);
  background: linear-gradient(var(--pass), var(--pass-deep)); }
.cover--empty .profile { width: 100%; height: 55%; }

/* ---------- Roadbook (Beitragsliste) ---------- */
.archive { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 2rem; }
.archive--full { padding-top: 0; }
.archive__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.more { color: var(--pass); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.roadbook { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--asphalt); }
.roadbook li { border-bottom: 1px solid var(--rule); }
.roadbook a {
  display: grid; grid-template-columns: 9.5rem 1fr 9rem 6.5rem; gap: 1.25rem; align-items: baseline;
  padding: 1rem .25rem; text-decoration: none;
}
.roadbook a:hover { background: var(--white); }
.roadbook a:hover .rb-title { color: var(--pass); }
.roadbook time { color: var(--granite); font-size: var(--s-1); font-variant-numeric: tabular-nums; }
.rb-title { font: 700 var(--s1)/1.2 var(--display); }
.rb-cat { color: var(--granite); font-size: var(--s-1); }
.rb-num { text-align: right; font-size: var(--s-1); font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.35; }

/* ---------- Seitenkopf / Filter ---------- */
.page-head { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: 2rem; }
.page-head h1 { font-size: clamp(2.6rem, 8vw, var(--s4) * 1.4); }
.page-head--center { text-align: center; padding-bottom: 6rem; }
.lede { font-size: var(--s1); line-height: 1.45; color: var(--granite); max-width: 46ch; margin: .75rem 0 0; }
.page-head--center .lede { margin-inline: auto; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.filters a {
  text-decoration: none; font-weight: 600; font-size: var(--s-1);
  padding: .45rem .9rem; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--rule);
}
.filters a span { color: var(--granite); font-weight: 400; margin-left: .2rem; }
.filters a[aria-current="page"] { background: var(--pass); color: var(--white); box-shadow: none; }
.filters a[aria-current="page"] span { color: var(--borne); }

/* ---------- Beitrag ---------- */
.post { padding-top: clamp(2.5rem, 7vw, 5rem); max-width: calc(54rem + 2 * var(--gutter)); }
.post__head { max-width: none; }
.post__head h1 { font-size: clamp(2.3rem, 6.5vw, 4.6rem); line-height: .98; text-wrap: balance; }
.post__profile { margin: 2.5rem 0 1rem; color: var(--pass); padding-top: 3rem; }
.post__profile .profile { width: 100%; height: clamp(150px, 22vw, 240px); }
.post__profile figcaption { font-size: var(--s-1); color: var(--granite); margin-top: .5rem; }
.post > .stats { margin: 1.5rem 0 2.5rem; }
.stage-h { font: 600 var(--s-1)/1 var(--text); color: var(--granite); margin: 2rem 0 -.75rem; }
.post__cover { margin: 2rem 0 0; border-radius: 4px; overflow: hidden; }
.post__cover img { width: 100%; max-height: 80vh; object-fit: cover; }
.post__cover--portrait { max-width: 26rem; }

.prose { max-width: none; margin: 2.5rem 0 0; font-size: 1.1875rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { font-size: var(--s3); margin-top: 2.2em; }
.prose h3 { font-size: var(--s2); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--pass); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
.prose strong { font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: .2rem 0 .2rem 1.25rem; border-left: 4px solid var(--borne); font-size: var(--s1); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose .photo, .prose .gallery { margin-inline: 0; width: 100%; }
.prose .photo img { border-radius: 4px; width: 100%; height: auto; cursor: zoom-in; }
.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(3, 1fr); }
.gallery[data-count="2"], .gallery[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.gallery img { background: var(--rule); width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; cursor: zoom-in; }
.prose video { width: 100%; max-height: 80vh; border-radius: 4px; background: #000; }
.prose .note { background: var(--white); border-left: 4px solid var(--borne); padding: .9rem 1.1rem; font-size: var(--s0); color: var(--granite); }
.strava-link a { display: inline-flex; gap: .5rem; align-items: center; color: #E8590C; font-weight: 600; margin-top: 2rem; }
.strava-link svg { width: 1.2rem; fill: currentColor; }

.pager { max-width: calc(54rem + 2 * var(--gutter)); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; padding-bottom: 4rem; }
.pager a { display: block; text-decoration: none; background: var(--white); padding: 1.1rem 1.25rem; border-radius: 4px; font: 700 var(--s1)/1.2 var(--display); box-shadow: inset 0 0 0 1px var(--rule); }
.pager a span { display: block; font: 400 var(--s-1) var(--text); color: var(--granite); margin-bottom: .3rem; }
.pager__next { text-align: right; }
.pager a:hover { box-shadow: inset 0 0 0 2px var(--pass); }

/* ---------- Kontakt ---------- */
.contact { max-width: calc(40rem + 2 * var(--gutter)); margin: 4rem 0 0; padding-inline: 0; }
.contact h2 { font-size: var(--s3); }
.contact form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.contact label { display: grid; gap: .35rem; font-weight: 600; font-size: var(--s-1); }
.contact input, .contact textarea { font: inherit; font-size: var(--s0); padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); color: var(--asphalt); }
.contact input:focus, .contact textarea:focus { border-color: var(--pass); outline: 2px solid var(--pass); outline-offset: 0; }
.contact button { justify-self: start; font: 700 var(--s0) var(--text); background: var(--pass); color: var(--white); border: 0; padding: .85rem 1.5rem; border-radius: 4px; cursor: pointer; }
.contact button:hover { background: var(--pass-deep); }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-size: var(--s-1); color: var(--pass); font-weight: 600; }
.contact button:disabled { opacity: .6; cursor: wait; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(20, 30, 45, .94); display: grid; place-items: center; padding: 1rem; z-index: 50; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.lightbox img { max-height: 92vh; max-width: 96vw; object-fit: contain; border-radius: 3px; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: var(--white); border: 0; border-radius: 999px; padding: .5rem 1rem; font: 600 var(--s-1) var(--text); cursor: pointer; }

/* ---------- Fuss ---------- */
.foot { background: var(--asphalt); color: #C9CFD5; margin-top: 4rem; }
.home .foot, .archive-page .foot { margin-top: 2rem; }
.foot__inner { max-width: var(--max); margin: 0 auto; padding: 3rem var(--gutter) 2rem; display: grid; gap: 1.5rem; }
.foot__motto { font: 700 var(--s2)/1.1 var(--display); color: var(--white); margin: 0; max-width: 22ch; }
.foot__links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { color: var(--borne); }
.social { display: inline-flex; align-items: center; gap: .4rem; }
.social svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.social svg .fill { fill: currentColor; stroke: none; }
.foot__copy { margin: 0; font-size: var(--s-1); color: var(--granite); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .latest__grid { grid-template-columns: 1fr; }
  .teaser--lead { grid-row: auto; }
  .teaser--lead h3 { font-size: var(--s2); }
  .roadbook a { grid-template-columns: 1fr auto; gap: .2rem 1rem; }
  .roadbook time { grid-column: 1; order: -1; }
  .rb-title { grid-column: 1; }
  .rb-cat { display: none; }
  .rb-num { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .hero__stage { grid-template-columns: 1fr; }
  .hero__title { font-size: var(--s1); }
  .stats { gap: .5rem; }
  .stats > div { min-width: 0; flex: 1; padding: .35rem .6rem .45rem; }
  .stats dd { font-size: var(--s1); }
  .profile .col--minor { display: none; }
  .profile .col { font-size: .72rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .pager { grid-template-columns: 1fr; }
  .pager__next { text-align: left; }
  .masthead { flex-wrap: wrap; }
}
