:root {
  --bg: #d7d7d2;
  --panel: #c7c7c1;
  --text: #10100e;
  --muted: rgba(16, 16, 14, 0.62);
  --line: rgba(16, 16, 14, 0.18);
  --accent: #d63f3a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  align-content: stretch;
  gap: clamp(20px, 3.2vh, 42px);
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 50px) clamp(16px, 3.3vw, 64px) clamp(34px, 4vw, 72px);
  isolation: isolate;
  background:
    linear-gradient(0deg, #d7d7d2 0%, rgba(215, 215, 210, 0.58) 54%, #d7d7d2 103%),
    radial-gradient(circle at 50% 42%, rgba(214, 63, 58, 0.12), transparent 31%),
    var(--bg);
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  width: clamp(82px, 8vw, 132px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.12));
}

.nav-links {
  display: flex;
  gap: clamp(18px, 2.2vw, 42px);
  color: var(--muted);
  font-size: clamp(13px, 0.9vw, 16px);
  font-weight: 900;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--text);
}

.contact-block {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(360px, 100%);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.contact-button {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--text);
  color: var(--bg);
  font-size: clamp(20px, 2.8vw, 38px);
  font-weight: 950;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-18px) scale(0.96);
}

.contact-email {
  display: block;
  width: 100%;
  margin: 0;
  clear: both;
  color: var(--text);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 800;
  line-height: 1;
  opacity: 0.82;
  text-align: left;
}

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

.contact-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-105%) skewX(-14deg);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-button::after {
  content: "Kontakt";
  position: relative;
  z-index: 1;
}

.contact-button:hover::before {
  transform: translateX(0) skewX(0deg);
}

.contact-button:hover {
  animation: contactPulse 520ms ease both;
}

.contact-button.is-visible {
  animation: contactEnter 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 220ms both;
}

.content-badge {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: min(620px, 100%);
  margin-top: clamp(28px, 4vw, 58px);
  padding: 16px 24px;
  border-left: 6px solid var(--accent);
  background: rgba(215, 215, 210, 0.74);
  color: var(--text);
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 950;
  line-height: 0.96;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  backdrop-filter: blur(12px);
}

.content-badge::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -8px;
  width: 44%;
  height: 8px;
  background: var(--accent);
}

.hero-logo-stage {
  position: relative;
  z-index: 0;
  display: grid;
  min-height: clamp(190px, 32vh, 360px);
  place-items: center;
  opacity: 0.72;
  perspective: 1200px;
  pointer-events: none;
}

.hero-logo {
  position: relative;
  width: min(520px, 48vw, 100%);
  aspect-ratio: 1;
  filter: drop-shadow(0 26px 64px rgba(0, 0, 0, 0.16));
}

.hero-logo-mw,
.hero-logo-film {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-logo-mw {
  inset: 50% auto auto 50%;
  width: 72%;
  height: 72%;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  animation:
    logoIntro 1300ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
    logoFlip 5s ease-in-out 1300ms infinite;
}

.hero-logo-film {
  inset: 0;
  clip-path: inset(64% 0 0 0);
  animation: logoFilmEnter 1300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.82;
  letter-spacing: 0;
}

.hero-content p {
  margin-bottom: 0;
  color: var(--accent);
  font-size: clamp(30px, 5vw, 84px);
  font-weight: 900;
  line-height: 0.95;
}

.text-reveal {
  opacity: 0;
  transform: translateY(32px);
}

.text-reveal.is-visible {
  animation: textEnter 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.delay-1 {
  animation-delay: 140ms;
}

.projects-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(118px, 14vw, 180px) 0 90px;
}

.projects-head {
  display: block;
  margin-bottom: clamp(30px, 6vw, 70px);
  text-transform: uppercase;
  text-align: left;
}

.projects-head p {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: clamp(46px, 9vw, 132px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
}

.project-list {
  display: grid;
  gap: clamp(54px, 8vw, 96px);
}

.project-card {
  display: grid;
  gap: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5.2vw, 78px);
  line-height: 0.92;
  text-transform: uppercase;
}

.project-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--panel);
  object-fit: contain;
}

.project-video-portrait {
  width: min(520px, 100%);
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

@keyframes logoIntro {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(18px) scale(0.94) rotateX(-28deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1) rotateX(0deg);
  }
}

@keyframes logoFlip {
  0%,
  78%,
  100% {
    transform: translate(-50%, -50%) rotateX(0deg);
  }
  88% {
    transform: translate(-50%, -50%) rotateX(180deg);
  }
}

@keyframes logoFilmEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes textEnter {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contactEnter {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes contactPulse {
  0% {
    transform: translateY(0) scale(1);
  }
  48% {
    transform: translateY(-4px) scale(1.035);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 620px;
    grid-template-rows: auto auto minmax(170px, 1fr) auto;
    gap: 18px;
    padding: 28px 16px 38px;
  }

  .brand {
    width: 72px;
  }

  .nav-links {
    gap: 14px;
    font-size: 12px;
  }

  .contact-block {
    width: min(260px, 100%);
  }

  .contact-button {
    min-height: 62px;
  }

  .content-badge {
    max-width: 100%;
    margin-top: 28px;
    padding: 13px 16px 13px 18px;
    font-size: clamp(15px, 5.3vw, 21px);
  }

  .hero-logo {
    width: min(300px, 68vw);
  }

  h1 {
    font-size: clamp(58px, 18vw, 116px);
  }

  .hero-content p {
    font-size: clamp(26px, 9vw, 58px);
  }

  .projects-head {
    display: block;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    gap: 16px;
  }

  .contact-block {
    width: min(100%, 320px);
  }

  .hero-logo-stage {
    min-height: clamp(150px, 24vh, 240px);
  }

  .hero-logo {
    width: min(240px, 58vw);
  }
}

@media (max-height: 680px) {
  .hero {
    min-height: 100svh;
    gap: 14px;
  }

  .contact-button {
    min-height: 58px;
    font-size: clamp(18px, 2.2vw, 28px);
  }

  .hero-logo-stage {
    min-height: 150px;
  }

  .hero-logo {
    width: min(260px, 42vw);
  }

  .content-badge {
    margin-top: 18px;
  }
}

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