/* Metropolis Font Face */
@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Regular.woff2') format('woff2'),
        url('../fonts/Metropolis-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-RegularItalic.woff2') format('woff2'),
        url('../fonts/Metropolis-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Bold.woff2') format('woff2'),
        url('../fonts/Metropolis-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-BoldItalic.woff2') format('woff2'),
        url('../fonts/Metropolis-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Light.woff2') format('woff2'),
        url('../fonts/Metropolis-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-LightItalic.woff2') format('woff2'),
        url('../fonts/Metropolis-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
}

:root {
    --font-family: 'Metropolis', "Roboto", Arial, sans-serif;
    --pico-font-family: var(--font-family);

    --vertex-light-primary: #00897b;
    --vertex-light-inverse: #1F2121;
    --vertex-dark-primary: #31B8C6;
    --vertex-dark-inverse: #fff;

    --vertex-font-bold: 700;
    --vertex-font-regular: 400;
    --vertex-font-light: 300;
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-primary: var(--vertex-light-primary);
    --pico-primary-hover: var(--vertex-light-primary);
    --pico-primary-hover-background: var(--vertex-dark-primary);
    --pico-primary-focus: #144d5220;
    --pico-primary-inverse: var(--vertex-light-inverse);
    --pico-primary-background: var(--vertex-light-primary);
}

[data-theme="dark"],
:root:not([data-theme="light"]) {
    --pico-primary: var(--vertex-dark-primary);
    --pico-primary-hover: var(--vertex-dark-primary);
    --pico-primary-hover-background: var(--vertex-light-primary);
    --pico-primary-background: var(--vertex-dark-primary);
    --pico-primary-focus: #31b8c620;
    --pico-primary-inverse: var(--vertex-dark-inverse);

    background-image: url('../img/background-dark.svg');
    background-size: cover;
}

button,
[role=button] {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-family);
    margin: 0;
}

/* Site header fixed at the top */
body>header {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--pico-background-color);
    border-bottom: 1px solid var(--pico-primary-inverse);
    opacity: 0.95;
}

h1,
h2 {
    margin-bottom: calc(var(--pico-typography-spacing-vertical) * 1.5);
}

/* Article headers layout */
article>header {
    position: static;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

article>header h3 {
    margin-bottom: 0;
    color: var(--pico-primary);
    font-size: 1.25rem;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    padding: 2rem 0;
    padding-top: 8vh;
    box-sizing: border-box;
}

main {
    margin-top: 4rem;
}

.logo {
    height: 30px;
    /*vertical-align: super;*/
}

.primary {
    color: var(--pico-primary);
}

[data-theme="dark"] .logo-light,
:root:not([data-theme="light"]) .logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

:root[data-theme="light"] .logo-dark {
    display: none;
}

.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
    /* Use filter to color the SVG if needed, or rely on SVG's stroke="currentColor" if using <object> or similar. 
       Since we use <img>, we'll use a CSS filter as a fallback for the primary color. */
    filter: invert(24%) sepia(35%) saturate(1028%) hue-rotate(136deg) brightness(92%) contrast(92%);
}

[role="button"]>.icon {
    filter: none !important;
}

#contact [role="button"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

details summary::after {
    background-position: center center !important;
}

[data-theme="dark"] .icon {
    filter: invert(65%) sepia(61%) saturate(464%) hue-rotate(139deg) brightness(85%) contrast(89%);
}


[data-theme="dark"] .logo-dark {
    display: inline-block;
}

[data-theme="dark"] .logo-light {
    display: none;
}

:root:not([data-theme]) .logo-light {
    display: inline-block;
}

/* Hero Logo Animation */
.logo-animation-container {
    position: relative;
    width: 100%;
    /* Use clamp for responsive scaling without media queries */
    font-size: clamp(0.5rem, 2.5vw, 1rem);
    height: 7em;
    margin-bottom: 2em;
    overflow: visible;
}

.logo-reveal-mask {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 7.5em;
    /* Start small, showing only the 'V' */
    overflow: hidden;
    transform: skewX(-23deg);
    /* Match rotation of the logo stroke */
    transform-origin: top left;
    animation: revealLogo 4s linear forwards;
}

.logo-full {
    height: 100%;
    width: auto;
    max-width: none;
    transform: skewX(23deg);
    /* Counter-skew to keep logo shape intact */
    transform-origin: top left;
}

.v-anim-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    /* Adjusted start */
    /* Upside down V */
    animation: moveV 4s linear forwards;
}

.v-logo-anim {
    height: 100%;
    width: auto;
}

@keyframes revealLogo {

    0%,
    10% {
        width: 7.5em;
    }

    30% {
        width: 17.5em;
    }

    50% {
        width: 27.5em;
    }

    60%,
    100% {
        width: 32.5em;
    }
}


@keyframes moveV {

    0%,
    10% {
        transform: scaleY(-1) translateX(4.8em);
        opacity: 1;
    }

    30% {
        transform: scaleY(-1) translateX(14.8em);
        opacity: 1;
    }

    50%,
    100% {
        transform: scaleY(-1) translateX(24.8em);
        opacity: 0;
    }
}


/* Theme switcher icon */
#theme-toggle {
    cursor: pointer;
    display: none;
    /* Default dark mode, hide toggle */
    align-items: center;
}

/* Company Name Styling */
.company_name {
    font-weight: inherit;
    display: inline-flex;
    align-items: baseline;
}

.company_name .symbol {
    font-size: 0.8em;
    position: relative;
    top: -0.35em;
    margin-left: 0.05em;
    font-weight: normal;
}

/* Footer Styling */
footer.container {
    scroll-snap-align: end;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

footer .grid>section {
    margin-bottom: 0;
    padding: 0;
    min-height: auto;
}

footer strong {
    color: var(--pico-primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsive Consult Text */
.consult-text-full {
    display: inline;
}

.consult-text-short {
    display: none;
}

@media (max-width: 768px) {
    .consult-text-full {
        display: none;
    }

    .consult-text-short {
        display: inline;
    }
}

#welcome hgroup {
    margin-bottom: 2.5rem;
}

/* Hero Footer Alignment */
#welcome footer {
    text-align: right;
}

/* WeChat Tooltip */
.wechat-container {
    position: relative;
}

details[open].wechat-container>summary {
    margin-bottom: 0;
}

details.wechat-container>summary[role="button"] {
    background-color: transparent;
}

.wechat-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    padding: 1rem;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: opacity 0.3s, visibility 0.3s;
    width: 200px;
    text-align: center;
}

.wechat-container.active .wechat-tooltip {
    visibility: visible;
    opacity: 1;
}

.wechat-qr-placeholder {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #333;
    font-size: 0.8rem;
}