﻿:root {
    --green: #5ea623;
    --blue: #3e7fb2;
    --bg: #050708;
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Arial,Helvetica,sans-serif;
}

body {
    background: #f4f6f8;
}

#tg-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 45%, rgba(62,127,178,.12), transparent 33%), radial-gradient(circle at 50% 58%, rgba(94,166,35,.09), transparent 38%), var(--bg);
    opacity: 1;
    visibility: visible;
    transition: opacity .7s ease, visibility .7s ease;
}

    #tg-preloader.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.tg-loader-inner {
    width: min(94vw,980px);
    text-align: center;
    padding: 20px;
}

.tg-writing-stage {
    position: relative;
    width: 100%;
    margin: auto;
}

.tg-writing-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tg-outline {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
}

.tg-thermal-outline {
    /*stroke: var(--green);*/
    stroke: #ffffff;
    filter: drop-shadow(0 0 7px rgba(94,166,35,.42));
    /*animation: drawThermal 2.25s ease-in-out .25s forwards;*/
    animation: drawThermal 3.1s ease-in-out .25s forwards;
}

.tg-guard-outline {
    stroke: #ffffff;
    /* stroke: var(--blue);*/
    filter: drop-shadow(0 0 7px rgba(62,127,178,.46));
    /*animation: drawGuard 1.7s ease-in-out 2.15s forwards;*/
    animation: drawGuard 3.3s ease-in-out 1.55s forwards;
}

.tg-fill {
    opacity: 0;
    /*animation: fillIn .6s ease 3.75s forwards;*/
    animation: fillIn 1.2s ease 4s forwards;
}

.tg-thermal-fill {
    fill: var(--green);
}

.tg-guard-fill {
    fill: var(--blue);
}

.tg-subtitle {
    margin-top: -4px;
    color: rgba(255,255,255,.62);
    font-size: clamp(20px,2vw,15px);
    font-weight: 700;
    letter-spacing: .30em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    /*animation: subtitleIn .65s ease 4.05s forwards;*/
    animation: subtitleIn 4.5s ease 2.5s forwards;
}

.tg-loading-line {
    position: relative;
    width: min(72vw,420px);
    height: 3px;
    margin: 25px auto 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    opacity: 0;
    /*animation: subtitleIn .45s ease 4.2s forwards;*/
    animation: subtitleIn 1.2s ease 1.5s forwards;
}

    .tg-loading-line::after {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 0;
        border-radius: inherit;
        background: linear-gradient(90deg,var(--green),#fff,var(--blue));
        box-shadow: 0 0 14px rgba(62,127,178,.5);
        /*animation: progress 1.15s ease 4.35s forwards;*/
        animation: progress 2.5s ease 3.2s forwards;
    }

.tg-status {
    margin-top: 11px;
    color: rgba(255,255,255,.34);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    opacity: 0;
    animation: subtitleIn 3.5s ease 2.25s forwards;
}

/* Demo page */
.demo {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg,rgba(94,166,35,.08),rgba(62,127,178,.10));
}

.demo-card {
    width: min(92vw,700px);
    padding: 46px 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(0,0,0,.10);
}

    .demo-card h1 {
        margin: 0 0 12px;
        color: #17232d;
    }

    .demo-card p {
        color: #64717a;
        line-height: 1.7;
    }

    .demo-card button {
        margin-top: 20px;
        padding: 12px 20px;
        border: 0;
        border-radius: 9px;
        color: #fff;
        background: #17232d;
        cursor: pointer;
        font-weight: 700;
    }


.tg-subtitle {
    color: #ffffff;
}

.tg-status {
    color: #ffffff;
}

@keyframes drawThermal {
    to {
        stroke-dashoffset: 0
    }
}

@keyframes drawGuard {
    to {
        stroke-dashoffset: 0
    }
}

@keyframes fillIn {
    to {
        opacity: 1
    }
}

@keyframes subtitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress {
    to {
        width: 100%
    }
}



@media(max-width:600px) {
    .tg-loader-inner {
        padding: 10px
    }
}

@media(prefers-reduced-motion:reduce) {
    .tg-outline {
        stroke-dashoffset: 0;
        animation: none !important;
    }

    .tg-fill,
    .tg-subtitle,
    .tg-loading-line,
    .tg-status {
        opacity: 1;
        animation: none !important;
        transform: none;
    }

    .tg-pen {
        display: none
    }
}

