/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 30px;
  z-index: var(--z-nav);
  background: transparent;
  pointer-events: none;
  /* Blend the (transparent) nav layer — i.e. the white hamburger lines —
     against the page behind it, the same negative effect as the logo. Must
     live here, not on .nav__hamburger: the hamburger sits inside .nav's own
     stacking context (fixed + z-index) where there is nothing behind it to
     blend with, so the blend has to happen at the .nav layer. */
  mix-blend-mode: difference;
}

.nav > * {
  pointer-events: auto;
}

.nav__logo {
  position: fixed;
  top: 0;
  right: 30px;
  z-index: var(--z-nav);
  mix-blend-mode: difference;
  pointer-events: auto;
}


.nav__logo img {
  height: 33vh;
  width: auto;
  max-width: 30vw;
  display: block;
}

@media (max-width: 767px) {
  .nav__logo img {
    height: 120px;
    max-width: 60vw;
  }
}

.nav__links {
  position: fixed;
  top: auto;
  bottom: var(--space-xs);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  display: none;
  gap: 0;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border-radius: 999px;
  z-index: var(--z-nav);
  pointer-events: auto;
  mix-blend-mode: difference;
}

.nav__link {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: calc(var(--text-sm) * 1.8);
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-light);
  position: relative;
  padding: 0 var(--space-md);
}

/* Dot separator between links */
.nav__link + .nav__link::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(247, 247, 245, 0.5);
  pointer-events: none;
  line-height: 1;
}

.nav__link:hover {
  color: var(--color-accent);
}

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.nav__hamburger span {
  display: block;
  width: 28px;
  height: 1px;
  background: #fff;
  transition: all var(--transition-fast);
}

.nav__hamburger--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-overlay-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.mobile-menu--open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.mobile-menu__link:hover {
  color: var(--color-accent);
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__hamburger {
    display: none;
  }
}

@media (max-width: 767px) {
  .nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav__hamburger {
    margin-top: var(--space-xs);
  }

  .nav__logo {
    top: var(--space-xs);
    right: 20px;
  }

  .nav__links {
    display: none !important;
  }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
  padding: var(--space-2xl) var(--section-padding) var(--space-lg);
  border-top: 1px solid rgba(42, 47, 48, 0.1);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(42, 47, 48, 0.1);
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand img {
  filter: brightness(0);
}

.footer__brand p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-secondary);
  margin-top: var(--space-md);
  max-width: 320px;
  line-height: 1.6;
}

.footer__heading {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-base);
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.footer__link {
  display: block;
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  color: var(--color-text-dark);
  padding: 0.35rem 0;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer__social a {
  color: var(--color-text-dark);
  transition: color var(--transition-fast);
}

.footer__social a:hover {
  color: var(--color-accent);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-lg);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-secondary);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__legal {
  display: flex;
  gap: var(--space-md);
}

.footer__legal a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--color-accent);
}

/* Language switch — injected server-side before </footer>. Real <a> links to
   the mirror URL (crawlable), so it doubles as an hreflang signal. */
.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding-top: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lang-switch__btn {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.lang-switch__btn:hover {
  color: var(--color-accent);
}

.lang-switch__btn.is-active {
  color: var(--color-text-dark);
  font-weight: 700;
}

.lang-switch__sep {
  color: var(--color-secondary);
  opacity: 0.5;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.hero__overlay {
  display: none;
}

.hero__content {
  position: relative;
  z-index: var(--z-base);
  text-align: center;
  padding: 0 var(--section-padding);
}

.hero__logo {
  width: 55vw !important;
  max-width: none !important;
  height: auto;
  margin: 0 auto var(--space-md);
}

/* W brandmark — anchored bottom-left, blended negative against the video */
.hero__brandmark {
  position: absolute;
  bottom: -10vh;
  left: var(--space-md);
  height: 75vh;
  width: auto;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: difference;
}

@media (max-width: 767px) {
  .hero__logo {
    width: 80vw !important;
  }

  .hero__content {
    margin-top: -15vh;
  }

  .hero__scroll {
    bottom: var(--space-lg);
  }

  .hero__brandmark {
    height: 40vh;
    bottom: var(--space-sm);
    left: var(--space-sm);
  }
}

.hero__tagline {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-light);
  opacity: 0.9;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-light);
  opacity: 0.6;
  animation: heroScroll 2s ease-in-out infinite;
}

.hero__scroll span {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@keyframes heroScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.hero__scroll {
  animation-duration: 3s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
}

/* ========================================
   USP SPLIT
   ======================================== */
.usp {
  position: relative;
  overflow: hidden;
}

.usp__grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 70vh;
}

/* USP images stacked vertically */

.usp__side {
  position: relative;
  height: 60vh;
  overflow: hidden;
}

.usp__side img,
.usp__side video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.usp__label {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: var(--color-overlay);
  padding: 0.5rem 1rem;
  backdrop-filter: blur(8px);
}

.usp__label--large {
  bottom: auto;
  top: var(--space-lg);
  left: var(--space-lg);
  background: none;
  backdrop-filter: none;
  padding: 0;
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(3rem, 6vw, 5.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-text-light);
}

.usp__label-sub {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.usp__divider {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: var(--color-border-light);
  z-index: var(--z-base);
}

/* divider hidden for stacked layout */

.usp__text {
  text-align: center;
  padding: var(--space-lg) var(--section-padding);
}

.usp__text h2 {
  margin-bottom: var(--space-sm);
}

.usp__text p {
  color: var(--color-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* USP Showcase (Runaway Vows style) */
.section--light .usp__text--showcase {
  background: var(--color-bg-light);
}

.usp__text--showcase {
  padding: var(--space-lg) var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.usp__emblem {
  width: 60px;
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
  filter: brightness(0);
}

.usp__headline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.75rem, 0.65rem + 0.5vw, 0.9rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-text-dark);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.usp__headline em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 2em;
  color: var(--color-text-dark);
}

.usp__text--showcase .usp__image {
  width: 100%;
  max-width: var(--max-width);
  margin: var(--space-lg) auto var(--space-lg);
  overflow: hidden;
}

.usp__text--showcase .usp__image img {
  width: 100%;
  height: auto;
  display: block;
}

.usp__description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-secondary);
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto var(--space-md);
  text-align: center;
}

.usp__link {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-dark);
  border-bottom: 1px solid var(--color-text-dark);
  padding-bottom: 0.4rem;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.usp__link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ========================================
   MEET THE FOUNDERS
   ======================================== */
.founders {
  padding: var(--space-xl) var(--section-padding);
  border-top: 1px solid var(--color-border-light);
}

.founders__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .founders__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

.founders__image {
  overflow: hidden;
}

.founders__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.founders__text {
  padding: var(--space-md) 0;
}

.founders__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.founders__divider {
  width: 80px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: var(--space-md);
}

.founders__names {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.founders__intro {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  max-width: 480px;
}

.founders__bio {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: 480px;
}

.founders__btn {
  display: block;
  width: 100%;
  max-width: 380px;
  padding: 14px 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-dark);
  background: var(--color-bg-light);
  transition: background var(--transition-fast), color var(--transition-fast);
}

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

/* ========================================
   FEATURED WORK
   ======================================== */
.featured-work__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
}

@media (min-width: 768px) {
  .featured-work__item {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-lg);
  }

  .featured-work__item:nth-child(even) {
    direction: rtl;
  }

  .featured-work__item:nth-child(even) > * {
    direction: ltr;
  }
}

.featured-work__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.featured-work__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-work__item:hover .featured-work__image img {
  transform: scale(1.03);
}

.featured-work__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}

.featured-work__couple {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-work__meta {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.featured-work__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.3rem 0.8rem;
  width: fit-content;
}

/* ========================================
   HOME GALLERY — staggered to match Works
   ======================================== */
.gallery {
  padding: var(--space-xl) 0 var(--space-md);
  background: var(--color-bg-light);
}

.gallery__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-md) 0;
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.gallery__item {
  display: block;
  overflow: hidden;
  position: relative;
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition-medium);
}

.gallery__item:hover {
  z-index: 5;
}

.gallery__item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery__quote {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(var(--space-sm), 4vw, var(--space-xl)) clamp(var(--space-xs), 2vw, var(--space-md));
}

.gallery__quote p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, var(--text-2xl));
  line-height: 1.5;
  color: var(--color-text-dark);
  max-width: 500px;
  text-align: center;
}

/* 6-child rhythm: img, img, img, quote, img, img — edges used.
   Negative margin-top in vw so overlap stays proportional at every viewport. */
.gallery__grid > :nth-child(1) {
  width: 55%;
  margin-left: 1%;
  margin-right: auto;
  margin-top: 4vw;
}
.gallery__grid > :nth-child(2) {
  width: 42%;
  margin-left: auto;
  margin-right: 1%;
  margin-top: -12vw;
  z-index: 2;
}
.gallery__grid > :nth-child(3) {
  width: 38%;
  margin-left: 4%;
  margin-right: auto;
  margin-top: -8vw;
}
.gallery__grid > :nth-child(4) {
  /* Quote — sits next to image 3 on the right */
  width: 42%;
  margin-left: auto;
  margin-right: 4%;
  margin-top: -18vw;
  z-index: 2;
}
.gallery__grid > :nth-child(5) {
  width: 50%;
  margin-left: auto;
  margin-right: 2%;
  margin-top: 3vw;
  z-index: 2;
}
.gallery__grid > :nth-child(6) {
  width: 46%;
  margin-left: 1%;
  margin-right: auto;
  margin-top: -12vw;
}

@media (min-width: 1024px) {
  .gallery__grid {
    padding: var(--space-xl) 0;
  }
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonials {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.testimonials__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.testimonials__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay-heavy);
}

.testimonials__inner {
  position: relative;
  z-index: var(--z-base);
  text-align: center;
  max-width: 700px;
  padding: var(--space-xl) var(--section-padding);
}

.testimonials__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--section-padding);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.testimonials__slide--active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.testimonials__quote {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.testimonials__author {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.testimonials__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.testimonials__arrow {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.testimonials__arrow:hover {
  background: var(--color-accent);
  color: var(--color-primary);
}

.testimonials__dots {
  display: flex;
  gap: var(--space-xs);
}

.testimonials__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.testimonials__dot--active {
  background: var(--color-accent);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cta__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .cta__bg {
    background-attachment: fixed;
  }
}

/* Legacy <img> child (falls noch in irgendeinem Markup vorhanden) füllt die Box */
.cta__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.cta__content {
  position: relative;
  z-index: var(--z-base);
  text-align: center;
  padding: var(--space-xl) var(--section-padding);
}

.cta__content h2 {
  margin-bottom: var(--space-sm);
}

.cta__content p {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-light);
  opacity: 0.8;
  margin-bottom: var(--space-md);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.45s; }

/* ========================================
   PORTFOLIO STAGGERED GALLERY
   — same mosaic rhythm at every viewport width
   ======================================== */
.portfolio-masonry {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-md) 0;
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.portfolio-masonry__item {
  overflow: hidden;
  position: relative;
}

.portfolio-masonry__item img {
  width: 100%;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition-medium);
}

.portfolio-masonry__item:hover {
  z-index: 5;
}

.portfolio-masonry__item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* 7-step repeating rhythm — edges used, gentle side-by-side overlap.
   Negative margin-top in vw so the overlap scales with viewport width
   and stays proportional from 320px phones up to 4K displays. */
.portfolio-masonry__item:nth-child(7n + 1) {
  width: 48%;
  margin-left: 2%;
  margin-right: auto;
  margin-top: 4vw;
}
.portfolio-masonry__item:nth-child(7n + 2) {
  width: 38%;
  margin-left: auto;
  margin-right: 2%;
  margin-top: -9vw;
  z-index: 2;
}
.portfolio-masonry__item:nth-child(7n + 3) {
  width: 34%;
  margin-left: 5%;
  margin-right: auto;
  margin-top: -6vw;
}
.portfolio-masonry__item:nth-child(7n + 4) {
  width: 44%;
  margin-left: auto;
  margin-right: 3%;
  margin-top: -7vw;
  z-index: 2;
}
.portfolio-masonry__item:nth-child(7n + 5) {
  width: 42%;
  margin-left: 2%;
  margin-right: auto;
  margin-top: -5vw;
}
.portfolio-masonry__item:nth-child(7n + 6) {
  width: 46%;
  margin-left: auto;
  margin-right: 2%;
  margin-top: -9vw;
  z-index: 2;
}
.portfolio-masonry__item:nth-child(7n + 7) {
  width: 34%;
  margin-left: 18%;
  margin-right: auto;
  margin-top: 3vw;
}

@media (min-width: 1024px) {
  .portfolio-masonry {
    padding: var(--space-xl) 0;
  }
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.filter-tab {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--color-border-light);
  color: var(--color-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover,
.filter-tab--active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ========================================
   FORMS
   ======================================== */
.form__group {
  margin-bottom: var(--space-md);
}

.form__label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.8rem 0;
  font-size: var(--text-base);
  color: var(--color-text-light);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-accent);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* Light form variant */
.section--light .form__input,
.section--light .form__textarea {
  color: var(--color-text-dark);
  border-bottom-color: rgba(42, 47, 48, 0.2);
}

.section--light .form__input:focus,
.section--light .form__textarea:focus {
  border-color: var(--color-accent);
}
