* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:      #f4f4f7;
    --bg-2:    #eaeaf0;
    --ink:     #0a0a1a;
    --muted:   rgba(10, 10, 26, 0.55);
    --line:    rgba(10, 10, 26, 0.1);
    --purple:       #6c55ff;
    --purple-deep:  #5039e8;
    --purple-soft:  #9488ff;
    --pink:         #ff5ed7;
    --blue:         #3b9ff5;
    --yellow:       #ffd93b;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(10, 10, 26, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Rainbow + sparkles
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.loader__scene {
    position: relative;
    width: 320px;
    height: 220px;
}
.loader__rainbow {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
}
.loader__rainbow .rb {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}
.loader__unicorn {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 80px;
    z-index: 2;
    filter: drop-shadow(0 8px 15px rgba(108, 85, 255, 0.35));
    will-change: transform;
}
.loader__sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.loader__sparkles span {
    position: absolute;
    font-size: 16px;
    will-change: transform, opacity;
}

.loader__meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--muted);
}
.loader__counter {
    color: var(--purple);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
}

/* =========================================================
   PLAYFUL SECTION
   ========================================================= */
.playful {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 3rem;
}

.topnav__logo {
    display: inline-flex;
    align-items: flex-end;
    gap: 0.4rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    will-change: transform;
}
.topnav__logo-mark { width: 38px; height: 20px; }
.topnav__logo-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }

.topnav__links {
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
}
.topnav__links a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.3rem 0.1rem;
    will-change: transform;
}
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--purple);
    transform: scaleX(0);
    transform-origin: right;
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__cta {
    background: #fff;
    color: var(--purple);
    text-decoration: none;
    padding: 0.9rem 1.8rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(10, 10, 26, 0.08);
    position: relative;
    will-change: transform;
    transition: box-shadow 0.3s;
}
.topnav__cta:hover { box-shadow: 0 10px 28px rgba(108, 85, 255, 0.25); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 10;
    padding: 2rem 1.5rem 4rem;
    text-align: center;
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.hero__rainbow {
    font-size: 42px;
    position: relative;
    z-index: 11;
    margin-bottom: -8px;
    transform-origin: center bottom;
    will-change: transform;
}

.hero__badge {
    background: #fff;
    padding: 0.8rem 1.75rem;
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(10, 10, 26, 0.08);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 11;
    will-change: transform;
    cursor: default;
}
.hero__badge-text b { color: var(--ink); font-weight: 700; }
.hero__badge-text em {
    font-style: normal;
    color: var(--purple);
    font-weight: 600;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Person bubbles ---------- */
.person {
    position: absolute;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(10, 10, 26, 0.15);
    z-index: 8;
    cursor: pointer;
    will-change: transform;
    border: 4px solid #fff;
}
.person img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; user-select: none; }
.person--1 { top: 8%; right: 22%; width: 75px; height: 75px; }
.person--2 { top: 40%; left: 26%; width: 65px; height: 65px; }
.person--3 { top: 60%; left: 42%; width: 75px; height: 75px; }

/* ---------- Floating emojis ---------- */
.emoji {
    position: absolute;
    z-index: 7;
    font-size: 38px;
    cursor: pointer;
    user-select: none;
    will-change: transform;
}
.emoji--uni-sm    { top: 16%; left: 28%; font-size: 42px; }
.emoji--fire-1    { top: 44%; left: 32%; font-size: 30px; }
.emoji--fire-2    { top: 56%; right: 28%; font-size: 34px; }
.emoji--rainbow-2 { top: 44%; right: 28%; font-size: 38px; }
.emoji--sparkle   { top: 26%; right: 35%; font-size: 26px; }

/* ---------- Main unicorn stage ---------- */
.unicorn-stage {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    will-change: transform;
}
.unicorn-platform {
    position: absolute;
    inset: 20% 10% 10% 10%;
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    border-radius: 40px;
    transform: rotate(-5deg);
    box-shadow: 0 20px 40px rgba(108, 85, 255, 0.3);
}
.unicorn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(108, 85, 255, 0.4) 0%, transparent 60%);
    filter: blur(20px);
    pointer-events: none;
}
.unicorn-main {
    position: relative;
    z-index: 2;
    font-size: 200px;
    transform: translateY(-10px);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
    will-change: transform;
    user-select: none;
}

/* ---------- Title ---------- */
.hero__title {
    position: relative;
    z-index: 9;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 9vw, 8rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-top: 0.5rem;
    pointer-events: none;
}
.hero__line {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 16vw, 14rem);
    pointer-events: none;
}
.hero__word {
    display: inline-block;
    pointer-events: auto;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.hero__word--right { /* right-side word alignment if needed */ }

/* ---------- Description ---------- */
.hero__desc {
    position: relative;
    z-index: 11;
    max-width: 620px;
    margin: 2rem auto 2rem;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- Main CTA ---------- */
.cta-big {
    position: relative;
    z-index: 11;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
    color: #fff;
    text-decoration: none;
    padding: 1.1rem 2.75rem 1.1rem 2rem;
    border-radius: 50px 35px 50px 35px / 50% 50% 50% 50%;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 12px 30px rgba(108, 85, 255, 0.35),
                0 4px 10px rgba(0, 0, 0, 0.1);
    will-change: transform;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.cta-big::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s;
}
.cta-big:hover::before { left: 150%; }
.cta-big__icon {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cta-big__icon svg { width: 100%; height: 100%; }
.cta-big__label { position: relative; z-index: 2; }

/* Secondary link */
.hero__secondary {
    position: relative;
    z-index: 11;
    color: var(--purple);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3rem;
    will-change: transform;
}

/* ---------- Trusted by ---------- */
.trusted {
    position: relative;
    z-index: 11;
    width: 100%;
    max-width: 1100px;
}
.trusted__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-align: left;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}
.trusted__logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.trusted__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    opacity: 0.5;
    filter: grayscale(1);
    cursor: pointer;
    will-change: transform;
    transition: filter 0.35s ease, opacity 0.35s ease;
}
.trusted__logo svg { width: 18px; height: 18px; }
.trusted__logo em { color: var(--purple); font-style: italic; font-weight: 600; }
.trusted__logo b { color: var(--purple); }
.trusted__logo:hover { opacity: 1; filter: grayscale(0); }

/* ---------- Scroll dot ---------- */
.scroll-dot {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 260px;
}
.scroll-dot::before {
    content: '';
    flex: 1;
    width: 1px;
    background: linear-gradient(180deg, rgba(10,10,26,0.15), transparent);
}
.scroll-dot span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--purple);
    margin-top: 8px;
    will-change: transform;
}

/* ---------- Initial hidden states ---------- */
[data-magnetic], [data-link], [data-fade], [data-word], [data-badge], [data-float],
[data-person], [data-emoji], [data-unicorn], [data-logo], [data-scroll] {
    opacity: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .topnav { padding: 1rem 1.5rem; gap: 1rem; }
    .topnav__links { display: none; }
    .hero__line { gap: 8rem; }
    .unicorn-stage { width: 260px; height: 260px; top: 24%; }
    .unicorn-main { font-size: 160px; }
    .person--1 { right: 8%; }
    .person--2 { left: 8%; }
    .person--3 { left: 52%; }
    .scroll-dot { display: none; }
}
@media (max-width: 768px) {
    .hero__rainbow { font-size: 32px; }
    .hero__badge { font-size: 0.9rem; padding: 0.6rem 1.25rem; }
    .hero__title { font-size: clamp(2rem, 12vw, 4.5rem); }
    .hero__line { gap: 5rem; }
    .unicorn-stage { width: 180px; height: 180px; top: 26%; }
    .unicorn-main { font-size: 110px; }
    .person { border-width: 3px; }
    .person--1 { width: 50px; height: 50px; top: 14%; right: 4%; }
    .person--2 { width: 45px; height: 45px; left: 2%; top: 44%; }
    .person--3 { width: 50px; height: 50px; left: 5%; top: 64%; }
    .emoji { font-size: 24px !important; }
    .cta-big { font-size: 1.05rem; padding: 0.9rem 2rem; }
    .trusted__logos { gap: 1.25rem; }
    .trusted__logo { font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .hero__line { gap: 3rem; }
    .unicorn-stage { width: 140px; height: 140px; top: 28%; }
    .unicorn-main { font-size: 80px; }
    .person--2, .emoji--sparkle, .emoji--rainbow-2 { display: none; }
    .topnav__cta { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
    .trusted__label { padding-left: 0; text-align: center; }
}
