:root {
    --blue: #0D47C7;
    --blue-deep: #003DA5;
    --blue-dark: #001a4d;
    --yellow: #FFD600;
    --white: #FFFFFF;
    --text: #0f172a;
    --text-muted: #64748b;
    --gradient: linear-gradient(135deg, var(--blue) 0%, #1565C0 45%, var(--yellow) 100%);
    --gradient-soft: linear-gradient(160deg, #eef4ff 0%, #fffef5 50%, #fff8dc 100%);
    --shadow: 0 24px 80px rgba(13, 71, 199, 0.18);
    --radius: 20px;
    --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    background: #fafbff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Canvas background ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 48px);
    transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(13, 71, 199, 0.08);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s;
}

.nav-links a:hover { color: var(--blue); }

.nav-cta {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600 !important;
    box-shadow: 0 8px 24px rgba(13, 71, 199, 0.25);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--blue);
    margin: 6px 0;
    transition: 0.3s;
}

/* ── Layout ── */
.page { position: relative; z-index: 1; }

section { padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 48px); }

.container {
    max-width: 1180px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(13, 71, 199, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 620px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 214, 0, 0.15);
    border: 1px solid rgba(255, 214, 0, 0.4);
    color: #92680a;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: pulse-badge 2.5s ease-in-out infinite;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--yellow);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--yellow);
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.btn:hover { transform: translateY(-3px); }

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 12px 32px rgba(13, 71, 199, 0.35);
}

.btn-ghost {
    background: var(--white);
    color: var(--blue);
    border: 2px solid rgba(13, 71, 199, 0.15);
    box-shadow: var(--shadow);
}

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.hero-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue);
}

.hero-stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 3D Logo diamond */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    min-height: 420px;
}

.scene-3d {
    position: relative;
    width: 320px;
    height: 320px;
    transform-style: preserve-3d;
    animation: float-scene 6s ease-in-out infinite;
}

@keyframes float-scene {
    0%, 100% { transform: translateY(0) rotateX(8deg); }
    50% { transform: translateY(-18px) rotateX(12deg); }
}

.diamond-wrap {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: spin-diamond 20s linear infinite;
}

@keyframes spin-diamond {
    from { transform: rotateY(0deg) rotateX(15deg); }
    to { transform: rotateY(360deg) rotateX(15deg); }
}

.diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    margin: -90px 0 0 -90px;
    transform-style: preserve-3d;
}

.diamond-face {
    position: absolute;
    width: 180px;
    height: 180px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    backface-visibility: hidden;
}

.diamond-face.outer { background: var(--yellow); transform: translateZ(40px); }
.diamond-face.mid { background: var(--white); transform: rotateY(90deg) translateZ(40px); }
.diamond-face.inner { background: var(--blue-deep); transform: rotateY(180deg) translateZ(40px); }
.diamond-face.back { background: var(--blue); transform: rotateY(270deg) translateZ(40px); }

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(13, 71, 199, 0.2);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.orbit-ring.r1 {
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    animation: orbit 12s linear infinite;
}

.orbit-ring.r2 {
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    border-color: rgba(255, 214, 0, 0.25);
    animation: orbit 18s linear infinite reverse;
}

@keyframes orbit {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

.orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.orbit-dot.blue { background: var(--blue); box-shadow: 0 0 16px var(--blue); }
.orbit-dot.yellow { background: var(--yellow); box-shadow: 0 0 16px var(--yellow); }

/* Phone mockup */
.phone-mockup {
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 180px;
    height: 360px;
    background: linear-gradient(145deg, #1a1a2e, #0f172a);
    border-radius: 32px;
    padding: 10px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255,255,255,0.08);
    transform: rotateY(-18deg) rotateX(8deg) translateZ(60px);
    animation: phone-float 5s ease-in-out infinite 0.5s;
}

@keyframes phone-float {
    0%, 100% { transform: rotateY(-18deg) rotateX(8deg) translateZ(60px) translateY(0); }
    50% { transform: rotateY(-18deg) rotateX(8deg) translateZ(60px) translateY(-12px); }
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--gradient-soft);
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 18px;
    background: #0f172a;
    border-radius: 999px;
    z-index: 2;
}

.phone-ui {
    padding: 36px 14px 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-card {
    background: var(--white);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(13, 71, 199, 0.1);
    animation: slide-card 4s ease-in-out infinite;
}

.phone-card:nth-child(2) { animation-delay: 0.6s; }
.phone-card:nth-child(3) { animation-delay: 1.2s; }

@keyframes slide-card {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.85; transform: translateX(4px); }
}

.phone-card-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue), var(--yellow));
    margin-bottom: 8px;
    width: 60%;
}

.phone-card-line {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    margin-bottom: 6px;
}

.phone-card-line.short { width: 70%; }

/* ── About ── */
.about {
    background: var(--white);
    border-radius: 40px 40px 0 0;
    margin-top: -40px;
    position: relative;
    z-index: 2;
    box-shadow: 0 -20px 60px rgba(13, 71, 199, 0.06);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-visual {
    position: relative;
    height: 400px;
}

.about-card-stack {
    position: absolute;
    inset: 0;
    perspective: 800px;
}

.stack-card {
    position: absolute;
    width: 85%;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid rgba(13, 71, 199, 0.06);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack-card.c1 {
    top: 0;
    left: 0;
    transform: rotate(-4deg) translateZ(0);
    z-index: 3;
}

.stack-card.c2 {
    top: 40px;
    left: 30px;
    transform: rotate(2deg);
    z-index: 2;
    background: linear-gradient(135deg, rgba(13,71,199,0.05), rgba(255,214,0,0.08));
}

.stack-card.c3 {
    top: 80px;
    left: 60px;
    transform: rotate(6deg);
    z-index: 1;
}

.stack-card:hover { transform: rotate(0deg) scale(1.02); z-index: 10; }

.stack-emoji { font-size: 2rem; margin-bottom: 12px; }
.stack-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--blue); }
.stack-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Features ── */
.features { background: var(--gradient-soft); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid rgba(13, 71, 199, 0.06);
    box-shadow: 0 8px 32px rgba(13, 71, 199, 0.06);
    transition: transform 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
}

.feature-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 24px 48px rgba(13, 71, 199, 0.14);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(13,71,199,0.1), rgba(255,214,0,0.15));
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ── Islands ── */
.islands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.island-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: default;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.island-card:hover { transform: scale(1.05) rotateY(5deg); }

.island-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.85;
}

.island-card:nth-child(even) .island-bg {
    background: linear-gradient(135deg, var(--blue-deep), var(--yellow));
}

.island-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 16px;
}

.island-emoji { font-size: 2.2rem; margin-bottom: 8px; }
.island-name { font-weight: 700; font-size: 0.95rem; }

/* ── Categories ── */
.categories { background: var(--blue-dark); color: var(--white); }

.categories .section-desc { color: rgba(255,255,255,0.7); }

.cat-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 48px 0 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cat-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 20px 28px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
    white-space: nowrap;
}

.cat-pill:hover {
    background: rgba(255, 214, 0, 0.15);
    transform: scale(1.05);
}

.cat-pill span { font-size: 1.4rem; }

/* ── Community ── */
.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.community-block {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(13, 71, 199, 0.06);
    position: relative;
    overflow: hidden;
}

.community-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.community-block h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--blue);
}

.community-block p { color: var(--text-muted); }

.community-list {
    list-style: none;
    margin-top: 20px;
}

.community-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.community-list li::before {
    content: '✦';
    color: var(--yellow);
    font-size: 0.8rem;
}

/* ── App CTA ── */
.app-cta {
    text-align: center;
    background: var(--gradient-soft);
    position: relative;
    overflow: hidden;
}

.app-cta::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,214,0,0.2) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.app-cta-box {
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 32px;
    padding: clamp(40px, 6vw, 64px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(13, 71, 199, 0.08);
    position: relative;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 24px;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(13, 71, 199, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 214, 0, 0.5); }
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #0f172a;
    color: var(--white);
    border-radius: 14px;
    opacity: 0.45;
    cursor: not-allowed;
    font-size: 0.9rem;
}

.store-btn svg { width: 28px; height: 28px; fill: currentColor; }

.store-btn small {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
}

.store-btn strong { font-size: 1rem; }

/* ── Footer ── */
.footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,0.75);
    padding: 48px clamp(20px, 5vw, 48px) 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto 40px;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.9rem;
    transition: color 0.25s;
}

.footer-links a:hover { color: var(--yellow); }

.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.footer-diamond {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--gradient);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    vertical-align: middle;
    margin-right: 6px;
}

/* ── Reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero-grid, .about-grid, .community-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .islands-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-visual { min-height: 360px; margin-top: 32px; }
    .phone-mockup { display: none; }
    .about-visual { height: 320px; }
}

@media (max-width: 640px) {
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.1);
        transform: translateY(-120%);
        opacity: 0;
        transition: 0.35s;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle { display: block; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
