/*----------------------------------------------------------------------------------------------------------------------
FONTS
----------------------------------------------------------------------------------------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Caprasimo&display=swap');
@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');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/*----------------------------------------------------------------------------------------------------------------------
HTML ELEMENTS
----------------------------------------------------------------------------------------------------------------------*/

body {
    background-color: #424242;
    color: white;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    text-align: center;
    margin: 2% 0;
}

@media screen and (max-width:480px) {
    body { margin: 0; }
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body > * {
    text-align: left;
}

a {
    color: #1968b8;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    color: black;
}

.html {
    text-align: left;
    padding: 20px;
}

h2, h3, h4, h5 {
    display: block;
    font-family: Kanit, sans-serif;
    font-size: 21px;
    font-weight: normal;
    line-height: normal;
    color: #790000;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

h3 {
    font-size: 17px;
}

h4 {
    font-size: 17px;
    color: black;
}

h5 {
    font-size: 17px;
    color: black;
    font-style: italic;
}

p {
    font-size: 15px;
    color: black;
    margin: 0;
}

/*----------------------------------------------------------------------------------------------------------------------
GRID RENDERING
----------------------------------------------------------------------------------------------------------------------*/

.grid {
    /*border: 1px solid white;*/
}

.grid h1 {
    display: none;
}

.grid .tile {
    /*position: relative;*/
    /*width: 150px;*/
    /*height: 150px;*/
    /*border: 1px solid #808080;*/
}

.grid .cnt {
    position: relative;
    /*position: relative;*/
    /*width: 300px;*/
    /*height: auto;*/
    /*border: 1px solid red;*/
    /*z-index: 2;*/
    pointer-events: none;
}

.grid .tile .sub {
    /*position: absolute;*/
    /*width: 100%;*/
    /*height: 100%;*/
    /*background-color: #204020;*/
    /*top: 0;*/
    /*left: 0;*/
    /*z-index: 1;*/
    /*pointer-events:all;*/
    /*border: 1px solid white;*/
}

.grid .tile.pointer .sub {
    cursor: pointer;
}

.grid .tile.logo_tile .sub {
    background-color: black;
}

/*----------------------------------------------------------------------------------------------------------------------
SIDEBAR
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.sidebar .cnt {
    padding: 20px;
    line-height: 21px;
}

.grid .tile.sidebar .cnt h4 {
    margin-top: 10px;
    font-size: 16px;
}

.grid .tile.sidebar .cnt p {
    font-size: 14px;
    color: #404040;
    margin: 3px 0 3px 0;
}

.grid .tile.sidebar .cnt b {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    margin-top: 5px;
}

.grid .tile.sidebar .cnt i {
    color: #808080;
}

.grid .tile.sidebar .cnt a {
    pointer-events: all;
}

.grid .tile.sidebar .cnt hr {
    margin: 10px 0 10px 0;
    color: transparent;
    background-color: transparent;
    border-top: 2px dashed #b0b0b0;
}

.grid .tile.sidebar .cnt .preview_item {
    border-bottom: 1px solid #b8b8b8;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.grid .tile.sidebar .cnt .preview_item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/*----------------------------------------------------------------------------------------------------------------------
ERROR
----------------------------------------------------------------------------------------------------------------------*/

.error {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #d3a2a2;
    border: 5px solid #7f0606;
    text-align: left;
    color: black;
    padding: 10px;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    z-index: 1000;
}

.error h1 {
    font-family: Kanit, sans-serif;
    font-size: 21px;
    color: #5b0000;
    margin: 0;
}

.error h2 {
    font-size: 17px;
    color: #5b0000;
    margin: 10px 0 0 0;
}

.error .label {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    display: inline-block;
    width: 70px;
}

.error .trace {
    font-size: 12px;
}

.error .trace .label {
    font-size: 12px;
}

.error .trace hr {
    height: 1px;
    background-color: transparent;
    border-top: 1px dashed #843939;
    border-bottom: none;
}

.error .btn_close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #5b0000;
    font-family: Kanit, sans-serif;
    font-size: 20px;
    cursor: pointer;
}

/*----------------------------------------------------------------------------------------------------------------------
BUTTON
----------------------------------------------------------------------------------------------------------------------*/

.grid .button .sub {
    background-color: black;
    cursor: pointer;
    background-size: 100% 100%;
    background-position: center center;
}

.grid .button .cnt {
    font-family: Kanit, sans-serif;
    font-size: 22px;
    line-height: 100%;
    margin-top: 42%;
    cursor: pointer;
    pointer-events: none;
    text-align: center;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: -moz-none;
    -o-user-select: none;
    user-select: none;
}

.grid .button .sub:hover {
    background-color: #202020;
}

.grid .button.disabled .sub {
    background-color: #f0f0f0;
    cursor: default;
}

.grid .button.gray .sub { background-color: #b4b4b4; }
.grid .button.gray .sub:hover { background-color: #c4c4c4; }
.grid .button.gray.disabled .sub { background-color: #f0f0f0; }

.grid .button.up .sub { background-image: url(../images/btn_up.png); }
.grid .button.right .sub { background-image: url(../images/btn_right.png); }
.grid .button.down .sub { background-image: url(../images/btn_down.png); }
.grid .button.left .sub { background-image: url(../images/btn_left.png); }

.grid .button.gray.up .sub { background-image: url(../images/btn_gray_up.png); }
.grid .button.gray.right .sub { background-image: url(../images/btn_gray_right.png); }
.grid .button.gray.down .sub { background-image: url(../images/btn_gray_down.png); }
.grid .button.gray.left .sub { background-image: url(../images/btn_gray_left.png); }

@media screen and (max-width:480px) {
    .grid .button .cnt { font-size: 5vw; }
}

.grid .tile .cnt .btn_close {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 10px;
    right: 5px;
    z-index: 100;
    cursor: pointer;
    pointer-events: all;
    background-image: url(../images/btn_close.png);
    background-position: center center;
    background-size: 40px 40px;
}

.grid .tile .cnt .btn_close:hover {
    opacity: 0.6;
}

/*----------------------------------------------------------------------------------------------------------------------
THUMBNAIL
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.thumbnail {
    /*background-color: white !important;*/
}
.grid .tile.thumbnail .sub {
    /*margin-left: 2%;*/
    /*width: 96% !important;*/
    /*height: 96% !important;*/
    /*border: 2px solid black !important;*/
}

.grid .tile.thumbnail .sub:hover {
    /*opacity: 0.8 !important;*/
    filter: brightness(120%);
}

/*----------------------------------------------------------------------------------------------------------------------
TILE BUTTONS
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.tile_button .cnt {
    height: 100% !important;
}

.grid .tile .cnt .btn_close,
.grid .tile .cnt .btn_prev,
.grid .tile .cnt .btn_next {
    position: absolute;
    width: 160px;
    height: 160px;
    background-position: center center;
    background-size: 100% 100%;
    pointer-events: none;
    cursor: pointer;
}

.grid .tile .cnt .btn_close {
    border-top: 5px solid white;
    border-right: 5px solid white;
    top: 0;
    right: 0;
    background-image: url(../images/btn_close.png);
}

.grid .tile .cnt .btn_prev {
    border-left: 5px solid white;
    border-bottom: 5px solid white;
    left: 0;
    top: 0;
    background-image: url(../images/btn_prev.png);
}

.grid .tile .cnt .btn_next {
    border-right: 5px solid white;
    border-bottom: 5px solid white;
    left: 0;
    top: 0;
    background-image: url(../images/btn_next.png);
}

.grid .tile:hover .btn_close,
.grid .tile:hover .btn_prev,
.grid .tile:hover .btn_next {
    opacity: 0.75;
}

.grid .tile .cnt .btn_close.disabled,
.grid .tile .cnt .btn_prev.disabled,
.grid .tile .cnt .btn_next.disabled {
    cursor: default;
    pointer-events: none;
}

.grid .tile .cnt .btn_close.disabled {
    background-image: url(../images/btn_close_d.png);
}

.grid .tile .cnt .btn_prev.disabled {
    background-image: url(../images/btn_prev_d.png);
}

.grid .tile .cnt .btn_next.disabled {
    background-image: url(../images/btn_next_d.png);
}

.grid .tile:hover .btn_close.disabled,
.grid .tile:hover .btn_prev.disabled,
.grid .tile:hover .btn_next.disabled {
    opacity: 1;
}


/*----------------------------------------------------------------------------------------------------------------------
PAGE CONTENT
----------------------------------------------------------------------------------------------------------------------*/

.grid .page_content .cnt {
    color: black;
    padding: 20px 30px 30px 30px;
}

.grid .page_content .cnt h2 {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 23px;
}

.grid .page_content .cnt h3 {
    color: black;
    font-size: 20px;
}

.grid .page_content .cnt p {
    font-size: 17px;
    line-height: 28px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.grid .page_content .cnt a {
    pointer-events: all;
    color: #1968b8;
}

.grid .page_content .cnt .inline_link {
    pointer-events: all;
    cursor: pointer;
    color: #1968b8;
    font-weight: 600;
}

.grid .page_content .cnt .inline_link:hover {
    color: black;
}

@media screen and (max-width:800px) {
    .grid .page_content .cnt {  padding: 25px 25px 25px 25px; }
    .grid .page_content .cnt h2 { font-size: 20px; }
    .grid .page_content .cnt p { font-size: 14px; line-height: 21px; }
}

@media screen and (max-width:480px) {
    .grid .page_content .cnt {  padding: 20px 20px 20px 20px; }
    .grid .page_content .cnt h2 { font-size: 18px; }
    .grid .page_content .cnt p { font-size: 3vw; line-height: 120%; }
}

/*----------------------------------------------------------------------------------------------------------------------
SCALABLE CONTENT
----------------------------------------------------------------------------------------------------------------------*/

:root {
    --lh: 1.7rem;
}

.grid .scalable_content1 .sub,
.grid .scalable_content2 .sub {
    pointer-events: none;
}

.grid .scalable_content1 .cnt,
.grid .scalable_content2 .cnt {
    padding: 15px 25px 20px 20px;
    pointer-events: none;
}

.grid .scalable_content1 p,
.grid .scalable_content2 p {
    --max-lines: 3;
    position: relative;
    max-height: calc(var(--lh) * var(--max-lines));
    overflow: hidden;
    margin: 0;
    pointer-events: none;
    font-size: 17px;
}

.grid .scalable_content2 h2 {
    margin-bottom: 20px;
    margin-top: 10px;
    font-size: 21px;
}
.grid .scalable_content1 h3 {
    display: none;
}
.grid .scalable_content2 h3 {
    color: black;
    font-size: 20px;
}
.grid .scalable_content2 p {
    --max-lines: 11;
}

.grid .scalable_content1 .cnt,
.grid .scalable_content2 .cnt {
    padding: 15px 20px 20px 20px;
    font-size: 16px;
    line-height: var(--lh);
}

.grid .scalable_content1.show_ellipsis p,
.grid .scalable_content2.show_ellipsis p {
    padding-right: 25px;
}

.grid .scalable_content1.show_ellipsis p::after,
.grid .scalable_content2.show_ellipsis p::after {
    content: ". . .";
    position: absolute;
    right: 5px;
    bottom: 0;
    color: black;
    z-index: 10;
}

@media screen and (max-width:480px) {
    .grid .scalable_content1 p,
    .grid .scalable_content2 p {
        font-size: 3.2vw;
    }
    :root {
        --lh: 4.8vw;
    }
}

@media screen and (max-width:380px) {
    .grid .scalable_content1 p {
        font-size: 3.2vw;
        --max-lines: 3;
    }
    .grid .scalable_content2 p {
        font-size: 3.1vw;
        --max-lines: 11;
    }
    :root {
        --lh: 4.4vw;
    }
}

/*----------------------------------------------------------------------------------------------------------------------
TAGCLOUD
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile .cnt .tagcloud {
    position: relative;
    overflow: hidden;
    height: 320px;
    border: 1px solid red;
}

.grid .tile .cnt .tagcloud .tag {
    font-family: Kanit, sans-serif;
    position: absolute;
    color: #424242;
}

/*----------------------------------------------------------------------------------------------------------------------
PAGE NR
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.page_nr .cnt {
    color: black;
    margin-top: 40%;
    text-align: center;
}

/*----------------------------------------------------------------------------------------------------------------------
DEBUG INFO
----------------------------------------------------------------------------------------------------------------------*/

.grid .debug_info {
    font-size: 12px;
    line-height: 15px;
    font-weight: 400;
    padding-left: 5px;
    margin: 5px 5px -5px 5px;
    background-color: black;
}

.grid .debug_info .label {
    display: inline-block;
    width: auto;
    color: #a0a0a0;
}

/*----------------------------------------------------------------------------------------------------------------------
HEADER
----------------------------------------------------------------------------------------------------------------------*/

.grid .header_subscript {
    font-family: "Kanit", sans-serif;
    font-size: 21px;
    line-height: 100%;
    color: white;
    margin-top: 60%;
    padding-left: 10%;
    padding-right: 10%;
    text-align: center;
}

@media screen and (max-width:480px) {
    .grid .header_subscript { font-size: 4.2vw; }
}

/*----------------------------------------------------------------------------------------------------------------------
MENU
----------------------------------------------------------------------------------------------------------------------*/

.grid .menu {
    text-align: center;
    cursor: pointer;
}

.grid .menu.selected {
}

.grid .menu .cnt {
    font-family: Kanit, sans-serif;
    font-size: 26px;
    line-height: 100%;
    margin-top: 38%;
    cursor: pointer;
    pointer-events: none;
}

.grid .menu.selected .cnt {
    color: black;
}

.grid .menu.selected .sub {
    background-color: white !important;
}

/*----------------------------------------------------------------------------------------------------------------------
HAMBURGER MENU
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.hmenu {
    z-index: 500;
}

.grid #hmenu_cbx {
    display: none;
}

.grid .hmenu_click {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    pointer-events: all;
    z-index: 300;
}

.grid .hmenu_popup {
    position: absolute;
    top: 100%;
    left: 0;
    height: auto;
    width: 320px;
    background-color: black;
    display: none;
    pointer-events: all !important;
    padding: 20px 10px 30px 27px;
}

.grid .hmenu_click:hover .hmenu_popup { display: block; }
.grid #hmenu_cbx:checked + .hmenu_click .hmenu_popup { display: block; }
.grid .hmenu_popup:hover { display: block; }

.grid .hmenu_item {
    font-family: Kanit, sans-serif;
    font-size: 28px;
    font-weight: 400;
    text-transform: uppercase;
    height: 60px;
    line-height: 60px;
}

.grid .hmenu_item.selected {
    color: #a0a0a0;
}

/*----------------------------------------------------------------------------------------------------------------------
SERVICES
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.services h2 {
    margin-bottom: 12px;
}

/*----------------------------------------------------------------------------------------------------------------------
PROJECTS
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.project_data .cnt {
    padding: 34px 15px 20px 20px;
    height: 100%;
}

.grid .tile.project_data .cnt .data_row {
    display: block;
    width: 100%;
    color: black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 30px;
    font-size: 14px;
}

.grid .tile.project_data .cnt .data_row label {
    font-family: Kanit, sans-serif;
    position: relative;
    display: inline-block;
    width: 70px;
    margin-right: 5px;
    font-size: 15px;
    color: #790000;
}

.grid .tile.project_data .cnt .data_row label:after {
    position: absolute;
    right: 0;
    content: ":"
}

.grid .tile.project_data .cnt .data_row a {
    pointer-events: all;
}

/*----------------------------------------------------------------------------------------------------------------------
PROJECT
----------------------------------------------------------------------------------------------------------------------*/

.grid .tile.project.project_data .cnt {
    padding: 20px 20px 0 20px;
}

/*----------------------------------------------------------------------------------------------------------------------
FOOTER
----------------------------------------------------------------------------------------------------------------------*/

.grid .footerpart {
    padding: 9% 0 0 10%;
    font-size: 15px;
    line-height: 24px;
    color: #d0d0d0;
}

.grid .footerpart  b {
    font-family: Kanit, sans-serif;
    font-size: 18px;
    font-weight: normal;
    line-height: 28px;
    color: white;
}

.grid .footerpart a {
    color: #4699ed;
    pointer-events: all;
}

@media screen and (max-width:480px) {
    .grid .footerpart { width: 100% !important; }
    .grid .footerpart { font-size: 3.5vw; line-height: 130%;}
    .grid .footerpart b { font-size: 3.5vw; line-height: 130%;}
}

/*----------------------------------------------------------------------------------------------------------------------
GAME OF LIFE
----------------------------------------------------------------------------------------------------------------------*/

.grid .gol_cell .sub {
    cursor: pointer;
    transition: background-color 0.15s ease-out;
}

.grid .gol_cell .sub:hover {
    opacity: 0.8;
}

/* Showcase tiles - borders match background */
.grid .showcase_tile .sub {
    border-color: #424242 !important;
    background-color: #424242 !important;
    transition: filter 0.3s ease-out;
}

.grid .showcase_tile .sub:hover {
    filter: brightness(1.5);
}

.grid .showcase_back .sub {
    border-color: white !important;
}

/* Showcase back button */
.grid .tile.showcase_back .sub {
    background-color: #1a1a1a !important;
    background-image: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease-out;
}

.grid .tile.showcase_back:hover .sub {
    background-color: #404040 !important;
}

/* Showcase image title */
.grid .showcase_title_tile .sub {
    border-color: white !important;
}

.grid .tile.showcase_title_tile .cnt {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.showcase_title {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.showcase_title_line.title {
    font-family: Kanit, sans-serif;
    font-size: 34px;
    font-weight: 400;
}

.showcase_title_line.description {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.85;
}

.showcase_title_line.client-year {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
}

.grid .tile.showcase_back .cnt {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px;
    color: white;
    box-sizing: border-box;
    cursor: pointer;
}

.grid .tile.showcase_back .cnt .back_arrow {
    margin-right: 8px;
    font-size: 14px;
}
