/* Michael Pikelj – schlankes Portfolio. Kein Framework, keine externen Ressourcen. */
@font-face { font-family: Raleway; font-weight: 300; font-display: swap; src: url(fonts/raleway-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Raleway; font-weight: 400; font-display: swap; src: url(fonts/raleway-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Raleway; font-weight: 500; font-display: swap; src: url(fonts/raleway-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Raleway; font-weight: 600; font-display: swap; src: url(fonts/raleway-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #121318;
  --bg-2: #1b1c22;
  --text: #eeeeee;
  --muted: #8a8a8a;
  --line: #262626;
  --accent: #00C2A8;          /* ultramagnetics-Jade: Linien, Markierungen */
  --accent-text: #00C2A8;     /* Jade, auch für kleine Schrift auf Dunkel */
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 Raleway, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  transition: background .4s, height .4s;
}
.site-header.is-solid, .page .site-header { background: rgba(18, 19, 24, .92); backdrop-filter: blur(8px); }
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand img { height: 34px; width: auto; }
.brand-name { font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: 15px; }
.brand-role { font-weight: 300; letter-spacing: .3em; text-transform: uppercase; font-size: 10px; color: var(--muted); }
.site-nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.site-nav a {
  font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  opacity: .8; transition: opacity .2s, color .2s;
}
.site-nav a:hover { opacity: 1; color: var(--accent-text); }

/* Hero / Medley */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #000; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.05) 40%, rgba(0,0,0,.55)); }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 16vh; text-align: center; padding: 0 24px;
}
.hero-text h1 {
  margin: 0 0 28px; font-weight: 300; font-size: clamp(26px, 4.4vw, 58px);
  letter-spacing: .02em; line-height: 1.15;
}
.hero-cta {
  display: inline-block; padding: 12px 28px; border: 1px solid rgba(255,255,255,.6);
  font-size: 11px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.hero-cta:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.sound-toggle {
  position: absolute; right: clamp(20px, 4vw, 56px); bottom: 28px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .75;
}
.sound-toggle:hover { opacity: 1; }
.sound-toggle .sound-on, .sound-toggle[aria-pressed="true"] .sound-off { display: none; }
.sound-toggle[aria-pressed="true"] .sound-on { display: inline; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 22px; height: 36px; margin-left: -11px;
  border: 1px solid rgba(255,255,255,.6); border-radius: 12px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px;
  background: #fff; border-radius: 1px; animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Portfolio */
.work { padding: clamp(48px, 6vw, 96px) 0 80px; }
.filter { list-style: none; margin: 0; padding: 0 20px clamp(28px, 3vw, 44px); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.filter button {
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.filter button:hover { color: var(--text); }
.filter button.is-active { color: var(--text); border-color: var(--accent); }

.grid {
  list-style: none; margin: 0; display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--gap, 0px); padding: 0 var(--gap, 0px);
}
.tile[hidden] { display: none; }
.tile-link {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-2); border-radius: var(--radius, 0px);
  isolation: isolate; transform: translateZ(0); /* hält die Rundung beim Zoom (Safari) */
}
.tile-link img, .tile-link video, .tile-video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms, filter 600ms; backface-visibility: hidden;
}
.tile-layer {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px; text-align: center; background: rgba(0, 0, 0, .62);
  opacity: 0; transition: opacity 600ms;
}
.tile-title { font-size: 15px; font-weight: 500; letter-spacing: .04em; line-height: 1.35; }
.tile-cat { font-size: 10px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--accent-text); }
.tile-link:hover img, .tile-link:hover video, .tile-link:focus-visible img { transform: scale(1.1) rotate(.1deg); }
.tile-link:hover .tile-layer, .tile-link:focus-visible .tile-layer, .tile.is-current .tile-layer { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* Detail-Bereich (öffnet über dem Raster, wie beim Brooklyn-Theme) */
.detail-wrap { max-height: 0; overflow: hidden; transition: max-height .8s var(--ease); }
.detail-wrap.is-open { max-height: 2400px; }
.detail { position: relative; max-width: 1760px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 48px) 70px; }
.detail-nav { display: flex; justify-content: center; align-items: center; gap: 36px; margin-bottom: 28px; }
.detail-nav button { width: 44px; height: 44px; font-size: 30px; line-height: 44px; color: var(--muted); font-weight: 300; transition: color .2s; }
.detail-nav button:hover { color: var(--text); }
.detail-media {
  position: relative; background: #000; aspect-ratio: 16 / 9; border-radius: var(--radius, 0px); overflow: hidden;
  /* so groß wie möglich, aber der ganze Player passt unter den Header ins Fenster */
  width: min(100%, calc((100vh - var(--header-h) - 120px) * 16 / 9)); margin: 0 auto;
}
.detail-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.detail-info { text-align: center; padding-top: 32px; }
.detail-title { margin: 0 0 10px; font-weight: 400; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .03em; }
.detail-meta { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.detail-credits, .detail-desc { max-width: 720px; margin: 14px auto 0; color: var(--muted); font-size: 15px; white-space: pre-line; }
.detail-credits:empty, .detail-desc:empty { display: none; }

/* About */
.about { max-width: 760px; margin: 0 auto; padding: 40px 24px 110px; text-align: center; }
.about h2, .page-title { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 22px; }
.about-text { font-size: clamp(17px, 1.6vw, 20px); font-weight: 300; line-height: 1.75; margin-bottom: 40px; }

/* Unterseiten */
.page main { max-width: 760px; margin: 0 auto; padding: calc(var(--header-h) + 70px) 24px 100px; min-height: 70vh; }
.page h1 { font-weight: 300; font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 18px; line-height: 1.2; }
.page h2 { font-size: 18px; font-weight: 500; margin: 36px 0 8px; }
.page p, .page li { color: #cfcfcf; }
.page main a:not(.hero-cta) { border-bottom: 1px solid var(--accent); }

/* Formular */
.form { display: grid; gap: 18px; margin-top: 36px; }
.form label { display: grid; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  font: 400 16px/1.5 Raleway, sans-serif; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); padding: 12px 14px; border-radius: 0; width: 100%;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { min-height: 180px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form button { justify-self: start; }
.notice { padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--bg-2); margin-top: 28px; }
.notice.error { border-color: #d0624e; }

/* Footer */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px;
  padding: 28px clamp(20px, 4vw, 56px); border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }
.footer-right { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.social a { display: block; width: 22px; height: 22px; color: var(--muted); transition: color .2s, transform .2s; }
.social a:hover { color: var(--accent-text); transform: translateY(-2px); }
.social svg { width: 100%; height: 100%; display: block; }
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }

/* ultramagnetics-Logo (Variante 2b, grüne Pole) */
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(fonts/outfit-latin-500-normal.woff2) format("woff2"); }
.um-logo {
  --um-bg: var(--bg);
  display: inline-flex; flex-direction: column; align-items: center; gap: .25em;
  font: 500 18px/1 Outfit, sans-serif; letter-spacing: -0.02em; color: #F5F5F5;
  text-transform: none; opacity: .75; transition: opacity .2s;
}
.um-logo:hover { opacity: 1; }
.um-logo .um-mark { width: 1.667em; height: 1.889em; }
.um-logo .um-word {
  position: relative; z-index: 1; margin-top: -1.417em; white-space: nowrap;
  text-shadow: -.035em 0 var(--um-bg), .035em 0 var(--um-bg), 0 -.035em var(--um-bg), 0 .035em var(--um-bg),
               -.028em -.028em var(--um-bg), .028em -.028em var(--um-bg), -.028em .028em var(--um-bg), .028em .028em var(--um-bg);
}
.um-logo .um-u { height: .5em; width: .441em; display: inline-block; vertical-align: baseline; margin-right: .04em; }
.um-credit { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .25em; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 1200px) { .grid { grid-template-columns: repeat(var(--cols-m, 3), 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); gap: min(var(--gap, 0px), 20px); padding: 0 min(var(--gap, 0px), 20px); } }
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .grid { grid-template-columns: 1fr; gap: min(var(--gap, 0px), 14px); padding: 0 min(var(--gap, 0px), 14px); }
  .tile-layer { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.75), transparent 60%); justify-content: flex-end; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 11px; letter-spacing: .14em; }
  .brand-role { display: none; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-right { justify-self: center; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* Overlays (contact, imprint, privacy) */
html.has-overlay { overflow: hidden; }
.overlay {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); color: var(--text); overflow: auto; overscroll-behavior: contain;
}
.overlay::backdrop { background: rgba(8, 9, 12, .78); backdrop-filter: blur(6px); }
.overlay[open] { animation: overlay-in .35s var(--ease); }
@keyframes overlay-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.overlay-body { padding: clamp(28px, 5vw, 56px); }
.overlay-body h1 { font-weight: 300; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; margin: 0 0 14px; }
.overlay-body p, .legal { color: #cfcfcf; }
.overlay-body a:not(.hero-cta), .legal a { border-bottom: 1px solid var(--accent); }
.overlay-close {
  position: sticky; top: 0; float: right; margin: 14px 14px 0 0; width: 40px; height: 40px;
  font-size: 28px; line-height: 40px; color: var(--muted); font-weight: 300; z-index: 1;
}
.overlay-close:hover { color: var(--text); }
.legal { font-size: 15px; line-height: 1.65; }
.legal h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin: 30px 0 8px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 1.2em; }
.legal li { margin: 2px 0; }
.form-note { font-size: 13px; color: var(--muted) !important; margin: 0; }
.form-hint { font-size: 13px; color: var(--muted) !important; margin: -6px 0 0; }
.form-status { margin: 0; min-height: 1.4em; font-size: 15px; }
.form-status.is-ok { color: var(--accent-text); }
.form-status.is-error { color: #e07a66; }
.form [hidden] { display: none !important; }
.overlay-body:focus { outline: none; }

/* Direkter Kontakt (Telefon, E-Mail) im Contact-Overlay */
.contact-direct { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 26px 0 8px; }
.contact-line {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line) !important; border-radius: 12px; background: var(--bg-2);
  transition: border-color .2s, transform .2s;
}
.contact-line:hover { border-color: var(--accent) !important; transform: translateY(-1px); }
.contact-line svg { width: 24px; height: 24px; flex: none; color: var(--accent-text); }
.contact-line span { display: flex; flex-direction: column; line-height: 1.35; font-size: 16px; color: var(--text); word-break: break-all; }
.contact-line small { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.form-intro { margin: 22px 0 -14px; font-size: 14px; color: var(--muted) !important; }

/* Button zum Transfer-Portal in der Navigation */
.site-nav { align-items: center; }
.site-nav a.nav-transfer {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border: 1px solid var(--accent); border-radius: 10px; opacity: 1; color: var(--text);
  transition: background .2s, color .2s;
}
.site-nav a.nav-transfer svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); transition: color .2s; }
.site-nav a.nav-transfer:hover { background: var(--accent); color: #06231f; }
.site-nav a.nav-transfer:hover svg { color: #06231f; }
@media (max-width: 560px) { .site-nav a.nav-transfer { height: 30px; padding: 0 10px; gap: 6px; } }
@media (max-width: 420px) { .site-nav { gap: 14px; } .site-nav a.nav-transfer svg { display: none; } }
