/* FONTS */

@font-face {
    font-family: 'Compacta';
    src: url('../font/CompactaBT-Bold.woff2') format('woff2'),
        url('../font/CompactaBT-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}



@font-face {
    font-family: 'Compacta';
    src: url('../font/CompactaBT-BoldItalic.woff2') format('woff2'),
        url('../font/CompactaBT-BoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Bai Jamjuree';
    src: url('../font/BaiJamjuree-Italic.woff2') format('woff2'),
        url('../font/BaiJamjuree-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Bai Jamjuree';
    src: url('../font/BaiJamjuree-Bold.woff2') format('woff2'),
        url('../font/BaiJamjuree-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bai Jamjuree';
    src: url('../font/BaiJamjuree-Regular.woff2') format('woff2'),
        url('../font/BaiJamjuree-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bai Jamjuree';
    src: url('../font/BaiJamjuree-BoldItalic.woff2') format('woff2'),
        url('../font/BaiJamjuree-BoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

/* COLOR VARIABLES */

:root {
    --white: #FFFFFF;
    --black: #000000;
    --orange: #FF2600;
    --orange-trans: #ff2600D9;
    --orange-glow: #ff7525;
    --green: #82A282;
    --light-grey: #ECECEC;
    --transparent: #00000000;
    --drop-shadow: #00000030;
}

/* PAGE SETUP */

* {
    scroll-behavior: smooth;
    scroll-margin-top: 144px;
}

html {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

body {
    margin: 0px;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    background-image: url("../img/home-bg.png");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto 100%;
    font-family: 'Bai Jamjuree';
}

main {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    /* background-color: var(--green); */
    overflow-x: hidden;
    overflow-y: auto;
    padding: 144px 8%; /* padding for main to start under nav */
    animation-name: bg-blur;
    animation-duration: 0.5s;
    animation-fill-mode: both;
    scrollbar-color: var(--orange) rgba(0, 0, 0, 0);
}

@keyframes bg-blur {
    from {backdrop-filter: brightness(100%) blur(0px);}
    to {backdrop-filter: brightness(150%) blur(20px);}
  }

main img {
    max-width: 100%;
    width: auto;
    height: auto;
}

a, a:visited {
    text-decoration: none;
    color: var(--orange);
    transition: color 0.2s;
}

h1, h2, h3 {
    color: var(--orange-trans);
    font-family: 'Compacta';
    font-weight: bold;
}

h1, h2 {
    letter-spacing: 0.06em;
    font-style: italic;
}

h1 {
    font-size: 64px;
    margin: 54px 0px 18px;
}

h2 {
    font-size: 32px;
    margin: 16px 0px;
}

h3 {
    font-size: 24px;
    margin: 12px 0px;
}

h4 {
    font-family: 'Bai Jamjuree';
    font-weight: bold;
    font-style: italic;
    font-size: 22px;
    margin: 0px 0px 32px;
}

ul {
    margin: 0px 0px 16px;
}

/* NAVIGATION */

nav {
    display: flex;
    width: 100%;
    height: 144px;
    position: fixed;
    top: 0px;
    z-index: 99;
    box-sizing: border-box;
    justify-content: space-between;
    background-image: linear-gradient(var(--white) 20%,var(--transparent)); 
}

.nav-button {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding-right: 42px;
}

.nav-button > h2 {
    font-size: 24px;
    transition: color 0.2s;
}

/* Link Hover */
a:hover, .nav-button:hover > h2 {
    color: var(--orange-glow);
    transition: color 0.2s;
}

/* For logo left padding */
#nav-logo {
    padding-left: 42px;
}

/* For menu */
#nav-menu {
    display: flex;
    transition: right 0.3s ease;
}

/* pointer on burgers */
#nav-burger-open, #nav-burger-closed {
    cursor: pointer;
}

/* fixes open menu burger positioning */
#nav-burger-open {
    padding: 56px 0px;
}

/* Responsive nav*/

@media screen and (min-width: 1280px) {
    /* Hide burgers */
    .nav-burger-container {
        display: none;
    }
}

@media screen and (max-width: 1279px) {
    /* Shift menu off viewport */
    #nav-menu {
        flex-direction: column;
        position: absolute;
        right: -312px;
        z-index: 100; /* makes menu higher */
        background-color: var(--light-grey);
        height: 100vh;
        overflow-x: none;
        overflow-y: scroll;
    }

    /* Aligns button texts to the right and adds padding to the left */
    #nav-menu > .nav-button {
        justify-content: flex-end;
        padding-left: 42px;
    }
    
    /* .nav-burger-container {
        z-index: 100;
    } */
}

/* HOME */

main#home { /* different padding for home page */
    padding: 0;
    animation-name: bg-blur;
    animation-duration: 0.5s;
    animation-direction: reverse;
    animation-fill-mode: both;
}

section#section-home-title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
}

section#section-home-title > h1 {
    font-size: 7.3vw;
    margin: 0;
}

/* Screen width 1025 or higher: Title size 7.3vw */
@media screen and (min-width: 1025px) {
    section#section-home-title > h1 {
        font-size: 5.3vw;
    }
}
  
/* Screen width 1024 or smaller: Title size 14.6vw */
@media screen and (max-width: 1024px) {
    section#section-home-title > h1 {
        font-size: 10.6vw;
    }
}

/* CONTENT PAGES */

section {
    display: flex;
    padding-bottom: 64px;
    gap: 32px;
}

section#header {
    flex-direction: column;
}

.content-text{
    display:flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
}

.content-image{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 50%;
    perspective: 2000px; /*3D perspective; lower value intensifies*/
}

/* Responive Content */

@media screen and (max-width: 1279px) {
    section {
        display: flex;
        flex-direction: column;
    }

    .content-image, .content-text {
        width: 100%;
    }

    .content-image {
        justify-content: center;
    }
}

.hover-3d {
    transition: transform 0.2s ease-out;
    transform-style: preserve-3d; /* Allow 3D transforms */
    transform-origin: center;
    filter: drop-shadow(10px 10px 4px var(--drop-shadow));
}