/* =========================================================
   Hendrik Braun — Portfolio
   Aesthetik: refined editorial minimalism
   Alle Assets lokal (keine externen Requests beim Seitenaufruf)
   ========================================================= */

/* ---------- Schriften (lokal eingebunden) ---------- */
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  --paper:      #F7F4EE;
  --paper-card: #FCFAF5;
  --ink:        #16140F;
  --ink-soft:   #57514593;
  --ink-muted:  #5b554a;
  --line:       rgba(22, 20, 15, 0.14);
  --line-soft:  rgba(22, 20, 15, 0.08);
  --accent:     #1F5C54;
  --accent-ink: #143f39;
  --accent-soft:rgba(31, 92, 84, 0.10);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 760px;
  --pad: clamp(20px, 5vw, 40px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* sehr feine Papier-Textur (inline, kein externer Request) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Animierter Hintergrund ---------- */
/* Liegt fix hinter dem gesamten Inhalt, fängt keine Klicks ab. */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Aurora: weiche grüne Lichtflächen, die langsam durchs Bild driften */
.bg-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(38% 42% at 20% 22%, rgba(31, 92, 84, 0.55), transparent 70%),
    radial-gradient(34% 40% at 82% 30%, rgba(46, 122, 110, 0.48), transparent 70%),
    radial-gradient(46% 50% at 50% 88%, rgba(31, 92, 84, 0.42), transparent 72%);
  filter: blur(40px);
  animation: aurora-drift 6.7s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(3%, 2%, 0)   scale(1.12) rotate(4deg); }
  100% { transform: translate3d(-2%, 3%, 0)  scale(1.06) rotate(-3deg); }
}

/* Punkte: feines grünes Punktraster, das sich gemächlich bewegt */
.bg-dots {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(31, 92, 84, 0.30) 1.4px, transparent 1.6px);
  background-size: 38px 38px;
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 40%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 120% at 50% 40%, #000 55%, transparent 100%);
  opacity: 0.5;
  animation: dots-drift 60s linear infinite;
  will-change: background-position;
}

@keyframes dots-drift {
  to { background-position: 380px -380px; }
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.monogram {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.monogram .dot { color: var(--accent); }
.topnav { display: flex; gap: 26px; }
.topnav a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}
.topnav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 5vw, 80px) 0px; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  color: var(--ink-muted);
  margin: 18px 0 0;
  line-height: 1.25;
}
.hero .bio {
  margin: 34px 0 0;
  max-width: 60ch;
  color: #2c2820;
}
.hero .bio + .bio { margin-top: 16px; }

/* ---------- Section heading ---------- */
.section { padding-block: clamp(40px, 8vw, 70px); }
.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 44px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.section-label h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0;
}
.section-label .count {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Project ---------- */
.project { margin-bottom: clamp(48px, 9vw, 80px); }
.project:last-child { margin-bottom: 0; }
.project-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}
.project-index {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}
.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.05;
  margin: 0;
}
.project-desc {
  margin: 0 0 16px;
  color: #2c2820;
}

.project-points {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: #2c2820;
}

.project-points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.project-points li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent, #5a6b5d);
}

/* ---------- Zwei-Klick-Video ---------- */
.video {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-card);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
              0 14px 40px -28px rgba(22,20,15,0.5);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background-color: var(--paper-card);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}
.video-cta {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%; height: 100%;
  cursor: pointer;
  background:
    radial-gradient(120% 120% at 50% 38%, rgba(0,0,0,0.18), transparent 60%),
    linear-gradient(180deg, rgba(20,18,14,0.28), rgba(20,18,14,0.42));
  border: 0;
  font-family: var(--sans);
  color: #fff;
  transition: background 0.25s ease;
}
.video-cta:hover {
  background:
    radial-gradient(120% 120% at 50% 38%, rgba(0,0,0,0.10), transparent 60%),
    linear-gradient(180deg, rgba(20,18,14,0.18), rgba(20,18,14,0.30));
}
.video-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.play {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 10px 28px -10px rgba(31,92,84,0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-cta:hover .play { transform: scale(1.06); box-shadow: 0 14px 32px -10px rgba(31,92,84,0.8); }
.play svg { width: 24px; height: 24px; margin-left: 3px; fill: #fff; }
.video-cta .label {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.video-consent {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-muted);
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-card);
}
.video-consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.video.is-loaded .video-consent { display: none; }

/* ---------- Kontakt ---------- */
.contact .lead {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 26px;
}
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(50px, 9vw, 90px);
  padding-block: 32px 44px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
}
.footer-row .legal { display: flex; gap: 22px; }
.site-footer a { color: var(--ink-muted); text-decoration: none; font-size: 0.86rem; }
.site-footer a:hover { color: var(--accent); }
.copyright { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Rechts-Seiten (Impressum / Datenschutz) ---------- */
.legal-page { padding-block: clamp(48px, 10vw, 90px) 40px; }
.legal-page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  margin: 0 0 8px;
}
.legal-page .updated { color: var(--ink-soft); font-size: 0.85rem; margin: 0 0 40px; }
.legal-page h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 40px 0 12px;
}
.legal-page h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 6px; }
.legal-page p, .legal-page li { color: #2c2820; }
.legal-page ul { padding-left: 1.2em; }
.legal-page li { margin-bottom: 6px; }
.legal-page address { font-style: normal; line-height: 1.7; }
.legal-page a { color: var(--accent); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--accent);
  font-size: 0.9rem; font-weight: 500; margin-bottom: 6px;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Load-Animation (staggered) ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.8s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .play, .btn, .video-cta { transition: none; }
  .bg-aurora, .bg-dots { animation: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 540px) {
  body { font-size: 16px; }
  .topnav { gap: 18px; }
  .project-head { gap: 12px; }
  .project-index { font-size: 1.8rem; }
}
