/* ==========================================================================
   Font Definitions
   ========================================================================== */

@font-face {
    font-family: 'Asta';
    src: url('fonts/Asta/AstaSans.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Display';
    src: url('fonts/sf/SanFranciscoDisplay-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'SF Display';
    src: url('fonts/sf/SanFranciscoDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'SF Display';
    src: url('fonts/sf/SanFranciscoDisplay-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'SF Display';
    src: url('fonts/sf/SanFranciscoDisplay-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
    --color-primary: #2dd4bf;
    --color-primary-deep: #0d9488;
    --color-bg: #ffffff;
    --color-logo: #ffffff;
    --color-text-white: #ffffff;
    --color-text-hero-secondary: #C8E6E0;
    --color-text-footer: #00D4BF;

    --font-display: 'Asta', system-ui, -apple-system, sans-serif;
    --font-body: 'Asta', 'SF Display', system-ui, -apple-system, 'Helvetica Neue', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.58, -0.8, 0.42, 1.8);
    --duration-enter: 2000ms;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
    touch-action: none;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100dvh;
    background-color: var(--color-bg);
    font-family: var(--font-body);
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */

main {
    position: relative;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    width: 100%;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ==========================================================================
   Glow Effect
   ========================================================================== */

.ambient-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    background-color: #fff;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.ambient-glow__gradient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    filter: blur(30px);
    -webkit-filter: blur(30px);
}

.ambient-glow__fluid {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 1;
    contain: strict;
    mix-blend-mode: normal;
    visibility: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.ambient-glow--fluid-ready .ambient-glow__fluid {
    visibility: visible;
}

.ambient-glow__fluid canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: max(100vw, 100vh) !important;
    height: max(100vw, 100vh) !important;
    background: transparent;
    transform: translate(-50%, -50%);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.ambient-glow__liquid-canvas {
    z-index: 2;
    opacity: 0;
    mix-blend-mode: normal;
    filter: blur(3.5px) saturate(1.14);
    -webkit-filter: blur(3.5px) saturate(1.14);
    image-rendering: auto;
    transform: translate(-50%, -50%) translateZ(0) scale(1.035);
    transition: opacity 220ms ease;
}

.ambient-glow[data-fluid-canvas="true"][data-fluid-active="true"] .ambient-glow__liquid-canvas {
    opacity: 0.84;
}

.ambient-glow[data-smoke-field="true"][data-fluid-active="true"] .ambient-glow__liquid-canvas {
    opacity: 0.64;
    filter: blur(5px) saturate(0.92);
    -webkit-filter: blur(5px) saturate(0.92);
}

.ambient-glow__orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}

.ambient-glow__noise {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.25;
    mix-blend-mode: soft-light;
    background-image: url('media/images/glow-noise2.png');
    background-position: center;
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ---- Breathing Radial Pulse ---- */

.ambient-glow__orb--1 {
    z-index: 0;
    width: 43vmin;
    height: 43vmin;
    min-width: 260px;
    min-height: 260px;
    inset: 0;
    place-self: center;
    border-radius: 25%;
    background: radial-gradient(circle,
            #00231D 0%,
            #00231D 35%,
            #00D4BFFF 60%,
            #00D4BF00 70%);
    /* filter: brightness(1.5); */
    opacity: 0;
    animation:
        breatheFadeIn 1s var(--ease-out-expo) 0.0s forwards,
        breathePulseA 3s var(--ease-out-quint) 1.0s infinite alternate;
}

.ambient-glow__orb--2 {
    z-index: 0;
    width: 45vmin;
    height: 45vmin;
    min-width: 265px;
    min-height: 265px;
    inset: 0;
    place-self: center;
    border-radius: 50%;
    background: radial-gradient(circle,
            #04f0d8 0%,
            #04f0d8 50%,
            transparent 70%);
    /* filter: brightness(1.5); */
    opacity: 0;
    animation:
        breatheFadeIn 1s var(--ease-out-expo) 0.2s forwards,
        breathePulseB 3s var(--ease-out-quint) 1.2s infinite alternate;
}

.ambient-glow__orb--3 {
    z-index: 0;
    width: 46vmin;
    height: 46vmin;
    min-width: 270px;
    min-height: 270px;
    inset: 0;
    place-self: center;
    border-radius: 50%;
    background: radial-gradient(circle,
            #0DFDE4 0%,
            #0DFDE4 60%,
            transparent 70%);
    /* filter: brightness(1.5); */
    opacity: 0;
    animation:
        breatheFadeIn 1s var(--ease-out-expo) 0.4s forwards,
        breathePulseC 3s var(--ease-out-quint) 1.4s infinite alternate;
}

.ambient-glow__orb--4 {
    z-index: 0;
    width: 47vmin;
    height: 47vmin;
    min-width: 280px;
    min-height: 280px;
    inset: 0;
    place-self: center;
    border-radius: 50%;
    background: radial-gradient(circle,
            #00fffa 0%,
            #5df6fc 60%,
            transparent 70%);
    /* filter: brightness(1.5); */
    opacity: 0;
    animation:
        breatheFadeIn 1s var(--ease-out-expo) 0.6s forwards,
        breathePulseD 3s var(--ease-out-quint) 1.6s infinite alternate;
}

@keyframes breatheFadeIn {
    from {
        opacity: 0;
        scale: 0;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

@keyframes breathePulseA {
    from {
        scale: 1;
    }

    to {
        scale: 1.16;
    }
}

@keyframes breathePulseB {
    from {
        scale: 1;
    }

    to {
        scale: 1.10;
    }
}

@keyframes breathePulseC {
    from {
        scale: 1;
    }

    to {
        scale: 1.06;
    }
}

@keyframes breathePulseD {
    from {
        scale: 1;
    }

    to {
        scale: 1.02;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.landing-hero {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    padding-inline: 1.5rem;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.effect-switcher {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(5, 34px);
    column-gap: 6px;
    row-gap: 8px;
    padding: 8px;
    border: 1px solid rgba(0, 212, 191, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        0 18px 40px rgba(0, 35, 29, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    backdrop-filter: blur(18px) saturate(1.12);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 160ms ease,
        visibility 160ms ease;
}

.effect-switcher.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.effect-switcher__button {
    width: 34px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: rgba(0, 62, 54, 0.66);
    background: rgba(255, 255, 255, 0.45);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.effect-switcher__button:hover,
.effect-switcher__button:focus-visible {
    color: #003E36;
    background: rgba(239, 255, 252, 0.88);
    outline: none;
    transform: translateY(-1px);
}

.effect-switcher__button.is-active {
    color: #ffffff;
    background: #00AFA0;
    box-shadow:
        0 8px 18px rgba(0, 148, 136, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.landing-hero__logo {
    width: 64px;
    height: 64px;
    margin-top: 0px;
    margin-bottom: 4px;
    display: block;
    color: var(--color-logo);
    opacity: 0;
    animation: fadeUp12 var(--duration-enter) var(--ease-out-expo) forwards;
}

.landing-hero__title {
    font-family: var(--font-display);
    font-weight: 620;
    /* font-size: clamp(1.75rem, 4vw, 2.25rem); */
    font-size: 30px;
    letter-spacing: -0.00em;
    line-height: 1.15;
    color: var(--color-text-white);
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeUp12 var(--duration-enter) var(--ease-out-expo) 0.0s forwards;
}

.landing-hero__name {
    font-family: var(--font-body);
    font-weight: 650;
    /* font-size: clamp(0.9rem, 2vw, 1.05rem); */
    font-size: 16px;
    letter-spacing: 0.00em;
    line-height: 1.15;
    color: var(--color-text-white);
    opacity: 0;
    animation: fadeUp4 var(--duration-enter) var(--ease-out-expo) 1.2s forwards;
}

.landing-hero__role {
    font-family: var(--font-body);
    font-weight: 700;
    /* font-size: clamp(0.8rem, 1.8vw, 0.95rem); */
    font-size: 12px;
    letter-spacing: 0.00em;
    line-height: 1.15;
    color: var(--color-text-white);
    margin-top: 4px;
    opacity: 0;
    animation: fadeUp4 var(--duration-enter) var(--ease-out-expo) 1.4s forwards;
}

@keyframes fadeUp4 {
    from {
        opacity: 0;
        translate: 0 4px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes fadeUp12 {
    from {
        opacity: 0;
        translate: 0 32px;
        filter: blur(80px);
    }

    to {
        opacity: 1;
        translate: 0 0;
        filter: blur(0);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 1;
    width: 100%;
    padding: 16px;
    text-align: center;
}

footer small {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.00em;
    color: var(--color-text-footer);

    opacity: 0.0;
    white-space: nowrap;
    overflow: hidden;
    /* border-right: 1.5px solid var(--color-text-footer); */
    /* width: 0; */

    animation:
        fadeUpFooter 2.0s var(--ease-out-expo) 2.0s forwards
}

@keyframes fadeUpFooter {
    from {
        opacity: 0.0;
        translate: 0 4px;
        filter: blur(10px);
    }

    to {
        opacity: 1;
        translate: 0 0px;
        filter: blur(0);
    }
}


/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .ambient-glow__orb {
        animation: none !important;
    }

    .ambient-glow__fluid {
        display: none;
    }
}

@media (max-width: 640px) {
    .effect-switcher {
        right: 50%;
        bottom: 12px;
        grid-template-columns: repeat(5, 28px);
        column-gap: 4px;
        row-gap: 6px;
        padding: 6px;
        transform: translateX(50%);
    }

    .effect-switcher__button {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
}
