/* Jeferson Souza — página inicial
   Edite as imagens nas propriedades background-image abaixo.
*/

:root {
  --ink: #171717;
  --muted: #929292;
  --panel-gap: clamp(14px, 1.45vw, 23px);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(25px, 3.2vw, 48px) 24px 28px;
}

.header {
  width: 100%;
  text-align: center;
  margin-bottom: clamp(38px, 4.1vw, 62px);
}

.signature {
  margin: 0;
  font-family: "Allura", cursive;
  font-size: clamp(58px, 7vw, 94px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -1.5px;
}

.gallery {
  width: min(100%, 1400px);
  height: clamp(340px, 34vw, 460px);
  display: flex;
  align-items: stretch;
  gap: var(--panel-gap);
}

.panel {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-decoration: none;
  background-color: #d7d7d7;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
  transition: flex 450ms ease, filter 350ms ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.02) 35%,
    rgba(0, 0, 0, 0.55) 100%
  );
  opacity: 0;
  transition: opacity 350ms ease;
}

.panel--agro {
  background-image: url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1100&q=85");
  background-position: center;
}

.panel--imoveis {
  background-image: url("https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1100&q=85");
  background-position: center;
}

.panel--tech {
  background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1100&q=85");
  background-position: center;
}

.panel__label {
  position: absolute;
  left: 50%;
  bottom: 27px;
  width: max-content;
  max-width: 80%;
  transform: translate(-50%, 8px);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transition: opacity 300ms ease, transform 300ms ease;
}

.instruction {
  margin: 25px 0 0;
  color: #888;
  font-family: "Montserrat", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-align: center;
}

.footer {
  margin-top: auto;
  padding-top: 54px;
  color: #999;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  letter-spacing: 0.13em;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .gallery:hover .panel {
    filter: saturate(0.82);
  }

  .gallery .panel:hover {
    flex: 1.16 1 0;
    filter: saturate(1.08);
  }

  .panel:hover::before,
  .panel:focus-visible::before {
    opacity: 1;
  }

  .panel:hover .panel__label,
  .panel:focus-visible .panel__label {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.panel:focus-visible {
  outline: 3px solid #222;
  outline-offset: 5px;
}

@media (max-width: 900px) {
  .home {
    padding-top: 32px;
  }

  .gallery {
    width: min(100%, 1100px);
    height: clamp(320px, 38vw, 400px);
  }
}

@media (max-width: 650px) {
  .home {
    min-height: 100svh;
    padding: 24px 20px 22px;
  }

  .header {
    margin-bottom: 25px;
  }

  .signature {
    font-size: clamp(58px, 14vw, 76px);
  }

  .gallery {
    width: 100%;
    height: auto;
    flex-direction: column;
    gap: 13px;
  }

  .panel {
    flex: none;
    width: 100%;
    height: clamp(145px, 42vw, 205px);
    clip-path: polygon(0 0, 96% 0, 100% 100%, 4% 100%);
    background-position: center 52%;
  }

  .panel::before {
    opacity: 1;
    background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.38),
      rgba(0, 0, 0, 0.04) 75%
    );
  }

  .panel__label {
    left: 25px;
    bottom: 22px;
    max-width: calc(100% - 50px);
    transform: none;
    opacity: 1;
    font-size: 12px;
    letter-spacing: 0.13em;
  }

  .instruction {
    margin-top: 20px;
    font-size: 8px;
  }

  .footer {
    padding-top: 35px;
  }
}

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