@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Lao+Looped:wght@400;500;600;700&family=Satisfy&display=swap");

:root {
    --rich-black-fogra-29: hsl(222, 44%, 8%);
    --middle-blue-green_40: hsla(174, 64%, 71%, 0.4);
    --midnight-green: hsl(186, 100%, 19%);
    --midnight-green_a25: hsla(186, 100%, 19%, 0.25);
    --independece: hsl(236, 14%, 39%);
    --verdigris: hsl(182, 100%, 35%);
    --ming: hsl(186, 72%, 24%);
    --space-cadet: hsla(226, 45%, 24%);
    --eerie-black: hsl(0, 0%, 13%);
    --alice-blue: hsl(187, 25%, 94%);
    --gray-web: hsl(0, 0%, 50%);
    --gainsboro: hsl(0, 0%, 87%);
    --white: hsl(0, 0%, 100%);
    --white_a20: hsla(0, 0%, 100%, 0.2);
    --white_a10: hsla(0, 0%, 100%, 0.1);
    --black: hsl(0, 0%, 0%);

    --ff-oswald: "Noto Sans Lao Looped", sans-serif;
    --ff-rubik: "Noto Sans Lao Looped", sans-serif;

    --headline-lg: 5rem;
    --headline-md: 3rem;
    --headline-sm: 2rem;
    --title-lg: 1.8rem;
    --title-md: 1.5rem;
    --title-sm: 1.4rem;

    --fw-500: 500;
    --fw-700: 700;

    /**
   * spacing
   */

    --section-padding: 120px;

    /**
   * box shadow
   */

    --shadow-1: 0px 2px 20px hsla(209, 36%, 72%, 0.2);
    --shadow-2: 0 4px 16px hsla(0, 0%, 0%, 0.06);

    /**
   * border radius
   */

    --radius-circle: 50%;
    --radius-12: 12px;
    --radius-6: 6px;
    --radius-4: 4px;

    /**
   * transition
   */

    --transition-1: 0.25s ease;
    --transition-2: 0.5s ease;
    --transition-3: 1s ease;
    --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
    --cubic-out: cubic-bezier(0.05, 0.83, 0.52, 0.97);
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

a,
img,
span,
time,
input,
button,
ion-icon {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    height: auto;
}

input,
button {
    background: none;
    border: none;
    font: inherit;
}

input {
    width: 100%;
    outline: none;
}

button {
    cursor: pointer;
}

ion-icon {
    pointer-events: none;
}

address {
    font-style: normal;
}

html {
    font-size: 10px;
    font-family: var(--ff-rubik);
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    font-size: 1.6rem;
    color: var(--independece);
    line-height: 1.8;
    overflow: hidden;
}

body.loaded {
    overflow-y: visible;
}
body.nav-active {
    overflow: hidden;
}

/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container {
    padding-inline: 16px;
}

.headline-lg {
    font-size: var(--headline-lg);
    color: var(--white);
    font-weight: var(--fw-500);
    line-height: 1.2;
}

.headline-md {
    font-size: var(--headline-md);
    font-weight: var(--fw-700);
}

.headline-lg,
.headline-md {
    font-family: var(--ff-oswald);
}

.headline-md,
.headline-sm {
    line-height: 1.3;
}

.headline-md,
.headline-sm {
    color: var(--midnight-green);
}

.headline-sm {
    font-size: var(--headline-sm);
}

.title-lg {
    font-size: var(--title-lg);
}

.title-md {
    font-size: var(--title-md);
}

.title-sm {
    font-size: var(--title-sm);
}

.social-list {
    display: flex;
}

.section {
    padding-block: var(--section-padding);
}

.has-before,
.has-after {
    position: relative;
    z-index: 1;
}

.has-before::before,
.has-after::after {
    content: "";
    position: absolute;
}

.btn {
    background-color: var(--verdigris);
    color: var(--white);
    font-weight: var(--fw-700);
    padding: 12px 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-6);
    overflow: hidden;
}

.btn::before {
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--eerie-black);
    border-radius: var(--radius-6);
    transition: var(--transition-2);
    z-index: -1;
}

.btn:is(:hover, :focus-visible)::before {
    transform: translateX(100%);
}

.w-100 {
    width: 100%;
}

.grid-list {
    display: grid;
    gap: 40px 28px;
}

.text-center {
    text-align: center;
}

[data-reveal] {
    opacity: 0;
    transition: var(--transition-2);
}

[data-reveal].revealed {
    opacity: 1;
}

[data-reveal="bottom"] {
    transform: translateY(50px);
}

[data-reveal="bottom"].revealed {
    transform: translateY(0);
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="left"].revealed,
[data-reveal="right"].revealed {
    transform: translateX(0);
}

/*-----------------------------------*\
  #PRELOADER
\*-----------------------------------*/
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--verdigris);
    display: grid;
    place-items: center;
    z-index: 6;
    transition: var(--transition-1);
}

.preloader.loaded {
    visibility: hidden;
    opacity: 0;
}

.preloader .circle {
    width: 50px;
    height: 50px;
    border: 4px solid var(--white);
    border-radius: var(--radius-circle);
    border-block-start-color: transparent;
    animation: rotate360 1s ease infinite;
}

@keyframes rotate360 {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(1turn);
    }
}

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/
.header .btn {
    display: none;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding-block: 16px;
    z-index: 4;
}

.header.active {
    position: fixed;
    background-color: var(--rich-black-fogra-29);
    animation: headerActive 0.5s ease forwards;
}

@keyframes headerActive {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-open-btn {
    color: var(--white);
    font-size: 4rem;
}

.navbar,
.overlay {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100vh;
}

.navbar {
    right: -300px;
    max-width: 300px;
    background-color: var(--rich-black-fogra-29);
    z-index: 3;
    transition: 0.25s var(--cubic-in);
    visibility: hidden;
}

.navbar.active {
    transform: translateX(-300px);
    visibility: visible;
    transition: 0.5s var(--cubic-out);
}

.navbar-top {
    position: relative;
    padding-inline: 25px;
    padding-block: 55px 100px;
}

.nav-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--white);
    font-size: 2.8rem;
}

.navbar-list {
    margin-block-end: 30px;
    border-block-end: 1px solid var(--white_a10);
}

.navbar-item {
    border-block-start: 1px solid var(--white_a10);
}

.navbar-link {
    color: var(--white);
    text-transform: uppercase;
    padding: 10px 24px;
}

.social-list {
    justify-content: center;
    gap: 20px;
    color: var(--white);
    font-size: 1.8rem;
}

.overlay {
    right: -100%;
    background-color: var(--black);
    opacity: 0.3;
    visibility: hidden;
    transition: var(--transition-2);
    z-index: 2;
}

.overlay.active {
    transform: translateX(-100%);
    visibility: visible;
}

/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero-banner {
    display: none;
}

.hero {
    background-color: var(--midnight-green);
    --section-padding: 200px;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-subtitle {
    color: var(--white);
    font-weight: var(--fw-500);
    padding-inline-start: 80px;
}

.hero-subtitle::before {
    top: 50%;
    left: 0;
    width: 60px;
    height: 1px;
    background-color: var(--white);
}

.hero-title {
    margin-block: 20px 30px;
}

.hero-card {
    background-color: var(--white);
    border-radius: var(--radius-12);
    padding: 20px;
}

.hero-card .card-text {
    color: var(--eerie-black);
    border-block-end: 1px solid var(--midnight-green_a25);
    padding-block-end: 12px;
    margin-block-end: 14px;
}

.hero-card .input-wrapper {
    position: relative;
    color: gray;
    opacity: 0.5;
}

.hero-card .input-field {
    color: var(--eerie-black);
    border-block-end: 1px solid var(--gainsboro);
    padding-inline-end: 18px;
}

.hero-card .input-wrapper ion-icon {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: var(--verdigris);
}

.hero-card .btn {
    width: 100%;
    justify-content: center;
    margin-block-start: 16px;
}

/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about {
    padding-block-end: 0;
}

.about .container {
    display: grid;
    gap: 20px;
}

.about .section-text {
    margin-block: 20px 35px;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 15px;
}

.tab-btn {
    background-color: var(--alice-blue);
    color: var(--midnight-green);
    padding: 7px 30px;
    border-radius: var(--radius-6);
    font-weight: var(--fw-700);
}

.tab-btn.active {
    background-color: var(--verdigris);
    color: var(--white);
}

.tab-text {
    color: var(--midnight-green);
    margin-block: 35px;
}

.about-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-block-end: 10px;
}

.about-item ion-icon {
    color: var(--verdigris);
    font-size: 2rem;
    flex-shrink: 0;
}

/*-----------------------------------*\
  #LISTING
\*-----------------------------------*/

.listing {
    background-color: var(--alice-blue);
}

.listing-card {
    padding: 25px 16px;
    display: flex;
    gap: 20px;
    border: 2px solid var(--middle-blue-green_40);
    border-radius: var(--radius-12);
    transition: var(--transition-1);
}

.listing-card:is(:hover, :focus-visible) {
    border-color: var(--verdigris);
}

.listing-card .card-title {
    margin-block-end: 5px;
    font-family: var(--ff-oswald);
}

.listing-card .card-text {
    color: var(--midnight-green);
}

/*-----------------------------------*\
  #BLOG
\*-----------------------------------*/

.blog {
    background-image: linear-gradient(
        to bottom,
        var(--alice-blue) 60%,
        var(--white) 60%
    );
    padding-block-start: 0;
}

.blog .section-title {
    margin-block-end: 60px;
}

.blog-card {
    padding: 50px 36px;
    border-radius: var(--radius-12);
    border: 2px solid var(--alice-blue);
    background-image: url("../images/blog1-card.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.blog-card01 {
    padding: 50px 36px;
    border-radius: var(--radius-12);
    border: 2px solid var(--alice-blue);
    background-image: url("../images/blog2-card.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.blog-card::before,
.blog-card::after {
    inset: 0;
    z-index: -1;
    transition: var(--transition-3);
}

.blog-card::before {
    background-color: var(--midnight-green);
    opacity: 0.9;
}

.blog-card::after {
    background-color: var(--white);
}

.blog-card:is(:hover, :focus-within)::after {
    transform: translateY(100%);
}

.blog-card .meta-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 20px;
    margin-block-end: 12px;
}

.blog-card .card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--midnight-green);
}

.blog-card .card-meta ion-icon {
    font-size: 1.8rem;
}

.blog-card .card-meta:first-child .span {
    text-transform: uppercase;
}

.blog-card .date {
    color: var(--space-cadet);
    font-weight: var(--fw-700);
    text-transform: uppercase;
    opacity: 0.5;
    margin-block: 16px;
}

.blog-card .btn-text {
    color: var(--verdigris);
    margin-block-start: 12px;
}

.blog-card :is(.card-meta, .card-title, .date, .card-text, .btn-text) {
    transition: var(--transition-2);
}

.blog-card:is(:hover, :focus-within)
    :is(.card-meta, .card-title, .date, .card-text, .btn-text) {
    color: var(--white);
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer {
    background-color: var(--midnight-green);
    color: var(--white);
    background-size: contain;
    background-position: top right;
    background-repeat: no-repeat;
}

.footer-top {
    display: grid;
    gap: 40px;
    padding-block-end: 60px;
}

.footer-brand {
    background-color: var(--ming);
    padding: 32px;
    border-radius: var(--radius-6);
}

.footer .logo {
    margin-block-end: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-block-start: 12px;
}

.contact-item .item-icon {
    font-size: 4rem;
}

.contact-link {
    display: inline;
    transition: var(--transition-1);
}

.contact-link:is(:hover, :focus-visible) {
    color: var(--verdigris);
}

.footer-list-title {
    color: var(--white);
    font-weight: var(--fw-700);
    margin-block-end: 20px;
}

.footer .text {
    opacity: 0.7;
}

.footer .address {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block-start: 20px;
}

.footer .address ion-icon {
    font-size: 4rem;
    flex-shrink: 0;
}

.footer-link {
    margin-block-start: 8px;
    transition: var(--transition-1);
}

.footer-link:is(:hover, :focus-visible) {
    color: var(--verdigris);
}

.footer-form .input-field {
    color: var(--white);
    border: 1px solid var(--white_a20);
    border-radius: var(--radius-4);
    padding: 8px 20px;
}

.footer-form .input-field::placeholder {
    color: inherit;
}

.footer-form .btn {
    width: 100%;
    justify-content: center;
    margin-block: 12px 28px;
}

.footer-bottom {
    padding-block: 32px;
    border-block-start: 1px solid var(--white_a20);
}

.footer-bottom .social-list {
    justify-content: flex-start;
    gap: 8px;
    margin-block-start: 16px;
}

.footer-bottom .social-link {
    font-size: 1.4rem;
    padding: 12px;
    background-color: var(--white_a10);
    border-radius: var(--radius-circle);
    transition: var(--transition-1);
}

.footer-bottom .social-link:is(:hover, :focus-visible) {
    background-color: var(--verdigris);
}

/*-----------------------------------*\
  #BACK TO TOP
\*-----------------------------------*/

.back-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--verdigris);
    color: var(--white);
    padding: 16px;
    font-size: 2rem;
    border-radius: var(--radius-circle);
    transition: var(--transition-1);
    opacity: 0;
    z-index: 3;
}

.back-top-btn:is(:hover, :focus-visible) {
    background-color: var(--eerie-black);
}

.back-top-btn.active {
    transform: translateY(-10px);
    opacity: 1;
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for large than 768px screen
 */

@media (min-width: 768px) {
    /**
   * CUSTOM PROPERTY
   */

    :root {
        /**
     * typography
     */

        --headline-lg: 8rem;
        --headline-md: 4.8rem;
    }

    /**
   * REUSED STYLE
   */

    .container {
        max-width: 750px;
        width: 100%;
        margin-inline: auto;
    }

    /**
   * HEADER
   */

    .header .btn {
        display: block;
    }

    .nav-open-btn {
        margin-inline-start: auto;
    }

    .header .container {
        gap: 40px;
    }

    /**
   * HERO
   */

    .hero-title {
        line-height: 1.125;
    }

    .hero .wrapper {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .hero-card .input-wrapper {
        flex-grow: 1;
    }

    .hero-card .input-field {
        height: 100%;
    }

    .hero-card .btn {
        width: max-content;
        margin-block-start: 0;
    }

    /**
   * ABOUT
   */

    .about-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .about-banner {
        max-width: max-content;
        margin-inline: auto;
    }

    /**
   * LISTING
   */

    .listing .grid-list {
        grid-template-columns: 1fr 1fr;
    }

    .listing .grid-list > li:first-child {
        grid-column: 1 / 3;
    }

    /**
   * FOOTER
   */

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / 3;
    }

    .contact-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 24px;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer-bottom .social-list {
        margin-block-start: 0;
    }
}

/**
 * responsive for large than 992px screen
 */

@media (min-width: 992px) {
    /**
   * REUSED STYLE
   */

    .container {
        max-width: 940px;
    }

    /**
   * HERO
   */

    .hero-banner {
        display: block;
        max-width: max-content;
    }

    .hero .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    /**
   * ABOUT
   */

    .about .container {
        grid-template-columns: 1fr 0.8fr;
        align-items: flex-end;
    }

    .about-content {
        padding-block-end: var(--section-padding);
    }

    .about-banner {
        margin-inline-end: -80px;
    }

    /**
   * BLOG
   */

    .blog .grid-list {
        grid-template-columns: 1fr 1fr;
    }
}

/**
 * responsive for large than 1200px screen
 */

@media (min-width: 1200px) {
    /**
   * REUSED STYLE
   */

    .container {
        max-width: 1200px;
    }

    /**
   * HEADER
   */

    .header {
        padding-block: 24px;
    }

    .nav-open-btn,
    .overlay,
    .navbar-top,
    .navbar .social-list {
        display: none;
    }

    .navbar,
    .navbar.active,
    .navbar-list {
        all: unset;
        display: block;
    }

    .navbar {
        margin-inline-start: auto;
    }

    .navbar-list {
        display: flex;
        gap: 8px;
    }

    .navbar-item {
        border-block-start: none;
    }

    .navbar-link {
        --title-md: 1.8rem;
        font-weight: var(--fw-500);
        padding-inline: 16px;
        text-transform: capitalize;
    }

    /**
   * HERO
   */

    .hero .container {
        grid-template-columns: 0.8fr 1fr;
        gap: 96px;
    }

    /**
   * LISTING
   */

    .listing .grid-list {
        grid-template-columns: repeat(4, 1fr);
    }

    /**
   * BLOG
   */

    .blog .grid-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /**
   * FOOTER
   */

    .footer {
        background-size: auto;
    }

    .footer-top {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-brand {
        grid-column: 1 / 5;
        padding: 28px 56px;
        display: grid;
        grid-template-columns: 0.3fr 1fr;
        align-items: center;
    }

    .footer .logo {
        margin-block-end: 0;
    }

    .contact-list {
        justify-content: space-between;
    }

    .contact-list::after {
        top: 0;
        left: 50%;
        width: 2px;
        height: 100%;
        background-color: var(--white_a20);
    }

    .contact-item {
        margin-block-start: 0;
    }
}
