/* ============================================================
   OPTAVO Referenzseite — Foto-Portfolio
   Dark Royal-Gradient · Inter · CSS-Columns Masonry
   ============================================================ */

:root {
  --bg:           #000000;
  --bg-deep:      #050507;
  --surface:      #0b0c12;
  --surface-2:    #14151f;

  --royal:        #2a34b0;
  --royal-soft:   rgba(42, 52, 176, 0.42);
  --royal-glow:   rgba(42, 52, 176, 0.22);
  --royal-tint:   rgba(42, 52, 176, 0.10);
  --gold:         #eab107;

  --text:         #f6f6f8;
  --text-dim:     #b9bcc9;
  --text-mute:    #7f8395;
  --hairline:     rgba(255, 255, 255, 0.08);
  --hairline-2:   rgba(255, 255, 255, 0.14);

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  18px;
  --r-xl:  24px;

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);   /* expo-ish */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --maxw: 1600px;
}

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

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

::selection { background: var(--royal); color: #fff; }

/* ---------- TOPBAR / LOGO ------------------------------------ */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: clamp(1.25rem, 2.4vw, 2rem) clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: inline-flex; align-items: center; }
.logo-svg { height: clamp(36px, 4.2vw, 48px); width: auto; }
.logo-svg .logo-word {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.02em;
  fill: #ffffff;
}
.logo-svg .logo-sub {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.32em;
  fill: var(--royal);
}

/* ---------- HERO -------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6rem, 14vh, 9rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 8vh, 6rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 22% 8%, var(--royal-soft), transparent 65%),
    radial-gradient(ellipse 80% 60% at 88% 18%, rgba(42, 52, 176, 0.28), transparent 70%),
    linear-gradient(160deg, rgba(42, 52, 176, 0.32) 0%, rgba(10, 12, 35, 0.55) 35%, #000 75%),
    #000;
}

/* slow drifting aurora — sehr subtil, kein "Wackeln" */
.hero-aurora {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(closest-side, rgba(42, 52, 176, 0.5), transparent 70%) 18% 22% / 55% 65% no-repeat,
    radial-gradient(closest-side, rgba(42, 52, 176, 0.32), transparent 70%) 78% 30% / 50% 55% no-repeat;
  filter: blur(40px);
  opacity: 0.85;
  animation: aurora 24s var(--ease-soft) infinite alternate;
  pointer-events: none;
  z-index: -1;
}

@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.04); }
}

/* feines Rauschen, damit der Verlauf nicht "plastic" wirkt */
.hero-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
  z-index: -1;
}

.hero-content {
  max-width: 920px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  margin-bottom: 1.75rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
}

.hero-headline {
  font-size: clamp(2.6rem, 7.4vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  color: #ffffff;
}
.hero-headline i {
  font-style: italic;
  font-weight: 500;
  color: #ffffff;
  position: relative;
  padding: 0 0.04em;
  letter-spacing: -0.02em;
}
.hero-headline i::after {
  content: "";
  position: absolute;
  left: 6%; right: 6%;
  bottom: 0.08em;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in 900ms var(--ease-out) 700ms forwards;
}

@keyframes underline-in {
  to { transform: scaleX(1); }
}

.hero-subline {
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  color: var(--text-dim);
  max-width: 32ch;
  margin: 1.75rem auto 0;
  line-height: 1.45;
  font-weight: 400;
}

.hero-story {
  font-size: 1rem;
  color: var(--text-mute);
  max-width: 56ch;
  margin: 1.5rem auto 0;
  line-height: 1.65;
}

/* Reveal-Initialzustand */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  filter: blur(6px);
  transition:
    opacity 600ms var(--ease-out),
    transform 700ms var(--ease-out),
    filter 700ms var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}
[data-reveal]:nth-child(1) { transition-delay: 100ms; }
[data-reveal]:nth-child(2) { transition-delay: 220ms; }
[data-reveal]:nth-child(3) { transition-delay: 360ms; }
[data-reveal]:nth-child(4) { transition-delay: 480ms; }

/* Scroll-Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-mute);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  z-index: 2;
  transition: color 250ms var(--ease-out);
}
.scroll-indicator:hover { color: var(--text); }
.scroll-line {
  display: block;
  width: 1px; height: 38px;
  background: linear-gradient(to bottom, transparent, var(--text-mute), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  left: 0; top: -50%;
  width: 1px; height: 50%;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scroll-pulse 2.4s var(--ease-out) infinite;
}
@keyframes scroll-pulse {
  0%   { top: -50%; opacity: 0; }
  20%  { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

/* ---------- GALERIE ----------------------------------------- */

.gallery-section {
  padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 3vw, 2.5rem) clamp(5rem, 12vh, 8rem);
  position: relative;
}

.gallery-section::before {
  /* sanfter Übergang Hero → Galerie */
  content: "";
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(42, 52, 176, 0.05), transparent);
  pointer-events: none;
}

.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  column-count: 1;
  column-gap: clamp(0.6rem, 1.2vw, 1.1rem);
}

.gallery-item {
  position: relative;
  margin: 0 0 clamp(0.6rem, 1.2vw, 1.1rem);
  break-inside: avoid;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(1.01);
  transition:
    opacity 700ms var(--ease-out),
    transform 800ms var(--ease-out);
  will-change: opacity, transform;
}

.gallery-item.is-in img {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Hover-Overlay (Royal-Tint + leichter Zoom) — Desktop only */
@media (hover: hover) and (pointer: fine) {
  .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(160deg, rgba(42, 52, 176, 0.22), rgba(0, 0, 0, 0.0) 60%),
      linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 50%);
    opacity: 0;
    transition: opacity 250ms var(--ease-out);
    pointer-events: none;
    z-index: 1;
  }
  .gallery-item:hover::after { opacity: 1; }
  .gallery-item.is-in:hover img {
    transform: translate3d(0, 0, 0) scale(1.035);
    transition-duration: 600ms;
  }
}

/* Fokus-Stil (Tastatur) */
.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (min-width: 640px)  { .gallery { column-count: 2; } }
@media (min-width: 1024px) { .gallery { column-count: 3; } }
@media (min-width: 1440px) { .gallery { column-count: 4; } }

/* ---------- BRÜCKE ------------------------------------------ */

.bridge {
  padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 4vw, 2.5rem) clamp(5rem, 10vh, 8rem);
}

.bridge-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 5vw, 3.5rem);
  position: relative;
  border-radius: var(--r-xl);
  background:
    linear-gradient(160deg, var(--royal-tint) 0%, rgba(0, 0, 0, 0.0) 60%),
    var(--surface);
  overflow: hidden;
  isolation: isolate;
}

/* Gradient-Border via Pseudoelement */
.bridge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--royal) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 80%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.bridge-card::after {
  /* leichter Spotlight im Hintergrund */
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, var(--royal-glow), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.bridge-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.bridge-headline {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: #ffffff;
}

.bridge-body {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 60ch;
  margin: 0 0 2rem;
}

.bridge-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.6rem;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  border-radius: 999px;
  transition:
    transform 250ms var(--ease-out),
    background 250ms var(--ease-out),
    box-shadow 250ms var(--ease-out);
  box-shadow: 0 0 0 0 rgba(234, 177, 7, 0.0);
}
.bridge-cta svg {
  transition: transform 280ms var(--ease-out);
}
.bridge-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -10px rgba(234, 177, 7, 0.55);
}
.bridge-cta:hover svg { transform: translateX(4px); }
.bridge-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* ---------- FOOTER ------------------------------------------ */

.footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(2rem, 5vh, 3.5rem) clamp(1.25rem, 4vw, 2.5rem);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-logo { height: 38px; }
.footer-tag {
  color: var(--text-mute);
  font-size: 0.9rem;
  margin: 0;
  max-width: 32ch;
}
.footer-meta {
  color: var(--text-mute);
  font-size: 0.85rem;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ---------- LIGHTBOX ---------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vh, 5rem) clamp(1rem, 4vw, 4rem);
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.lightbox-img {
  max-width: min(100%, 1400px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 220ms var(--ease-out),
    transform 260ms var(--ease-out);
}
.lightbox.is-open .lightbox-img.is-shown {
  opacity: 1;
  transform: scale(1);
}
.lightbox-counter {
  color: var(--text-mute);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold);
}
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev  { left:  1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(2px); }

@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next {
    top: auto;
    bottom: 1.25rem;
    transform: none;
    width: 44px; height: 44px;
  }
  .lightbox-prev { left: calc(50% - 56px); }
  .lightbox-next { right: calc(50% - 56px); }
  .lightbox-prev:hover, .lightbox-next:hover { transform: none; }
}

body.lightbox-open { overflow: hidden; }

/* ---------- ACCESSIBILITY: REDUCED MOTION ------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  .gallery-item img {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .hero-aurora { animation: none !important; }
  .scroll-line::after { animation: none !important; opacity: 0.4 !important; }
}
