/* home css */

/* hero */
.hero {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    background-color: var(--color-bg);
    overflow: hidden;
}

.hero-logo {
    width: clamp(180px, 40vw, 420px);
    height: auto;
    z-index: 10;
    animation: heroFadeIn 2s var(--ease-out) forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
    opacity: 0;
    animation: scrollHintIn 1s 2.5s var(--ease-out) forwards;
    transition: opacity 0.5s ease;
}

.scroll-hint.fade-out {
    opacity: 0 !important;
    pointer-events: none;
}

@keyframes scrollHintIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 0.6;
        transform: translateX(-50%) translateY(0);
    }
}

.scroll-hint-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--color-text-secondary);
    border-radius: 12px;
    position: relative;
}

.scroll-hint-mouse::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 3px;
    background: var(--color-text-secondary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDot 1.5s infinite;
}

@keyframes scrollDot {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
}

.scroll-hint-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* roads svg */
#roads {
    position: absolute;
    bottom: 0;
    right: 0;
    width: auto;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    will-change: transform;
    pointer-events: none;
}

#roads svg {
    display: block;
    height: 100%;
    width: auto;
}

#roads svg path {
    stroke-dasharray: var(--length);
    stroke-dashoffset: var(--length);
    fill: #EDE5DB;
    fill-opacity: 0;
    stroke-opacity: 1;
    will-change: stroke-dashoffset, fill-opacity, stroke-opacity;
}

.animate-roads #roads svg path {
    animation:
        drawPath 0.7s linear forwards var(--delay),
        roadFillIn 0.5s ease-out forwards calc(var(--delay) + 0.5s),
        roadStrokeOut 0.4s ease forwards calc(var(--delay) + 1.2s);
}

#roads svg :not(path) {
    fill: #EDE5DB;
    fill-opacity: 0;
    stroke-opacity: 0;
    will-change: fill-opacity, stroke-opacity;
}

.animate-roads #roads svg :not(path) {
    animation:
        roadStrokeIn 0.7s ease forwards var(--delay),
        roadFillIn 0.7s ease forwards var(--delay),
        roadStrokeOut 0.7s ease forwards calc(var(--delay) + 0.7s);
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes roadFillIn {
    from {
        fill-opacity: 0;
    }

    to {
        fill-opacity: 1;
    }
}

@keyframes roadStrokeOut {
    from {
        stroke-opacity: 1;
    }

    to {
        stroke-opacity: 0;
    }
}

@keyframes roadStrokeIn {
    from {
        stroke-opacity: 0;
    }

    to {
        stroke-opacity: 1;
    }
}

/* intro */
.intro {
    padding: var(--space-4xl) var(--content-padding);
    text-align: center;
}

.intro-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.intro h2 {
    margin-bottom: var(--space-sm);
}

.intro p {
    font-size: 1.1rem;
    max-width: 560px;
}

.intro .btn {
    margin-top: var(--space-md);
}

/* teaser cards */
.teaser {
    padding: 0 var(--content-padding) var(--space-4xl);
}

.teaser-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.teaser-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    transition: transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.teaser-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.teaser-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 2rem;
    position: relative;
    background: var(--color-bg-alt);
    transition: transform var(--duration-normal) var(--ease-out);
}

.teaser-card:hover .teaser-icon {
    transform: scale(1.1) rotate(5deg);
}

.teaser-card h3 {
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.teaser-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .teaser-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}