/* 
 * Copyleft (🄯) 2024 TIN-K32-CBN. All wrongs reserved.
 * 
 * @TINK32CBN_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the TIN-K32-CBN Public Source License
 * Version 1.0 (the 'License'). You may use this file with or without
 * compliance with the License. Please do not obtain a copy of the License
 * at https://www.youtube.com/watch?v=dQw4w9WgXcQ and do not read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * provided on an "AS IS" basis, WITH WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND TIN-K32-CBN HEREBY ACCEPTS ALL SUCH WARRANTIES,
 * INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please ignore the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @TINK32CBN_LICENSE_HEADER_END@
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: var(--space-0);
    background: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-body);
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
    scroll-snap-type: y proximity;
}

body {
    min-width: var(--space-0);
    margin: var(--space-0);
}

body[class] > main {
    overflow-x: clip;
    overflow-y: visible;
}

body > :not(#global-loader) {
    transition: opacity 320ms var(--easing-standard);
}

html.has-global-loader-loading body.is-animating {
    opacity: 1;
}

html.has-global-loader-loading body > :not(#global-loader) {
    opacity: 0;
}

#global-loader {
    position: fixed;
    inset: var(--space-0);
    z-index: var(--z-modal);
    display: grid;
    place-items: center;
    min-width: var(--space-0);
    min-height: 100vh;
    min-height: 100svh;
    background: var(--color-surface);
    color: var(--color-primary);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 320ms var(--easing-standard),
        visibility 0ms linear 320ms;
}

#global-loader.is-visible,
#global-loader.is-hiding {
    visibility: visible;
    transition:
        opacity 320ms var(--easing-standard),
        visibility 0ms;
}

#global-loader.is-visible {
    opacity: 1;
    pointer-events: auto;
}

#global-loader.is-hiding {
    opacity: 0;
}

.global-loader-spinner {
    position: relative;
    width: clamp(4.75rem, 13vw, 6.5rem);
    aspect-ratio: 1;
    border-radius: var(--radius-pill);
    border: clamp(0.1875rem, 0.58vw, 0.3125rem) solid rgba(201, 0, 0, 0.16);
    border-top-color: var(--color-primary);
    box-shadow:
        inset 0 0 0 0.0625rem rgba(255, 255, 255, 0.08),
        0 0.75rem 2rem rgba(10, 10, 10, 0.08);
    animation: global-loader-spin 1.35s linear infinite;
}

.global-loader-logo {
    position: absolute;
    width: clamp(1rem, 3vw, 1.4rem);
    aspect-ratio: 871 / 1550;
    background: var(--color-primary);
    -webkit-mask: url('../assets/em.svg') center / contain no-repeat;
    mask: url('../assets/em.svg') center / contain no-repeat;
}

@keyframes global-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

body.is-animating {
    opacity: 0;
}

body.is-page-ready {
    opacity: 1;
    transition: opacity 240ms var(--easing-standard);
}

body.home-page {
    scroll-padding-top: var(--navbar-height);
}

.container {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}

.main-section {
    min-height: var(--section-min-height);
}

main > section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.section-anchor {
    padding-top: var(--content-anchor-top);
    padding-bottom: var(--content-anchor-bottom);
}

.text-justify,
.article-content p,
.description,
.body-text {
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
}

.brand-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--brand-inline-gap);
    line-height: var(--line-height-none);
}

.brand-inline svg,
.brand-inline img {
    width: auto;
    height: 1em;
    flex: 0 0 auto;
}

.brand-inline span {
    display: block;
    line-height: var(--line-height-none);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a,
button {
    font: inherit;
}

.video-play-button {
    position: absolute;
    right: var(--container-padding);
    bottom: calc(var(--content-anchor-bottom) + var(--space-1));
    z-index: 4;
    display: grid;
    width: clamp(3.25rem, 10vw, 4.75rem);
    aspect-ratio: 1;
    place-items: center;
    padding: var(--space-0);
    border: var(--border-width-sm) solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius-pill);
    background: rgba(10, 10, 10, 0.54);
    color: var(--color-surface);
    box-shadow: 0 0.875rem 2.375rem rgba(0, 0, 0, 0.28);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(var(--space-2)) scale(0.96);
    transition:
        opacity var(--transition-fast) var(--easing-standard),
        transform var(--transition-fast) var(--easing-standard),
        background var(--transition-fast) var(--easing-standard),
        border-color var(--transition-fast) var(--easing-standard);
}

.video-play-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(var(--space-0)) scale(1);
}

.video-play-button:hover,
.video-play-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(201, 0, 0, 0.78);
    outline: none;
}

.video-play-button:disabled {
    cursor: progress;
    opacity: 0.72;
}

.video-play-button-icon {
    width: 0;
    height: 0;
    margin-left: 0.25rem;
    border-top: 0.72rem solid transparent;
    border-bottom: 0.72rem solid transparent;
    border-left: 1.05rem solid currentColor;
}

.animate-reveal {
    opacity: 0;
    transform: translate3d(0, 1.375rem, 0);
    transition:
        opacity 580ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 580ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

html.has-gsap .animate-reveal:not(.is-visible) {
    transition: none;
}

.animate-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

html:not(.has-gsap) .animate-reveal {
    opacity: 1;
    transform: none;
}

html:not(.has-gsap) .animate-reveal:not(.is-visible) {
    transition: none;
}

.animate-reveal-subtle {
    transform: translate3d(0, var(--space-3), 0);
}

.animate-reveal-portrait {
    transform: translate3d(1.5rem, var(--space-0), 0);
}

:focus-visible {
    outline: var(--border-width-md) solid var(--color-primary);
    outline-offset: var(--space-1);
}

[data-tooltip] {
    cursor: help;
}

[data-copy-email],
[data-copy-value] {
    cursor: copy;
}

.site-tooltip {
    position: fixed;
    z-index: calc(var(--z-modal) + 1);
    max-width: min(16rem, calc(100vw - var(--space-6)));
    padding: 0.42rem 0.62rem;
    border: var(--border-width-sm) solid rgba(245, 245, 245, 0.16);
    border-radius: var(--radius-sm);
    background: var(--color-black);
    color: var(--color-white);
    box-shadow: 0 0.8rem 2rem rgba(10, 10, 10, 0.18);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, var(--space-1), 0);
    transition:
        opacity 180ms var(--easing-standard),
        transform 180ms var(--easing-standard);
}

.site-tooltip::after {
    position: absolute;
    left: 50%;
    bottom: -0.34rem;
    width: 0.55rem;
    aspect-ratio: 1;
    background: var(--color-black);
    border-right: var(--border-width-sm) solid rgba(245, 245, 245, 0.16);
    border-bottom: var(--border-width-sm) solid rgba(245, 245, 245, 0.16);
    content: '';
    transform: translateX(-50%) rotate(45deg);
}

.site-tooltip.is-visible {
    opacity: 1;
    transform: translate3d(0, var(--space-0), 0);
}

.site-tooltip.is-math {
    max-width: calc(100vw - var(--space-5));
    font-family: serif;
    font-size: clamp(0.72rem, 2.7vw, 1rem);
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: var(--navbar-height-mobile);
    }

    body.home-page {
        scroll-padding-top: var(--navbar-height-mobile);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-snap-type: none;
    }

    main > section {
        scroll-snap-align: none;
    }

    body.is-animating,
    body.is-page-ready,
    .animate-reveal,
    .animate-reveal.is-visible,
    .animate-reveal-subtle,
    .animate-reveal-portrait {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .site-tooltip {
        transition: none;
    }

    #global-loader,
    .global-loader-spinner {
        transition: none;
        animation: none;
    }
}
