/* ==========================================================
   Barbara Hölke – gemeinsames Stylesheet
   Wird von index.html, ueber-mich.html und kontakt.html eingebunden
   ========================================================== */

/* ---------- Schriften (lokal eingebunden, Lizenz: SIL OFL 1.1, siehe fonts/) ---------- */
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("fonts/PlayfairDisplay.woff2") format("woff2"),
       url("fonts/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/Jost.woff2") format("woff2"),
       url("fonts/Jost-VariableFont_wght.ttf") format("truetype");
}

:root {
  box-sizing: border-box;
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #ffffff;
  --ink: #000000;
  --muted: #6b6b6b;
  --faint: #b4b4b4;
  --line: #e4e4e4;
  --shadow: rgba(0, 0, 0, .16);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* Header */
header {
  /*position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;*/
  background: var(--bg);
  box-shadow: 0 calc(-1 * env(safe-area-inset-top, 0px)) 0 var(--bg);
}
header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 34px; padding-top: 32px; padding-bottom: 32px; flex-wrap: wrap;
}
.logo {
  font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.02em;
  text-transform: uppercase;
}
.logo span { display: block; }
nav ul { display: flex; gap: 44px; list-style: none; margin: 0; padding: 0; }
nav a {
  font-size: 22px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s;
}
nav a:hover { border-bottom-color: var(--ink); }
nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Footer */
footer { border-top: 1px solid var(--ink); }
footer .wrap {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 28px; padding-bottom: 50px; font-size: 20px; color: var(--muted);
}
footer a:hover { color: var(--ink); }

/* ---------- Startseite (Werke) ---------- */
.intro { padding-top: 80px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px 56px; }
.tab {
  background: none; border: 0; padding: 0 0 16px; cursor: pointer; text-align: left;
  font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -.005em;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  color: var(--muted);
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 1px; text-underline-offset: .18em;
  transition: color .2s, text-decoration-color .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); text-decoration-color: var(--ink); }
.count { font-size: 18px; letter-spacing: .06em; color: var(--muted); margin: 22px 0 0; text-transform: uppercase; }

.grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 64px 44px; margin: 64px 0 120px; padding: 0; list-style: none;
}
.work-btn {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.art {
  position: relative; overflow: hidden;
  width: 100%;
  box-shadow: 0 18px 46px -18px var(--shadow);
  background-color: #eee;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
/* Bilder werden komplett und unbeschnitten in ihrem eigenen Seitenverhältnis gezeigt */
.art img { display: block; width: 100%; height: auto; aspect-ratio: auto 210 / 297; }
.work-btn:hover .art, .work-btn:focus-visible .art { transform: translateY(-4px); }
.work .ttl {
  font-family: var(--serif); font-size: 29px; font-weight: 500; margin: 22px 0 6px; line-height: 1.2;
}
.work .meta { font-size: 22px; color: var(--muted); margin: 0; letter-spacing: .02em; }

/* Lightbox */
dialog.lb {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100%; background: var(--bg); color: var(--ink);
}
dialog.lb[open] { display: flex; flex-direction: column; }
dialog.lb::backdrop { background: #fff; }
.lb-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 28px 0;
  min-height: 64px; font-size: 20px; letter-spacing: .08em; color: var(--muted);
}
.lb-icon {
  background: none; border: 0; cursor: pointer; width: 44px; height: 44px;
  display: grid; place-items: center; color: var(--ink);
}
.lb-icon svg { width: 50px; height: 50px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-body {
  flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 8px; padding: 0 16px;
}
.lb-stage {
  display: flex; justify-content: center; align-items: center; height: 100%; touch-action: pan-y;
}
.lb-img { display: block; max-width: 100%; max-height: calc(100dvh - 260px); object-fit: contain; box-shadow: 0 18px 46px -18px var(--shadow); }
.lb-ph { width: min(100%, calc((100dvh - 260px) * .8)); aspect-ratio: 4 / 5; box-shadow: 0 18px 46px -18px var(--shadow); }
.lb-cap {
  text-align: center; padding: 8px 24px calc(28px + env(safe-area-inset-bottom, 0px));
}
.lb-cap .ttl { font-family: var(--serif); font-size: 34px; font-weight: 500; margin: 0 0 4px; line-height: 1.2; }
.lb-cap .date { font-size: 20px; letter-spacing: .06em; color: var(--muted); margin: 0; }

/* ---------- Über mich ---------- */
main.page { padding-top: 104px; padding-bottom: 140px; }
h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5.2vw, 3rem);
  line-height: 1.05; margin: 0 0 56px; letter-spacing: -.005em;
}
.bio { /*display: grid;*/ grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.portrait {
  aspect-ratio: 3 / 4; width: 100%; background-color: #eee; position: relative; overflow: hidden;
  box-shadow: 0 18px 46px -18px var(--shadow);
  background-image:
    radial-gradient(circle at 50% 32%, #d9c3ae 0 22%, transparent 23%),
    radial-gradient(ellipse at 50% 78%, #7a7367 0 40%, transparent 41%),
    linear-gradient(180deg, #efe9e2, #d7d0c6);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-text { font-family: var(--serif); font-size: clamp(1.4rem, 1.8vw, 1.5rem); line-height: 1.65; color: var(--ink); max-width: 60ch; }
.bio-text p { margin-top: 0;}
.bio-text a {text-decoration: underline;}

/* ---------- Kontakt ---------- */
main.page-kontakt { padding-top: 104px; padding-bottom: 160px; min-height: 40vh; }
.kontakt-text {
  font-family: var(--serif); font-size: clamp(1.4rem, 1.8vw, 1.5rem); line-height: 1.65;
  color: var(--ink); max-width: 62ch; margin: 0 0 44px;
}
.card { max-width: 46ch; }
.name { font-family: var(--serif); font-size: clamp(1.6rem, 2.2vw, 2rem); margin: 0 0 14px; }
.mail {
  display: inline-block; font-size: 21px; letter-spacing: .01em;
  border-bottom: 1px solid var(--ink); padding-bottom: 3px;
}
.mail:hover { opacity: .6; }

/* ---------- Impressum / Datenschutz ---------- */
.legal-text {
  font-size: 19px; line-height: 1.7; max-width: 68ch; color: var(--ink);
}
.legal-text h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2vw, 1.75rem);
  margin: 2.2em 0 .6em;
}
.legal-text h2:first-child { margin-top: 0; }
.legal-text p { margin: 0 0 1em; }
.legal-text a { border-bottom: 1px solid var(--ink); }
.legal-text a:hover { opacity: .6; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }
  .intro { padding-top: 80px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  header .wrap { padding-top: 22px; }
  nav ul { gap: 24px; }
  nav a { font-size: 20px; }
  main.page { padding-top: 56px; padding-bottom: 88px; }
  main.page-kontakt { padding-top: 56px; padding-bottom: 100px; }
  .bio { grid-template-columns: 1fr; gap: 32px; }
  .portrait { max-width: 220px; }
  .logo { font-size: 37px; }
}
@media (max-width: 640px) {
  .intro { padding-top: 56px; }
  .tabs { gap: 4px 28px; }
  .grid { grid-template-columns: 1fr; margin: 44px 0 80px; }
  .lb-top { padding-left: 16px; padding-right: 8px; }
  .lb-body { padding: 0 4px; gap: 0; }
  .lb-icon { width: 40px; }
  .lb-cap .ttl { font-size: 24px; }
   nav a { font-size: 18px; }
    nav ul { gap: 19px; }
}
@media (prefers-reduced-motion: reduce) { .art, .tab { transition: none; } }
