/*
Theme Name: Konzept
Theme URI: https://www.regigi.com/
Author: Alcoweb
Description: Tema compatibile per la galleria fotografica CorpunicArte.
Version: 3.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: regigi
*/

@font-face {
  font-family: "Raleway Local";
  src: url("assets/fonts/raleway-light-webfont.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Raleway Local";
  src: url("assets/fonts/raleway-extrabold-webfont.woff") format("woff");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --regigi-accent: #a51f36;
  --regigi-black: #111;
  --regigi-muted: #727272;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--regigi-black);
  background: #fff;
  font-family: "Raleway Local", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
}

body.regigi-gallery-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--regigi-accent);
  outline-offset: 4px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: #fff;
  background: var(--regigi-accent);
}

.site-header {
  position: relative;
  z-index: 20;
  padding: 10px 24px 28px;
  background: #fff;
}

.site-header__inner {
  display: flex;
  width: min(1170px, 100%);
  min-height: 82px;
  margin: 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.site-brand {
  display: inline-flex;
  width: 272px;
  height: 50px;
  margin-top: 10px;
  align-items: center;
}

.site-brand img {
  display: block;
  width: 272px;
  height: auto;
}

.site-menu-toggle {
  display: none;
  padding: 10px;
  border: 0;
  color: var(--regigi-black);
  background: transparent;
  cursor: pointer;
}

.site-menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.site-nav ul {
  display: flex;
  margin: 0;
  padding: 26px 0 0;
  gap: 34px;
  list-style: none;
}

.site-nav a {
  color: #000;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--regigi-accent);
}

.portfolio-grid {
  display: grid;
  width: min(1600px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portfolio-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: #e5e5e5;
}

.portfolio-card__link {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.portfolio-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  padding: 30px;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: var(--card-hover, var(--regigi-accent));
  background: color-mix(in srgb, var(--card-hover, var(--regigi-accent)) 88%, transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}

.portfolio-card__title {
  max-width: 100%;
  margin: 0;
  font-size: clamp(24px, 2.1vw, 36px);
  font-weight: 800;
  line-height: .9;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  text-shadow: 1px 1px rgba(0, 0, 0, .18);
}

.portfolio-card__role {
  display: block;
  margin-top: 6px;
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 800;
  line-height: 1;
  text-transform: lowercase;
}

.portfolio-card__plus {
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
}

.portfolio-card:hover .portfolio-card__image,
.portfolio-card:focus-within .portfolio-card__image {
  transform: scale(1.035);
}

.portfolio-card:hover .portfolio-card__overlay,
.portfolio-card:focus-within .portfolio-card__overlay {
  opacity: 1;
}

.portfolio-empty {
  width: min(900px, calc(100% - 48px));
  margin: 12vh auto;
  text-align: center;
}

.portfolio-empty h1 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 800;
  text-transform: uppercase;
}

.site-footer {
  padding: 14px 24px;
  color: #fff;
  background: rgba(25, 23, 24, .96);
}

.site-footer__inner {
  display: flex;
  width: min(1170px, 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
}

.site-footer a:hover {
  color: #fff;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  color: #fff;
  background: #0b0b0b;
  touch-action: pan-y;
}

.admin-bar .gallery-viewer {
  top: 32px;
}

.gallery-viewer__topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  display: flex;
  min-height: 82px;
  padding: 22px 30px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent);
}

.gallery-viewer__title {
  margin: 0;
  font-size: clamp(24px, 4vw, 56px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.gallery-viewer__role {
  margin-top: 4px;
  color: rgba(255, 255, 255, .76);
  font-size: 18px;
  text-transform: lowercase;
}

.gallery-viewer__close,
.gallery-viewer__arrow {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.gallery-viewer__close {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  opacity: .72;
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-viewer__close:hover {
  opacity: 1;
  transform: rotate(5deg);
}

.gallery-viewer__slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gallery-viewer__slide {
  position: absolute;
  inset: 0;
  display: grid;
  padding: 78px 84px 58px;
  place-items: center;
  opacity: 0;
  transform: translateX(3%);
  visibility: hidden;
  transition: opacity 350ms ease, transform 450ms cubic-bezier(.2, .7, .2, 1), visibility 0s linear 450ms;
}

.gallery-viewer__slide.is-active {
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.gallery-viewer__slide img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

.gallery-viewer__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 60px;
  height: 80px;
  margin-top: -40px;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  opacity: .6;
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-viewer__arrow:hover {
  opacity: 1;
}

.gallery-viewer__arrow--previous {
  left: 8px;
}

.gallery-viewer__arrow--previous:hover {
  transform: translateX(-4px);
}

.gallery-viewer__arrow--next {
  right: 8px;
}

.gallery-viewer__arrow--next:hover {
  transform: translateX(4px);
}

.gallery-viewer__counter {
  position: absolute;
  right: 30px;
  bottom: 22px;
  z-index: 5;
  color: rgba(255, 255, 255, .75);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .site-header {
    padding: 8px 16px 18px;
  }

  .site-header__inner {
    min-height: 60px;
    align-items: flex-start;
    gap: 10px;
  }

  .site-brand {
    width: min(272px, calc(100vw - 92px));
    height: auto;
    min-height: 50px;
  }

  .site-brand img {
    max-width: 100%;
  }

  .site-menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    right: 16px;
    z-index: 30;
    width: min(260px, calc(100vw - 32px));
    padding: 0;
    background: rgba(17, 17, 17, .96);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .site-nav ul {
    display: block;
    padding: 8px 0;
  }

  .site-nav a {
    display: block;
    padding: 12px 18px;
    color: #fff;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-card__overlay {
    padding: 20px;
  }

  .gallery-viewer__topbar {
    padding: 15px 18px;
  }

  .gallery-viewer__slide {
    padding: 72px 42px 46px;
  }

  .gallery-viewer__arrow {
    width: 42px;
    font-size: 42px;
  }

  .gallery-viewer__arrow--previous {
    left: 0;
  }

  .gallery-viewer__arrow--next {
    right: 0;
  }
}

@media (max-width: 520px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card__title {
    font-size: 30px;
  }

  .portfolio-card__role {
    font-size: 22px;
  }

  .gallery-viewer__topbar {
    align-items: flex-start;
  }

  .gallery-viewer__role {
    font-size: 15px;
  }

  .gallery-viewer__close {
    width: 42px;
    height: 42px;
  }

  .gallery-viewer__slide {
    padding: 78px 20px 48px;
  }

  .gallery-viewer__arrow {
    top: auto;
    bottom: 3px;
    height: 44px;
    margin-top: 0;
  }
}

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