/* okanoecal.com — cinematic editorial. Schwarz / Beton / Amber. */
@import url('fonts/fonts.css');

:root {
  --bg: #0a0a0b;
  --bg2: #101012;
  --ink: #ece8e1;
  --mut: #97928a;
  --line: #232327;
  --amber: #d9a441;
  --amber-dim: #a87c2c;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--amber); color: #14100a; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Korn-Textur über allem — Kino-Feeling, kein glattes Digital-Schwarz */
body::after {
  content: '';
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 9000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  animation: grain 7s steps(9) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) }
  40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-2%) }
  80% { transform: translate(3%,3%) }
}

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

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
/* Logo-PNG ist schwarz auf weiß → invert + screen-Blend löst die Box im Dunkel auf */
.nav-logo img { height: 34px; width: auto; filter: invert(1) brightness(1.15); mix-blend-mode: screen; opacity: .95; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--mut);
  transition: color .25s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--amber); transition: width .3s cubic-bezier(.7,0,.2,1);
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current]::after { width: 100%; }

.burger { display: none; background: none; border: 0; cursor: pointer; z-index: 120; }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .3s, opacity .3s; }

@media (max-width: 760px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center;
    gap: 2.2rem; background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(20px);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav-links a { font-size: 1rem; }
  body.menu-offen .nav-links { opacity: 1; pointer-events: auto; }
  body.menu-offen .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.menu-offen .burger span:nth-child(2) { opacity: 0; }
  body.menu-offen .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- Hero (Home) ---------- */
.hero {
  position: relative; min-height: 92svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
}
/* Ambient-Bild (Higgsfield) hinter dem Sternen-Canvas; Gradient blendet unten in Seiten-Schwarz */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(10,10,11,.25), rgba(10,10,11,.55) 60%, rgba(10,10,11,.97) 98%),
              url(/img/hero-bg.jpg) center / cover no-repeat;
}
/* width/height:100% ist Pflicht: sonst bläht das width-Attribut (Pixelpuffer) den Mobil-Viewport auf */
#sterne { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .85; }
.hero-rolle {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--amber);
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: .96;
  letter-spacing: -.015em;
}
.hero h1 em {
  font-style: italic; font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 75%, transparent);
}
.hero-unter {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em;
  color: var(--mut); text-transform: uppercase;
}
.hero-unter .amber { color: var(--amber); }

/* ---------- Projekt-Index (Home-Grid) ---------- */
.werk { padding: clamp(4rem, 10vh, 8rem) var(--gutter); }
.werk-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: clamp(2rem, 5vh, 4rem);
}
.werk-kopf h2 {
  font-family: var(--serif); font-weight: 340; font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.werk-kopf .zaehler { font-family: var(--mono); font-size: .74rem; color: var(--mut); letter-spacing: .2em; }

.raster {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.2rem, 3vw, 3.5rem) clamp(1rem, 2.5vw, 2.5rem);
}
.karte { position: relative; display: block; }
/* editorialer Rhythmus: 7/5, dann 5/7 — bewusst asymmetrisch */
.karte:nth-child(4n+1) { grid-column: 1 / span 7; }
.karte:nth-child(4n+2) { grid-column: 8 / span 5; margin-top: clamp(2rem, 8vh, 6rem); }
.karte:nth-child(4n+3) { grid-column: 1 / span 5; }
.karte:nth-child(4n+4) { grid-column: 6 / span 7; margin-top: clamp(-3rem, -4vh, -1rem); }
@media (max-width: 900px) {
  .karte:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
}
.karte-bild {
  overflow: hidden; background: var(--bg2);
  aspect-ratio: 4 / 3;
}
.karte-bild img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.015);
  transition: transform 1.1s cubic-bezier(.22,.8,.24,1), filter .6s;
  filter: saturate(.92) contrast(1.02);
}
.karte:hover .karte-bild img { transform: scale(1.06); filter: saturate(1.05); }
.karte-zeile {
  display: flex; align-items: baseline; gap: 1rem;
  padding-top: .8rem;
  border-bottom: 1px solid transparent;
}
.karte-nr { font-family: var(--mono); font-size: .7rem; color: var(--amber-dim); letter-spacing: .1em; }
.karte-titel {
  font-family: var(--serif); font-weight: 380;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  transition: color .3s;
}
.karte-pfeil {
  margin-left: auto; font-family: var(--mono); color: var(--mut);
  transform: translateX(-6px); opacity: 0;
  transition: transform .35s, opacity .35s;
}
.karte:hover .karte-titel { color: var(--amber); }
.karte:hover .karte-pfeil { transform: none; opacity: 1; }

/* ---------- Projekt-Seite ---------- */
.p-hero { position: relative; height: min(78svh, 900px); overflow: hidden; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.95); }
.p-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 45%, transparent), transparent 30%, transparent 55%, var(--bg));
}
.p-kopf {
  position: relative;
  margin: clamp(-7rem, -14vh, -4rem) var(--gutter) 0;
  /* min-height = |Pull-up|: bei kurzen Titeln rutscht sonst der Folgetext aufs Hero-Bild */
  min-height: clamp(4rem, 14vh, 7rem);
  max-width: 62rem;
}
.p-kopf h1 {
  font-family: var(--serif); font-weight: 330;
  font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 1.02;
  letter-spacing: -.01em;
}
.p-kopf .amber-strich { width: 72px; height: 2px; background: var(--amber); margin: 1.6rem 0; }
.p-intro {
  padding: 0 var(--gutter);
  max-width: 46rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75; color: color-mix(in srgb, var(--ink) 88%, var(--mut));
}
.p-intro p + p { margin-top: 1rem; }
/* lange Strings (URLs, Mail-Adressen) dürfen umbrechen — 440px-Clipping-Fix */
.p-intro, .p-meta, .prose, .seite { overflow-wrap: anywhere; }
.p-meta {
  padding: 1.2rem var(--gutter) 0;
  font-family: var(--mono); font-size: .78rem; line-height: 2;
  color: var(--mut); letter-spacing: .04em;
  max-width: 46rem;
}
.galerie { padding: clamp(3rem, 8vh, 6rem) var(--gutter); display: grid; gap: clamp(1.6rem, 5vh, 4rem); }
.galerie figure { margin: 0 auto; width: 100%; }
/* Galerie-Rhythmus: voll / schmal-links / schmal-rechts */
.galerie figure:nth-child(3n+2) { width: min(100%, 72%); margin-left: 0; }
.galerie figure:nth-child(3n) { width: min(100%, 72%); margin-right: 0; }
@media (max-width: 760px) { .galerie figure:nth-child(n) { width: 100%; } }
.galerie img { width: 100%; cursor: zoom-in; background: var(--bg2); }

/* YouTube click-to-load */
.video { position: relative; aspect-ratio: 16 / 9; cursor: pointer; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; inset: 0; margin: auto;
  width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--amber) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(4px);
  cursor: pointer; transition: transform .3s, background .3s;
}
.video-play::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 20px solid var(--amber);
  border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  transform: translateX(3px);
}
.video:hover .video-play { transform: scale(1.08); background: color-mix(in srgb, var(--bg) 75%, transparent); }
.galerie .prose {
  max-width: 44rem; margin: 0 auto;
  color: color-mix(in srgb, var(--ink) 85%, var(--mut));
  line-height: 1.75;
}

.p-weiter {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.6rem);
}
.p-weiter a { color: var(--mut); transition: color .3s; max-width: 45%; }
.p-weiter a:hover { color: var(--amber); }
.p-weiter .mono { font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; display: block; margin-bottom: .5rem; }
.p-weiter a:last-child { text-align: right; }

/* ---------- Text-Seiten (About / Skills / Legal) ---------- */
.seite { padding: clamp(7rem, 16vh, 11rem) var(--gutter) clamp(4rem, 8vh, 6rem); max-width: 60rem; }
.seite > h1 {
  font-family: var(--serif); font-weight: 330;
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.seite h2 {
  font-family: var(--serif); font-style: italic; font-weight: 360;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: clamp(2.5rem, 6vh, 4rem) 0 1.2rem;
  color: var(--amber);
}
.seite p { max-width: 44rem; color: color-mix(in srgb, var(--ink) 88%, var(--mut)); margin-bottom: .55rem; }
.seite .zitat {
  font-family: var(--serif); font-style: italic; font-weight: 320;
  font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.4;
  color: var(--ink); border-left: 2px solid var(--amber);
  padding-left: 1.4rem; margin: 1.8rem 0;
  max-width: 38rem;
}
.seite .mono-klein { font-family: var(--mono); font-size: .78rem; color: var(--mut); letter-spacing: .06em; }
.seite .bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 2rem 0; }
.seite .bilder img { cursor: zoom-in; }
.seite .spalten { columns: 2; column-gap: 3.5rem; }
@media (max-width: 760px) { .seite .spalten { columns: 1; } }

/* Kontakt */
.kontakt-riese {
  font-family: var(--serif); font-weight: 320;
  font-size: clamp(1.6rem, 5.4vw, 4rem);
  line-height: 1.15; letter-spacing: -.01em;
  word-break: break-word;
  border-bottom: 1px solid var(--line); padding-bottom: .3rem;
  display: inline-block; margin: 1.2rem 0 2rem;
  transition: color .3s, border-color .3s;
}
.kontakt-riese:hover { color: var(--amber); border-color: var(--amber); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem var(--gutter) 3rem;
  display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem;
  align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--mut); text-transform: uppercase;
}
footer a { transition: color .25s; }
footer a:hover { color: var(--amber); }
footer .gruppe { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 2vh 2vw;
}
.lightbox.offen { display: flex; }
.lightbox img { max-width: 96vw; max-height: 96vh; width: auto; height: auto; }

/* ---------- Reveals ---------- */
[data-r] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.22,.8,.24,1), transform .9s cubic-bezier(.22,.8,.24,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-r].sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  [data-r] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
