/* ------------------- */
/* Custom properties   */
/* ------------------- */

:root {
    /* colors */
    --clr-dark: 230 35% 7%;
    --clr-light: 231 77% 90%;
    --clr-white: 0 0% 100%;
    
    /* font-sizes */
    --fs-900: clamp(5rem, 8vw + 0.1rem , 9.375rem);
    --fs-800: 6.25rem;
    --fs-700: 3.5rem;
    --fs-600: 1.15rem;
    --fs-500: 1.1rem;
    --fs-400: 1.125rem;
    --fs-300: 1rem;
    --fs-200: 0.875rem;
    
    /* font-families */
    --ff-serif: "Bellefair", serif;
    --ff-sans-cond: "Barlow Condensed", sans-serif;
    --ff-sans-normal: "Barlow", sans-serif;
}


@media (min-width: 35em) {
    :root {
        --fs-800: 5rem;
        --fs-400: 1rem;
        --fs-500: 1.25rem;
        --fs-600: 1.5rem;
        --fs-700: 2.5rem;
    }
}

@media (min-width: 45em) {
    :root {
       
        /* --fs-400: 1.125rem; */
        --fs-500: 1.275rem;
        --fs-600: 1.85rem;
        --fs-700: 3.5rem;
        --fs-800: 6.25rem;
    }
}


/* ------------------- */
/* Reset               */
/* ------------------- */

/* https://piccalil.li/blog/a-modern-css-reset/ */

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

/* Reset margins */
body,
h1,
h2,
h3,
h4,
h5,
p,
figure,
picture {
    margin: 0; 
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    font-weight: 400;
}

/* set up the body */
body {
    display: grid;
    grid-template-rows: min-content 1fr;

    font-family: var(--ff-sans-normal);
    font-size: var(--fs-400);
    color: hsl( var(--clr-white) );
    background-color: hsl( var(--clr-dark) );
    line-height: 1.5;
    min-height: 100vh;

    overflow-x: hidden;
}


/* make images easier to work with */
img,
picutre {
    width: 100%;
    display: block;
}

/* make form elements easier to work with */
input,
button,
textarea,
select {
    font: inherit;
}

/* remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ------------------- */
/* Utility classes     */
/* ------------------- */

/* general */

.fixed {
    position: fixed;
    top: 0;
    z-index: 10000;
    width: 100%;
}

.flex {
    display: flex;
    gap: var(--gap, 1rem);
}

.grid {
    display: grid;
    gap: var(--gap, 1rem);
}

.grid-container--flow > * {
    margin-block: var(--grid-flow-gap, 1em);
}

.d-block {
    display: block;
}

.flow > *:where(:not(:first-child)) {
    margin-top: var(--flow-space, 1rem);
}

.container {
    padding-inline: 2em;
    margin-inline: auto;
    max-width: 80rem;
}

.sr-only {
  position: absolute; 
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px; 
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; /* added line */
  border: 0;
}

.skip-to-content {
    position: absolute;
    width: max-content;
    padding: .345em .7em;
    margin-inline: auto;
    background-color: hsl( var(--clr-white) );
    color: hsl( var(--clr-dark) );
    transition: transform ease .75s;
    transform: translateY(-100%);
}

.skip-to-content:focus {
    transform: translateY(100%);
}

/* colors */

.bg-dark { background-color: hsl( var(--clr-dark) );}
.bg-accent { background-color: hsl( var(--clr-light) );}
.bg-white { background-color: hsl( var(--clr-white) );}

.text-dark { color: hsl( var(--clr-dark) );}
.text-accent { color: hsl( var(--clr-light) );}
.text-white { color: hsl( var(--clr-white) );}

/* typography */

.ff-serif { font-family: var(--ff-serif); } 
.ff-sans-cond { font-family: var(--ff-sans-cond); } 
.ff-sans-normal { font-family: var(--ff-sans-normal); } 

.letter-spacing-1 { letter-spacing: 4.75px; } 
.letter-spacing-2 { letter-spacing: 2.7px; } 
.letter-spacing-3 { letter-spacing: 2.35px; } 

.uppercase { text-transform: uppercase; }

.fs-900 { font-size: var(--fs-900); }
.fs-800 { font-size: var(--fs-800); }
.fs-700 { font-size: var(--fs-700); }
.fs-600 { font-size: var(--fs-600); }
.fs-500 { font-size: var(--fs-500); }
.fs-400 { font-size: var(--fs-400); }
.fs-300 { font-size: var(--fs-300); }
.fs-200 { font-size: var(--fs-200); }

.fs-900,
.fs-800,
.fs-700,
.fs-600 {
    line-height: 1.1;
}

.numbered-title {
    font-family: var(--ff-sans-cond);
    font-size: var(--fs-500);
    text-transform: uppercase;
    letter-spacing: 4.72px; 
}

.numbered-title span {
    margin-right: .5em;
    font-weight: 700;
    color: hsl( var(--clr-white) / .25);
}


/* ------------------- */
/* Compontents         */
/* ------------------- */

.large-button {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    padding: 0 2em;
    border-radius: 50%;
    aspect-ratio: 1;
    text-decoration: none;
}

.large-button::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: hsl( var(--clr-white) / .1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 500ms linear, transform 750ms ease-in-out;
}
 
.large-button:hover::after,
.large-button:focus::after {
    opacity: 1;
    transform: scale(1.5);
}

/* --- Primary-navigationbar --- */

.logo {
    min-width: 2.5rem;
    margin: 1.65em 0 1.5em clamp(1em, 8vw + 1rem, 4em);
}

.primary-header {
    justify-content: space-between;
    align-items: center;
}

.primary-navigation {
    --gap: clamp(1.2rem, 5vw + 0.1rem, 1.5rem);
    --underline-gap: 2rem;
    padding-inline: 2rem;
    margin: 0;
    background: hsl( var(--clr-white) / .05 ) ;
    backdrop-filter: blur(1.5rem);
    list-style: none;
}

.primary-navigation a {
    text-decoration: none;
}

.primary-navigation a > span {
    font-weight: 700;
    margin-right: .5em;
}


.mobile-nav-toggle {
    display: none;
}

.underline-indicators > * {
    cursor: pointer;
    padding: var(--underline-gap, 1rem) .2em;
    border: none;
    border-bottom: .2rem solid hsl( var(--clr-white) / 0 );
}

.underline-indicators > *:hover,
.underline-indicators > * :focus {
    border-color: hsl( var(--clr-white) / .5);
}

.underline-indicators > .active,
.underline-indicators > [aria-selected="true"] {
    color: hsl( var(--clr-white) / 1);
    border-color: hsl( var(--clr-white) / 1); 
}

@media (max-width: 40em) {
    .primary-navigation {
        --gap: 2rem;
        /* --underline-gap: 2rem; */
        flex-direction: column;
        position: fixed;
        z-index: 1000;
        inset:  0 0 0 35%;
        padding: min(6em, 15vh) min(2em, 20vw);
        margin: 0;
        transform: translateX(100%);
        transition: transform ease-out 0.5s;
        list-style: none;
    }

    .primary-navigation.underline-indicators > * {
        border-bottom: none;
        padding: 0;
    }

    .mobile-nav-toggle {
        display: block;
        position: absolute;
        top: 2em;
        right: 2rem;
        z-index: 2000;
        padding: .785em;
        background: none;
        background-image: url(./assets/shared/icon-hamburger.svg);
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        color: white;
        border: none;
    }

    .mobile-nav-toggle:focus-visible {
        outline: 1px solid yellow;
        outline-offset: .5em;
    }

    .primary-navigation--toggle {
        transform: translateX(0%);
    }
}

@media (min-width: 35em) and (max-width: 55em) {
    
    .primary-navigation a > span {
        display: none;
    }

    .underline-indicators > * {
        padding: 1em .45em;
    }
}

@media (min-width: 49em) {
    .primary-header {
        position: relative;
    }

    .primary-header::before {
        content: "";
        display: block;
        position: relative;
        z-index: 100;
        height: 1px;
        width: 100%;
        margin-right: -2rem;
        background-color: white;
        order: 1;
    }

    nav {
        order: 2;
    }

    .primary-navigation {
        margin-block: 1rem;
        padding-inline: clamp(2.5rem, 7vw + 0.1rem , 3rem);
        font-size: var(--fs-200);
    }
}


.dot-indicators > * {
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    padding: .321em;
    background-color: hsl( var(--clr-white) / .25);
}
 
.dot-indicators > *:hover,
.dot-indicators > *:focus { 
    background-color: hsl( var(--clr-white) / .5);
}

.dot-indicators > [aria-selected="true"] {
    background-color: hsl( var(--clr-white) / 1); 
}

/* ----------------- */
/* page-spacific     */
/* ----------------- */

/* home */

/* background-image-mobile */
.home, .destination, .crew {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.home{
    background-image: url(./assets/home/background-home-mobile.jpg);
}

.destination {
    background-image: url(./assets/destination/background-destination-mobile.jpg);
}

.crew {
    background-image: url(./assets/crew/background-crew-mobile.jpg);
}

/* background-image-tablet */
@media (min-width: 30rem) {
    .home {
        background-image: url(./assets/home/background-home-tablet.jpg);
    }

    .destination {
        background-image: url(./assets/destination/background-destination-tablet.jpg);
    }

    .crew {
        background-image: url(./assets/crew/background-crew-tablet.jpg);
    }
}

/* background-image-laptop */
@media (min-width: 750px) {
    .home {
        background-image: url(./assets/home/background-home-desktop.jpg);
    }

    .destination {
        background-image: url(./assets/destination/background-destination-desktop.jpg);
    }

    .crew {
        background-image: url(./assets/crew/background-crew-desktop.jpg);
    }
}

/* ----------------- */
/* layouts           */
/* ----------------- */

.grid-container {
    min-height: 100vh;
    display: grid;
    /* row-gap: 6rem; */
    place-items: center;
    text-align: center;
    padding-inline: clamp(0.5em, 3vw + 0.1rem, 2em);
}

.grid-container--destination > .numbered-title {
    grid-area: title;
}

.grid-container > * {
    max-width: 45ch;
    /* border: 1px solid red; */
}

.grid-container > *:first-child {
    align-self: flex-end;
}

.grid-container > *:last-child {
    align-self: center;
}

/* --Destination-layout -- */

.grid-container--destination {
    grid-template-areas: 
    'title'
    'image'
    'tabs'
    'content';
}

.grid-container--destination > h1 {
    grid-area: title;
}

.grid-container--destination > picture {
    grid-area: image;
    max-width: clamp(20rem, 65%, 75%);
    align-self: flex-start;
    padding-top: 2rem;
}

.grid-container--destination > .tab-list {
    grid-area: tabs;
}

.tab-list > button {
    background-color: transparent;
    font-size: max(.9rem, 1.3rem);
    /* background-color: red; */
}

.grid-container--destination > .destination-info {
    grid-area: content;
}

/* destination-article-content */

.destination-info h1 {
    font-size: clamp(4.45rem, 10vw + 0.1rem, 5.84rem);
}

.destination-info > p {
    max-width: 45ch;
    margin-bottom: 3rem;
    font-family: var(--ff-sans-cond);
    font-size: 1.235rem;
    line-height: 1.3em;
    color: hsl( var(--clr-white) / .75 );
}

/* destination-meta-info */

.destination-meta {
    gap: 2em;
    flex-direction: column;
    padding-top: 2em;
    border-top: 0.01px solid hsl( var(--clr-light) / .4 );
}

.destination-meta p {
    font-size: 1.75rem;
}

/* -------------- */
/* -media-query-  */
/* -------------- */

@media (min-width: 560px) {
    .grid-container--destination .numbered-title {
        justify-self: left;
        padding-inline: 2.2em;
    }

    .destination-meta {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (min-width: 750px) {
    .grid-container {
        column-gap: var(--column-gap, 2rem);
        grid-template-columns: minmax(2rem, 1fr) repeat(2, minmax(0 ,35rem)) minmax(2rem, 1fr);
        text-align: left;
    }

    .grid-container > .space-paragraph {
        grid-column: 2;
    }

    .grid-container > *:last-child {
        grid-column: 3;
        text-align: right;
    }

    .grid-container--home {
        padding-bottom: max(6rem, 20vh);
        align-content: flex-end;
    }

    .grid-container--destination {
        grid-template-areas: 
        '. title title.'
        '. image tabs .'
        '. image content .';
        justify-items: left;
        align-content: start;
    }

    .grid-container--destination > .tab-list ,  
    .destination-info {
        margin-left: clamp(.5em, 3vw + 0.1em , 4em);
    }

    .destination-info >* {
        text-align: left;
    }
    
    .destination-meta {
        justify-content: left;
        gap: 6em;
    }


}

/* crew-page */
.grid-container--crew {
    grid-template-areas: 
    'title'
    'image'
    'slider'
    'content';
    margin-bottom: 5em;
}

.grid-container--crew > .numbered-title {
    grid-area: title;
}

.grid-container--crew > picture {
    max-width: clamp(20rem, 60%, 75%);
    align-self: flex-end;
    grid-area: image;
    user-select: none;
}

picture img {
    user-select: none;
}

.grid-container--crew > .dot-indicators {
    grid-area: slider;
    align-self: flex-start;
}

.grid-container--crew  > article {
    grid-area: content;
    max-width: 45ch;
}

/* crew-article */

.grid-container--crew > article > p {
    margin-block: .5em;
}

.grid-container--crew > article > h1 > span {
    font-size: clamp(1.5rem, 5vw + 0.1rem, 2.1rem);
    margin-block: .5em;
}

.grid-container--crew > article > h1 {
    opacity: .75;
}

/* media-query-for-crew */
@media (min-width: 35em) {
    .grid-container--crew {
        height: 90vh;
        grid-template-areas: 
        'title'
        'content'
        'slider'
        'image';
    }
}

@media (min-width: 47em) {
    .grid-container--crew {
        grid-template-columns: minmax(2rem, 1fr) minmax(0, 37rem) minmax(0, 23rem) minmax(2rem, 1fr);
        grid-template-areas: 
            '. title title .'
            '. content image .'
            '. slider image .';
            margin-bottom: 0;
            justify-items: left;
            align-items: center;
    }

    .grid-container--crew > picture {
        max-height: 100%;
        grid-column: span 2;
    }
}


/* ---Nav-bar--- */

/* space-model */

.space-paragraph > h1 > span {
   font-size: clamp(3.8rem , 10vw + 0.1rem, 6rem);
}
