/* Reset */

*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  /* line-height: 1; */
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
ul {
    list-style: none;
    padding: 0;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
#root, #__next {
  isolation: isolate;
}

/* INIT */

@font-face {
 font-family: 'GoogleSansFlex';
 font-style: normal;
 src: url(../fonts/GoogleSansFlex.ttf) format("truetype-variations");
 font-weight: 100 900;
}

@font-face {
 font-family: 'IBMPlexSerif';
 font-style: normal;
 src: url(../fonts/IBMPlexSerif-Regular.ttf) format("truetype-variations");
 font-weight: 400;
}

@font-face {
 font-family: 'IBMPlexSerif';
 font-style: italic;
 src: url(../fonts/IBMPlexSerif-Italic.ttf) format("truetype-variations");
 font-weight: 400;
}

body {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    position: relative;
    font-family: "IBMPlexSerif", serif;
    /* color: #383838; */
}

header {
    display:flex;
    align-items: center;
    flex-shrink: 0;
    height: 54px;
    padding: 8px;
    z-index: 10;
    background-color: #000;
    justify-content: space-between;
}

a.ksr-button, button.ksr-button {
    background: none;
    border: none;
    padding: 0;
    display:flex;
    height:40px;
    min-width: 40px;
    justify-content: center;
    align-items:center;
    border-radius: 4px;
    text-decoration: none;
}

.ksr-button.ksr-button-filled {
    background-color: #444;
    color: #fff;
}

.ksr-button > * {
    pointer-events:none;
}

.ksr-button.disabled {
    opacity: 0.4;
}

.ksr-button span {
    margin-left:4px;
}

.ksr-scroll {
    overflow:auto;
}

.ksr-scroll-lock {
    overflow:hidden;
}

.ksr-header {
    flex-shrink:0;
    display: flex;
}

h1 {
    margin-top:-8px;
}

h2 {
    margin-bottom: 36px;
    font-size: 24px;
    font-family: 'GoogleSansFlex';
    font-weight: 840;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

h3 {
    margin-bottom: 16px;
    font-weight: 900;
    font-family: 'GoogleSansFlex';
}

h4 {
    margin-bottom:8px;
}

a {
    /* text-decoration: none; */
    color: inherit;
    font-weight: 500;
    text-underline-offset: 2px;
}

p {
    margin-bottom:24px;
}

#logo {
    width: 184px;
    height:auto;
}

nav {
    position: absolute;
    background-color: #990724;
    right:0;
    top:0;
    /* bottom: 0; */
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: end;
    transform: translateX(100%);
    padding: 24px;
    opacity:0;
    pointer-events:none;
    color: #fff;
}

nav.active {
    transform: translateX(0%);
    pointer-events:all;
    opacity:1;
}

nav ul {
    text-align:right;
}

nav a {
    text-decoration:none;
}

#nav-button {
    z-index:10;
}

#scroll-container {
    display: flex;
    flex-direction: column;
    margin-top: -54px;
}

main {
    display: flex;
    flex-direction: column;
}

#home-section-container{
    display:flex;
    flex-direction: column;
}

.section-inner {
    display: flex;
    flex-direction: column;
    padding: 54px 24px;
    padding-bottom: 64px;
    align-items:start;
}

#home-section {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
     /* Crucial: Allows it to ignore inner content size */
    justify-content: center;
    background: #000000;
    background: linear-gradient(20deg,rgba(0, 0, 0, 1) 40%, #2c333a 100%);
    background: #2C333A;
    background: radial-gradient(circle, rgba(44, 51, 58, 1) 10%, rgba(0, 0, 0, 1) 100%);
    background-attachment:fixed;
    color:#fff;
    background-position: 50% 50%;
    background-size: 400% 400%;
    animation:bgAni 4s ease-in-out infinite alternate;
    
}

@keyframes bgAni {
    0% {
        background-position: 0% 75%;
    }
    100% {
        background-position: 100% 100%;
    }
}

#home-section .section-inner {
    padding:0 48px;
}

#home-section h2 {
    font-size:36px;
    margin-bottom:24px;
}

#home-section  p{
    font-size:20px;
}

section {

scroll-margin-top: 54px;
}

#service-section {
    background-color:#fff;
}

#service-section .section-inner {
    
}

#service-section #service-figures {
    display:flex;
    gap: 16px;
    /* margin-left: -16px; */
    /* margin-right: -16px; */
}

#service-info {
    margin-bottom: 24px;
}

#service-section #service-figures a {
    aspect-ratio: 2 / 3;
} 

#service-section #service-figures figure {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 16px;
    border-radius: 4px;
    background: #d9d9d9;
}

#projects-section {
    background: #000000;
    background: linear-gradient(20deg,rgba(0, 0, 0, 1) 40%, rgba(44, 51, 59, 1) 100%);
    background-attachment:fixed;
    color:#fff;
}

#project-list {
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    color: #fff;
}

#project-list li {width: calc(50% - 8px);}

#project-list figure {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid #ffffff3b;
    overflow: hidden;
}

#project-list figure img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

#project-list figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    font-weight: 700;
}

#project-list figure figcaption span {
    font-size: 14px;
    font-weight: 400;
}

#details-section-container {
    display:none;
    position: absolute;
    flex-direction: column;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    color: #000;
    backdrop-filter: blur(8px);
    /* padding-top: 8px; */
}

#details-section-container.active {
    display:flex;
}

#details-section-container section{
    display: none;
    flex-direction: column;
    flex: 1;
    /* padding: 24px; */
}

#details-section-container section.active {
    display:flex;
}

#details-back-button {
    margin-top:8px;
    margin-left:16px;
}

#project-article-section {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    /* bottom: 0; */
    height: calc(100dvh - 54px);
    background-color: #ffffff6b;
    color: #000;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    display: none;
}

#project-article-section.active {
    display:flex;
}

#project-article-section article {
    display:none;
    background-color: #fff;
    flex-direction: column;
    flex: 1;
    border-radius: 4px;
}

#project-article-section article.active {
    display:flex;
}

#project-article-header {
    justify-content: space-between;
}

#project-nav {
    display:flex;
    gap:8px;
}

#project-next-button svg{
    transform:rotate(180deg);
}

.project-article-info {
    padding:24px;
    padding-bottom: 48px;
}

.project-service-list {
    margin-bottom: 24px;
}

#project-credits-list {
    list-style:disc;
    padding-left:20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fadein-element {
  opacity: 0; /* Hidden by default */
  animation: fadeIn 240ms ease-out forwards;
}

.swiper {
    height:300px;
    margin-left: -24px;
    margin-right: -24px;
    margin-top: -24px;
}