/* ----- RESET & GLOBAL ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

.grid-lines {
    --s: 40px;
    --t: 2px;
    background: conic-gradient(
            from 90deg at var(--t) var(--t),
            #ffffff 25%,
            #f8faeb 0
        )
        0 0 / var(--s) var(--s);
    width: 100%;
    height: 100%;
    position: relative;
}

#drawCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* make sure content sits above the canvas */
.grid-lines > section,
.grid-lines > .hero,
.grid-lines > .early-access {
    position: relative;
    z-index: 1;
}

body {
    background: #fafaf8;
    color: #111;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
    line-height: 1.4;
    overflow-x: hidden;
}

:root {
    --g: #bdcf46;
    --g-light: #eef7e0;
    --g-mid: #f2fedc;
    --text: #111;
    --muted: #5a5a62;
    --faint: #adada6;
    --border: #e8e8e2;
    --bg: #fafaf8;
    --white: #ffffff;
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
}

/* ----- ANIMATIONS ----- */
@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(-2deg);
    }
    50% {
        transform: translateY(-14px) rotate(2deg);
    }
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.75);
    }
}
@keyframes mascotBounce {
    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-10px) rotate(-6deg) scale(1.08);
    }
    50% {
        transform: translateY(-2px) rotate(3deg) scale(0.96);
    }
    75% {
        transform: translateY(-14px) rotate(-3deg) scale(1.05);
    }
}
@keyframes footerGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes arrowBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}
@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}
@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes newGlow {
    0%,
    100% {
        box-shadow:
            0 0 0 3px rgba(189, 207, 70, 0.15),
            var(--shadow-sm);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(189, 207, 70, 0.25),
            var(--shadow-sm);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1),
        transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================= */
/* NAV                                                        */
/* ========================================================= */
nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    width: calc(100% - 2rem);
    max-width: 1200px;
    background: rgba(250, 250, 248, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img {
    height: 28px;
    width: auto;
    transition: transform 0.3s ease;
}
.nav-logo:hover img {
    transform: rotate(-5deg) scale(1.1);
}
.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}
.nav-badge {
    background: var(--g);
    color: var(--text);
    padding: 0.5rem 1.3rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-badge:hover {
    transform: scale(0.97);
    background: #bdcf46;
}

/* ========================================================= */
/* HERO — Version Transition                                  */
/* ========================================================= */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 9rem 2rem 5rem;
    max-width: 720px;
    margin: 0 auto;
}
.hero-left {
    animation: fadeUp 0.9s ease both;
}

/* --- Version transition column --- */
.version-transition {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.version-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s ease;
}
.version-block:hover {
    transform: translateY(-4px);
}

/* Old icon: fade in immediately */
.version-block:first-child .version-icon {
    animation: iconFadeIn 0.5s ease both 0.3s;
}

/* New icon: fade in after arrow finishes drawing */
.version-block:last-child .version-icon {
    animation: iconFadeIn 0.4s ease both 1.5s;
    opacity: 0;
}
.version-block:last-child .version-meta {
    animation: iconFadeIn 0.4s ease both 1.7s;
    opacity: 0;
}

.version-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--white);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.version-icon img {
    width: 55%;
    height: 55%;
    object-fit: contain;
}
/* old.png fills the icon like a real app icon */
.version-icon img.icon-fill {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* New icon: green ring + subtle breathing glow */
.version-icon.new {
    border-color: var(--g);
    box-shadow:
        0 0 0 3px rgba(189, 207, 70, 0.15),
        var(--shadow-sm);
    animation:
        iconFadeIn 0.4s ease both 1.5s,
        newGlow 3s ease-in-out 1.9s infinite;
    opacity: 0;
}
.version-block:hover .version-icon {
    box-shadow: var(--shadow-md);
}
.version-block:hover .version-icon.new {
    box-shadow:
        0 0 0 5px rgba(189, 207, 70, 0.25),
        var(--shadow-md);
}

.version-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.version-name {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}
.version-status {
    font-size: 0.68rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.65rem;
    border-radius: 100px;
    letter-spacing: 0.01em;
}
.version-status.live {
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
}
.status-dot {
    width: 5px;
    height: 5px;
    background: var(--g);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.version-status.soon {
    color: #476b1a;
    background: var(--g-light);
    border: 1px solid transparent;
}

/* --- Animated drawn arrow --- */
.version-arrow-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.2rem 0;
}
.draw-arrow {
    width: 40px;
    height: 72px;
    overflow: visible;
}
.arrow-stem,
.arrow-tip {
    stroke: var(--g);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.arrow-stem {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawStroke 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards 0.7s;
}
.arrow-tip {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawStroke 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards 1.35s;
}

/* --- Headline & sub --- */
h1.headline {
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 1.4rem;
}
h1.headline em {
    font-style: normal;
    color: var(--g);
}
.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto 3rem;
}

/* --- Scroll arrow --- */
.hero-arrow {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--faint);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.3s;
}
.hero-arrow:hover {
    color: var(--g);
}
.hero-arrow svg {
    width: 20px;
    height: 20px;
    animation: arrowBounce 2s ease-in-out infinite;
}
.hero-arrow:hover svg {
    animation: none;
    transform: translateY(3px);
}

/* ========================================================= */
/* EARLY ACCESS / CTA                                         */
/* ========================================================= */
.early-access {
    padding: 2rem 1.5rem 6rem;
}
.early-access-inner {
    max-width: 640px;
    margin: 0 auto;
}
.cta-section {
    background: #111;
    border-radius: 36px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}
.cta-glow-1 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--g);
    opacity: 0.1;
    top: -180px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}
.cta-glow-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--g);
    opacity: 0.06;
    bottom: -120px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
}
.cta-content {
    position: relative;
    z-index: 1;
}
.cta-mascot {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.5rem;
    animation: float 4s ease-in-out infinite;
}
.cta-title {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: 0.7rem;
}
.cta-title em {
    color: var(--g);
    font-style: normal;
}
.cta-sub {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2.2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Email form */
.email-form {
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}
.email-input-wrap {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}
.email-input-wrap:focus-within {
    border-color: rgba(189, 207, 70, 0.5);
    box-shadow: 0 0 0 3px rgba(189, 207, 70, 0.1);
}
.email-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.9rem 1.3rem;
    min-width: 0;
}
.email-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}
.email-input-wrap button {
    background: var(--g);
    color: var(--text);
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.9rem 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.email-input-wrap button:hover {
    background: #c9da58;
}
.email-input-wrap button:active {
    transform: scale(0.97);
}
.email-note {
    margin-top: 0.9rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Success state */
.email-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}
.success-check {
    width: 56px;
    height: 56px;
    background: var(--g);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-check svg {
    width: 26px;
    height: 26px;
    color: var(--text);
}
.email-success p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================================= */
/* FOOTER                                                     */
/* ========================================================= */
footer {
    padding: 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(120deg, #fdfdfb, #f6f9f0, #fdfdfb);
    background-size: 200% 200%;
    animation: footerGradient 10s ease infinite;
    transition: box-shadow 0.3s ease;
}
footer:hover {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
    transition:
        transform 0.3s ease,
        color 0.3s ease;
    text-decoration: none;
}
.footer-logo:hover {
    transform: translateY(-3px);
    color: var(--g);
}
.footer-logo-svg {
    width: 24px;
    height: 28px;
    transition: filter 0.3s ease;
}
.footer-logo:hover .footer-logo-svg {
    animation: mascotBounce 0.8s ease infinite;
    filter: drop-shadow(0 6px 10px rgba(141, 194, 62, 0.35));
}
.footer-logo-text {
    font-weight: 800;
}
.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.footer-links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--faint);
    transition:
        color 0.2s,
        transform 0.25s ease;
    position: relative;
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--text);
    transform: translateX(3px);
}
.footer-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--g);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
}
.footer-links a:hover::after {
    width: 100%;
}
.footer-copy {
    font-size: 0.8rem;
    color: var(--faint);
    transition:
        color 0.3s ease,
        transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.footer-copy:hover {
    color: var(--muted);
    transform: translateY(-1px);
}
.footer-copy-dot {
    width: 4px;
    height: 4px;
    background: var(--g-mid);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2.5s infinite;
}

/* ========================================================= */
/* RESPONSIVE                                                 */
/* ========================================================= */
@media (max-width: 768px) {
    nav {
        padding: 0.65rem 1rem;
        gap: 0.4rem;
    }
    .nav-logo {
        font-size: 1.3rem;
    }
    .nav-logo img {
        height: 22px;
    }
    .nav-badge {
        padding: 0.4rem 1rem;
        font-size: 0.72rem;
    }
    .hero {
        padding: 7.5rem 1.5rem 4rem;
        min-height: auto;
    }
    .version-icon {
        width: 68px;
        height: 68px;
        border-radius: 17px;
    }
    .version-arrow-wrap {
        height: 60px;
    }
    .draw-arrow {
        height: 60px;
    }
}

@media (max-width: 640px) {
    .early-access {
        padding: 1rem 1.2rem 4rem;
    }
    .cta-section {
        padding: 2.8rem 1.5rem;
        border-radius: 28px;
    }
    footer {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.55rem 0.8rem;
        border-radius: 40px;
    }
    .nav-logo {
        font-size: 1.15rem;
        gap: 0.35rem;
    }
    .nav-logo img {
        height: 20px;
    }
    .nav-badge {
        padding: 0.35rem 0.85rem;
        font-size: 0.68rem;
    }
    .hero {
        padding: 7rem 1.2rem 3rem;
    }
    .version-icon {
        width: 60px;
        height: 60px;
        border-radius: 15px;
    }
    .version-name {
        font-size: 0.78rem;
    }
    .version-status {
        font-size: 0.62rem;
        padding: 0.15rem 0.5rem;
    }
    .version-arrow-wrap {
        height: 50px;
    }
    .draw-arrow {
        height: 50px;
    }
    h1.headline {
        margin-bottom: 1.2rem;
    }
    .hero-sub {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
    }
    .cta-section {
        padding: 2.2rem 1.2rem;
        border-radius: 24px;
    }
    .email-input-wrap {
        flex-direction: column;
        border-radius: 16px;
    }
    .email-input-wrap input {
        text-align: center;
        padding: 0.85rem 1.2rem;
    }
    .email-input-wrap button {
        padding: 0.8rem;
        border-radius: 0 0 14px 14px;
    }
    footer {
        padding: 2rem 1.2rem;
    }
}

@media (max-width: 360px) {
    .nav-badge {
        font-size: 0.62rem;
        padding: 0.3rem 0.7rem;
    }
    .footer-copy {
        font-size: 0.7rem;
    }
}

button {
    cursor: pointer;
    background: none;
    border: none;
}
img,
svg {
    max-width: 100%;
}
/* ========================================================= */
/* V1.0 STORE LINKS                                          */
/* ========================================================= */
.version-block {
    position: relative;
}
.version-icon-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.store-links-row {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.55rem;
    justify-content: center;
    white-space: nowrap;
}
.store-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.32rem 0.7rem;
    font-size: 0.63rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.store-pill:hover {
    border-color: var(--g);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.store-pill svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
