/* ============================================================
   Hahn Film — Main Stylesheet
   Modern CSS, no preprocessors, no utility frameworks
   ============================================================ */

/* ----- Font Faces ----- */

@font-face {
  font-family: "PredigeRounded";
  src: url("assets/fonts/343452_0_0.woff2") format("woff2"),
       url("assets/fonts/343452_0_0.woff") format("woff"),
       url("assets/fonts/343452_0_0.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PredigeRounded";
  src: url("assets/fonts/343540_0_0.woff2") format("woff2"),
       url("assets/fonts/343540_0_0.woff") format("woff"),
       url("assets/fonts/343540_0_0.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ----- Custom Properties ----- */

:root {
  --color-body: #292b2c;
  --color-black: #000;
  --color-white: #fff;
  --font-display: "PredigeRounded", Arial, sans-serif;
  --font-body: "Fira Sans", sans-serif;
  --header-height: 82px;
  --z-header: 100;
  --z-lightbox: 200;
  --container-max: 1200px;
  --gutter: 24px;
}

/* ----- Reset & Base ----- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 27px;
  color: var(--color-body);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================================
   Header / Banner
   ============================================================ */

.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Logo — supports both .brandname and .banner__logo */
.brandname,
.banner__logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: 0.9px;
  color: var(--color-black);
  text-transform: lowercase;
}

.brandname a,
.banner__logo a {
  color: inherit;
  text-decoration: none;
}

/* Desktop Nav — supports both ul-based and flat-link nav */
.main-navigation,
.banner__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-navigation__list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-navigation__list a,
.banner__nav a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--color-black);
  text-transform: lowercase;
  transition: opacity 0.2s ease;
}

.main-navigation__list a:hover,
.banner__nav a:hover {
  opacity: 0.6;
}

/* Hamburger / Mobile Toggle */
.mobile-nav-toggle,
.banner__hamburger {
  display: none;
}

.banner__hamburger {
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.banner__hamburger span {
  display: block;
  height: 2px;
  background: var(--color-black);
  border-radius: 1px;
}

/* Mobile Menu — supports both .mobile-navigation and .mobile-menu */
.mobile-navigation,
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: calc(var(--z-header) - 1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.mobile-navigation--open,
.mobile-menu.is-open {
  display: flex;
}

.mobile-navigation__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.mobile-navigation__list a,
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 1.5px;
  color: var(--color-black);
  text-transform: lowercase;
}

/* Header spacer for pages without hero */
.header-spacer {
  height: var(--header-height);
}

/* ============================================================
   Hero Slider (Flickity)
   ============================================================ */

.hero-slider {
  position: relative;
  width: 100%;
  margin-top: var(--header-height);
}

.carousel--hero {
  aspect-ratio: 16 / 9;
}

.carousel__slide--hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

/* Flickity overrides for hero */
.carousel--hero .flickity-page-dots {
  bottom: 24px;
}

.carousel--hero .flickity-page-dots .dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.carousel--hero .flickity-page-dots .dot.is-selected {
  background: var(--color-white);
}

/* ============================================================
   Section Headings
   ============================================================ */

.section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 80px;
  text-transform: lowercase;
  text-align: center;
  margin-top: 92px;
  margin-bottom: 40px;
  color: var(--color-body);
}

/* Also support .homepage__headline class used by portfolio pages */
.homepage__headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 80px;
  text-transform: lowercase;
  text-align: center;
  margin-top: 92px;
  margin-bottom: 40px;
  color: var(--color-body);
}

/* ============================================================
   Work Categories / Topic Boxes
   ============================================================ */

.work-category {
  margin-bottom: 80px;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.work-category__header {
  text-align: center;
  margin-bottom: 32px;
}

.work-category__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  text-transform: lowercase;
  letter-spacing: 0.9px;
  margin-bottom: 8px;
  color: var(--color-body);
}

.work-category__title a {
  color: inherit;
  transition: opacity 0.2s ease;
}

.work-category__title a:hover {
  opacity: 0.6;
}

.work-category__links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.work-category__links a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 18px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease;
}

.work-category__links a:hover {
  opacity: 0.6;
}

/* Work Carousel (Flickity) */
.carousel--work {
  max-width: 768px;
  margin-inline: auto;
}

.carousel__slide--work {
  width: 100%;
  height: 432px;
  background-size: cover;
  background-position: center;
}

/* Flickity overrides for work carousels */
.carousel--work .flickity-prev-next-button {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

.carousel--work .flickity-prev-next-button:hover {
  background: rgba(0, 0, 0, 0.6);
}

.carousel--work .flickity-prev-next-button .flickity-button-icon {
  fill: white;
}

.work-category__description {
  max-width: 768px;
  margin-inline: auto;
  margin-top: 24px;
  text-align: center;
  font-size: 18px;
  line-height: 27px;
}

/* ============================================================
   Company Section
   ============================================================ */

.section--company {
  position: relative;
}

.company__parallax {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.company__parallax-image {
  position: absolute;
  inset: -80px 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.company__text {
  max-width: 680px;
  margin-inline: auto;
  padding: 40px var(--gutter);
  text-align: center;
  font-size: 18px;
  line-height: 30px;
}

/* ============================================================
   Contact Section
   ============================================================ */

.section--contact {
  padding-bottom: 80px;
}

.contact__content {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.contact__map-pin {
  display: inline-block;
  margin-bottom: 16px;
  transition: opacity 0.2s ease;
}

.contact__map-pin:hover {
  opacity: 0.6;
}

.contact__address {
  font-style: normal;
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 24px;
}

.contact__directions {
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 24px;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
  transition: opacity 0.2s ease;
}

.contact__email:hover {
  opacity: 0.6;
}

.contact__email img {
  display: inline-block;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  text-align: center;
  padding: 24px var(--gutter);
  font-size: 11px;
  color: var(--color-body);
  border-top: 1px solid #e5e5e5;
}

.footer__nav {
  margin-bottom: 8px;
}

.footer__nav a {
  transition: opacity 0.2s ease;
}

.footer__nav a:hover {
  opacity: 0.6;
}

.footer__nav a + a::before {
  content: " \2022 ";
  margin-inline: 8px;
}

.footer__copyright {
  margin-top: 4px;
}

/* Also support .meta-navigation class used by portfolio pages */
.meta-navigation {
  text-align: center;
  padding: 24px var(--gutter);
  font-size: 11px;
  color: var(--color-body);
  border-top: 1px solid #e5e5e5;
}

.meta-navigation a {
  transition: opacity 0.2s ease;
}

.meta-navigation a:hover {
  opacity: 0.6;
}

/* ============================================================
   Portfolio Pages (animation.html, live-action.html)
   ============================================================ */

/* Page header spacer for portfolio pages (no hero slider) */
.page-portfolio {
  padding-top: var(--header-height);
}

/* ----- Filter Bar ----- */

.filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 40px;
  padding-inline: var(--gutter);
}

.filter-btn {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  text-transform: lowercase;
  letter-spacing: 0.8px;
  padding: 8px 20px;
  border: 1px solid var(--color-body);
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active,
.filter-btn.is-active {
  background: var(--color-body);
  color: var(--color-white);
}

.youtube-link {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.youtube-link:hover {
  opacity: 0.6;
}

/* ----- Portfolio Grid ----- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-inline: var(--gutter);
  max-width: var(--container-max);
  margin-inline: auto;
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.grid-item.hidden {
  display: none;
}

.grid-item__image {
  width: 100%;
  aspect-ratio: 740 / 396;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.grid-item:hover .grid-item__image {
  transform: scale(1.03);
}

.grid-item__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  text-transform: lowercase;
}

.grid-item__meta {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 2px;
}

/* ----- Project Detail (Expandable) ----- */

.project-detail {
  display: none;
  grid-column: 1 / -1;
  background: #f5f5f5;
  padding: 40px var(--gutter);
  margin-bottom: 20px;
}

.project-detail.is-open,
.project-detail.active {
  display: block;
}

.project-detail__inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  max-width: var(--container-max);
  margin-inline: auto;
}

.project-detail__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.project-detail__gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.project-detail__gallery img:hover {
  opacity: 0.8;
}

.project-detail__meta h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  text-transform: lowercase;
  margin-bottom: 16px;
}

.project-detail__meta p {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 24px;
}

.project-detail__meta strong {
  font-weight: 600;
}

.project-detail__close {
  float: right;
  font-size: 24px;
  line-height: 1;
  padding: 8px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.project-detail__close:hover {
  opacity: 1;
}

/* Portfolio description (below grid) */
.topic-box__description,
.portfolio-description {
  max-width: 768px;
  margin: 60px auto;
  padding-inline: var(--gutter);
  text-align: center;
  font-size: 18px;
  line-height: 27px;
}

/* ----- Lightbox ----- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open,
.lightbox.active {
  display: flex;
}

.lightbox__image,
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--color-white);
  font-size: 32px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__arrow,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 36px;
  padding: 16px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox__arrow:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

.lightbox__arrow--prev,
.lightbox__prev {
  left: 16px;
}

.lightbox__arrow--next,
.lightbox__next {
  right: 16px;
}

/* ============================================================
   Legal Pages (imprint, privacy)
   ============================================================ */

.legal-content {
  max-width: 800px;
  margin-inline: auto;
  padding: calc(var(--header-height) + 60px) var(--gutter) 80px;
}

.legal-content .section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 56px;
  text-transform: lowercase;
  text-align: center;
  margin-top: 0;
  margin-bottom: 40px;
  color: var(--color-body);
}

.legal-content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-body);
}

.legal-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--color-body);
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 26px;
}

.legal-content address {
  font-style: normal;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 26px;
}

.legal-content a {
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.legal-content a:hover {
  opacity: 0.6;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content ul li {
  font-size: 16px;
  line-height: 26px;
  margin-bottom: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1200px) {
  .section__title,
  .homepage__headline {
    font-size: 64px;
  }
}

@media (max-width: 992px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-detail__inner {
    grid-template-columns: 1fr;
  }

  .section__title,
  .homepage__headline {
    font-size: 56px;
  }

  .carousel--hero,
  .carousel__slide--hero {
    height: 500px;
  }

  .company__parallax {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .main-navigation {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .banner {
    padding-inline: 20px;
  }

  .brandname {
    font-size: 28px;
  }

  .section__title,
  .homepage__headline {
    font-size: 42px;
    margin-top: 60px;
    margin-bottom: 28px;
  }

  .work-category__title {
    font-size: 28px;
  }

  .carousel--hero,
  .carousel__slide--hero {
    height: 360px;
  }

  .carousel--work {
    max-width: 100%;
  }

  .carousel__slide--work {
    height: 300px;
  }

  .work-category__links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

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

  .project-detail__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .company__parallax {
    height: 300px;
  }

  .company__text {
    padding: 24px;
    font-size: 16px;
    line-height: 26px;
  }

  .filter-bar {
    gap: 8px;
  }

  .filter-btn {
    font-size: 14px;
    padding: 6px 14px;
  }
}

@media (max-width: 480px) {
  .section__title,
  .homepage__headline {
    font-size: 32px;
  }

  .carousel--hero,
  .carousel__slide--hero {
    height: 260px;
  }

  body {
    font-size: 16px;
    line-height: 25px;
  }
}
