/* Font Face Declarations - Only load weights actually used */
@font-face {
    font-family: 'STKBureauSerif';
    src: url('assets/fonts/STKBureauSerif-Light.woff2') format('woff2'),
         url('assets/fonts/STKBureauSerif-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'STKBureauSans';
    src: url('assets/fonts/STKBureauSans-Light.woff2') format('woff2'),
         url('assets/fonts/STKBureauSans-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'STKBureauSans';
    src: url('assets/fonts/STKBureauSans-Book.woff2') format('woff2'),
         url('assets/fonts/STKBureauSans-Book.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'STKBureauSans';
    src: url('assets/fonts/STKBureauSans-Medium.woff2') format('woff2'),
         url('assets/fonts/STKBureauSans-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'STKGerhard';
    src: url('assets/fonts/STKGerhard-Standard.woff2') format('woff2'),
         url('assets/fonts/STKGerhard-Standard.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

/* Base */
body {
    font-family: 'STKBureauSans', sans-serif;
    background-color: #111;
    color: #F2F4F8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Image */
.bg-image {
    position: absolute;
    inset: 0;
    background-image: url('assets/images/bgImage.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    transform: rotate(180deg) scaleY(-1);
    mix-blend-mode: lighten;
    pointer-events: none;
}

/* ===========================================
   INTRO ANIMATION SYSTEM
   Timeline (after 500ms initial delay):
   - 0s-0.8s: Lines animate from edges to center (cross)
   - 0.8s-1.4s: Lines split to final positions
   - 1.2s+: Content appears with blur animation
   =========================================== */

/* Dotted Lines - Pure CSS */
.vertical-dots {
    position: absolute;
    width: 1px;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    background: repeating-linear-gradient(
        to bottom,
        #656565 0,
        #656565 1px,
        transparent 1px,
        transparent 5px
    );
}

.horizontal-dots {
    position: absolute;
    width: 100vw;
    height: 1px;
    left: 0;
    pointer-events: none;
    z-index: 20;
    background: repeating-linear-gradient(
        to right,
        #656565 0,
        #656565 1px,
        transparent 1px,
        transparent 5px
    );
}

/* Initial state: hidden, waiting for JS to calculate positions */
.vertical-dots-left,
.vertical-dots-right {
    left: 50%;
    top: 0;
    clip-path: inset(100% 0 100% 0);
}

.horizontal-dots-top,
.horizontal-dots-bottom {
    top: 50%;
    clip-path: inset(0 100% 0 100%);
}

/* Phase 1: Vertical lines animate from top/bottom to center via clip-path */
/* Phase 2: Split horizontally to final positions */

.intro-ready .vertical-dots-left {
    animation: 
        verticalLineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        verticalLineSplitLeft 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.intro-ready .vertical-dots-right {
    animation: 
        verticalLineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        verticalLineSplitRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

/* Phase 1: Horizontal lines animate from left/right to center via clip-path */
/* Phase 2: Split vertically to final positions */

.intro-ready .horizontal-dots-top {
    animation: 
        horizontalLineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        horizontalLineSplitTop 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.intro-ready .horizontal-dots-bottom {
    animation: 
        horizontalLineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        horizontalLineSplitBottom 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

/* Keyframes - Phase 1: Lines converge to center */
@keyframes verticalLineReveal {
    0% {
        clip-path: inset(100% 0 100% 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes horizontalLineReveal {
    0% {
        clip-path: inset(0 100% 0 100%);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Keyframes - Phase 2: Lines split to final positions */
@keyframes verticalLineSplitLeft {
    0% {
        left: 50%;
    }
    100% {
        left: calc(50% - 200px);
    }
}

@keyframes verticalLineSplitRight {
    0% {
        left: 50%;
    }
    100% {
        left: calc(50% + 200px);
    }
}

@keyframes horizontalLineSplitTop {
    0% {
        top: 50%;
    }
    100% {
        top: calc(50% - var(--dots-top-offset, 154px));
    }
}

@keyframes horizontalLineSplitBottom {
    0% {
        top: 50%;
    }
    100% {
        top: calc(50% + var(--dots-bottom-offset, 154px));
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .vertical-dots-left,
    .vertical-dots-right,
    .horizontal-dots-top,
    .horizontal-dots-bottom,
    .intro-ready .vertical-dots-left,
    .intro-ready .vertical-dots-right,
    .intro-ready .horizontal-dots-top,
    .intro-ready .horizontal-dots-bottom {
        animation: none !important;
        clip-path: none !important;
    }
    
    .vertical-dots-left {
        left: calc(50% - 200px) !important;
    }
    
    .vertical-dots-right {
        left: calc(50% + 200px) !important;
    }
    
    .horizontal-dots-top {
        top: calc(50% - var(--dots-top-offset, 154px)) !important;
    }
    
    .horizontal-dots-bottom {
        top: calc(50% + var(--dots-bottom-offset, 154px)) !important;
    }
    
    .content-card,
    .intro-ready .content-card {
        opacity: 1 !important;
        animation: none !important;
    }
    
    .content-card > .header,
    .content-card > .headline,
    .content-card > .description-block,
    .content-card > .cta-row,
    .intro-ready .content-card > .header,
    .intro-ready .content-card > .headline,
    .intro-ready .content-card > .description-block,
    .intro-ready .content-card > .cta-row {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* Content Card */
.content-card {
    position: relative;
    width: 400px;
    background-color: #111;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    z-index: 10;
    /* Start hidden */
    opacity: 0;
}

.intro-ready .content-card {
    animation: contentCardReveal 0.4s ease-out 1.2s forwards;
}

@keyframes contentCardReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Blur-in Animation */
@keyframes blurIn {
    0% {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* Content elements start hidden */
.content-card > .header,
.content-card > .headline,
.content-card > .description-block,
.content-card > .cta-row {
    opacity: 0;
}

/* Blur-in triggered after intro animation completes */
.intro-ready .content-card > .header,
.intro-ready .content-card > .headline,
.intro-ready .content-card > .description-block,
.intro-ready .content-card > .cta-row {
    animation: blurIn 0.6s ease-out forwards;
}

.intro-ready .content-card > .header {
    animation-delay: 1.5s;
}

.intro-ready .content-card > .headline {
    animation-delay: 1.7s;
}

.intro-ready .content-card > .description-block {
    animation-delay: 1.9s;
}

.intro-ready .content-card > .cta-row {
    animation-delay: 2.1s;
}

/* Header */
.header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.name-text {
    font-family: 'STKGerhard', sans-serif;
    font-size: 9px;
    text-transform: uppercase;
    color: #fff;
}

.logo {
    width: 12px;
    height: 16px;
}

/* Headline */
.headline {
    width: 100%;
    font-size: 28px;
    line-height: 34px;
    letter-spacing: -0.56px;
    font-weight: 300;
}

.headline-serif {
    display: block;
    font-family: 'STKBureauSerif', serif;
    color: #F2F4F8;
}

.headline-sans {
    display: block;
    font-family: 'STKBureauSans', sans-serif;
    color: #888;
}

/* Description */
.description-block {
    width: 100%;
}

.description {
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: -0.21px;
    color: #888;
    max-width: 352px;
}

/* CTA */
.cta-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    background-color: #fff;
    border-radius: 36px;
    font-family: 'STKBureauSans', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.21px;
    color: #111;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cta-button:hover {
    opacity: 0.85;
}

/* Status */
.status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    position: relative;
    width: 5px;
    height: 5px;
    background-color: #118739;
    border-radius: 50%;
    box-shadow: 
        0 0 1px #118739,
        0 0 3px #118739,
        0 0 8px #118739,
        0 0 15px #118739;
}

.status-dot::before,
.status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #118739;
    animation: radar 2s ease-out infinite;
}

.status-dot::after {
    animation-delay: 1s;
}

@keyframes radar {
    0% {
        transform: scale(1);
        opacity: 0.6;
        filter: blur(0);
    }
    100% {
        transform: scale(4);
        opacity: 0;
        filter: blur(2px);
    }
}

.status-text {
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: -0.21px;
    color: #888;
    position: relative;
    background: linear-gradient(
        90deg,
        #888 0%,
        #888 35%,
        #4ade80 50%,
        #888 65%,
        #888 100%
    );
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Shimmer starts after cta-row blur-in completes (2.1s delay + 0.6s animation) */
.intro-ready .status-text {
    animation: textShimmer 3s cubic-bezier(0.4, 0, 0.2, 1) 2.7s infinite;
}

@keyframes textShimmer {
    0%, 60% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .content-card {
        width: 100%;
        padding: 24px 16px;
    }
    
    .description {
        max-width: 100%;
    }
    
    .headline {
        font-size: 24px;
        line-height: 30px;
        letter-spacing: -0.48px;
    }
    
    .cta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
