:root {
  --color-bg:           #1F2B23;
  --color-bg-darker:    #1A2620;
  --color-text-warm:    #E8C9A5;
  --color-text-muted:   #8FA391;
  --color-accent-green: #009D46;
  --color-accent:       #F4B86A;
  --color-cream-light:  #F0DDBE;


  --color-overlay-tint: 143, 163, 145;
  --color-frame:        244, 184, 106;

  --font-body:    'Geist', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text-warm);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { overflow-x: hidden; }

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

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: none;
}

.hero__photo {
  position: absolute;
  inset: -20px;
  background-image: url('assets/haberkorn_edited.jpg');
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}

.hero__darken {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(31, 43, 35, 0.55) 0%,
    rgba(31, 43, 35, 0)    18%,
    rgba(31, 43, 35, 0)    55%,
    rgba(31, 43, 35, 0.85) 100%
  );
}

.hero__frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    linear-gradient(90deg,  rgba(var(--color-frame), 0.25) 0%, transparent 12%),
    linear-gradient(180deg, rgba(var(--color-frame), 0.25) 0%, transparent 12%),
    linear-gradient(270deg, rgba(var(--color-frame), 0.25) 0%, transparent 12%),
    linear-gradient(360deg, rgba(var(--color-frame), 0.25) 0%, transparent 12%);
}

.hero__meta {
  position: relative;
  z-index: 4;
  padding: var(--space-lg) var(--space-lg) 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;

  opacity: 0;
  transform: translateY(-12px);
  animation: fadeInDown 0.8s 0.5s var(--ease-out) forwards;

  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.hero:not([data-state="default"]) .hero__meta {
  opacity: 0 !important;
  transform: translateY(-8px);
  pointer-events: none;
}

.hero__spacer {
  flex: 1;
  min-height: 100px;
}


.nav {
  position: relative;
  z-index: 5;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;

  opacity: 0;
  transform: translateY(-12px);
  animation: fadeInDown 0.8s 0.2s var(--ease-out) forwards;
}

.nav__logo {
  font-size: 0.95rem;
  font-weight: 500;
}

.nav__dot {
  display: inline-block;
  color: var(--color-accent);
  animation: pulse 2.4s infinite;
}

.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 28, 22, 0.55);
  border: 0.5px solid rgba(232, 201, 165, 0.22);
  border-radius: 999px;
  margin-left: 100px;
  padding: 6px 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pill__link {
  font-size: 0.9rem;
  padding: 6px 16px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.pill__link:hover { opacity: 0.7; }

.pill__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-text-warm);
  color: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
}

.nav__social {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav__social-link { transition: opacity 0.2s; }
.nav__social-link:hover { opacity: 0.7; }


.hero__name-block {
  position: relative;
  z-index: 4;
  padding: 0 var(--space-lg) var(--space-md);
}

.hero__name-row {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}

.hero__name {
  flex: 1;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(72px, 13vw, 180px);
  line-height: 0.86;
  letter-spacing: -0.02em;
}

.hero__name-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}

.hero__name-line .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: letterUp 0.9s var(--ease-out) forwards;
}

.hero__name-line .letter--ready {
  transition: color 0.25s var(--ease-out);
}

.hero__subtitle {
  text-align: right;
  margin-top: var(--space-xs);
  font-size: 0.95rem;

  opacity: 0;
  animation: fadeIn 1s 1.9s var(--ease-out) forwards;
}


.cursor-glow {
  position: fixed;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(244, 184, 106, 0.5) 0%,
    transparent 50%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  z-index: 6;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-text-warm);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
  mix-blend-mode: difference;
}


.hero__overlay {
  position: absolute;
  left: var(--space-lg);
  top:  calc(var(--space-md) + 72px);
  bottom: 8rem;
  width: min(520px, 38vw);
  z-index: 4;

  padding: 2.25rem 2.25rem 2rem;
  overflow-y: auto;

  background: rgba(var(--color-overlay-tint), 0.22);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 0.5px solid rgba(232, 201, 165, 0.18);
  border-radius: 28px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.4);

  color: var(--color-text-warm);
  font-family: var(--font-body);

  opacity: 0;
  transform: translateX(-24px) scale(0.96);
  pointer-events: none;
  transition:
    opacity   0.45s var(--ease-out),
    transform 0.55s var(--ease-out);

  scrollbar-width: thin;
  scrollbar-color: rgba(232, 201, 165, 0.3) transparent;
}

.hero__overlay::-webkit-scrollbar { width: 4px; }
.hero__overlay::-webkit-scrollbar-track { background: transparent; }
.hero__overlay::-webkit-scrollbar-thumb {
  background: rgba(232, 201, 165, 0.3);
  border-radius: 2px;
}

.hero[data-state="leistungen"]  .hero__overlay[data-overlay="leistungen"],
.hero[data-state="impressum"]   .hero__overlay[data-overlay="impressum"],
.hero[data-state="datenschutz"] .hero__overlay[data-overlay="datenschutz"] {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.hero__overlay-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--color-text-warm);
}

.hero__overlay-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-left: -6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 999px;
  opacity: 0.8;
  transition: opacity 0.2s var(--ease-out), transform 0.25s var(--ease-out);
  flex-shrink: 0;
}

.hero__overlay-back:hover {
  opacity: 1;
  transform: translateX(-3px);
}

.hero__overlay-body {
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero__overlay-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--color-cream-light);
}

.hero__overlay-text {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.7rem;
  color: var(--color-text-warm);
  opacity: 0.92;
}

.hero__overlay-text strong {
  font-weight: 500;
  color: var(--color-cream-light);
  opacity: 1;
}

.hero__overlay-note {
  font-size: 0.82rem;
  font-style: italic;
  opacity: 0.7;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(232, 201, 165, 0.35);
  margin: 0.75rem 0;
}

.hero__overlay-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  transition: opacity 0.2s;
}

.hero__overlay-link:hover { opacity: 0.7; }


@keyframes letterUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.9); }
}


@media (max-width: 1024px) {
  .pill {
    margin-left: 0;
  }

  .hero__name-line {
    font-size: clamp(72px, 11vw, 112px) !important;
  }

  .hero__overlay {
    width: min(440px, 48vw);
    top: calc(var(--space-sm) + 76px);
    bottom: 7rem;
  }

  .hero__meta {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero { min-height: 0; }

  .hero__photo {
    background-position: 40% center;
  }

  .nav {
    padding: var(--space-sm) var(--space-md);
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
  }

  .nav__logo {
    font-size: 0.82rem;
  }

  .nav__social {
    gap: 1rem;
  }

  .nav__social-link img {
    width: 22px !important;
    height: 22px !important;
  }

  .pill {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .pill__link {
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  .hero__meta {
    padding: var(--space-sm) var(--space-md) 0;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .hero__spacer {
    min-height: 40px;
  }

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

  .hero__name-row {
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .hero__name-block {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .hero__name-row {
    display: contents;
  }

  .hero__name {
    order: 1;
    flex-basis: 100%;
  }

  .hero__subtitle {
    order: 2;
    flex-basis: 100%;
  }

  .hero__name-row > .pill__link {
    order: 3;
    margin-top: 0.25rem;
  }

  .hero__name-line {
    font-size: clamp(42px, 12vw, 84px) !important;
  }

  .hero__name-row .pill__link {
    padding: 4px 0;
    font-size: 0.85rem;
  }

  .hero__subtitle {
    font-size: 0.85rem;
  }

  .hero__overlay {
    top: 88px;
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: var(--space-sm);
    width: auto;
    padding: 1.5rem 1.25rem 1.5rem;
    border-radius: 22px;
  }

  .hero__overlay-title {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .hero__overlay-back {
    width: 44px;
    height: 44px;
    margin-left: -10px;
  }

  .hero__overlay-back svg {
    width: 22px;
    height: 22px;
  }

  .cursor-glow,
  .cursor-dot { display: none; }

  .hero { cursor: auto; }


  .hero:not([data-state="default"]) .hero__name-block {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
  }
}

@media (max-width: 420px) {
  .nav {
    padding: 0.75rem 1rem;
  }

  .nav__logo {
    font-size: 0.78rem;
  }

  .nav__social {
    gap: 0.75rem;
  }

  .nav__social-link img {
    width: 20px !important;
    height: 20px !important;
  }

  .pill__mark {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  .pill__link {
    padding: 5px 12px;
    font-size: 0.82rem;
  }

  .hero__meta {
    padding: var(--space-sm) 1rem 0;
    font-size: 0.82rem;
  }

  .hero__name-block {
    padding: 0 1rem 1rem;
  }

  .hero__name-line {
    font-size: clamp(38px, 12.5vw, 60px) !important;
  }

  .hero__overlay {
    top: 110px;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }

  .hero__overlay-heading {
    font-size: 1rem;
    margin-top: 1.2rem;
  }

  .hero__overlay-text {
    font-size: 0.88rem;
  }
}


@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 480px; }

  .hero__meta { display: none; }

  .hero__name-line {
    font-size: clamp(40px, 9vw, 72px) !important;
  }

  .hero__overlay {
    top: 70px;
    bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
