/* reset 
The purpose of starting with a CSS reset is to: 
Remove default legacy styles: useful in the early days on the internet, but no longer required.
Define default styles: styles that will be most common on your website. For example, if the majority of text on the site is black, set that color her.
*/
*,
*::before,
*::after {
    box-sizing: border-box; /* Intuitive box-sizing model */
    min-width: 0; /* helps word-wrapping with flexbox */
    margin: 0;
    padding: 0;
}

/* Only show focus outline when the user is tabbing (not when clicking) */
/* Except for input and textarea */
*:focus:not(:is(input, textarea)) {
    outline: none;
}

*:focus-visible {
  outline: 1px solid blue;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

html {
    /* Allow percentage-based heights */
    /* Setting width: 100% isn't required because it is a default for block-level elements (html and body are block level) */
    height: 100%;

    /* Sets font-size to 10px. 
    Percent units are used to ensure font will scale if user has a custom font-size browser setting (for ally).
    Using 10px as the base to make it easy to set font sizes in elements. Example: for 16px, use 1.6rem, for 32px, use 3.2rem, ...  */
    font-size: calc(100% / 16 * 10);
    line-height: 1.5;
    /* Prevent the browser from synthesizing missing typefaces */
    font-synthesis: none;
    font-smooth: always;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    /* Prevent mobile browsers increasing font-size */
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;

    color: black;

    /* Prevent the rubber band effect when the user scrolls to the top or bottom of the page (WebKit only) */
    overscroll-behavior: none;
}

body {
    height: 100%;
    margin: 0;
    font-family: "TribunADFStd", sans-serif;
    accent-color: #DCA06D;
    background: #3d1a37;
    min-height: 100%;
    font-size: 1.6rem;
}

ul, ol {
  list-style: none;
}

input,
textarea,
button,
button:disabled {
  /* font: inherit; */ /* Turned this off because it changed the size of the button's border-radius somehow, may want to check on this later */
  /* color: inherit; */ /* Turned this off because it altered the color of a button negatively */
  border: none;
  border-radius: 0;
  background: none;
}

fieldset {
    border: none;
}

img {
    max-width: 100%;
}

.body-wrapper {
    box-sizing: border-box;
    min-height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

main {
    display: grid;
    /* grid-template-columns: minmax(1rem, 1fr) minmax(0, 94rem) minmax(1rem, 1fr); */ /* turning this off due to not working with CSS reset settings */
    grid-template-columns: minmax(2rem, 1fr) minmax(0, 150.4rem) minmax(2rem, 1fr);
    /* grid-template-rows: auto 1fr auto; */
    row-gap: 2rem;
    min-height: 90dvh;
    align-content: start;
}

h1 {
    /* font-family: "New Amsterdam", sans-serif; */
    font-family: "TribunADFStd", serif; /* view fonts.css */
    padding: 0px;
    margin: 5px;
}

.color-reference {
    background-color: #000;
    grid-column: 1 / -1;
    width: 100%;
    color: white;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    display: block;
    /* display: none; */
    position: relative;
    margin-top: 0;
    font-size: 1.6rem;
}

.to-right {
    float: right;
}

.fa {
    display: inline-block;
    font-family: Fontawesome;
}

.invert {
    filter: invert(100%);
}

.cover {
    max-width: 960px;
    display: block;
    margin: 0 auto;
    padding: 1%;
    position: relative;
    width: 100%;
    grid-column: 2;
    text-align: center;
    color: #DCA06D;
    font-size: 3em;
}

.cover-wrapper {
    font-family: "TribunADFStd", serif;
    font-weight: 500;
    padding: 0 3.5rem;
    display: inline-block;
    margin: 0 auto;
    max-width: 100%;
    font-size: 3rem;
}

.content {
    box-sizing: content-box;
    display: block;
    grid-column: 2;
}

.explanation-intro {
    max-width: 72ch;        /* comfortable reading width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    color: #F5E0D1;
    font-size: 2.2rem;
    line-height: 1.8;
    padding: 2rem 0;
}

.explanation-intro-small {
    max-width: 55ch;        /* comfortable reading width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.6rem;
    color: #F5E0D1;
    font-size: 1.8rem;
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    padding: 2rem 0;
}

.explanation-intro-mini-title {
    color: rgba(245, 224, 209, 0.5)
}

.portfolio-image-wrapper {
    grid-column: 2 / 3; 
    display: flex; 
    justify-content: center; 
    max-width: 960px;
    margin: 0 auto;
    margin-bottom: 2rem;
    overflow: hidden; /* prevents the image from growing past the scope of the wrapper */
}

.portfolio-image-text-pair {
    margin: 0 auto 4em auto;
}

.portfolio-image-wrapper picture {
    display: contents; /* picture behaves transparent to make img inherit flex-sizing */
}

.portfolio-img {
    z-index: 10;
    display: block; 
    position: relative; 
    box-sizing: border-box;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.portfolio-list {
    column-count: 3;
    column-gap: 1em;
    justify-content: center;
    gap: 1em;
}

.tallness-5 {
    grid-row: span 5;
}

.tallness-6 {
    grid-row: span 6;
}

.tallness-8 {
    grid-row: span 8;
}

.tallness-11 {
    grid-row: span 11;
}

.portfolio-item {
    position: relative;
    display: inline-block;
    flex-direction: column;
    text-align: center;
    margin: auto auto 1rem;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.5s ease;
    z-index: 10;
    pointer-events: none;
}

.portfolio-item:hover::after {
    background: rgba(8, 8, 8, 0.55);
}

.portfolio-list > .portfolio-item {
    color: #F5E0D1;
}

.portfolio-thumb-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 1px 1px 6px black, 1px 1px 1px black;
    width: 50%;
    z-index: 11;
    opacity: 0;
    transition: opacity 0.5s ease;
    container-type: inline-size;
}

.portfolio-thumb-title {
    transform: translateY(-8px);
    transition: transform 0.5s ease;
    font-size: clamp(1.5rem, 9cqi, 3.8rem);
}

.portfolio-item:hover .portfolio-thumb-title {
    transform: translateY(0);
}

.hidden-placeholder {
    visibility: hidden;
}

.portfolio-thumb-title-wrap > span,
.portfolio-thumb-ender-wrap > p {
	letter-spacing: 0.2rem;
	transition: letter-spacing 0.5s ease;
}

.portfolio-item:hover .portfolio-thumb-title-wrap > span,
.portfolio-item:hover .portfolio-thumb-ender-wrap > p {
    letter-spacing: 0;
}

.portfolio-thumb-ender-wrap {
    transform: translateY(8px);
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-thumb-ender-wrap {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-thumb-content {
    opacity: 1;
}

.portfolio-thumb-content > p {
    font-size: 2rem;
}

.portfolio-thumb-title-wrap {
    margin: 32px 0px;
    white-space: nowrap;
}

.portfolio-thumb-ender-wrap {
    margin: 32px 0px;
}

.portfolio-thumb-ender-wrap p {
    display: inline-block; /* zodat de breedte gelijk is aan de tekst */
    position: relative;
}

.portfolio-thumb-ender-wrap p::after {
    content: '';
    position: absolute;
    bottom: -4px;   /* distance from text */
    left: 50%;
    width: 100%;
    height: 1px;    /* thickness of stroke */
    background: rgb(245, 224, 209);
    transform: translateX(-50%) scaleX(0); /* start narrow */
    transition: transform 0.4s ease;
    transform-origin: center;
}

.portfolio-item:hover .portfolio-thumb-ender-wrap p::after {
    transform: translateX(-50%) scaleX(1); /* grow to full width */
}

.content-footer-wrapper {
    grid-column: 2;
    margin-top: auto;
    flex-grow: 0;
    flex-shrink: 0;
}

.footer-content {
    text-align: center;
    margin: 20px;
    color: #DCA06D;
}

.portfolio-img-note {
    text-align: justify;
    text-align-last: center;
    margin: 20px auto;
    color: #DCA06D;
    max-width: 960px;
}

.portfolio-nav {
    grid-column: 2;
    display: flex;
    max-width: 960px;
    width: 80%;
    margin: 0 auto;
    max-height: 120px;
    position: relative;
    overflow: hidden;
}

.portfolio-nav > a:hover {
    color: #82CFE0;
}

/* beide kanten */
.portfolio-nav .nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    text-decoration: none;
    color: #F5E0D1;
    position: relative;
    transition: background 0.3s ease;
    overflow: hidden;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* links */
.portfolio-nav .prev {
    align-items: flex-start;
    text-align: left;
    border-radius: 40px 0 24px 0;
}

/* rechts */
.portfolio-nav .next {
    align-items: flex-end;
    text-align: right;
    border-radius: 0 40px 0 24px;
}

.portfolio-nav .next > svg {
    fill: url("#next-arrow-gradient");
    width: 80px;
    height: 80px;
    display: block;
    flex-shrink: 0;
    position: relative;
    right: -10px;
    bottom: 20px;
    margin-top: auto;
}

.portfolio-nav .prev > svg {
    fill: url("#back-arrow-gradient");
    width: 80px;
    height: 80px;
    display: block;
    flex-shrink: 0;
    position: relative;
    right: 10px;
    bottom: 20px;
    margin-top: auto;
}

/* hover effect */
.portfolio-nav .nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    z-index: 0;
}

.portfolio-nav .nav:hover::before {
    background: rgba(0,0,0,0.4);
}

/* tekst boven overlay */
.portfolio-nav .nav span {
    position: relative;
    z-index: 1;
}

/* labels */
.portfolio-nav .label {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* titel */
.portfolio-nav .title {
    font-size: 1.6rem;
}

.back-to-index-button {
    color: #DCA06D;
    transition: 0.5s ease-in-out;
    border-radius: 50%;
}

.back-to-index-button:hover {
    rotate: 180deg;
}

.contact-form {
    max-width:50%; 
    margin: 0 auto;
    color: #DCA06D;
}

#contact-success {
    text-align: center;
    padding: 4rem 2rem;
    color: #DCA06D;
    font-family: "TribunADFStd", serif;
    font-size: 2.4rem;
}

.michiels-name {
    color: #F5E0D1;
    margin-bottom: 20px;
}

input[type=text], input[type=email], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgb(108, 75, 170);
    background: #461f40;
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 16px;
    resize: vertical;
}

input, textarea {
    color: #F5E0D1;
}

input::placeholder, textarea::placeholder {
    color: rgb(130, 93, 199);
}

input:focus::placeholder, textarea:focus::placeholder {
    color: rgb(173, 144, 228);
}

input[type=submit] {
    color: #280137;
    background-color: #DCA06D;
    padding: 20px 40px;
    border-radius: 10px;
    cursor: pointer;
}

.contact-submit-button {
    color: #280137;
    background-color: #DCA06D;
    padding: 20px 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

.contact-submit-button:hover {
    background-color: #82CFE0;
}

.contact-submit-button::after {
    content: '';
    position: absolute;
    bottom: -12px;   /* distance from text */
    left: 50%;
    width: 100%;
    height: 2px;    /* thickness of stroke */
    background: linear-gradient(90deg,rgba(245, 224, 209, 0) 0%, rgba(245, 224, 209, 1) 50%, rgba(245, 224, 209, 0) 100%);
    transform: translateX(-50%) scaleX(0); /* start narrow */
    transition: transform 0.3s ease;
    transform-origin: center;
}

.contact-submit-button:hover::after {
    transform: translateX(-50%) scaleX(0.9); /* grow to full width */
}

.form-input-text {
    color: #DCA06D;
}

/* --------------------------------
   Contact form field wrapper
   Needed for positioning the required badge relative to the input
-------------------------------- */
.form-field-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}
 
/* --------------------------------
   Required badge
   Positioned in the top-right corner of the input/textarea
-------------------------------- */
.required-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #c0392b;
    color: #fff;
    font-size: 1rem;
    font-family: "Roboto", Arial, sans-serif;
    padding: 2px 7px;
    border-radius: 0 10px 0 4px; /* follows the input border-radius on the top-right */
    pointer-events: none;
    z-index: 1;
}
 
/* --------------------------------
   Invalid field state
   Red border when a field fails validation
-------------------------------- */
.field-invalid {
    border-color: #c0392b !important;
}
 

#form-error-message {
    color: #fff;
    background: #c0392b;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 1.4rem;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.uppercase {
    text-transform: uppercase;
}

.roboto {
    font-family: "Roboto", Arial, sans-serif;
}

@media(min-width: 1550px){
    .portfolio-list {
        column-count: 4;
    }
}

@media(max-width: 1550px) and (min-width: 1200px){
    .portfolio-list {
        column-count: 3;
    }
}

@media(max-width: 1200px) and (min-width: 800px){
    .portfolio-list {
        column-count: 2;
    }
    .contact-form {
        max-width: 80%;
    }
}

@media(max-width: 800px){
    .portfolio-list {
        column-count: 1;
    }
    .cover-wrapper {
        padding: 0px;
    }
    .contact-form {
        max-width: 100%;
    }
    .portfolio-nav {
        max-height: 260px;
    }
}