@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
    --bg: #070b18;
    --bg-soft: #0d1328;
    --surface: rgba(16, 24, 48, 0.72);
    --surface-strong: rgba(15, 23, 42, 0.92);
    --text: #f7f9ff;
    --muted: #aab3c8;
    --line: rgba(148, 163, 184, 0.14);
    --primary: #6d7cff;
    --primary-soft: #8b5cf6;
    --cyan: #22d3ee;
    --green: #34d399;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(109, 124, 255, 0.12),
            transparent 34%
        ),
        radial-gradient(
            circle at 80% 72%,
            rgba(34, 211, 238, 0.08),
            transparent 35%
        ),
        var(--bg);
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
}

.background-grid {
    position: absolute;
    inset: 0;
    z-index: -4;
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.background-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            120deg,
            transparent 0 46%,
            rgba(109, 124, 255, 0.06) 50%,
            transparent 54%
        ),
        linear-gradient(
            30deg,
            transparent 0 44%,
            rgba(34, 211, 238, 0.04) 50%,
            transparent 56%
        );
    background-size: 260px 260px;
    animation: grid-shift 18s linear infinite;
}

.background-glow {
    position: absolute;
    z-index: -3;
    width: 38rem;
    height: 38rem;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.14;
    pointer-events: none;
}

.background-glow--one {
    top: -18rem;
    right: -8rem;
    background: var(--primary);
    animation: drift-one 14s ease-in-out infinite;
}

.background-glow--two {
    bottom: -22rem;
    left: -10rem;
    background: var(--cyan);
    animation: drift-two 17s ease-in-out infinite;
}

.hero {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
    padding: 82px 0 50px;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.97fr);
    align-items: center;
    gap: clamp(54px, 8vw, 120px);
}

.hero__content {
    position: relative;
    z-index: 2;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 52px;
}

.brand-mark__dot {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.brand-mark__dot::before,
.brand-mark__dot::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    transform: translateY(-50%);
}

.brand-mark__dot::before {
    left: -6px;
}

.brand-mark__dot::after {
    right: -6px;
}

.brand-mark__text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.eyebrow {
    margin: 0 0 18px;
    color: #a7b1ff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.24em;
}

h1 {
    max-width: 780px;
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3rem, 6.2vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.gradient-text {
    display: block;
    padding-bottom: 0.08em;
    color: transparent;
    background: linear-gradient(
        100deg,
        #ffffff 0%,
        #b3bbff 28%,
        #6d7cff 57%,
        #22d3ee 100%
    );
    background-size: 220% auto;
    background-clip: text;
    -webkit-background-clip: text;
    animation: gradient-flow 8s ease-in-out infinite;
}

.hero__description {
    max-width: 630px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.8;
}

.status-pill {
    width: fit-content;
    margin-top: 34px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d7dcef;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
    font-size: 0.84rem;
    font-weight: 500;
}

.status-pill__indicator {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.72);
}

.status-pill__indicator::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: inherit;
    animation: status-pulse 2s ease-out infinite;
}

.visual {
    position: relative;
    min-height: 540px;
    display: grid;
    place-items: center;
    perspective: 1200px;
}

.visual::before {
    content: "";
    position: absolute;
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(109, 124, 255, 0.2),
        rgba(34, 211, 238, 0.04) 50%,
        transparent 72%
    );
    filter: blur(8px);
    animation: visual-breathe 7s ease-in-out infinite;
}

.visual__orbit {
    position: absolute;
    border: 1px solid rgba(159, 172, 255, 0.16);
    border-radius: 50%;
}

.visual__orbit::before,
.visual__orbit::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 0 18px rgba(109, 124, 255, 0.75);
}

.visual__orbit--outer {
    width: 480px;
    height: 480px;
    animation: spin 24s linear infinite;
}

.visual__orbit--outer::before {
    left: -4px;
}

.visual__orbit--outer::after {
    right: -4px;
}

.visual__orbit--middle {
    width: 365px;
    height: 365px;
    border-style: dashed;
    animation: spin-reverse 18s linear infinite;
}

.visual__orbit--middle::before {
    top: -4px;
    left: 50%;
}

.visual__orbit--middle::after {
    top: auto;
    right: 50%;
    bottom: -4px;
}

.code-card {
    position: relative;
    width: min(390px, 80vw);
    aspect-ratio: 1.03;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 30px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.015)
        ),
        var(--surface);
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    transform: rotateY(-7deg) rotateX(4deg);
    animation: card-float 6s ease-in-out infinite;
}

.code-card::before {
    content: "";
    position: absolute;
    inset: -70%;
    background: conic-gradient(
        from 180deg,
        transparent,
        rgba(109, 124, 255, 0.2),
        transparent 24%,
        rgba(34, 211, 238, 0.14),
        transparent 54%
    );
    animation: spin 11s linear infinite;
}

.code-card__topbar {
    position: relative;
    z-index: 2;
    height: 58px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(7, 11, 24, 0.32);
}

.code-card__topbar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.code-card__topbar span:nth-child(1) {
    background: #fb7185;
}

.code-card__topbar span:nth-child(2) {
    background: #fbbf24;
}

.code-card__topbar span:nth-child(3) {
    background: #34d399;
}

.code-card__screen {
    position: relative;
    z-index: 2;
    height: calc(100% - 58px);
    padding: 36px;
    overflow: hidden;
}

.code-card__screen::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.code-line {
    position: relative;
    height: 7px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(109, 124, 255, 0.85),
        rgba(34, 211, 238, 0.26)
    );
    transform-origin: left center;
    animation: code-load 4s ease-in-out infinite;
}

.code-line--one {
    width: 48%;
}

.code-line--two {
    width: 72%;
    animation-delay: 0.3s;
}

.code-line--three {
    width: 58%;
    animation-delay: 0.6s;
}

.code-line--four {
    width: 34%;
    animation-delay: 0.9s;
}

.loop-symbol {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 190px;
    height: 100px;
    transform: translate(-50%, -32%);
    filter: drop-shadow(0 0 22px rgba(109, 124, 255, 0.35));
}

.loop-symbol__segment {
    position: absolute;
    top: 0;
    width: 112px;
    height: 100px;
    border: 13px solid transparent;
    border-radius: 50%;
}

.loop-symbol__segment--left {
    left: 0;
    border-top-color: #6d7cff;
    border-bottom-color: #9f7aea;
    transform: rotate(28deg);
}

.loop-symbol__segment--right {
    right: 0;
    border-top-color: #22d3ee;
    border-bottom-color: #6d7cff;
    transform: rotate(-28deg);
}

.loop-symbol::before,
.loop-symbol::after {
    content: "";
    position: absolute;
    top: 40px;
    z-index: 3;
    width: 22px;
    height: 22px;
    border-top: 6px solid;
    border-right: 6px solid;
}

.loop-symbol::before {
    left: 4px;
    border-color: #6d7cff;
    transform: rotate(-135deg);
}

.loop-symbol::after {
    right: 4px;
    border-color: #22d3ee;
    transform: rotate(45deg);
}

.loop-symbol__spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: white;
    box-shadow:
        0 0 16px white,
        0 0 36px var(--cyan),
        0 0 70px var(--primary);
    transform: translate(-50%, -50%);
    animation: spark-pulse 2.4s ease-in-out infinite;
}

.floating-token {
    position: absolute;
    min-width: 58px;
    height: 58px;
    padding: 0 14px;
    display: grid;
    place-items: center;
    color: #d8ddff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 17px;
    background: rgba(10, 16, 34, 0.76);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
}

.floating-token--left {
    left: 2%;
    top: 27%;
    animation: token-float 5s ease-in-out infinite;
}

.floating-token--right {
    right: 0;
    top: 18%;
    animation: token-float 6.4s ease-in-out infinite reverse;
}

.floating-token--bottom {
    right: 13%;
    bottom: 12%;
    color: #87f0ff;
    font-size: 1.6rem;
    animation: token-float 5.7s ease-in-out infinite 0.8s;
}

.footer {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(170, 179, 200, 0.7);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

.footer__divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(170, 179, 200, 0.5);
}

@keyframes gradient-flow {
    0%,
    100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

@keyframes grid-shift {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 260px 260px;
    }
}

@keyframes drift-one {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-70px, 80px, 0) scale(1.14);
    }
}

@keyframes drift-two {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(95px, -55px, 0) scale(1.12);
    }
}

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

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

@keyframes visual-breathe {
    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.72;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

@keyframes card-float {
    0%,
    100% {
        transform: rotateY(-7deg) rotateX(4deg) translateY(0);
    }
    50% {
        transform: rotateY(-3deg) rotateX(1deg) translateY(-16px);
    }
}

@keyframes code-load {
    0%,
    100% {
        transform: scaleX(0.82);
        opacity: 0.55;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes token-float {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

@keyframes spark-pulse {
    0%,
    100% {
        opacity: 0.72;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.25);
    }
}

@keyframes status-pulse {
    0% {
        opacity: 0.9;
        transform: scale(0.5);
    }
    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}

@media (max-width: 980px) {
    .hero {
        width: min(760px, calc(100% - 36px));
        padding-top: 54px;
        grid-template-columns: 1fr;
        gap: 26px;
        text-align: center;
    }

    .hero__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .brand-mark {
        margin-bottom: 38px;
    }

    .hero__description {
        max-width: 600px;
    }

    .visual {
        min-height: 470px;
    }

    .visual__orbit--outer {
        width: 420px;
        height: 420px;
    }

    .visual__orbit--middle {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 560px) {
    .hero {
        width: min(100% - 28px, 720px);
        padding-top: 34px;
    }

    .brand-mark {
        margin-bottom: 30px;
    }

    h1 {
        font-size: clamp(2.75rem, 15vw, 4.2rem);
    }

    .hero__description {
        margin-top: 22px;
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .visual {
        min-height: 390px;
        margin-top: 12px;
    }

    .visual__orbit--outer {
        width: 330px;
        height: 330px;
    }

    .visual__orbit--middle {
        width: 250px;
        height: 250px;
    }

    .code-card {
        width: min(300px, 82vw);
        border-radius: 24px;
    }

    .code-card__screen {
        padding: 28px;
    }

    .loop-symbol {
        width: 150px;
        height: 78px;
    }

    .loop-symbol__segment {
        width: 88px;
        height: 78px;
        border-width: 10px;
    }

    .loop-symbol::before,
    .loop-symbol::after {
        top: 31px;
        width: 18px;
        height: 18px;
        border-top-width: 5px;
        border-right-width: 5px;
    }

    .floating-token {
        min-width: 48px;
        height: 48px;
        padding: 0 11px;
        border-radius: 14px;
        font-size: 0.82rem;
    }

    .floating-token--left {
        left: -1%;
        top: 23%;
    }

    .floating-token--right {
        right: -2%;
        top: 17%;
    }

    .floating-token--bottom {
        right: 6%;
        bottom: 7%;
        font-size: 1.35rem;
    }

    .footer {
        width: calc(100% - 28px);
        padding-bottom: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
