@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #040712;
    --bg-soft: #0b1020;
    --panel: rgba(12, 20, 38, 0.58);
    --panel-border: rgba(167, 139, 250, 0.22);
    --panel-highlight: rgba(226, 232, 240, 0.14);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #52e3ac;
    --accent-2: #50d7ff;
    --accent-3: #b39bff;
    --aurora-a: rgba(82, 227, 172, 0.32);
    --aurora-b: rgba(80, 215, 255, 0.3);
    --aurora-c: rgba(179, 155, 255, 0.28);
    --glow-blur: 56px;
    --motion-slow: 12s;
    --motion-mid: 9s;
    --motion-fast: 7.5s;
    --page-transition-ms: 340ms;
}

@view-transition {
    navigation: auto;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 10%, rgba(82, 227, 172, 0.18), transparent 36%),
        radial-gradient(circle at 80% 18%, rgba(80, 215, 255, 0.14), transparent 34%),
        radial-gradient(circle at 55% 92%, rgba(179, 155, 255, 0.16), transparent 33%),
        linear-gradient(180deg, #030615 0%, #040712 56%, #060b1f 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--page-transition-ms) ease, transform var(--page-transition-ms) ease;
}

body.page-ready {
    opacity: 1;
    transform: translateY(0);
}

body.page-leaving {
    opacity: 0;
    transform: translateY(10px);
}

.home-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    isolation: isolate;
}

.aurora-base {
    position: fixed;
    inset: -18% -12%;
    background:
        conic-gradient(from 210deg at 22% 18%, rgba(82, 227, 172, 0.26), transparent 36%),
        conic-gradient(from 28deg at 84% 22%, rgba(80, 215, 255, 0.24), transparent 34%),
        conic-gradient(from 310deg at 54% 78%, rgba(179, 155, 255, 0.22), transparent 38%);
    filter: blur(48px) saturate(118%);
    opacity: 0.74;
    z-index: 0;
    pointer-events: none;
    animation: auroraShift var(--motion-slow) ease-in-out infinite alternate;
}

.home-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(var(--glow-blur));
    opacity: 0.8;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 0;
    animation: auroraFloat var(--motion-mid) ease-in-out infinite;
}

.home-glow-one {
    width: clamp(18rem, 34vw, 32rem);
    height: clamp(18rem, 34vw, 32rem);
    left: -10rem;
    top: -7rem;
    background: radial-gradient(circle at 38% 30%, var(--aurora-a), transparent 66%);
    animation-duration: var(--motion-slow);
}

.home-glow-two {
    width: clamp(16rem, 28vw, 27rem);
    height: clamp(16rem, 28vw, 27rem);
    right: -6rem;
    bottom: -8rem;
    background: radial-gradient(circle at 42% 40%, var(--aurora-b), transparent 68%);
    animation-duration: var(--motion-mid);
    animation-delay: -3.4s;
}

.home-glow-three {
    width: clamp(14rem, 24vw, 22rem);
    height: clamp(14rem, 24vw, 22rem);
    right: 28%;
    top: 10%;
    background: radial-gradient(circle at 44% 42%, var(--aurora-c), transparent 70%);
    animation-duration: var(--motion-fast);
    animation-delay: -7.2s;
}

.hero-card {
    width: min(960px, 100%);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(22px) saturate(118%);
    border-radius: 28px;
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow:
        0 30px 90px rgba(1, 5, 17, 0.56),
        inset 0 1px 0 var(--panel-highlight),
        inset 0 -1px 0 rgba(148, 163, 184, 0.08);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.12), transparent 38%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 52%);
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.72rem;
    color: var(--muted);
}

.hero-card h1 {
    margin: 0;
    font-size: clamp(3rem, 4vw, 6rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.06em;
    background: linear-gradient(90deg, #f8fafc 0%, #86efac 36%, #67e8f9 68%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 0 rgba(134, 239, 172, 0);
    animation: heroGlow 5.8s ease-in-out infinite;
}

.hero-copy {
    max-width: 64ch;
    margin: 1rem 0 0;
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.65;
    color: #c6d0e0;
}

.tool-grid {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tool-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 190px;
    padding: 1.25rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(180deg, rgba(12, 20, 38, 0.86), rgba(12, 20, 38, 0.62)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 40%);
    color: var(--text);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease, filter 220ms ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: auto -2rem -2rem auto;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    filter: blur(10px);
    transition: transform 260ms ease, opacity 260ms ease;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.012);
    border-color: rgba(148, 163, 184, 0.42);
    box-shadow: 0 22px 56px rgba(3, 10, 25, 0.5);
    filter: saturate(1.06);
}

.tool-card:hover::after,
.tool-card:focus-visible::after,
.tool-card[aria-current='true']::after {
    transform: translate3d(-0.7rem, -0.7rem, 0) scale(1.08);
    opacity: 0.95;
}

.tool-card:focus-visible {
    outline: 2px solid rgba(80, 215, 255, 0.7);
    outline-offset: 3px;
}

.tool-card[aria-current='true'] {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 20px 52px rgba(3, 10, 25, 0.5);
}

.tool-card-primary {
    background:
        linear-gradient(180deg, rgba(7, 82, 64, 0.52), rgba(12, 20, 38, 0.74)),
        radial-gradient(circle at top right, rgba(82, 227, 172, 0.26), transparent 42%);
}

.tool-card-secondary {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(12, 20, 38, 0.74)),
        radial-gradient(circle at top right, rgba(80, 215, 255, 0.24), transparent 42%);
}

.tool-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.tool-card strong {
    display: block;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    line-height: 1.1;
}

.tool-description {
    margin-top: auto;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.96rem;
}

@keyframes auroraFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    12% { transform: translate3d(14px, -8px, 0) scale(1.04); }
    28% { transform: translate3d(-10px, 16px, 0) scale(1.03); }
    46% { transform: translate3d(20px, 22px, 0) scale(1.09); }
    62% { transform: translate3d(-18px, 10px, 0) scale(1.05); }
    78% { transform: translate3d(10px, -18px, 0) scale(1.07); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes auroraShift {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.66; }
    14% { transform: translate3d(1.2%, -0.8%, 0) scale(1.02); opacity: 0.72; }
    32% { transform: translate3d(-1.6%, 2.1%, 0) scale(1.04); opacity: 0.78; }
    51% { transform: translate3d(2.4%, -1.8%, 0) scale(1.08); opacity: 0.87; }
    69% { transform: translate3d(-2.1%, 1.5%, 0) scale(1.06); opacity: 0.81; }
    100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
}

@keyframes heroGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(80, 215, 255, 0));
        text-shadow: 0 0 0 rgba(80, 215, 255, 0);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(80, 215, 255, 0.28));
        text-shadow: 0 0 22px rgba(80, 215, 255, 0.22), 0 0 36px rgba(134, 239, 172, 0.17);
    }
}

@media (max-width: 760px) {
    body {
        overflow-y: auto;
    }

    .home-shell {
        padding: 1rem;
        place-items: center;
        align-content: center;
    }

    .aurora-base {
        inset: -16% -12%;
        filter: blur(38px);
        opacity: 0.66;
    }

    .home-glow {
        filter: blur(42px);
        opacity: 0.64;
    }

    .home-glow-one {
        left: -9rem;
        top: -7rem;
    }

    .home-glow-two {
        right: -8rem;
        bottom: -9rem;
    }

    .home-glow-three {
        right: 16%;
        top: 16%;
        width: 12rem;
        height: 12rem;
    }

    .tool-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .hero-card {
        width: 100%;
        border-radius: 22px;
        min-height: calc(100dvh - 2rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .tool-card {
        min-height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-card h1,
    .aurora-base,
    .home-glow,
    .tool-card {
        animation: none !important;
        transition: none;
    }
}
