@font-face {
  font-family: "Avian";
  src:
    local("Avian"),
    url("../fonts/avian/avian.woff2") format("woff2"),
    url("../fonts/avian/avian.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  background-color: #e9eae3;
}

:root {
  --_font-default: "Avian", "Urbanist", sans-serif;
  --_font-accent: "Avian", "Urbanist", sans-serif;
  --hero-dodecahedron-1-opacity: 0.5;
  --hero-dodecahedron-2-opacity: 0.5;
  --footer-dodecahedron-1-opacity: 0.5;
  --footer-dodecahedron-2-opacity: 0.5;
}

.nowrap {
  white-space: nowrap;
}

.intro-bg-01__01 img {
  opacity: var(--hero-dodecahedron-1-opacity);
}

.intro-bg-01__02 img {
  opacity: var(--hero-dodecahedron-2-opacity);
}

.bottom-bg-01__01 img {
  opacity: var(--footer-dodecahedron-1-opacity);
}

.bottom-bg-01__02 img {
  opacity: var(--footer-dodecahedron-2-opacity);
}

/* --- Dodecahedron slow rotation --- */
@keyframes dodeca-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes dodeca-rotate-reverse {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

.intro-bg-01__01 img,
.bottom-bg-01__01 img {
  animation: dodeca-rotate 120s linear infinite;
}

.intro-bg-01__02 img,
.bottom-bg-01__02 img {
  animation: dodeca-rotate-reverse 90s linear infinite;
}

/* --- Hero background tuning --- */
@media only screen and (max-width: 767px) {
  .intro-bg-01__02 {
    left: -24px;
    right: auto;
    bottom: -10rem;
  }
}

@media only screen and (min-width: 1200px) {
  .intro-bg-01__02 {
    left: -120px;
    right: auto;
    bottom: 3.5rem;
    width: 340px;
    height: 340px;
  }

  .headline.headline-95-desktop {
    padding-bottom: 11rem;
  }
}

@media only screen and (min-width: 1400px) {
  .intro-bg-01__02 {
    left: -120px;
    bottom: 4.5rem;
    width: 390px;
    height: 390px;
  }

  .headline.headline-95-desktop {
    padding-bottom: 12rem;
  }
}

@media only screen and (min-width: 1600px) {
  .intro-bg-01__02 {
    left: -175px;
    bottom: 3rem;
    width: 500px;
    height: 500px;
  }

  .headline.headline-95-desktop {
    padding-bottom: 13rem;
  }
}

.portfolio-links-offset {
  margin-top: 2.5rem;
}

.portfolio-stack__inner.portfolio-item-1,
.portfolio-stack__inner.portfolio-item-2,
.portfolio-stack__inner.portfolio-item-3,
.portfolio-stack__inner.portfolio-item-4,
.portfolio-stack__inner.portfolio-item-5 {
  box-shadow: inset 0 0 0 2px rgba(28, 20, 18, 0.78);
}

@media only screen and (min-width: 768px) {
  .portfolio-links-offset {
    margin-top: 3.5rem;
  }
}

@media only screen and (min-width: 1200px) {
  .portfolio-links-offset {
    margin-top: 4.5rem;
  }

  .stack-wrapper,
  .portfolio-stack {
    background-color: var(--base);
  }
}

/* --- Nav custom SVG icons (icons only, captions always hidden) --- */
.menu__caption {
  display: none !important;
}

.menu__link .menu__icon {
  width: 4rem;
  height: 4rem;
  display: block;
  transform-origin: center;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  filter: brightness(0) saturate(100%) invert(8%) sepia(26%) saturate(612%)
    hue-rotate(324deg) brightness(95%) contrast(93%);
}

.menu__link.active {
  background-color: rgba(28, 20, 18, 0.5);
}

#to-top {
  display: none !important;
}

@media only screen and (min-width: 1200px) {
  .menu__link {
    position: relative;
    width: 5.8rem;
    height: 5.8rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu__link.active {
    background-color: transparent;
  }

  .menu__link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.4rem;
    width: 3.5rem;
    height: 0.2rem;
    transform: translateX(-50%);
    background-color: #1c1412;
    border-radius: 999px;
  }
}

@media only screen and (max-width: 767px) {
  .menu__list {
    gap: 1.2rem;
  }

  .menu__link {
    width: 4.8rem;
    height: 4.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .menu__link .menu__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .menu__item--home {
    display: inline-flex;
  }
}

/* --- Bottom nav (show on scroll) --- */
#header {
  top: auto;
  bottom: 2rem;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media only screen and (min-width: 768px) {
  #header {
    bottom: 3rem;
  }
}

@media only screen and (min-width: 1200px) {
  #header {
    top: auto;
    left: 50%;
    bottom: 3rem;
  }
}

.nav-swoop-visible {
  pointer-events: auto;
}

#header.nav-swoop-visible {
  pointer-events: auto;
  cursor: pointer;
}

/* --- Restore template top spacing on mobile/tablet --- */
.main {
  padding-top: 6rem;
}

@media only screen and (min-width: 768px) {
  .main {
    padding-top: 7rem;
  }
}

@media only screen and (min-width: 1200px) {
  .main {
    padding-top: 0;
  }
}

/* --- Hero scroll indicator --- */
.hero-scroll-indicator {
  padding: 2rem 5%;
}

@media only screen and (min-width: 1200px) {
  .hero-scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 5%;
    padding: 0;
    z-index: 2;
  }
}

/* --- Contact section --- */
.contact-data__item {
  text-align: center;
}

.mfp-service-image.mfp-zoom-out-cur,
.mfp-service-image.mfp-zoom-out-cur .mfp-content,
.mfp-service-image.mfp-zoom-out-cur .mfp-image-holder .mfp-close {
  cursor: auto !important;
}

.mfp-service-image .mfp-close {
  font-size: 0 !important;
  color: transparent !important;
  line-height: 0 !important;
  cursor: pointer !important;
}

.mfp-service-image .mfp-close::before {
  font-size: 1.8rem !important;
  line-height: 1 !important;
  color: var(--t-per-bright-dark) !important;
}

/* --- Case study popup scrolling --- */
.mfp-fade .mfp-container {
  overflow-y: auto;
}

.mfp-fade.mfp-wrap .mfp-content {
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.popup {
  overflow: visible;
}

/* --- Cards text sizing --- */
.cards__text.type-basic-160lh {
  font-size: 2rem !important;
}

@media only screen and (min-width: 992px) {
  .tools-cards__item {
    width: 20%;
  }
}

/* --- Blockquote width override (prevent early line break, centered) --- */
@media only screen and (min-width: 1200px) {
  .col-xl-8:has(.content__block.large-text-block) {
    max-width: 1000% !important;
    flex: 0 0 100% !important;
    place-items: center !important;
  }
}

/* --- Footer marquee spacing --- */
.footer.footer-marquee {
  padding-top: 6rem;
}

@media only screen and (min-width: 768px) {
  .footer.footer-marquee {
    padding-top: 8rem;
  }
}

@media only screen and (min-width: 1200px) {
  .footer.footer-marquee {
    padding-top: 9rem;
  }
}

@media only screen and (min-width: 1400px) {
  .footer.footer-marquee {
    padding-top: 10rem;
  }
}

@media only screen and (min-width: 1600px) {
  .footer.footer-marquee {
    padding-top: 12rem;
  }
}

/* --- Case study popup frosted background (opened card only) --- */
.popup .project {
  background-color: rgba(233, 234, 227, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.6rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* --- Heading color helpers (template only includes h3.light/h3.dark) --- */
h4.dark,
h5.dark {
  color: var(--t-per-bright-dark);
}

h4.light,
h5.light {
  color: var(--t-per-bright-light);
}

/* --- Case study popup list readability --- */
.popup .project__descr ul,
.popup .project__data ul,
.popup .project__feedback ul {
  margin: 0 0 2rem 0;
  padding-left: 0rem;
  padding-top: 2rem;
}

.popup .project__descr li,
.popup .project__data li,
.popup .project__feedback li {
  font: normal var(--font-weight-base) 1.8rem/1.6 var(--_font-default);
  color: var(--t-bright);
  margin-bottom: 0.8rem;
}

@media only screen and (min-width: 1200px) {
  .popup .project__descr li,
  .popup .project__data li,
  .popup .project__feedback li {
    font-size: 2rem;
  }
}

@media only screen and (min-width: 1400px) {
  .popup .project__descr li,
  .popup .project__data li,
  .popup .project__feedback li {
    font-size: 2.2rem;
  }
}

@media only screen and (min-width: 1600px) {
  .popup .project__descr li,
  .popup .project__data li,
  .popup .project__feedback li {
    font-size: 1.8rem;
  }
}

/* --- Circle button text centering --- */
.btn-circle-text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
