/* VARIABLES */
:root {
  --color-burgundy: #b62336;
  --color-beige: #f5f6f1;
  --color-black: #0b0202;

  --z-decor: -1;
  --z-base: 0;
  --z-content: 10;
  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;

  --services-title-size: clamp(50px, 7vw, 143px);
  --logo-size: clamp(200px, 40vw, 450px);
}

/* FONTS */

@font-face {
  font-family: "Des Montilles";
  src: url("/fonts/DesMontilles-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.archivo {
  font-family: "Archivo", sans-serif;
}

.archivo-narrow {
  font-family: "Archivo Narrow", sans-serif;
}

.des-montilles {
  font-family: "Des Montilles", serif;
}

/* BASE */

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

html {
  scroll-padding-top: 100px;
}

main {
  scroll-snap-type: y proximity;
}

section {
  overflow-x: hidden;
  min-height: 100dvh;
  scroll-snap-align: start;
  margin-top: -1px;
}

footer {
  scroll-snap-align: none;
}

#projects {
  scroll-snap-align: none;
  overscroll-behavior-x: contain;
}

.showcase-carousel::-webkit-scrollbar {
  display: none;
}

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

/* LAYOUT */

.welcome {
  background: url("/images/main.gif") center/cover no-repeat;
}

.hero {
  position: relative;
  min-height: calc(100dvh - 90px);
}

.navbar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  background: transparent;
}

.newsletter-overlay {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.45);

  opacity: 0;
  visibility: hidden;
  transition: 0.3s;

  z-index: var(--z-modal);
}

.projects {
  height: 100vh;
}

.services {
  position: relative;
}

/* COMPONENTS */

.navbar .nav-item {
  text-decoration: none;
}

.navbutton {
  font-weight: 900;
  color: var(--color-beige);
  font-size: 26px;
  line-height: 60px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.navbar.dark .navbutton {
  color: var(--color-black);
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-toggler {
  filter: invert(1);
}

.hero-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: top 0.35s ease;
}

.hero-center-logo img {
  width: var(--logo-size);
  max-height: 600px;
  transition: width 0.35s ease;
}

.hero-half {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  scroll-snap-align: center;
}

.hero-half-label {
  font-weight: 800;
  font-size: 80px;
  letter-spacing: 0.03em;
}

.eat-word {
  position: relative;
  display: inline-block;
  z-index: var(--z-base);
}

.eat-word img {
  position: absolute;
  inset: 60% auto auto 75%;
  transform: translate(-50%, -50%);
  z-index: var(--z-decor);
  width: 140%;
  pointer-events: none;
}

.services-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-base);
}

.services-decor img {
  position: absolute;
}

.shape-1 {
  top: 25%;
  left: 85%;
  width: clamp(120px, 8vw, 210px);
}

.shape-2 {
  top: 55%;
  left: 0%;
  width: clamp(140px, 10vw, 250px);
}

.shapes {
  position: relative;
  display: inline-block;
  z-index: var(--z-base);
}

.shapes img {
  position: absolute;
  transform: translate(20%, -40%);
  z-index: var(--z-decor);
  width: clamp(120px, 20vw, 210px);
}

.triangle {
  position: relative;
  display: inline-block;
  z-index: var(--z-base);
}

.triangle img {
  position: absolute;
  z-index: var(--z-decor);
  transform: translate(-130%, -85%);
  width: clamp(140px, 22vw, 250px);
}

.about-label {
  font-size: clamp(20px, 3vw, 23px);
  font-weight: 700;
  line-height: 30px;
}

.about-title {
  font-size: clamp(29px, 5vw , 38px);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.about-picture-left {
  min-height: 200px;
  height: 50%;
  background: url("/images/about_picture_left.png") center / cover no-repeat;
}

.about-picture-right {
  min-height: 600px;
  height: 100%;
  background: url("/images/about_picture_right.png") 25% center / cover no-repeat;
}

.about-gif-right {
  margin-top: auto;
  height: 100%;
  width: 100%;
}

.gif-wrap {
  margin-top: auto;
  position: relative;
}

.gif-caption {
  position: absolute;
  top: 100%;
  width: 200px;
  left: 50%;
  transform: translate(-40%, 10%) rotate(-5deg);
}

.gif-caption-text {
  font-size: 40px;
}

.about-button {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 38px;
  text-decoration: none;
  color: var(--color-black);
}

.newsletter-modal {
  position: relative;

  width: min(700px, 90vw);
  aspect-ratio: 700 / 550;

  transform: rotate(-6deg);

  background: url("/images/noise.png") center / 100% 100% no-repeat;
  padding: clamp(1.5rem, 4vw, 5rem);

  text-align: center;
  border-radius: 5px;
}

.newsletter-modal > * {
  transform: rotate(6deg);
}

.newsletter-card {
  background: transparent;
}

.modal-close {
  position: absolute;
  top: 40px;
  right: 40px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  z-index: var(--z-modal);
}

.modal-close img {
  width: clamp(40px, 8vw, 60px);
}

.modal-title {
  font-size: clamp(20px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-text {
  font-size: clamp(16px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-form-input {
  font-size: clamp(14px, 2.5vw, 25px);
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 40%;
}

.modal-form-button {
  font-size: clamp(20px, 4vw, 40px);
  color: var(--color-beige);
  background: var(--color-burgundy);
  border: none;
}

.services-title {
  font-weight: 800;
  font-size: var(--services-title-size);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.service-label {
  font-size: clamp(25px, calc(var(--services-title-size)*0.20), 30px);
  font-weight: 700;
  line-height: 1.2;
}

.projects-title {
  font-weight: 700;
  font-size: 27px;
  letter-spacing: 0.03em;
}

footer a {
  color: var(--color-beige);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.footer-logo {
  width: var(--logo-size);
  max-height: 600px;
}

.ciao-image {
  position: absolute;
  top: calc(70% + 60px);
  max-width: 450px;
}

.mouse-image {
  width: 15vw;
  max-width: 20vh;
}

.showcase-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

.showcase-track {
  display: flex;
  width: max-content;
}

.showcase-item {
  flex: 0 0 auto;
  width: 250px;
  margin-right: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  aspect-ratio: 9 / 4.5;
  max-height: 70vh;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-radius 0.4s ease;
}

.grain-effect {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.35) 25%,
      rgba(0, 0, 0, 0.1) 50%,
      rgba(0, 0, 0, 0) 75%
    ),
    url("/images/noise.svg");

  opacity: 0;
  transition: opacity 0.3s ease;

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: transform 0.4s ease;
}

.gallery-item-title {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;

  padding: 16px;
  overflow-wrap: anywhere;

  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(16px, 2vh, 24px);
  letter-spacing: 0.03em;
  color: var(--color-beige);

  z-index: var(--z-content);

  opacity: 0;
  transition: opacity 0.3s ease;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.i1 {
  grid-column: 1;
  grid-row: 1;
}

.i2 {
  grid-column: 2 / span 2;
  grid-row: 1 / span 2;
}

.i3 {
  grid-column: 4;
  grid-row: 2;
}

.i4 {
  grid-column: 5 / span 2;
  grid-row: 2 / span 2;
}

.i5 {
  grid-column: 7;
  grid-row: 2;
}

.i6 {
  grid-column: 8 / span 2;
  grid-row: 1 / span 2;
}

/* UTILITIES */

.black {
  color: var(--color-black);
}

.burgundy {
  color: var(--color-burgundy);
}

.beige {
  color: var(--color-beige);
}

.background-beige {
  background: var(--color-beige);
}

.background-burgundy {
  background: var(--color-burgundy);
}

.background-linear-gradient {
  position: relative;
  background-image: linear-gradient(
    to bottom,
    rgba(245, 246, 241, 1) 0%,
    rgba(245, 246, 241, 1) 30%,
    rgba(182, 35, 54, 1) 100%
  );
  overflow: hidden;
}

.background-linear-gradient::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("/images/noise.svg");
  background-size: 180px;

  opacity: 0.3;
  pointer-events: none;

  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 90%,
    transparent 100%
  );

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 90%,
    transparent 100%
  );
}

.background-linear-gradient > * {
  position: relative;
  z-index: 1;
}

/* ANIMATIONS */

.newsletter-overlay.show {
  opacity: 1;
  visibility: visible;
}

.gallery-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.gallery-item:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-radius: 12px;
}

.gallery-item:hover .gallery-item-title {
  opacity: 1;
}

.gallery-item:hover .grain-effect {
  opacity: 0.5;
}

.showcase-carousel {
  cursor: grab;
}

.showcase-carousel.dragging {
  cursor: grabbing;
  user-select: none;
}

/* MEDIA QUERIES */

/* DESKTOP */
@media (min-width: 991.98px) {
  .nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
  }
}

/* TABLET */
@media (max-width: 1200px) {
  .about-gif-right {
    max-width: 600px;
  }
}

/* MOBIL */
@media (max-width: 991.98px) {
  .nav-center {
    position: static;
    transform: none;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding-bottom: 3rem;
  }

  .hero-half-label {
    font-size: 48px;
  }

  .eat-word img {
    inset: 60% auto auto 50%;
  }

  .navbar-overlay:has(.navbar-collapse:is(.show, .collapsing)) {
    background: rgba(0, 0, 0, 1);
  }

  .navbar-overlay:has(.navbar-collapse:is(.show, .collapsing))
    + .hero
    .hero-center-logo {
    top: 80%;
  }

  .navbar-overlay:has(.navbar-collapse:is(.show, .collapsing))
    + .hero
    .hero-center-logo
    img {
    width: 28vw;
    max-width: 320px;
  }

  .hero-center-logo {
    transition: top 0.35s ease;
  }

  .navbar-overlay .navbar-collapse {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.8) 90%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .mouse-image {
    left: 10%;
  }
}

/* KEYFRAMES */

@keyframes scrollShowcase {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}