:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
  --black: rgba(0, 0, 0, 0.82);
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #050505;
  color: var(--white);
  font-family: "DM Sans", sans-serif;
}

.site-logo {
  position: fixed;
  top: clamp(22px, 4vw, 48px);
  left: 50%;
  z-index: 10;
  width: min(260px, 42vw);
  padding: 20px 34px 22px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  animation: logoEnter 900ms var(--ease-out) 620ms forwards;
}

.site-logo::before {
  content: "";
  position: absolute;
  inset: -28px -70px -42px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48) 45%, transparent 72%);
  filter: blur(2px);
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.55));
}

.stripes {
  display: flex;
  width: 100vw;
  height: 100vh;
  isolation: isolate;
}

.stripe {
  position: relative;
  display: flex;
  flex: 1 1 33.333%;
  align-items: flex-end;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08) contrast(1.03);
  opacity: 1;
  clip-path: inset(0 0 100% 0);
  animation: revealStripe 1.15s var(--ease-out) forwards;
  transition:
    flex-grow 820ms var(--ease-smooth),
    opacity 620ms var(--ease-smooth),
    filter 620ms var(--ease-smooth);
}

.stripe:nth-child(2) {
  animation-delay: 140ms;
}

.stripe:nth-child(3) {
  animation-delay: 280ms;
}

.stripe:nth-child(4) {
  animation-delay: 420ms;
}

.stripe::before,
.stripe::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition:
    opacity 720ms var(--ease-smooth),
    transform 900ms var(--ease-smooth);
}

.stripe::before {
  background: inherit;
  background-position: inherit;
  background-size: cover;
  transform: scale(1.04);
  z-index: -2;
}

.stripe::after {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 48%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.22), transparent 35%, rgba(0, 0, 0, 0.22));
  mix-blend-mode: soft-light;
  opacity: 0.9;
  z-index: -1;
}

.stripe--germany {
  background-image: url("assets/germany.webp");
}

.stripe--italy {
  background-image: url("assets/italy.webp");
}

.stripe--turkey {
  background-image: url("assets/turkey.webp");
}

.stripe--morocco {
  background-image: url("assets/marocco.webp");
}

.stripes:hover .stripe {
  opacity: 0.42;
  filter: saturate(0.62) contrast(0.92) brightness(0.75);
}

.stripes .stripe:hover,
.stripes .stripe:focus-visible {
  flex-grow: 1.55;
  opacity: 1;
  filter: saturate(1.18) contrast(1.08) brightness(1.03);
}

.stripe:hover::before,
.stripe:focus-visible::before {
  transform: scale(1.14);
}

.stripe:hover::after,
.stripe:focus-visible::after {
  opacity: 0.7;
  transform: translateY(0) scale(1.04);
}

.stripe__content {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: min(86%, 420px);
  margin: 0 auto 5vh;
  opacity: 0;
  transform: translateY(34px);
  animation: riseContent 900ms var(--ease-out) forwards;
  animation-delay: calc(720ms + var(--delay, 0ms));
  z-index: 2;
}

.stripe:nth-child(2) .stripe__content {
  --delay: 120ms;
}

.stripe:nth-child(3) .stripe__content {
  --delay: 240ms;
}

.stripe:nth-child(4) .stripe__content {
  --delay: 360ms;
}

.stripe__country {
    font-size: clamp(2.4rem, 4vw, 6.8rem);
    font-weight: 700;
    line-height: 0.9;
    min-width: 0;
    text-shadow: 0 22px 50px rgba(0, 0, 0, 0.68);
    letter-spacing: -3px;
}

.stripe__arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(56px, 5vw, 82px);
  height: clamp(56px, 5vw, 82px);
  background: transparent;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  transition:
    transform 520ms var(--ease-smooth),
    opacity 520ms var(--ease-smooth);
}

.stripe__arrow svg {
  width: 100%;
  height: 100%;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.stripe:hover .stripe__arrow,
.stripe:focus-visible .stripe__arrow {
  transform: translate(10px, -10px) scale(1.08);
  opacity: 1;
}

.stripe:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: -8px;
}

@keyframes revealStripe {
  from {
    clip-path: inset(0 0 100% 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes riseContent {
  from {
    opacity: 0;
    transform: translateY(34px);
  }

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

@keyframes logoEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -18px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 760px) {

  .nascondiPortrait{
    display: none !important;
  }
  
  body {
    overflow: auto;
  }

  .stripes {
    flex-direction: column;
    min-height: 100vh;
    height: auto;
  }

  .stripe {
    min-height: 33.333vh;
  }

  .stripes .stripe:hover,
  .stripes .stripe:focus-visible {
    flex-grow: 1.25;
  }

  .stripe__content {
    width: min(90%, 520px);
    margin-bottom: 5vh;
    gap: 8px;
  }

  .site-logo {
    width: min(210px, 56vw);
    padding: 16px 26px 18px;
  }
}

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