/*————————————————————————————————————————————————————————*/
/* FONT-FACE DECLARATIONS */
/*————————————————————————————————————————————————————————*/

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/*————————————————————————————————————————————————————————*/
/* RESET & FONT-SMOOTHING */
/*————————————————————————————————————————————————————————*/
:root {
  --color--bg-200: #f8f8f8;
  --color--txt-200: #f9f6f0;
  --color--txt-300: #a4a4a4;
  --color--primary-100: #292b34;
  --color--accent: #a29496;

  /* spacing vars */
  --edge-x: clamp(16px, 1.4vw, 24px);
  --edge-y: 20px;
  --size--p-100: clamp(8px, 1vw, 16px);
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

/* Remove default margins */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin: 0;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Headings & controls */
h1, h2, h3, h4, button, input, label { line-height: 1.1; }
h1, h2, h3, h4 { text-wrap: balance; }

/* Links & images */
a { text-decoration: none; color: currentColor; }
a:not([class]) { text-decoration-skip-ink: auto; }
img { display: block; max-width: 100%; border: 0; overflow: clip; }

/* Form inheritance */
input, button, textarea, select { font: inherit; }

/* Textareas default height */
textarea:not([rows]) { min-height: 10em; }

/* Anchor offset for in-page links */
:target { scroll-margin-block: 5ex; }

/* Utilities */
.font-weight-100 { font-weight: 100; }
.font-weight-600 { font-weight: 600; }
.font-weight-800 { font-weight: 800; }
.pb100 { padding-bottom: clamp(24px, 2vw, 32px); }
.pb300 { padding-bottom: clamp(40px, 8vw, 56px); }

/*————————————————————————————————————————————————————————*/
/* anchor under a fixed header fix */
/*————————————————————————————————————————————————————————*/
/* Height of your fixed header / top chrome */
:root { --scroll-offset: 0px; }  /* adjust as needed */

/* Make anchor jumps account for the fixed UI */
html { scroll-padding-top: var(--scroll-offset); }

/* Also cover in-page targets (broad support) */
section[id],
[id][role="region"] { scroll-margin-top: var(--scroll-offset); }

/*————————————————————————————————————————————————————————*/
/* GLOBAL LAYOUT */
/*————————————————————————————————————————————————————————*/

.main {
  background-color: var(--color--bg-200);
  display: flex;
  flex-flow: column;
  position: relative;
  overflow: visible;
}

.fixed-logo {
  position: fixed;
  top: var(--edge-x);
  left: var(--edge-x);
  z-index: 1000;
  display: inline-block;
  text-decoration: none;
}

.fixed-logo img {
  height: 48px;   /* your asset size */
  width: auto;
  display: block;
}

/* Hide the fixed logo on mobile */
@media (max-width: 768px) {
  .fixed-logo { display: none !important; }
}

/*————————————————————————————————————————————————————————*/
/* HERO SECTION */
/*————————————————————————————————————————————————————————*/

.hero {
  position: relative;
  height: 100vh;
  display: flex;
}
.hero .left,
.hero .right {
  width: 50%;
  height: 100%;
  position: relative;
}

.hero .right {
  background-image: url('images/bg_image.jpg'); /* resolves to assets/images/bg_image.jpg */
  background-size: cover;
  background-position: center;
}

/* Left half bottom text */
.left-text {
  position: absolute;
  bottom: 10rem;
  left: 2rem;
  line-height: 1.2;
  color: #000;
}

.h4-inter {
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  font-weight: 600;
  margin: 0;
}

.h5-inter {
  font-size: clamp(1rem, 2.2vw, 1.75rem);
  font-weight: 600;
  margin: 0;
  color: var(--color--bg-200);
}

.h6-inter {
  font-size: clamp(0.50rem, 2vw, 1rem);
  font-weight: 400;
  margin-top: 0.5rem;
  color: var(--color--bg-200);
}

.p-inter {
  font-size: clamp(0.75rem, 2vw, 1.25rem);
  font-weight: 400;
  margin-top: 0.5rem;
  color: var(--color--accent);
}

/* Menu */
.menu {
  position: absolute;
  top: 2rem;
  left: 2rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.menu li {
  cursor: pointer;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}
.menu li a {
    display: inline-block;
    color: inherit;
}

.menu li .txt-wrap { position: relative; display: inline-block; }
.menu li .copy { position: absolute; top: 0; left: 0; pointer-events: none; }
.char { display: inline-block; line-height: 1; }

/* Overlayed bottom text */
.hero-preview-wrapper { position: relative; }

.hero-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  transform: translateZ(0);
  will-change: opacity, transform;
}
.hero-sticky-inner { position: relative; width: 100%; height: 100%; }

.hero-text {
  margin: 0; padding: 0;
  line-height: 0.75;
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 11rem);
  color: #000;
  text-align: center;
}
h1.hero-text { margin-bottom: 0 !important; }

.mobile-break { display: none; }

.hero-left-sticky {
  position: fixed;
  left: 2rem;
  bottom: 10rem;
  z-index: 20;
  pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --sticky-clearance: clamp(100px, 16vh, 160px);
  }
  .hero { flex-direction: column; height: auto; }
  .hero .left, .hero .right { width: 100%; height: 100vh; }
  .menu { display: none; }
  .mobile-break { display: inline; }

  .hero-sticky {
    top: 0; bottom: auto;
    justify-content: flex-start;
    padding: 2rem;
    backface-visibility: hidden;
    contain: paint;
  }
  .hero-text { text-align: left; }
  .left-text { bottom: 2rem; }

  .hero-left-sticky {
    left: var(--edge-x);
    top: auto;
    bottom: calc(var(--sticky-clearance) + env(safe-area-inset-bottom));
  }
}

/*————————————————————————————————————————————————————————*/
/* ABOUT SECTION */
/*————————————————————————————————————————————————————————*/

.section-about {
  display: flex;
  position: relative;
  height: 100vh;
  z-index: 1;
}
.section-about.is-pinned { z-index: 10; }

.section-about .left,
.section-about .right { width: 50%; height: 100%; }

.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 20px;
  height: 100%;
}

.about-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 50%;
  overflow: hidden;
}
.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.about-wrapper-title {
  position: relative;
  height: 0;
  padding: 0;
  overflow: visible;
}
.about-title {
  position: absolute;
  left: var(--edge-x);
  bottom: var(--edge-y);
  margin: 0;
  font-weight: 700;
  font-size: 4rem;
  color: #000;
  z-index: 30;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.about-title.is-fixed {
  position: fixed;
  left: var(--edge-x);
  bottom: var(--edge-y);
  visibility: visible;
  opacity: 1;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.about-caption {
  font-size: clamp(0.75rem, 2vw, 1.25rem);
  font-weight: 400;
  margin-top: 0.5rem;
  color: var(--color--accent);
}

/*————————————————————————————————————————————————————————*/
/* WORK SECTION */
/*————————————————————————————————————————————————————————*/

.preview {
  display: flex;
  flex-flow: column;
  width: 100%;
  position: relative;
}
@media (max-width: 991px) {
  .preview { gap: 5vh; margin-bottom: 20svh; } /* replaced grid- gaps */
}

.preview__container { z-index: 20; display: flex; }
.preview__container.container { flex-flow: row; } /* keeps container padding */

.container {
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  padding-left: clamp(16px, 1.4vw, 24px);
  padding-right: clamp(16px, 1.4vw, 24px);
  position: relative;
}

.preview__box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100svh;
  padding-block: 24px;
}
@media (max-width: 991px) {
  .preview__box { min-height: 60svh; }
}

.preview__box.work__box-bottom { align-items: flex-end; }
.preview__box.works__box-top { align-items: flex-start; }

@media (max-width: 991px) {
  .preview__box.works__box-top.work__box-m-left { min-height: auto; }
}

.w-inline-block { display: inline-block; max-width: 100%; }

.preview-item {
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(260px, 24vw, 380px);
  max-height: 440px;
  position: relative;
}

.preview-item-vertical {
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(320px, 30vw, 470px);
  max-height: 880px;
  position: relative;
}

.preview-item__info {
  z-index: 20;
  padding: var(--size--p-100);
  gap: 8px;
  color: var(--color--bg-200);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: absolute;
  inset: 0;           /* cover the card */
  /* no opacity/visibility/transition here — GSAP handles it */
}

/* Ensure split spans inherit style */
.preview-item__info .char,
.preview-item__info .word {
  color: inherit !important;
  -webkit-text-stroke: inherit;
  text-stroke: inherit;
  opacity: 1 !important;
}


.preview-item__bg {
  z-index: 10;
  background-color: var(--color--bg-200);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.preview-item__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform, filter;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center center;
}

/*————————————————————————————————————————————————————————*/
/* CONTACT SECTION */
/*————————————————————————————————————————————————————————*/

.section-contact {
  position: relative;
  background-color: var(--color--accent);
  display: flex;             /* allow inner wrapper to stretch */
  flex-direction: column;
  min-height: 100dvh;
}

.contact-page-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Title */
.contact-wrapper-title { padding: 0; }
.contact-title {
  position: relative;
  margin: 0 0 var(--edge-y) var(--edge-x);
  font-weight: 700;
  font-size: 4rem;
  color: #000;
  z-index: 10;
}
.contact-title.is-fixed {
  position: fixed;
  left: var(--edge-x);
  bottom: var(--edge-y);
  margin: 0;
  z-index: 30;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Mobile: stick to the TOP of the section */
@media (max-width: 768px) {
  /* Ensure sticky wins even if .is-fixed is present */
  .contact-title,
  .contact-title.is-fixed {
    position: sticky;
    top: var(--edge-y);
    left: var(--edge-x);
    bottom: auto;            /* override the desktop fixed-bottom */
    margin: 0;
    pointer-events: auto;    /* re-enable interactions if needed */
    transform: none;         /* no GPU nudge needed */
    z-index: 30;
  }
}

/* Two-box wrapper */
.section-contact-wrapper {
  padding-top: clamp(40px, 24vw, 120px);
  padding-left: clamp(16px, 1.4vw, 24px);
  padding-right: clamp(16px, 1.4vw, 24px);
  padding-bottom: clamp(16px, 1.4vw, 24px);
  flex: 1 1 auto;            /* fill remaining height */
}

.section-contact-wrapper .split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: inherit;
  gap: var(--gap, 0);
}
.section-contact-wrapper .split > .left,
.section-contact-wrapper .split > .right {
  flex: 1 1 50%;
  min-width: 0;
}

/* Mobile: stack, with LEFT above LEFT */
@media (max-width: 768px) {
  .section-contact-wrapper .split { flex-direction: column; }
  .section-contact-wrapper .split > .right { order: 1; }
}

/* Left column info */
.container_contacts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-info {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  z-index: 1;
}
.contact-details {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact-box {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  gap: 1rem;
}
.contact-box-title { color: #555; }
.contact-item { display: flex; flex-direction: column; gap: 8px; }

/* Right column form */
.contactform-container {
  display: block;
  width: clamp(424px, 40vw, 468px);
  max-width: 100%;
}

.contactform-title {
    cursor: default;
    margin-top: 0;
    margin-bottom: 0;
    font-size: clamp(20px, 1.25vw, 26px);
    font-weight: 600;
    line-height: 1.21;
}
.contact-form { width: 100%; }
.contact-form fieldset { width: 100%; min-inline-size: 0; border: none; padding: 0; margin: 0; background-color: var(--color--accent); color: #000; }

.input-box-container {
  display: flex;
  flex-flow: column;
  align-items: stretch;
}

/* Raw inputs */
input, textarea {
  appearance: none !important;
  background: none;
  border: none;
}

/* The styled input */
.input-box {
  display: block;
  width: 100%;
  height: 38px;
  background-color: var(--color--accent);
  color: #000;
  border-bottom: 1px solid #000;
  padding: .5rem 0 0 1rem;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.textarea { min-height: 20vh; resize: vertical; }

.box-label { display: block; margin-bottom: 0; }
.form-group { display: flex; justify-content: center; width: 100%; }

/* Visually hidden label (if used) */
.hide-label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px;
  border-style: solid;
  border-color: #000;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn--primary { background: var(--color--accent); color: #000; }
.btn--large { font-size: clamp(0.95rem, 1.2vw, 1.05rem); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/*————————————————————————————————————————————————————————*/
/* IMPRESSUM */
/*————————————————————————————————————————————————————————*/

.fixed-logo-mobile {
  position: fixed;
  top: var(--edge-x);
  left: var(--edge-x);
  z-index: 1000;
  display: inline-block;
  text-decoration: none;
}

.fixed-logo-mobile img {
  height: 48px;
  width: auto;
  display: block;
}

/* Wrapper */
.section-impressum-wrapper {
  padding-top: clamp(40px, 24vw, 120px);
  padding-left: clamp(16px, 1.4vw, 24px);
  padding-right: clamp(16px, 1.4vw, 24px);
  padding-bottom: clamp(16px, 1.4vw, 24px);
  flex: 1 1 auto;
}

.section-impressum-wrapper .split {
  display: flex;
  flex-direction: row;     /* always two columns */
  align-items: stretch;
  min-height: inherit;
  gap: var(--gap, 0);
}

.section-impressum-wrapper .split > .left {
  flex: 0 0 100px;         /* ~100px fixed spacer */
  width: 100px;            /* ensures consistent gutter */
  min-width: 100px;
}

.section-impressum-wrapper .split > .right {
  flex: 1 1 auto;          /* fill the rest */
  min-width: 0;            /* allow wrapping, prevent overflow */
}

/* If the old mobile-collapse rules still exist, neutralize them */
@media (max-width: 768px) {
  .section-impressum-wrapper .split { flex-direction: row; }
  .section-impressum-wrapper .split > .left { display: block; flex: 0 0 100px; width: 100px; min-width: 100px; }
  .section-impressum-wrapper .split > .right { order: 0; }
}

/*————————————————————————————————————————————————————————*/
/* PROJECTS */
/*————————————————————————————————————————————————————————*/

.cases__gallery-content {
  flex: none;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  padding-bottom: clamp(16px, 2vw, 24px);
  display: flex;
  position: relative;
}

/*————————————————————————————————————————————————————————*/
/* PROJECT DETAIL PAGE                                    */
/*————————————————————————————————————————————————————————*/

.page-project {
  background-color: var(--color--bg-200);
  overflow-x: hidden;
}

/* Project navbar */
.project-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--edge-x);
  z-index: 1000;
}

.project-navbar__logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* Close button */
.project-close {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.project-close .txt-wrap { position: relative; display: inline-block; }
.project-close .copy { position: absolute; top: 0; left: 0; pointer-events: none; }

/* Project main layout */
.project-main {
  position: relative;
}

/* Project info — below gallery */
.project-info {
  padding: var(--edge-x);
}

.project-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.2;
  color: #000;
}

.project-location {
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 400;
  color: var(--color--txt-300);
  margin-top: 4px;
}

.project-description-text {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color--txt-300);
  margin-top: clamp(8px, 1vw, 12px);
  max-width: 520px;
}


/* Horizontal scroll gallery */
.project-gallery {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.project-gallery::-webkit-scrollbar { display: none; }
.project-gallery { scrollbar-width: none; }

.project-gallery__track {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
  padding-left: var(--edge-x);
  padding-right: var(--edge-x);
  height: 50vh;
}

.project-gallery__slide {
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
}

.project-gallery__slide img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
}

/* Bottom navigation */
.project-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: var(--edge-x);
  z-index: 1000;
  pointer-events: none;
}

.project-nav__link {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #000;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

.project-nav__link .txt-wrap { position: relative; display: inline-block; }
.project-nav__link .copy { position: absolute; top: 0; left: 0; pointer-events: none; }

.project-nav__name {
  font-weight: 400;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0;
  color: var(--color--txt-300);
  margin-top: 4px;
}

.project-nav__next {
  align-items: flex-end;
  text-align: right;
}

/* Gallery scroll hint arrow */
.gallery-scroll-hint {
  position: fixed;
  right: var(--edge-x);
  z-index: 90;
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
  will-change: opacity, filter, transform;
}

.gallery-scroll-hint svg {
  width: 100px;
  height: 100px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.6));
}

/* Mobile */
@media (max-width: 768px) {
  .project-gallery__track {
    padding-left: var(--edge-x);
    padding-right: var(--edge-x);
  }

  .gallery-scroll-hint svg {
    width: 28px;
    height: 28px;
  }
}