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

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

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

  --image-mask: url(/images/mask.png);
}

/* 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;
}

.semibold {
  font-weight: 600;
}

.bold {
  font-weight: 800;
}

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

/* BASE */

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

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

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

section {
  overflow-x: hidden;

  min-height: 100svh;
  margin-top: -1px;
}

section.contacts {
  min-height: auto;
}


#projects {
  overscroll-behavior-x: contain;
}

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

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

/* LAYOUT */

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video.mobile {
  display: none;
}

.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);
}

section.projects {
  min-height: 100dvh;
}

.services {
  position: relative;
  scroll-padding-top: 20px;
}

/* COMPONENTS */

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

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

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

  transition: color 0.2s ease;
}

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

.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;
}

.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);
  max-width: none;
  width: 140%;
  pointer-events: none;
}

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

.shape-1 {
  position: absolute;
  top: 20%;
  left: 110%;
  width: clamp(60px, 8vw, 210px);
}

.shape-2 {
  position: absolute;
  top: -20%;
  left: -70%;
  width: clamp(70px, 10vw, 250px);
}

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

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

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

.about-picture-left {
  min-height: 200px;
  height: 50%;
}

.about-picture-right {
  min-height: 600px;
  height: 100%;
}

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

.gif-wrap {
  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);

  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;
}

.project-description {
  white-space: pre-line;
}

.contact-privicy-title {
  font-size: clamp(28px, 5vw, 48px);
}

.privacy-container {
  max-width: 800px;
  padding-bottom: 200px;
}

.privacy-container p {
  padding: 0px;
}

.project-title {
  font-size: clamp(24px, 3vw, 43px);
  text-transform: uppercase;
}

.project p,
.project strong {
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 700;
}

.project-main-data {
  min-height: calc(100svh + 2px);
  padding-top: 120px;
}

.project-main-picture {
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  background-size: cover;      
  background-position: center;
  background-repeat: no-repeat;
}

.project-type-list {
  list-style: none; 
  padding: 0px;
  text-align: end;
}

.project-type-list li {
  font-size: clamp(12px, 2.5vw, 20px);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);

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

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox img {
  width: 70vw;
  height: 70vh;
  object-fit: contain;

  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox.active img {
  transform: scale(1);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.project-gallery-item {
  position: relative;
}

.gallery-index {
  position: absolute;
  bottom: 12px;
  right: 12px;

  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 800;
  letter-spacing: 0.05em;

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

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  display: block;
}

.project-gallery-item.square {
  grid-column: span 1;
  height: clamp(200px, 25vw, 350px);
}

.project-gallery-item.wide {
  grid-column: span 2;
  height: clamp(200px, 25vw, 350px);
}

.project-gallery-item.square-blank {
  grid-column: span 1;
  background-color: transparent;
}

.project-gallery-item.wide-blank {
  grid-column: span 2;
  background-color: transparent;
}

.project-gallery-item:not(.square-blank):not(.wide-blank) {
  cursor: pointer;
}

.project-navigation {
  min-height: 180px;
}

.project-nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;

  text-decoration: none;
  color: var(--color-black);

  transition: opacity 0.25s ease,
              transform 0.25s ease;
}

.project-nav-link:hover {
  opacity: 0.7;
  transform: translateY(-2px);
}

.project-nav-link small {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-nav-link strong {
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-arrow {
  font-size: 2rem;
  line-height: 1;
}

.next-project {
  margin-left: auto;
  text-align: right;
}

.footnote {
  width: 200px;
}

.footnote p {
  font-size: 15px;
}

.footer-logo-wrapper {
  position: relative;
  isolation: isolate;
  display: inline-block;
  background: var(--color-burgundy);
}


.logo-hover {
  position: absolute;
  inset: 0;

  opacity: 0;
  z-index: var(--z-cover);

  transform: scale(1.1);
  transform-origin: center;

  transition: opacity 0.2s ease;
  transition-delay: 0s;
}

.logo-default {
  opacity: 1;
  z-index: var(--z-cover-hover);

  transition: opacity 0.2s ease;
  transition-delay: 0s;
}

.footer-logo-wrapper:hover .logo-default {
  opacity: 0;
  transition-delay: 0.05s;
}

.footer-logo-wrapper:hover .logo-hover {
  opacity: 1;
}

.footer-logo-wrapper:not(:hover) .logo-hover {
  opacity: 0;
  transition-delay: 0.05s;
}

.footer-logo-wrapper:not(:hover) .logo-default {
  opacity: 1;
  transition-delay: 0s;
}

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

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

  transition: color 0.2s ease;
}

footer li:hover .footer-menu-item {
  color: var(--color-black);
}

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

.mouse-image {
  width: clamp(90px, 15vw, 180px);
}

.mouse-black-image {
  inset: -120% auto auto -10%;
}

.showcase-carousel {
  height: 80vh;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
}

.showcase-track {
  display: flex;
  gap: 24px;
  height: 100%;
}

.gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;

  height: 100%;
  flex: 0 0 auto;
}

.gallery-item {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  aspect-ratio: 2 / 3;
  overflow: hidden;

  background: transparent;

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

  font-size: 24px;
}

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

  width: 100%;
  height: 100%;
  object-fit: cover;

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

  transition: 
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.75) blur(1px);
}

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

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

  padding: 20px;
  overflow-wrap: anywhere;

  opacity: 0;

  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 0.03em;
  color: var(--color-beige);

  transform: translateY(20px);
  transition: 
    opacity 0.4s ease,
    transform 0.4s ease;

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

.gallery-item:hover .gallery-item-title {
  opacity: 1; 
  transform: translateY(0);
}

/* ===== PATTERN ===== */

.gallery-item.size-a { height: 60%; align-self: flex-start; }
.gallery-item.size-b { height: 90%; align-self: center; }
.gallery-item.size-c { height: 60%; align-self: flex-end; }
.gallery-item.size-d { height: 75%; align-self: flex-start; }
.gallery-item.size-e { height: 60%; align-self: center; }
.gallery-item.size-f { height: 75%; align-self: center; }
.gallery-item.size-g { height: 75%; align-self: flex-end; }

/* 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-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;
}

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

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

  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-light > * {
  position: relative;
  z-index: 1;
}

/* ANIMATIONS */

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

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

.scroll-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;

  z-index: 1000;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease, transform 0.3s ease;
}

.scroll-indicator {
  width: 28px;
  height: 56px;

  background: var(--color-burgundy);
  opacity: 0.8;
  backdrop-filter: blur(6px);

  border-radius: 20px;

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

  overflow: hidden; /* fontos */
}

.scroll-indicator:hover {
  transform: scale(1.1);
}

.arrow {
  width: 10px;
  height: 10px;

  border-right: 2px solid white;
  border-bottom: 2px solid white;

  transform: rotate(45deg);

  animation: arrowSlide 1.5s infinite;
}

/* MEDIA QUERIES */

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

  .project-gallery-item {
    transition: transform 0.3s ease;
  }


  .project-gallery-item:hover {
    transform: scale(1.05);
  }

  .project-type-list li {
    position: relative;
  }

  .project-type-list li::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0px;
    width: 0%;
    height: 1px;
    background: currentColor;

    transition: width 0.4s ease;
  }

  .project-type-list li:hover::after {
    width: 100%;
  }
}

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

  .project-gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* 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 70%;
    width: 160%;
  }

  .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: 5%;
  }

  .mouse-black-image {
    inset: -120% auto auto -10%;
  }

  .hero-video.desktop {
    display: none;
  }

  .hero-video.mobile {
    display: block;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-gallery-item.square,
  .project-gallery-item.wide {
    height: auto;
  }

  .project-gallery-item.square-blank,
  .project-gallery-item.wide-blank {
    display: none;
  }

  .project-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
  }

}

/* MEDIUM MOBIL */
@media (max-width: 700px) {
  .project-gallery {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .project-gallery-item {
    grid-column: span 1 !important;
    height: auto !important;
  }

  .project-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .project-gallery-item.square-blank,
  .project-gallery-item.wide-blank {
    display: none;
  }

  .project-nav-link strong,
  .nav-arrow {
    display: none;
  }

  .project-nav-link small {
    max-width: 80px;
    white-space: normal;
  }
}

/* SMALL MOBIL */
@media (max-width: 500px) {
  .project-gallery {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .project-gallery-item {
    grid-column: span 1 !important;
    height: auto !important;
  }

  .project-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .project-gallery-item.square-blank,
  .project-gallery-item.wide-blank {
    display: none;
  }
}

/* KEYFRAMES */

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

@keyframes arrowSlide {
  0% {
    transform: translateY(-10px) rotate(45deg);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  50% {
    transform: translateY(0px) rotate(45deg);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(10px) rotate(45deg);
    opacity: 0;
  }
}