@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@view-transition {
    navigation: auto;
}

html {
    font-family: 'Kanit';
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
}

::selection {
    background: #ffe207;
    color: black;
}

img {
    margin-bottom: -5px; /* cause there is a 5px gap somewhere, I don't know where it's from */
}

.centerText {
    text-align: center;
}

h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0.67em 0;
}
h2 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 2em 0 0.75em 0;
}
h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0.75em 0;
}
h4 {
    margin: 0;
}

li.bottomSpacing:not(:last-child) {
    margin-bottom: 10px;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #ffe207;
}

button {
    padding: 15px 25px;
    border: 2px solid black;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    font-size: 18px;
    text-wrap-mode: nowrap;
    cursor: pointer;
    margin: 50px auto;
    color: black;
    background-color: transparent;
    font-family: 'Kanit';
}
button > img {
    height: 15px;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 0;
    z-index: unset;
}
.button_white {
    border: 2px solid white;
    color: white;
}
.button_hover:hover {
    background-color: #ffe207;
    border-color: #ffe207;
}

.content {
    padding: 0 clamp(25px, 8vw, 150px);
    margin: 0 auto;
    max-width: 1300px;
}

main {
    margin-block: 150px 80px;
}

/* main page */

.card {
    background-color: black; /* if background image does not exist or load */
    background-position: center;
    background-size: cover;
    color: white;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.bigCard {
    aspect-ratio: 1 / 1.3;
}

.cardInner {
    margin: 40px;
    height: calc(100% - 80px);
}

.card button {
    margin: 0;
    position: absolute;
    left: 0;
    bottom: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(50px, 5vw, 90px);
}

.gridShifted {
    margin-bottom: 120px;
}
.gridShifted > *:nth-child(2n) {
    transform: translateY(120px);
}

@media (max-width: 850px) {
    .grid {
        grid-template-columns: repeat(1, 1fr);
        margin-bottom: 0;
    }
    .grid > * {
        transform: translateY(0px) !important;
    }
}

/* hover circle effect */

.circleEffect {
    position: absolute;
    width: 0;
    height: 0;
    top: 0;
    left: 0;
    border-radius: 100%;
    background-color: #ffe207;
    opacity: 1;
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hoverCircleEffect > *:not(.circleEffect) {
    z-index: 1;
    position: relative;
}
.hoverCircleEffect {
    transition: all 0.3s;
}

.hoverCircleEffect:hover .circleEffect {
    width: 300%;
    height: 300%;
}
.hoverCircleEffect:hover {
    color: black;
}
.hoverCircleEffect:hover button {
    color: black;
    border-color: black;
}
.hoverCircleEffect:hover button > img {
    filter: invert(1);
}

/*    PAGE: INSIDE    */

.widget {
    display: flex;
    column-gap: 70px;
    flex-wrap: wrap;
    margin-bottom: 70px;
    justify-content: center;
    flex-direction: row;
    padding: clamp(10px, 5vw, 30px);
    overflow: hidden;
    position: relative;
}
.flexReverse {
    flex-direction: row-reverse !important;
}

.widgetImage {
    flex: 1;
    max-width: 250px;
    min-width: 180px;
    flex-basis: 180px;
}

.widgetImage > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.widgetText {
    flex: 1;
    flex-basis: 400px;
}
.widget:hover .circleEffect {
    width: 300%;
    height: 300%;
}

/*    PAGE: CONTACT    */

.contactForm {
    border: 0px solid black;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 80px;
}

.contactForm > input[name='company'],
.contactForm > textarea[name='message'] {
    grid-column: span 2;
}

.contactForm textarea {
    resize: vertical;
    max-height: 300px;
}

.contactForm > input,
select,
textarea {
    width: 100%;
    min-width: 200px;
    padding: 0;
    margin: 0;
    border: none;
    border-bottom: 2px solid black;
    outline: none;
    padding-block: 10px;
    font-size: 1em;
    font-family: 'Kanit';
    border-radius: 0;
    background-color: transparent;
    color: black;
}

::placeholder {
    color: #999;
    opacity: 1; /* Firefox */
}

select,
select option {
    color: #000000;
}

select:invalid,
select option[value=''] {
    color: #999;
}

@media (max-width: 750px) {
    .contactForm > * {
        grid-column: span 2;
    }
}

.contactForm > *:user-invalid {
    border-color: rgb(255, 0, 68);
    colodr: rgb(255, 0, 68);
}

.textGray {
    color: #999;
}

/*    PAGE: IT Services    */

/* no unice css needed */

.backgroundRepeat {
    background-image: url(assets/pattern2.png);
    background-size: 30px;
    background-position: center;
}

.scaleUpAmination {
    animation: 0.5s cubic-bezier(0.01, 0.66, 0.64, 1.08) 0s 1 scaleUp;
}
@keyframes scaleUp {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}
