@font-face {
    font-family: vazirmatn;
    src: url("Vazirmatn-Medium.woff2");
}

:root {
    --bg: #100F17;
    --bg-2: #17151F;
    --card: #1C1A26;
    --line: #2C2937;
    --ink: #EFEDF6;
    --ink-dim: #A8A3B8;
    --acid: #D6FF4A;
    --acid-dim: #9CB838;
    --violet: #7C5CFF;
    --violet-dim: #5A41BF;
    --radius: 22px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: vazirmatn;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== background atmosphere ===== */
.noise-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 900px 600px at 85% 15%, rgba(124, 92, 255, 0.20), transparent 60%),
        radial-gradient(ellipse 700px 700px at 8% 85%, rgba(214, 255, 74, 0.10), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.floating-glyph {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.035);
    font-size: clamp(60px, 10vw, 140px);
    user-select: none;
    animation: drift 18s ease-in-out infinite;
}

.fg1 {
    top: 6%;
    left: 4%;
    animation-delay: 0s;
}

.fg2 {
    bottom: 10%;
    right: 6%;
    animation-delay: -6s;
    font-size: clamp(50px, 8vw, 110px);
}

.fg3 {
    top: 55%;
    left: 1%;
    animation-delay: -11s;
    font-size: clamp(40px, 7vw, 90px);
}

@keyframes drift {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-26px) rotate(4deg);
    }
}

/* ===== layout ===== */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
    padding: 40px clamp(24px, 6vw, 90px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
    color: var(--ink-dim);
    width: fit-content;
    opacity: 0;
    animation: rise 0.8s cubic-bezier(.16, 1, .3, 1) 0.1s forwards;
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acid);
    box-shadow: 0 0 12px var(--acid);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: .6;
    }
}

.copy {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

h1 {
    font-size: clamp(46px, 6.4vw, 92px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(.16, 1, .3, 1) 0.25s forwards;
}

h1 .accent {
    color: var(--acid);
    position: relative;
    display: inline-block;
}

h1 .accent::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 6px;
    height: 14px;
    background: var(--violet);
    opacity: .35;
    z-index: -1;
    border-radius: 6px;
    transform: scaleX(0);
    transform-origin: right;
    animation: underline-grow 0.7s cubic-bezier(.16, 1, .3, 1) 1.1s forwards;
}

@keyframes underline-grow {
    to {
        transform: scaleX(1);
    }
}

.lede {
    font-size: clamp(17px, 1.6vw, 21px);
    color: var(--ink-dim);
    line-height: 1.85;
    max-width: 540px;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(.16, 1, .3, 1) 0.42s forwards;
}

.lede b {
    color: var(--ink);
    font-weight: 700;
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(.16, 1, .3, 1) 0.58s forwards;
}

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--acid);
    color: #14130C;
    font-weight: 800;
    font-size: 18px;
    padding: 18px 34px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
    box-shadow: 0 0 0 0 rgba(214, 255, 74, 0.5);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 40px -8px rgba(214, 255, 74, 0.55);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.99);
}

.btn-primary svg {
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.btn-primary:hover svg {
    transform: translateX(-6px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
    transition: border-color .3s ease, color .3s ease, gap .3s ease;
}

.btn-ghost:hover {
    border-color: var(--ink);
    gap: 16px;
}

.stats {
    display: flex;
    gap: clamp(22px, 4vw, 48px);
    padding-top: 18px;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(.16, 1, .3, 1) 0.74s forwards;
}

.stat .num {
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.stat .lbl {
    font-size: 13px;
    color: var(--ink-dim);
    margin-top: 4px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== signature: living letter grid ===== */
.stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) 0.5s forwards;
}

.phone {
    position: relative;
    width: min(340px, 80vw);
    aspect-ratio: 9/18.5;
    border-radius: 48px;
    background: linear-gradient(155deg, #232032, #15131D);
    border: 1px solid var(--line);
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 0 80px -20px rgba(124, 92, 255, 0.35);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: float-phone 6s ease-in-out infinite;
}

@keyframes float-phone {

    0%,
    100% {
        transform: translateY(0) rotate(-1.2deg);
    }

    50% {
        transform: translateY(-18px) rotate(1.2deg);
    }
}

.phone-notch {
    width: 70px;
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 auto;
}

.phone-label {
    font-size: 13px;
    color: var(--ink-dim);
    text-align: center;
    letter-spacing: .04em;
}

.phone-label b {
    color: var(--acid);
    font-weight: 700;
}

.grid-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.tile {
    aspect-ratio: 1;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 800;
    color: var(--ink-dim);
    position: relative;
    transition: background .5s ease, color .5s ease, border-color .5s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.tile.lit {
    background: rgba(214, 255, 74, 0.14);
    border-color: var(--acid);
    color: var(--acid);
    transform: scale(1.08);
    box-shadow: 0 0 24px -4px rgba(214, 255, 74, 0.6);
}

.tile.pop {
    animation: tile-pop .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes tile-pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.18) rotate(-4deg);
    }

    100% {
        transform: scale(1.08);
    }
}

.progress-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.progress-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    transition: background .4s ease, transform .4s ease;
}

.progress-dot.active {
    background: var(--violet);
    transform: scale(1.3);
}

.score-pill {
    position: absolute;
    top: 14%;
    left: -10%;
    background: var(--violet);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 14px;
    box-shadow: 0 16px 40px -10px rgba(124, 92, 255, 0.7);
    animation: badge-float 5s ease-in-out infinite, fade-in-late 0.8s ease 1.6s backwards;
}

@keyframes badge-float {

    0%,
    100% {
        transform: translateY(0) rotate(-4deg);
    }

    50% {
        transform: translateY(-14px) rotate(2deg);
    }
}

@keyframes fade-in-late {
    from {
        opacity: 0;
        transform: translateY(20px) rotate(-4deg) scale(.8);
    }
}

.streak-pill {
    position: absolute;
    bottom: 10%;
    right: -8%;
    background: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--acid);
    font-weight: 700;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: badge-float 5.6s ease-in-out infinite reverse, fade-in-late 0.8s ease 1.9s backwards;
}

/* ===== scroll cue ===== */
.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ink-dim);
    font-size: 12px;
    z-index: 3;
    opacity: 0;
    animation: rise 0.8s ease 1.3s forwards;
}

.scroll-cue .line {
    width: 1px;
    height: 34px;
    background: linear-gradient(var(--line), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-cue .line::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(var(--acid), transparent);
    animation: line-run 2s ease-in-out infinite;
}

@keyframes line-run {
    0% {
        top: -100%;
    }

    60% {
        top: 100%;
    }

    100% {
        top: 100%;
    }
}

/* ===== responsive ===== */
@media (max-width: 880px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 64px;
        padding-bottom: 64px;
        gap: 56px;
        min-height: auto;
    }

    .stage {
        order: -1;
    }

    .copy {
        align-items: flex-start;
        text-align: right;
    }

    .lede {
        max-width: 100%;
    }

    .score-pill {
        left: 2%;
    }

    .streak-pill {
        right: 2%;
    }

    .scroll-cue {
        display: none;
    }
}

@media (max-width: 420px) {
    .stats {
        gap: 22px;
        flex-wrap: wrap;
    }
}