@font-face {
  font-family: "Mistral";
  src: url("../fonts_web/Mistral___version_4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* ========================================
   RESET
======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
html {
  /* // DEBUG comment it to check errors*/
  overflow-x:hidden;
  font-family: "Sen", sans-serif;
  font-size: 23px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  width:100dvw;
  background-color: var(--bg-color-z-0);
}
img,
picture,
video,
canvas,
svg {
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  width: min(15vw, 20dvh);
  height: min(15vw, 20dvh);
  max-height:100%;
  max-width:100%;
  display: block;
  align-self: stretch;
  justify-self: stretch;
}

button,
input,
textarea,
select {
  font: inherit;
}


button {
  cursor: pointer;
  
}

h1,
h2,
h3,
h4,
h5,
h6 {
  max-width: 92vw;
  font-family: "RokkittBold", sans-serif;
  line-height: 1.1;
  /* text-wrap: balance; */
  margin-bottom: 1em;
  margin-top: 1em;
  height:fit-content;
}
h2 {
  font-size: var(--h2-rem);
}
h3 {
  font-size: var(--h3-rem);
}
p {
  margin-top: 1em;
  text-wrap: pretty;
}

a {
  width: fit-content;
  color: var(--color-granite);
  text-decoration: none;
  font-style: normal;
  background-image: linear-gradient(
    to bottom,
    transparent 92%,
    #1e241d 92%,
    #1e241d 100%
  );
}
span {
  /* Critical for the typewriter effect, but we always want that rules anyway */
  display: inline-block; 
}

ul,
ol {
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
}

textarea {
  resize: vertical;
}

code {
  font-family: "FiraCode", monospace;
}

nav {
  width: 100%;
  height: 100%;
}
section {
  display: inline-block;
}

:root {
  --header-menu-height: 8dvh;
  --menu-height: calc(100dvh - var(--header-menu-height));
  
  --fog-color-black: #080808;
  --fog-black-alpha: ;
  --fog-reveal-threshold: 0.05;
  --fog-reveal-softness: 0.25;
  --fog-opacity: 1;
  --fog-scale: 1.5;
  --fog-position-x: 0;
  --fog-position-y: 0;
  --fog-speed: 1;
  
  --hero-1-bg-content-width:  100dvw;
  
  --color-granite:        #4B5C4Bff;
  --color-deep-saffron:   #FD9936ff;
  --color-pearl-beige:    #E6DBB7ff;
  --color-rusty-spice:    #B14E30ff;
  --color-soft-apricot:   #FCDEBDff;
  --color-deep-forest:    #26352C;
  --color-sage:           #F3F4F1;
  --color-muted-ochre:    #C9823E;
  --color-dusty-rose:     #9A5B50;
  --color-warm-ivory:     #F3EBDD;
  
  --h1-rem: 1.2rem;
  --h2-rem: 1.3rem;
  --h3-rem: 1.2rem;
  --h4-rem: 1.2rem;
  --h5-rem: 1.1rem;
  --p-rem: calc(var(--h5-rem) - 0.2rem);
  --wrapper-padding-dvw: 5dvw;
  --wrapper-margin-top-dvh: 200px;
  --bg-color-z-0: var(--color-sage);
  --bg-color-z-1: var(--color-deep-forest);
  --font-color-bg-z-1: var(--color-deep-forest);
}


@media (min-width: 640px) {
  :root {
    --wrapper-padding-dvw: 5dvw;
  }
}
@media (min-width: 960px) {
  :root {
    --wrapper-padding-dvw: 10dvw;
    --hero-1-bg-content-width: 28dvw;
  }
}
@media (min-width: 1280px) {
  html {
    font-size: 26px;
  }
  :root {
    --header-menu-height: 7dvh;
    --hero-1-bg-content-width: 28dvw;
    --h1-rem: 1.3rem;
    --h2-rem: 1.2rem;
    --h3-rem: 0.9rem;
    --h4-rem: 0.9rem;
    --h5-rem: 0.9rem;
    --p-rem: calc(var(--h5-rem) - 0.3rem);
    --wrapper-padding-dvw: 21dvw;
  }
  
}
@media (min-width: 1600px) {
  :root {
    --header-menu-height: 7dvh;
    --hero-1-bg-content-width: 28dvw;
    --h1-rem: 1.1rem;
    --h2-rem: 1.4rem;
    --h3-rem: 1.2rem;
    --h4-rem: 1.2rem;
    --h5-rem: 1.2rem;
    --p-rem: calc(var(--h5-rem) - 0.4rem);
    --wrapper-padding-dvw: 14dvw;
  }
}
@media (min-width: 1920px) {
  :root {
    --header-menu-height: 7dvh;
    --hero-1-bg-content-width: 28dvw;
    --h1-rem: 1.1rem;
    --h2-rem: 1.4rem;
    --h3-rem: 1.2rem;
    --h4-rem: 1.2rem;
    --h5-rem: 1.2rem;
    --p-rem: calc(var(--h5-rem) - 0.4rem);
    --wrapper-padding-dvw: 21dvw;
  }
}
@media (min-width: 2560px) {
  :root {
    --wrapper-padding-dvw: 32dvw;
  }
}

/* ========================================
   GENERAL
======================================== */
body.image-viewer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

html:has(body.image-viewer-open) {
  overflow: hidden;
}
h1 {
  color: var(--font-color-bg-z-1);
  padding: 0;
  margin: 0;
  visibility: hidden; /* avoid typewrite effect to have the full sentence visible at init. */
  font-size: var(--h1-rem);
  font-family: "FiraCode", monospace;
  grid-column: 2;
  grid-row: 6;
}
p {
  color: var(--font-color-bg-z-1);
  font-size: var(--p-rem);
}

.is-hidden {
  display: none;
}

main > div.with-wrapper {
  background-color: color-mix(in srgb,var(--bg-color-z-1) 2%,transparent);
}
main > div.with-wrapper::before,
main > div.with-wrapper::after {
  content: "";
  display: block;
  height: 200px;
}
main > div.with-wrapper:last-child {
  margin-bottom: 50dvh;
}
main > div.with-wrapper {
  padding: 0 var(--wrapper-padding-dvw) 0 var(--wrapper-padding-dvw);
  margin-top: var(--wrapper-margin-top-dvh)
}

footer {
  font-size: 0.9rem;
  /* background-color: rgb(54, 39, 5); */
  border-top: 1px solid color-mix(
    in srgb,
    var(--color-deep-forest) 30%,
    transparent
  );
  padding: 1em 1em;
}
@media (min-width: 1600px) {
  #hero-1-bg-content::before {
    content: "";
    position: absolute;
    inset: 0;
  }
}
@media (min-width: 1920px) {
}
@media (min-width: 2560px) {
}

/* //////////////////////////// */
/*             LAYOUTS */

.gallery-a {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  aspect-ratio: 16 / 9;
}

.gallery-a > * {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  object-fit: cover;
}

.gallery-a > :nth-child(1) {
  grid-column: 1;
  grid-row: 1 / -1;
}

.gallery-a > :nth-child(2) {
  grid-column: 2 / -1;
  grid-row: 1;
}

.gallery-a > :nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.gallery-a > :nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}


/* Tablet */

@media (max-width: 800px) {
  .gallery-a {
    aspect-ratio: 4 / 3;
  }
}


/* Mobile */

@media (max-width: 600px) {
  .gallery-a {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    gap: 1rem;
  }

  .gallery-a > * {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
}


/* Clickable images */

[data-gallery] img {
  cursor: pointer;

  transition:
    transform 350ms cubic-bezier(.2, .7, .2, 1),
    filter 350ms ease;
}

[data-gallery] img:hover {
  transform: scale(1.015);
  filter: brightness(1.05);
}


/* Tablet / progressively more portrait */
@media (max-width: 800px) {
  .gallery {
    aspect-ratio: 4 / 3;
    grid-template-columns: 1fr 1.5fr 1fr;
  }
}


/* Mobile */
@media (max-width: 600px) {
  .gallery {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    gap: 1rem;
  }

  .gallery > * {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
}

.image-viewer {
  overscroll-behavior: contain;
  touch-action: none;
}

.image-viewer__image {
  touch-action: pinch-zoom;
}



.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 3vw;

  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 300ms ease,
    visibility 300ms ease;

  overflow: hidden;
}

.image-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-viewer img {
  display: block;

  width: auto;
  height: auto;

  max-width: 94vw;
  max-height: 94vh;

  object-fit: contain;

  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;

  transition: transform 200ms ease;
}

.image-viewer__close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;

  border: 0;
  background: none;

  color: white;
  font-size: 32px;
  cursor: pointer;
}