@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(base);
@import "tailwindcss/utilities.css" layer(utilities);

@import "./css/fonts.css";

@theme {
	--font-display: "Clash";
	--font-body: "Archiro";
	--color-dark: rgb(5, 5, 5);
	--color-white: rgb(250, 250, 250);
	--color-accent: rgb(165, 165, 0);
}

:root {
	h1 {
		@apply font-display text-lg h-[68px] md:text-4xl flex items-center justify-center relative z-2 bg-white px-3 py-3 w-fit pointer-events-none select-none;
		font-weight: 500;
		font-feature-settings:
			"ss01" 0,
			"ss02" 1,
			"ss03" 1,
			"ss04" 1,
			"ss05" 1,
			"ss08" 1;
	}
	h2 {
		@apply font-display text-2xl font-[500] max-md:leading-[26px];
		scroll-margin: 24px;
	}
	h2 span {
		@apply font-normal max-md:flex max-md:text-sm;
	}
	p {
		@apply font-body;
	}
}

body {
	@apply bg-white;
}

.h1-animate-wrapper {
	@apply relative overflow-hidden flex max-h-7 md:max-h-10 bg-dark px-2 font-[900] tracking-wide;
}
h1 > span:not(.h1-animate-wrapper) {
	@apply inline-block mx-2;
}
.h1-animate-inner {
	@apply flex flex-col items-center h-max text-white uppercase;
}

header {
	@apply h-svh justify-center min-h-svh max-w-svw relative overflow-hidden;
}
header video {
	@apply absolute inset-0 object-cover w-full h-full;
}

.header-texts {
	@apply flex flex-col gap-2 fixed z-3 top-0 h-fit;
}
.header-texts.compact h1,
.header-texts.compact .logotype {
	@apply opacity-0 transition-opacity duration-300;
}
.header-texts.compact .header-buttons .button,
.header-texts.compact .header-buttons .link {
	@apply border border-dark;
}
.header-texts.compact .header-buttons:first-child .button {
	@apply -translate-x-29;
}

.header-content {
	@apply min-h-svh z-2 flex-col gap-2 flex items-center justify-center;
}
.menu-btn {
	@apply p-0! opacity-0 w-full md:min-w-[260px] md:md:max-w-[260px]
  text-ellipsis overflow-visible! min-w-[calc(100vw-104px-16px-4px)] max-w-[calc(100vw-104px-16px-4px)];
}
.menu-btn:hover .btn-menu-list {
	@apply opacity-100;
}
.header-texts.compact .compact-hidden {
  @apply max-md:hidden;
}
.header-texts:not(.compact) .menu-btn {
  @apply max-md:hidden
}
.menu-btn--before .btn-menu-list {
	@apply bottom-full;
}
.btn-menu-list {
	@apply relative left-0 right-0 pointer-events-none;
}
.btn-menu-list.opened {
  @apply pointer-events-auto;
}
.menu-btn-option {
	@apply text-dark opacity-0 text-left min-w-full max-w-full px-4 py-3 hover:bg-neutral-100
  transition-colors absolute top-0 bg-white text-ellipsis whitespace-nowrap overflow-hidden;
}
.menu-btn-option-city {
  @apply text-neutral-500 text-sm;
}
.watch-button {
  @apply flex;
}
.watch-button svg, .watch-button span {
  @apply pointer-events-none;
}
.watch-button .resize {
  @apply px-3.5! bg-white/80 border-white border border-l-0 cursor-pointer;
}
.watch-button .resize svg {
  @apply h-4.5 w-4.5;
}
@keyframes AnimateResize  {
  0%, 100% {
    scale: 1
  } 50% {
    scale: 1.3
  }
}
.watch-button .resize:hover svg {
  animation: AnimateResize 0.6s ease;
}
.menu-btn .button-label {
	@apply text-left block overflow-hidden text-ellipsis whitespace-nowrap text-white;
}
.menu-btn-overlay {
  @apply absolute left-0 right-0;
}
.header-texts.compact .menu-btn {
	@apply opacity-100;
}
.logotype .logotype-wrapper {
	@apply absolute inset-0 h-full grid grid-cols-[repeat(var(--cols),1fr)] -skew-x-15;
}
.logotype svg {
	@apply stroke-white fill-white/20;
}
.logotype {
	@apply -mb-3 md:-mb-[8.5px] h-14 md:h-20 relative pointer-events-auto;
	-webkit-mask-image: url(/logo-mask.svg);
	mask-image: url(/logo-mask.svg);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}
.logotype svg {
	@apply w-full h-full;
}
.logotype .cell {
	@apply bg-white;
}

.videos-wrapper,
.photos-wrapper {
	@apply flex flex-col gap-4 min-h-svh bg-white px-4 py-6 md:p-12;
}

.videos-grid {
	@apply grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-0.5 mb-8;
}
.video-poster {
	@apply bg-neutral-300 aspect-video;
}
.header-buttons {
	@apply absolute top-[calc(100%+4px)] left-0 right-0 flex justify-between items-end pointer-events-none;
}
.header-buttons:first-child {
	@apply top-auto bottom-[calc(100%+4px)];
}

.button {
	@apply relative z-4 overflow-hidden px-6 py-3 bg-white text-white w-fit isolate cursor-pointer h-fit pointer-events-auto font-display;
}
.button-bg {
	@apply content-[''] -left-1/2 absolute z-1 inset-0 h-[200%] w-[200%] -translate-y-full origin-center;
}
.button-label {
	@apply flex;
}
/*.button:hover .button-bg {*/
/*  @apply translate-y-0;*/
/*}*/
.button .button-label {
	@apply relative z-2 mix-blend-difference;
}
.button-cat {
	@apply absolute z-2 left-1/2 -translate-x-1/2 mix-blend-difference fill-white;
}

.button-decor-wrapper {
	@apply z-2 absolute w-2 h-2;
	/*rotate: 45deg;*/
	/*scale: 0.5;*/
}

@keyframes buttonDecor1 {
	0%,
	100% {
		transform: rotate(-40deg) scaleY(0.5) rotate(45deg);
	}
	50% {
		transform: rotate(-20deg) scaleY(0.5) rotate(45deg);
	}
}

@keyframes buttonDecor2 {
	0%,
	100% {
		transform: rotate(40deg) scaleY(0.5) rotate(45deg);
	}
	50% {
		transform: rotate(20deg) scaleY(0.5) rotate(45deg);
	}
}
.button-decor {
	@apply flex w-full h-full bg-dark;
	animation: buttonDecor1 1s infinite ease-in-out alternate;
}
.button-decor-wrapper:nth-child(odd) .button-decor {
	animation: buttonDecor2 1s infinite ease-in-out alternate;
}
.button-decor-wrapper:nth-child(1) {
	@apply -left-1 -top-1;
}
.button-decor-wrapper:nth-child(2) {
	@apply -right-1 -top-1;
}
.button-decor-wrapper:nth-child(3) {
	@apply -right-1 -bottom-1;
}
.button-decor-wrapper:nth-child(4) {
	@apply -left-1 -bottom-1;
}

.button-cat .earR,
.button-cat .earL {
	@apply origin-center;
}
.muscateR,
.muscateL {
	@apply absolute z-2 w-10 h-10 top-1/2 -translate-y-1/2 mix-blend-difference fill-white;
}
.muscateL {
	@apply left-10;
}
.muscateR {
	@apply right-10;
}
.muscateL path,
.muscateR path {
	@apply opacity-0;
}

@keyframes animateLinkSvg {
	0%,
	100% {
		rotate: 0;
		translate: 0 0;
	}
	50% {
		rotate: -10deg;
		translate: 3px 0;
	}
	80% {
		rotate: 5deg;
		translate: -3px 0;
	}
}
@keyframes animateLink {
	0%,
	100% {
		rotate: 0;
		translate: 0 0;
	}
	50% {
		translate: -3px 0;
	}
	80% {
		translate: 3px;
	}
}
.link {
	@apply pointer-events-auto cursor-pointer relative z-2 p-3 bg-white origin-center overflow-hidden transition-opacity duration-300;
}
.link.icon {
	@apply flex justify-center min-h-12 min-w-12.5;
}
.link.icon svg {
	@apply h-6 w-6;
}
.link svg {
	@apply h-4 w-4;
}
.link span {
	@apply delay-100;
	transition: translate 0.3s cubic-bezier(0.14, 0.65, 0.55, 1.32);
}
.link:not(.icon) {
	@apply px-7 bg-white/80 border border-amber-50 flex gap-2 items-center;
}
.link:not(.icon) svg {
	@apply -left-4;
}
.link:not(.icon) svg {
	@apply absolute top-1/2 -translate-y-1/2;
	transition: translate 0.3s cubic-bezier(0.14, 0.65, 0.55, 1.32);
}
.link:not(.icon):hover span {
	@apply translate-x-3;
}
.link.icon:hover {
	animation: animateLink 0.3s cubic-bezier(0.56, -0.58, 0.69, 0.9);
}
.link.icon:hover svg {
	animation: animateLinkSvg 0.3s cubic-bezier(0.56, -0.58, 0.69, 0.9);
}

.photos-wrapper {
	@apply pb-8;
}
.video-poster {
	@apply relative z-1 flex items-center justify-center opacity-0;
	transform: translateY(20px);
}
.video-poster.hide .video-overlay {
	@apply opacity-0;
}
.video-poster:hover .video-overlay {
	@apply opacity-100;
}
.video-poster img {
	@apply absolute inset-0 object-cover w-full h-full;
}
.video-overlay {
	@apply absolute z-0 inset-0 flex items-center justify-center transition-opacity duration-300 opacity-0;
}
.video-poster:not(.hide) .link:hover .svg-play {
	@apply translate-x-8;
}

.video-poster.hide .link:hover .svg-pause {
	@apply translate-x-8;
}

.photos-grid {
	@apply columns-2 md:columns-4 gap-0.5 mb-8;
}
.photo-poster {
	@apply mb-0.5 opacity-0;
	transform: translateY(-20px);
}
