/* =========================================
   PORTFOLIO
========================================= */

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #portfolio {
        padding: 5rem 0;
        background-color: #FFF;
    }
    #portfolio .container {
        width: 92%;
        max-width: 75rem;
        margin: 0 auto;
    }
    #portfolio .content {
        width: 100%;
    }
    #portfolio .portfolio-heading {
        max-width: 48rem;
        margin: 0 auto 3rem;
        text-align: center;
    }
    #portfolio .title {
        margin: 0 0 1rem;
        font-size: clamp(2rem, 7vw, 3.25rem);
        line-height: 1.08;
    }
    #portfolio .overview {
        max-width: 44rem;
        margin: 0 auto;
        line-height: 1.7;
    }
    #portfolio .card-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        width: 100%;
        max-width: 44rem;
        margin: 0 auto;
        padding: 0;
        list-style: none;
    }
    #portfolio .item {
        min-width: 0;
        border: 1px solid rgba(20, 35, 28, 0.12);
        border-radius: 1rem;
        overflow: hidden;
        background-color: #fff;
        box-shadow: 0 0.75rem 2.5rem rgba(20, 35, 28, 0.08);
        transition:
            transform 0.3s ease,
            box-shadow 0.3s ease,
            border-color 0.3s ease;
    }
    #portfolio .link {
        display: flex;
        flex-direction: column;
        height: 100%;
        color: inherit;
        text-decoration: none;
    }
    #portfolio .picture {
        position: relative;
        display: block;
        width: 100%;
        aspect-ratio: 16 / 11;
        overflow: hidden;
        background-color: #e8e6e0;
    }
    #portfolio .picture::after {
        position: absolute;
        inset: 0;
        content: "";
        background: linear-gradient(
            to bottom,
            transparent 72%,
            rgba(0, 0, 0, 0.07)
        );
        pointer-events: none;
    }
    #portfolio .picture img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: none;
        transition: transform 0.5s ease;
    }
    #portfolio .card-content {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    #portfolio .project-type {
        display: block;
        margin-bottom: 0.625rem;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--primary, #315f4b);
    }
    #portfolio h3 {
        margin: 0 0 0.875rem;
        font-size: clamp(1.5rem, 5vw, 2rem);
        line-height: 1.15;
        color: #17211c;
    }
    #portfolio .description {
        margin: 0 0 1.5rem;
        line-height: 1.65;
        color: #535c57;
    }
    #portfolio .button {
        display: inline-flex;
        align-items: center;
        gap: 0.625rem;

        margin-top: auto;
        padding-bottom: 0.25rem;

        border-bottom: 0.125rem solid currentColor;

        font-size: 0.875rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.04em;
        text-transform: uppercase;

        color: var(--primary, #315f4b);

        transition:
            gap 0.25s ease,
            color 0.25s ease;
    }

    #portfolio .button::after {
        content: "→";

        font-size: 1.1em;
    }
    #portfolio .link:focus-visible {
        outline: 0.1875rem solid var(--primary, #315f4b);
        outline-offset: -0.1875rem;
    }
}
/* Tablet - 48rem+ */
@media (min-width: 48rem) {
    #portfolio {
        padding: 6.5rem 0;
    }

    #portfolio .portfolio-heading {
        margin-bottom: 4rem;
    }

    #portfolio .card-group {
        gap: 2rem;
    }

    #portfolio .card-content {
        padding: 2rem;
    }

    #portfolio h3 {
        font-size: 2rem;
    }
}
/* Desktop - 64rem+ */
@media (min-width: 64rem) {
    #portfolio {
        padding: 8rem 0;
    }

    #portfolio .card-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;

        max-width: none;
    }

    #portfolio .item:hover {
        border-color: rgba(49, 95, 75, 0.3);

        box-shadow: 0 1.25rem 3.5rem rgba(20, 35, 28, 0.14);

        transform: translateY(-0.375rem);
    }

    #portfolio .item:hover .picture img {
        transform: scale(1.025);
    }

    #portfolio .item:hover .button {
        gap: 0.875rem;
    }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #portfolio .item,
    #portfolio .picture img,
    #portfolio .button {
        transition: none;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #portfolio {
        background-color: var(--dark);
    }
    body.dark-mode #portfolio .title,
    body.dark-mode #portfolio h3,
    body.dark-mode #portfolio .text {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #portfolio .item {
        background: var(--medium);
        border-color: #FFF;
    }
    body.dark-mode #portfolio .item:hover {
        border-color: var(--lightAccentColor);
        background-color: var(--accent);
    }
    body.dark-mode #portfolio .project-type {
        color: var(--lightAccentColor);
    }
    body.dark-mode #portfolio .button {
        color: var(--lightAccentColor);
    }
    body.dark-mode #portfolio .item:hover .button {
        color: #FFF;
    }
}

/************* CUSTOM WORK ***************/
/*****************************************/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #custom-work {
        padding: var(--sectionPadding);
    }
    #custom-work .container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* 48px - 64px */
        gap: clamp(3rem, 6vw, 4rem);
    }
    #custom-work .content {
        /* set text align to left if content needs to be left aligned */
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        /* centers content horizontally, set to flex-start to left align */
        align-items: center;
    }

    #custom-work .card-group {
        width: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        /* 16px - 20px */
        gap: clamp(1rem, 1.6vw, 1.25rem);
    }
    #custom-work .item {
        list-style: none;
        width: 100%;
        max-width: 31.25rem;
        border-radius: 0.5rem;
        position: relative;
        z-index: 1;
        transition:
            box-shadow 0.3s,
            transform 0.3s;
    }
    #custom-work .item:hover {
        box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
        transform: translateY(-0.4375rem);
    }
    #custom-work .item:hover .picture img {
        opacity: 0.3;
        transform: scale(1.1);
    }
    #custom-work .item:hover .h3 {
        color: var(--primaryLight);
    }
    #custom-work .item:before {
        /* border, done in pseudo so it can sit under the picture */
        content: "";
        width: 100%;
        height: 100%;
        border-radius: 0.5rem;
        border: 1px solid #e8e8e8;
        /* prevents border from affecting height and width */
        box-sizing: border-box;
        background: transparent;
        opacity: 1;
        position: absolute;
        display: block;
        top: 0;
        left: 0;
        z-index: -1;
    }
    #custom-work .link {
        text-decoration: none;
        /* 16px - 24px */
        padding-bottom: clamp(1rem, 2.2vw, 1.5rem);
        display: block;
    }
    #custom-work .picture {
        width: 100%;
        height: 15rem;
        /* 16px - 24px */
        margin-bottom: clamp(1rem, 2.2vw, 1.5rem);
        border-radius: 0.5rem 0.5rem 0 0;
        background-color: var(--primaryLight);
        /* clips the img tag corners */
        overflow: hidden;
        display: block;
        position: relative;
        z-index: 10;
    }
    #custom-work .picture img {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
        transition:
            transform 0.6s,
            opacity 0.3s;
    }
    #custom-work .h3 {
        /* 20px - 25px */
        font-size: clamp(1.25rem, 3vw, 1.5625rem);
        line-height: 1.2em;
        font-weight: 700;
        color: var(--headerColor);
        margin: 0 0 0.75rem 0;
        /* 16px - 24px */
        padding: 0 clamp(1rem, 2vw, 1.5rem);
        transition: color 0.3s;
    }
    #custom-work .item-text {
        /* 14px - 16px  */
        font-size: clamp(0.875rem, 1.5vw, 1rem);
        line-height: 1.5em;
        color: var(--bodyTextColor);
        margin: 0;
        /* 16px - 24px */
        padding: 0 clamp(1rem, 2.2vw, 1.5rem);
    }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    #custom-work .card-group {
        flex-direction: row;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #custom-work .topper {
        color: var(--primaryLight);
    }
    body.dark-mode #custom-work .title,
    body.dark-mode #custom-work .text,
    body.dark-mode #custom-work .h3,
    body.dark-mode #custom-work .item-text {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #custom-work .item:before {
        opacity: 0.3;
    }
}

/************* WHY CHOOSE US *************/
/*****************************************/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #why-choose {
        padding: var(--sectionPadding);
        background-color: var(--bgLight);
        position: relative;
    }
    #why-choose::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("/assets/img/blob-scene-haikei-portfolio-m.svg");
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        opacity: 0.15;
        z-index: 0;
        pointer-events: none;
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 12%,
            black 88%,
            transparent 100%
        );
        -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 12%,
            black 88%,
            transparent 100%
        );
    }
    #why-choose .container {
        width: 100%;
        /* changes to 1280px on tablet */
        max-width: 34.375rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* 48px - 64px */
        gap: clamp(3rem, 6vw, 4rem);
        position: relative;
        z-index: 1;
    }
    #why-choose .content {
        /* set text align to left if content needs to be left aligned */
        text-align: left;
        width: 100%;
        max-width: 39rem;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        /* centers content horizontally, set to flex-start to left align */
        align-items: flex-start;
    }
    #why-choose .topper {
        font-size: var(--topperFontSize);
        line-height: 1.2em;
        text-transform: uppercase;
        text-align: center;
        letter-spacing: 0.1em;
        margin-bottom: 0.25rem;
        display: block;
    }
    #why-choose .title {
        font-size: var(--headerFontSize);
        font-weight: 900;
        line-height: 1.2em;
        text-align: inherit;
        max-width: 43.75rem;
        margin: 0 0 1rem 0;
        color: var(--headerColor);
        position: relative;
    }
    #why-choose .text {
        font-size: var(--bodyFontSize);
        line-height: 1.5em;
        text-align: inherit;
        width: 100%;
        max-width: 40.625rem;
        margin: 0;
        color: var(--bodyTextColor);
    }
    #why-choose .text {
        margin-bottom: 1rem;
    }
    #why-choose .text:last-of-type {
        margin-bottom: 2rem;
    }
    #why-choose .card-group {
        width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 1.25rem;
    }
    #why-choose .item {
        text-align: left;
        list-style: none;
        width: 100%;
        /* 32px - 44px top & bottom, 24px - 32px left & right */
        padding: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2rem);
        margin: 0;
        border-radius: 0.3125rem;
        border: 2px solid #000;
        background: #FFF;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: wrap;
        /* 16px - 32px */
        column-gap: clamp(1rem, 2vw, 2rem);
        /* 24px - 28px */
        row-gap: clamp(1.5rem, 1.5vw, 1.75rem);
        /* prevents padding from adding to height and width */
        box-sizing: border-box;
    }
    #why-choose .icon {
        /* 70px - 80px */
        width: clamp(4.375rem, 7vw, 5rem);
        height: auto;
        margin: 0;
        display: block;
    }
    #why-choose .h3 {
        /* 25px - 31px */
        font-size: clamp(1.5625rem, 2vw, 1.9375rem);
        line-height: 1.2em;
        font-weight: 750;
        text-align: inherit;
        width: 55%;
        margin: 0;
        color: var(--headerColor);
        word-wrap: normal;
        
    }
    #why-choose .item-text {
        font-size: 1rem;
        line-height: 1.5em;
        text-align: inherit;
        width: 100%;
        margin: auto 0 0 0;
        color: var(--bodyTextColor);
    }
    #why-choose .button-solid {
        display: none;
        width: fit-content;
        min-width: 10rem;
    }
    #why-choose .mobile-button {
        display: inline-block;
    }
    
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    #why-choose .container {
        max-width: 80rem;
    }
    #why-choose .content {
        width: 70%;
    }
    #why-choose .card-group {
        /* switch to grid since there's no chance of adding or removing cards in this design.  We can be more set and rigid in our layout of this section and use grid for better spacing */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        /* if different boxes are different heights, this makes them all the same height so the grid is always even */
        align-items: stretch;
    }
    #why-choose .item {
        grid-column: span 1;
    }
}
/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #why-choose::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("/assets/img/blob-scene-haikei-portfolio-d.svg");
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        opacity: 0.15;
        z-index: 0;
        pointer-events: none;
        
    }
    #why-choose .container {
        flex-direction: row;
        justify-content: space-between;
        z-index: 1;
    }
    #why-choose .card-group {
        width: 60%;
        max-width: 47.375rem;
        /* prevents flexbox from squishing it */
        flex: none;
    }
    #why-choose .button-solid {
        display: inline-block;
    }
    #why-choose .mobile-button {
        display: none;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #why-choose {
        background-color: var(--Dark);
    }
    body.dark-mode #why-choose::before {
      opacity: 0.06;
    }
    body.dark-mode #why-choose .title,
    body.dark-mode #why-choose .text,
    body.dark-mode #why-choose .h3,
    body.dark-mode #why-choose .item-text {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #why-choose .icon {
        filter: invert(1) brightness(2);
    }
    body.dark-mode #why-choose .item {
        background-color: var(--heroBG);
        border: 2px solid #FFF;
    }
    body.dark-mode #why-choose .button-solid {
        background-color: var(--accentColor);
    }
}

/*-- -------------------------- -->
<---        How We've Helped     ->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #sbs-1982 {
    padding: var(--sectionPadding);
    overflow: hidden;
    position: relative;
    z-index: 1;
  }
  #sbs-1982:before {
    content: '';
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.05;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  #sbs-1982 .container {
    width: 100%;
    /* changes to 1280px at desktop */
    max-width: 36.5rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    /* 48px - 64px */
    gap: clamp(3rem, 6vw, 5rem);
  }
  #sbs-1982 .content {
    /* set text align to left if content needs to be left aligned */
    text-align: center;
    width: 100%;
    max-width: 35.625rem;
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: flex-start;
    gap: 1rem;
  }
  #sbs-1982 .topper {
    align-self: center;
  }
  #sbs-1982 .text-large {
    font-size: 1.25rem;
    line-height: 1.5em;
    margin: 0 0 0.75rem 0;
    color: var(--headerColor);
  }
  #sbs-1982 .text {
    margin-bottom: 2rem;

  }
  #sbs-1982 .ratings {
    width: 100%;
    margin: 0;
    margin-top: 4rem;
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    align-self: stretch;
  }
  #sbs-1982 .ratings:before {
    content: '';
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.1;
    border-radius: 1rem;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  #sbs-1982 .stars {
    display: flex;
    flex-direction: row;
  }
  #sbs-1982 .rating {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  #sbs-1982 .h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2em;
    margin: 0;
    color: var(--headerColor);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
  }
  #sbs-1982 .rating-text {
    font-size: 1rem;
    line-height: 1.5em;
    text-align: inherit;
    width: 100%;
    margin: 0;
    color: var(--bodyTextColor);
  }
  #sbs-1982 .icon {
    width: 5.125rem;
    height: 5.9375rem;
    position: absolute;
    top: -1.875rem;
    right: 1.25rem;
  }
  #sbs-1982 .image-group {
    width: 100%;
    max-width: 39.375rem;
    /* Changes to auto at desktop */
    height: 30rem;
    /* clips the corners of the children around the border radius */
    overflow: hidden;
    border-radius: 1rem;
    order: -1;
    position: relative;
  }
  #sbs-1982 .background {
    width: 100%;
    height: 100%;
    /* makes it cover the parent dimensions */
    object-fit: contain;
    display: block;
  }
  #sbs-1982 .background img {
    width: 100%;
    height: 100%;
    /* makes it cover the parent like a backgorund image */
    object-fit: contain;
    display: block;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {

  #sbs-1982 .content {
    align-self: center;
  }
  #sbs-1982 .image-group {
    height: auto;
  }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #sbs-1982 .container {
    max-width: 80rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: left;
    align-content: left;
  }
  #sbs-1982 .topper {
    align-self: left;
  }
  #sbs-1982 .title {
    text-align: left;
  }
  #sbs-1982 .text-large {
    text-align: left;
  }
  #sbs-1982 .text {
    text-align: left;
  }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
  body.dark-mode #sbs-1982 {
    background-color: var(--dark);
  }
  body.dark-mode #sbs-1982 .title,
  body.dark-mode #sbs-1982 .text-large,
  body.dark-mode #sbs-1982 .text,
  body.dark-mode #sbs-1982 .h3,
  body.dark-mode #sbs-1982 .rating-text,
  body.dark-mode #sbs-1982 .desc,
  body.dark-mode #sbs-1982 .box-text {
    color: var(--bodyTextColorWhite);
  }
  body.dark-mode #sbs-1982 .text,
  body.dark-mode #sbs-1982 .rating-text,
  body.dark-mode #sbs-1982 .box-text {
    opacity: 0.8;
  }
}