/* mathiasbecker.de – static site */

@font-face { font-family: "Lato"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-900-normal.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --bg-alt: #f2f2f0;
  --text: #4a4a4a;
  --heading: #222222;
  --muted: #8a8a8a;
  --line: #e2e2df;
  --accent: #1f6f8b;
  --header-h: 72px;
  --radius: 4px;
  --wrap: 1140px;
  --gutter: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { color: var(--heading); line-height: 1.25; font-weight: 900; letter-spacing: .02em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 28px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.08); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand {
  color: #6b6b6b; text-decoration: none; text-transform: uppercase;
  font-weight: 700; font-size: 1.45rem; letter-spacing: .03em; white-space: nowrap;
}
.brand:hover { color: var(--heading); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav a {
  display: block; padding: 8px 12px; color: #8a8a8a; text-decoration: none;
  text-transform: uppercase; font-weight: 700; font-size: .78rem; letter-spacing: .06em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--heading); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .brand { font-size: 1.15rem; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -10px; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(0,0,0,.06);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 6px var(--gutter) 14px; }
  .site-nav a { padding: 12px 0; font-size: .9rem; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; background: #1b1b1b; overflow: hidden; }
.slides { position: relative; height: clamp(280px, 38vw, 78vh); }
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.4s ease;
}
.slide.is-active { opacity: 1; }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding-bottom: 22px; padding-top: 60px;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
  max-width: none;
}
.hero-text p {
  max-width: var(--wrap); margin: 0 auto; color: #fff;
  font-weight: 300; font-size: clamp(1rem, 2.2vw, 1.5rem); letter-spacing: .04em;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  margin: 0 0 8px; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: .08em;
}
.section-lead { margin: 0 0 8px; color: var(--muted); }

.filters { list-style: none; margin: 18px 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: inherit; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #6b6b6b; background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.filters button:hover { border-color: #b9b9b5; color: var(--heading); }
.filters button[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); color: #fff; }
@media (max-width: 559px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { white-space: nowrap; }
}

/* ---------- portfolio ---------- */
.grid-portfolio {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) { .grid-portfolio { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 900px) { .grid-portfolio { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.tile[hidden], .card[hidden] { display: none; }
.tile a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: #ddd; aspect-ratio: 4 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile-info {
  position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff; display: flex; flex-direction: column; line-height: 1.3;
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.tile-info strong { font-weight: 900; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.tile-info small { font-size: .78rem; opacity: .85; }
.tile a:hover img, .tile a:focus-visible img { transform: scale(1.04); }
.tile a:hover .tile-info, .tile a:focus-visible .tile-info { opacity: 1; transform: none; }
@media (hover: none) {
  .tile-info { opacity: 1; transform: none; padding-top: 22px; }
  .tile-info small { display: none; }
  .tile-info strong { font-size: .72rem; }
}

/* ---------- travel cards ---------- */
.grid-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 22px; grid-template-columns: 1fr;
}
@media (min-width: 700px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.card a {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; color: var(--text); text-decoration: none;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: box-shadow .2s, transform .2s;
}
.card a:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card h3 { margin: 4px 0 8px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; }
.card-body > p:last-child { margin: 0; font-size: .95rem; line-height: 1.6; }
.meta { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact {
  position: relative; color: #e8e8e8; text-align: center;
  background: #111 url("../../img/kontakt.jpg") center / cover no-repeat;
}
@media (hover: hover) and (min-width: 900px) { .contact { background-attachment: fixed; } }
.contact::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.contact-inner { position: relative; max-width: 640px; padding-top: clamp(24px, 6vw, 60px); padding-bottom: clamp(24px, 6vw, 60px); }
.contact .section-title { color: #fff; }
.contact-lead { font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin: 12px 0 4px; }
.contact-mail { margin-top: 26px; }
.contact-mail a, .button {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: #fff; color: var(--heading); text-decoration: none; font-weight: 700; letter-spacing: .03em;
  transition: background .2s, color .2s;
}
.contact-mail a:hover { background: var(--accent); color: #fff; }
.button { background: var(--heading); color: #fff; }
.button:hover { background: var(--accent); color: #fff; }

/* ---------- article ---------- */
.post { padding: clamp(28px, 6vw, 64px) 0 clamp(40px, 7vw, 80px); }
.post-head h1 { margin: 6px 0 10px; font-size: clamp(1.7rem, 4.5vw, 2.6rem); text-transform: uppercase; letter-spacing: .03em; }
.crumbs { margin: 0; font-size: .85rem; }
.crumbs a { text-decoration: none; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.crumbs a:hover { color: var(--heading); }
.post-banner { max-width: 1100px; margin: 28px auto 0; padding: 0 var(--gutter); }
.post-banner img { width: 100%; border-radius: var(--radius); }
.post-body { margin-top: 28px; }
.post-body::after { content: ""; display: table; clear: both; }
.post-body p { margin: 0 0 1.15em; hyphens: auto; }
.post-body h2 { margin: 2em 0 .6em; font-size: 1.4rem; text-transform: uppercase; }
.post-body h3 { margin: 1.6em 0 .4em; font-size: 1.05rem; }
.post-body img { border-radius: 3px; }
.post-body figure { margin: 1.6em 0; max-width: 100%; }
.post-body figure img { margin: 0 auto; }
.post-body figcaption { margin-top: 8px; font-size: .86rem; line-height: 1.5; color: var(--muted); text-align: center; }
.post-body .img-single { margin: 1.6em 0; }
.post-body .img-single img { margin: 0 auto; }
.img-row { display: flex; gap: 6px; margin: 1.6em 0; }
.img-row > span { min-width: 0; }
.img-row img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) {
  .post-body .alignleft { float: left; max-width: 46%; margin: .3em 1.6em 1em 0; }
  .post-body .alignright { float: right; max-width: 46%; margin: .3em 0 1em 1.6em; }
}
.post-body .aligncenter { margin-left: auto; margin-right: auto; }
.post-body a[data-lb] { cursor: zoom-in; display: block; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { display: flex; flex-direction: column; text-decoration: none; color: var(--heading); font-weight: 700; line-height: 1.35; }
.post-nav a small { color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.post-nav .next { text-align: right; grid-column: 2; }
.post-nav a:hover span { color: var(--accent); }

.legal .post-body h2 { margin-top: 1.2em; }
.legal .post-body h2:first-child { margin-top: 0; }
.notfound { text-align: center; }

/* ---------- footer ---------- */
.site-footer { background: #1d1d1d; color: #a8a8a8; font-size: .85rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: #d6d6d6; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(10,10,10,.96); color: #eee;
  touch-action: pan-y;
}
.lb.is-open { display: flex; flex-direction: column; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 56px 12px 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; transition: opacity .2s; }
.lb-stage img.is-loading { opacity: .25; }
.lb-caption { min-height: 48px; padding: 10px 70px 16px; text-align: center; font-size: .9rem; letter-spacing: .03em; }
.lb-caption small { color: #999; margin-left: 10px; }
.lb button {
  position: absolute; background: rgba(255,255,255,.06); border: 0; color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.lb button:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 8px; right: 10px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: 6px; transform: none; }
  .lb-stage { padding: 56px 0 4px; }
}
.lb.is-single .lb-prev, .lb.is-single .lb-next { display: none; }
body.lb-open { overflow: hidden; }
