/* Fonts */
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Book.woff2') format('woff2'),
    url('../fonts/PPNeueMontreal-Book.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Regular.woff2') format('woff2'),
    url('../fonts/PPNeueMontreal-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Medium.woff2') format('woff2'),
    url('../fonts/PPNeueMontreal-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Bold.woff2') format('woff2'),
    url('../fonts/PPNeueMontreal-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Palette */
:root {
  --bg: #F5F5F5;
  --accent: #e9003f;
  --text: #282828;
  --main-secondary: #0e0f16;
  --main-secondary-2: hsl(from var(--main-secondary) h s calc(l + 3.4));
  --font-pp-neue-montreal: 'PP Neue Montreal';
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-pp-neue-montreal), sans-serif;
  font-weight: 400;
  background: var(--main-secondary);
  overflow-x: hidden;
}

#page {
  width: 100%;
}

/* Typography - Font Weights */
h1,
h2 {
  font-weight: 700;
  /* Bold for main headings */
}

h3,
h4,
h5,
h6 {
  font-weight: 500;
  /* Medium for subheadings */
}

p,
body {
  font-weight: 400;
  /* Regular for body text and paragraphs */
}

.v-section,
.h-panel {
  width: 100%;
  min-height: 75svh;
  height: auto;
  position: relative;
  /* Ensure children can fill the height */
  display: flex;
  flex-direction: column;
}

.h-wrapper {
  width: 100%;
  min-height: 75svh;
  height: auto;
  position: relative;
}

@media (min-width: 768px) and (max-width: 1024px) {

  .v-section,
  .h-panel {
    min-height: 100vh;
  }

  /* h-wrapper might need min-height 100vh too? 
     Original code grouped them. I should verify if I need to duplicate the media query.
     Yes, the user likely wants consistency.
  */
  .h-wrapper {
    min-height: 100vh;
  }
}

@media (min-width: 1025px) {
  .v-section {
    min-height: 100vh;
    height: auto;
  }

  .h-panel {
    height: 100vh;
  }

  .h-wrapper {
    height: 100vh;
  }
}

/* Full-size content container */
.content--full {
  position: relative;
  width: 100%;
  height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

/* Vertical Sections - With Padding */
.content--full>.v-wrapper {
  padding: clamp(2rem, 4vw, 75px);
  height: 100%;
  box-sizing: border-box;
  transition: padding-bottom 0.5s ease-out;
}

@media (min-width: 1025px) {
  .content--full>.v-wrapper {
    padding: 100px clamp(2rem, 4vw, 75px);
  }
}

/* Horizontal Panels - No Padding (Full Bleed) */
.content--full>.h-wrapper {
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  transition: padding-bottom 0.5s ease-out;
}

/* Simple center layout for empty demo sections */
.center {
  display: grid;
  place-content: center;
  text-align: center;
}

.center h1 {
  margin: 0 0 10px 0;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.03em;
}

.center p {
  margin: 0;
  font-size: 18px;
  opacity: 0.85;
}

.small {
  font-size: 14px;
  opacity: 0.8;
}

/* UI overlay */
.ui {
  display: none;
}

/* Horizontal pinned section */
.h-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.h-track {
  height: 100%;
  width: 300vw;
  /* 3 panels */
  display: flex;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.h-panel {
  flex: 0 0 100vw;
}

/* Split last section (footer in lower half) */
.split {
  padding: 0;
}

.split__top,
.split__footer {
  width: 100%;
  position: relative;
}

.split__top {
  height: 80vh;
}

.split__footer {
  min-height: 20vh;
}

/* Dark backgrounds (Section 2+) */
.bg-secondary {
  background: var(--main-secondary);
  color: #fff;
}

.bg-secondary-2 {
  background: var(--main-secondary-2);
  color: #fff;
}

.bg-footer {
  background: #0e0f16;
  color: #fff;
}

/* ---- Intro (V1) ---- */
.intro {
  background: #0b0b0b;
  color: #fff;
  overflow: hidden;
}

.intro__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 420ms ease;
}

.intro__video.is-active {
  opacity: 1;
}

.intro__shade {
  position: absolute;
  inset: 0;
  background: #0a2842c2;
}

.intro .content--full {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
}

.intro__layout {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 42px);
  align-items: flex-end;
  padding: 4rem 2rem;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .intro__layout {
    grid-template-columns: 1fr;
    align-content: center;
  }
}

.intro__kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 10px;
}

.intro__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.intro__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.05;
  cursor: default;
  user-select: none;
  opacity: 0.4;
  transition: opacity 220ms ease, transform 220ms ease;
}

.intro__item.is-active {
  opacity: 1;
  transform: translateX(6px);
}

.intro__num {
  font-size: 12px;
  letter-spacing: 0.18em;
  opacity: 0.85;
  min-width: 36px;
}

.intro__txt {
  font-weight: 650;
}

/* Intro Item Styles */
.intro__title {
  margin: 0 0 6px 0;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .intro__video {
    transition: none;
  }
}

@layer utilities {
  .special-img {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .special-img img {
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
  }

  .special-img:before,
  .special-img:after {
    content: "";
    z-index: 1;
    background: #e9003f;
    position: absolute;
  }

  /* Default: Top-Right (small) and Bottom-Left (large) */
  .special-img:before {
    width: 40px;
    height: 40px;
    top: -10px;
    right: -10px;
  }

  .special-img:after {
    width: 100px;
    height: 100px;
    bottom: -20px;
    left: -20px;
  }

  /* Flip: Top-Left (small) and Bottom-Right (large) */
  .special-img.flip:before {
    right: auto;
    left: -10px;
  }

  .special-img.flip:after {
    left: auto;
    right: -20px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 60px;
  cursor: pointer;
  padding: 20px;
  z-index: 1001;
  transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 14px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}


.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 
   Footer Logic:
   1. Default: Static relative footer (Mobile / Subpages).
   2. body.scroller-active: Fixed hidden footer (Desktop Home).
   3. body.scroller-active.footer-visible: Fixed visible footer.
*/
.site-footer {
  position: relative;
  height: auto;
  z-index: 50;
  padding: 20px 0;
}

body.scroller-active .site-footer,
.site-footer.is-home {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  transform: translateY(100%);
  transition: transform 0.5s ease-out;
}

/* Slide in when visible */
body.scroller-active.footer-visible .site-footer {
  transform: translateY(0);
}

/* Adjust last section padding ONLY when scroller is active and footer is visible */
body.scroller-active.footer-visible main#page>section:last-child .v-wrapper,
body.scroller-active.footer-visible main#page>section:last-child .h-wrapper {
  padding-bottom: 150px;
  padding-top: 120px;
  transition: padding-bottom 0.5s ease-out, padding-top 0.5s ease-out;
}

/* Navigation Links */
.nav-link {
  color: #fff;
  text-decoration: none;
}


.nav-link:hover,
.nav-link[data-active="true"] {
  color: var(--accent);
}

/* --- Responsive / Mobile Styles (< 1024px) --- */
@media (max-width: 1023px) {

  /* Reset global overrides – also override scroller-active class if still present */
  html,
  body,
  body.scroller-active {
    overflow: auto !important;
    overscroll-behavior: none;
  }

  /* Reset vertical sections */
  .v-section {
    height: auto !important;
    min-height: auto;
    /* Remove 100vh constraint to let content flow, but user said 'mindesthöhe nicht mehr benötigt', wait user said 'desktop hat feste höhe/mindesthöhe... diese wird bei smartphones nicht mehr benötigt'. So min-height: auto is correct.*/
    padding: 100px 0;
    opacity: 1 !important;
    /* Force visible */
    visibility: visible !important;
    transform: none !important;
    /* Disable smooth scroll transforms if any */
  }

  /* Reset horizontal wrapper */
  .h-wrapper {
    height: auto !important;
    min-height: auto;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .content--full {
    height: auto !important;
    overflow: visible !important;
  }


  .h-viewport {
    position: relative;
    height: auto !important;
    width: 100%;
    overflow: visible;
  }

  /* Stack horizontal panels vertically */
  .h-track {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    /* Override the 400vw width */
    height: auto !important;
    transform: none !important;
    will-change: auto;
  }

  .h-panel {
    width: 100% !important;
    height: auto !important;
    min-height: auto;
    padding: 0;
  }

  /* Adjust Intro */
  .intro-section {
    min-height: auto !important;
    padding: 100px 0;
  }

  .project-content,
  .contact-content,
  .impressum-content,
  .datenschutz-content {
    padding: 100px 0;
  }

  .intro {
    min-height: 85svh !important;
    display: flex;
    justify-content: center;
  }

  .intro-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
  }

  .project-list h2 {
    text-align: center;
  }

  .project-list ul {
    justify-content: center;
  }

  .intro__layout {
    grid-template-columns: 1fr;
  }

  .intro__left {
    position: relative;
    height: auto;
    min-height: auto;
  }

  .intro__right {
    display: none !important;
  }

  /* Force Footer Visibility on Home/Mobile */
  .site-footer.is-home {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: 80px !important;
  }
}

/* =============================
   Blog Content Styles
   ============================= */
.blog-content {
  color: #1f2937;
  font-size: 1.125rem;
  line-height: 1.8;
}

.blog-content p {
  color: #374151;
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.blog-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.blog-content strong { color: #111827; font-weight: 700; }
.blog-content em { font-style: italic; }
.blog-content u { text-decoration: underline; }
.blog-content s { text-decoration: line-through; }

.blog-content a {
  color: #e9003f;
  text-decoration: none;
}
.blog-content a:hover { text-decoration: underline; }

.blog-content ul {
  list-style: disc;
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
  color: #374151;
}
.blog-content ol {
  list-style: decimal;
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
  color: #374151;
}
.blog-content li { margin-bottom: 0.375rem; }

.blog-content blockquote {
  border-left: 4px solid #e9003f;
  padding-left: 1.25rem;
  color: #6b7280;
  font-style: italic;
  margin: 1.5rem 0;
}

.blog-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.blog-content code {
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: #111827;
}