/* [b3]Lab — Benjamin Mauz — Base Stylesheet */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Variable.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Italic-Variable.woff2') format('woff2');
}

:root {
  --bg: #0e0e0e;
  --bg-raised: #141414;
  --fg: #e8e8e8;
  --muted: #888888;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #2b3348;
  --accent-hover: #384164;
  --nav-h: 76px;
  --container: 1800px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}

/* PAGE BACKGROUND PATTERN — random per page-load, skipped on pages with data-video-hero */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
body.pattern-plus-tight::before { opacity: 1; background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2730%27 height=%2730%27><g stroke=%27%23ffffff%27 stroke-opacity=%270.12%27 stroke-width=%271%27 stroke-linecap=%27round%27><line x1=%2713%27 y1=%2715%27 x2=%2717%27 y2=%2715%27/><line x1=%2715%27 y1=%2713%27 x2=%2715%27 y2=%2717%27/></g></svg>"); background-repeat: repeat; }
body.pattern-plus-normal::before { opacity: 1; background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2740%27 height=%2740%27><g stroke=%27%23ffffff%27 stroke-opacity=%270.12%27 stroke-width=%271%27 stroke-linecap=%27round%27><line x1=%2718%27 y1=%2720%27 x2=%2722%27 y2=%2720%27/><line x1=%2720%27 y1=%2718%27 x2=%2720%27 y2=%2722%27/></g></svg>"); background-repeat: repeat; }
body.pattern-plus-loose::before { opacity: 1; background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2755%27 height=%2755%27><g stroke=%27%23ffffff%27 stroke-opacity=%270.12%27 stroke-width=%271%27 stroke-linecap=%27round%27><line x1=%2725%27 y1=%2727%27 x2=%2729%27 y2=%2727%27/><line x1=%2727%27 y1=%2725%27 x2=%2727%27 y2=%2729%27/></g></svg>"); background-repeat: repeat; }
body.pattern-plus-extra::before { opacity: 1; background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2780%27 height=%2780%27><g stroke=%27%23ffffff%27 stroke-opacity=%270.12%27 stroke-width=%271%27 stroke-linecap=%27round%27><line x1=%2738%27 y1=%2740%27 x2=%2742%27 y2=%2740%27/><line x1=%2740%27 y1=%2738%27 x2=%2740%27 y2=%2742%27/></g></svg>"); background-repeat: repeat; }

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(14, 14, 14, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo img {
  width: 42px;
  height: 42px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.navbar__item--external {
  margin-left: 20px;
}

.navbar__links a {
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.navbar__links a:hover {
  color: var(--fg);
}

.navbar__links a.is-active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.navbar__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: var(--accent);
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn--soon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: default;
}

/* ---------- Section heading dash ---------- */

.dash {
  width: 40px;
  height: 2px;
  background: var(--fg);
  margin-bottom: 20px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------- Hero (Home) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0.35) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 48px 100px;
  max-width: 720px;
}

.hero__content h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.hero__content p {
  color: #d8d8d8;
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 620px;
}

/* ---------- Split layout (About / Contact) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100vh;
}

.split__media {
  position: relative;
  min-height: 420px;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
}

.split__media-corner {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-top: 1px solid rgba(255,255,255,0.5);
  border-right: 1px solid rgba(255,255,255,0.5);
}

.split__media-heading {
  position: absolute;
  left: 0;
  bottom: 40px;
  padding: 0 40px;
  z-index: 2;
}

.split__media-heading h1 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
}

.split__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 35%);
}

.split__media--flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: auto;
  padding: calc(var(--nav-h) + 56px) 56px 56px;
}

.split__media--flex::after {
  content: none;
}

.split__content {
  padding: calc(var(--nav-h) + 56px) 56px 56px;
  display: flex;
  flex-direction: column;
}

.split__content h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.split__content > hr {
  margin-bottom: 32px;
}

.quote-block {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  font-style: italic;
  color: #cfcfcf;
  font-size: 14px;
  margin-bottom: 40px;
}

.quote-block p {
  margin-bottom: 16px;
}

.quote-block p:last-child {
  margin-bottom: 0;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat__num {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
}

.stat__label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

/* ---------- Skill bars ---------- */

.skills {
  margin-bottom: auto;
}

.skill {
  margin-bottom: 20px;
}

.skill__row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.skill__row span:last-child {
  font-weight: 700;
}

.skill__track {
  height: 4px;
  background: var(--border);
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  width: 0%;
  background: var(--fg);
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 24px 56px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--border);
}

.split__content .site-footer {
  margin-top: 40px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}

/* ---------- Clients page ---------- */

.clients {
  padding-top: var(--nav-h);
}

.clients__intro {
  padding: 72px 48px 40px;
}

.clients__intro h1 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}

.clients__intro p {
  color: var(--muted);
  max-width: 560px;
}

.clients__grid {
  padding: 0 48px 80px;
}

.clients__grid img {
  width: 100%;
  height: auto;
}

/* ---------- Contact page ---------- */

.contact-info {
  list-style: none;
  margin-bottom: 32px;
}

.contact-info li {
  margin-bottom: 24px;
}

.contact-info .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.contact-info .value {
  font-size: 15px;
  font-weight: 700;
}

.contact-info a.value:hover {
  color: var(--muted);
}

.contact__subtitle {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 32px;
  max-width: 460px;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 56px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.qr-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.qr-card img {
  width: 100%;
  max-width: 300px;
  background: transparent;
}

/* ---------- Impressum ---------- */

.legal {
  padding: calc(var(--nav-h) + 64px) 0 100px;
}

.legal__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

.legal h1 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 56px 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal p, .legal li {
  color: #cfcfcf;
  font-size: 13.5px;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 48px;
}

.legal__footer {
  margin-top: 56px;
  padding-left: 0;
  padding-right: 0;
}

/* ---------- Video modal (Shortreel) ---------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 40px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__inner {
  position: relative;
  width: 100%;
  max-width: 1100px;
}

.video-modal video {
  width: 100%;
  max-height: 80vh;
  background: #000;
}

.video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

.video-modal__close:hover {
  border-color: var(--fg);
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split__media {
    min-height: 60vh;
  }

  .split__media--flex {
    min-height: auto;
    padding: calc(var(--nav-h) + 40px) 28px 0;
  }

  .split__content {
    padding: 56px 28px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .navbar {
    padding: 0 20px;
  }

  .navbar__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
    display: none;
  }

  .navbar__links.is-open {
    display: flex;
  }

  .navbar__links li {
    width: 100%;
  }

  .navbar__item--external {
    margin-left: 0;
  }

  .navbar__links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .navbar__toggle {
    display: block;
  }

  .hero__content {
    padding: 0 24px 64px;
  }

  .clients__intro,
  .clients__grid {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-footer {
    padding: 20px 24px;
  }
}
