/* ==========================================================================
   Youssef Jammoul – Portfolio
   Farben und Abstände stehen ganz oben als Variablen. Wer das Aussehen
   ändern will, fängt am besten hier an.
   ========================================================================== */

:root {
  --bg: #f4f1ec;
  --bg-elev: #ffffff;
  --text: #1c1b19;
  --muted: #6b675f;
  --line: #ddd7cc;
  --accent: #c8432b;          /* Redknot-Rot */
  --accent-text: #ffffff;
  --overlay: rgba(12, 11, 10, 0.94);

  --radius: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --bg-elev: #1b1a19;
    --text: #ece8e1;
    --muted: #9c978e;
    --line: #2d2b28;
    --accent: #e0563c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211;
  --bg-elev: #1b1a19;
  --text: #ece8e1;
  --muted: #9c978e;
  --line: #2d2b28;
  --accent: #e0563c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  font: inherit; font-size: 12px; letter-spacing: 0.08em; border: 0; background: none; color: var(--muted);
  padding: 4px 10px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 8px; }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 17px; width: 100%; }
  .lang-switch { margin-top: 8px; }
}

/* ---------- Startseite ---------- */
.hero { padding-block: clamp(56px, 10vw, 120px) clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.02; margin: 0 0 18px; font-weight: 600; letter-spacing: -0.02em; }
.hero .roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.hero .roles li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: var(--muted); }
.hero p { max-width: 640px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin: 0; }

.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.section-head h2 { margin: 0; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; max-width: 520px; text-align: right; }
@media (max-width: 640px) { .section-head { flex-direction: column; gap: 6px; } .section-head p { text-align: left; } }

/* Hervorgehobenes Studio-Projekt */
.feature {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; text-decoration: none;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.feature .media { aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.feature .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature:hover .media img { transform: scale(1.03); }
.feature .body { padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.feature .kicker { color: var(--accent); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.feature h3 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; }
.feature p { margin: 0; color: var(--muted); }
.feature:hover h3 { color: var(--accent); }
@media (min-width: 861px) { .feature .media { aspect-ratio: auto; min-height: 340px; } }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* Projekt-Raster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(16px, 2.5vw, 28px); }
.card { text-decoration: none; display: block; }
.card .media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--line); position: relative; }
.card .media img, .card .media video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .media img, .card:hover .media video { transform: scale(1.04); }
.card h3 { margin: 14px 0 4px; font-size: 18px; letter-spacing: 0.02em; }
.card:hover h3 { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.card .tag {
  position: absolute; left: 12px; top: 12px; background: var(--bg); color: var(--text);
  font-size: 12px; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.06em;
}
.card.soon { pointer-events: none; }
.card.soon .media img { filter: grayscale(0.4) brightness(0.85); }

/* ---------- Projektseite ---------- */
.project-hero { padding-block: clamp(40px, 7vw, 88px) 28px; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 20px; }
.project-hero h1 { font-size: clamp(34px, 6vw, 68px); line-height: 1.04; margin: 0 0 14px; letter-spacing: -0.015em; }
.project-hero .lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 760px; margin: 0; }

.cover { border-radius: var(--radius); overflow: hidden; margin: 8px 0 clamp(32px, 5vw, 56px); }
.cover img, .cover video { width: 100%; max-height: 78vh; object-fit: cover; }

.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .project-layout { grid-template-columns: 1fr; } .facts { order: -1; position: static !important; } }

.facts { position: sticky; top: 88px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--bg-elev); }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; line-height: 1.45; }
.facts .links { margin-top: 18px; display: grid; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  background: var(--text); color: var(--bg); border: 0; border-radius: 999px; padding: 10px 18px;
  font: inherit; font-size: 15px; cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--accent-text); }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.blocks > * + * { margin-top: clamp(28px, 4vw, 48px); }
.block-text h2 { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
.block-text p { margin: 0 0 1em; max-width: 72ch; }
.block-text p:last-child { margin-bottom: 0; }

figure { margin: 0; }
figure .frame { border-radius: var(--radius); overflow: hidden; background: var(--line); }
figure img, figure video { width: 100%; height: auto; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
img.zoomable { cursor: zoom-in; }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.gallery figure .frame { aspect-ratio: var(--ratio, auto); }
.gallery figure .frame img, .gallery figure .frame video { height: 100%; object-fit: cover; }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(min(var(--cols, 2), 2), minmax(0, 1fr)); } }

.steps { display: grid; gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.steps li p { margin: 5px 0 0; }

.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .consent {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background-size: cover; background-position: center; color: #fff;
}
.embed .consent::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.embed .consent > div { position: relative; display: grid; gap: 12px; justify-items: center; max-width: 440px; }
.embed .consent small { opacity: .8; font-size: 13px; line-height: 1.4; }
.embed .consent .btn { background: #fff; color: #111; }
.embed .consent .btn:hover { background: var(--accent); color: #fff; }
.embed.steam { aspect-ratio: auto; height: 200px; background: none; }

.next-project { border-top: 1px solid var(--line); margin-top: clamp(48px, 7vw, 96px); padding: 28px 0 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.next-project a { text-decoration: none; font-size: clamp(20px, 3vw, 30px); font-weight: 600; }
.next-project span { display: block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 360px 1fr; gap: clamp(28px, 5vw, 72px); padding-block: clamp(40px, 7vw, 88px); align-items: start; }
.about .portrait { border-radius: var(--radius); overflow: hidden; }
.about .portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 16px; line-height: 1.05; }
.about blockquote { margin: 28px 0; padding-left: 18px; border-left: 3px solid var(--accent); font-size: 19px; font-style: italic; }
.about blockquote cite { display: block; font-size: 14px; color: var(--muted); font-style: normal; margin-top: 6px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-top: 36px; }
.cols h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; color: var(--muted); }
.cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 15px; }
.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 15px; }
.timeline .when { color: var(--muted); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about .portrait { max-width: 360px; } }
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 760px; padding-block: clamp(40px, 7vw, 88px); }
.legal h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 24px; }
.legal h2 { font-size: 18px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text); }

/* ---------- Fußzeile ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); padding: 40px 0 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer .contact h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 32px); }
.site-footer .contact a.mail { font-size: 17px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; text-decoration: none; }
.socials a:hover { border-color: var(--accent); }
.legal-links { width: 100%; display: flex; gap: 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links span { margin-right: auto; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 4px; }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; padding: 0 60px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; width: 48px; height: 48px;
  border-radius: 50%; font-size: 22px; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Deko-Elemente, die nur bestimmte Designs einblenden */
.deco { display: none; }

.notfound { padding-block: 120px; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
