/* Google Fonts loaded in HTML with display=swap for non-blocking render */

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-deep: #030014;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --glass-border: 1px solid var(--border-color);
    --header-height: 90px;
    --container-width: 1200px;
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(56, 189, 248, 0.1) 0px, transparent 50%);
    opacity: 0.8;
}

.mesh-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.text-center { text-align: center; }

.text-center p,
.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hue-rotate 10s infinite linear;
}

#dynamic-word {
    display: inline-block;
    min-height: 1.2em;
}

@keyframes hue-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.bento-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover::before { opacity: 1; }

.bento-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.4), transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.bento-card:hover::after { opacity: 1; }

header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
}

.logo img { height: 32px; }

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--primary-light);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-glow {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), 0 8px 32px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-glow::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    z-index: 2;
}

.btn-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
    border-radius: 100px;
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.1), 0 16px 48px rgba(99, 102, 241, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-glow:hover::after {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(99, 102, 241, 0.25));
}

.lang-selector {
    position: relative;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-lang:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-lang[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-lang[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

.lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-chevron {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 160px;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.2);
    color: white;
}

.lang-option .lang-flag {
    width: 24px;
    height: 18px;
}

.btn-outline {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.4), rgba(20, 20, 30, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(12px);
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
}

.app-preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-top: 2rem;
}

.app-preview-wrapper img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 80px -20px rgba(0, 0, 0, 0.5);
    display: block;
}

.features { padding: 5rem 0; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-3 { grid-column: span 3; }

.bento-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: white;
}

.bento-content p { color: var(--text-secondary); }

.steps-section { padding: 5rem 0; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 5rem;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-icon-wrapper {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: var(--primary-light);
}

.cta-section { padding: 5rem 0; }

.cta-card {
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.5) 0%, rgba(19, 17, 50, 0) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background: rgba(0, 0, 0, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
    margin-top: 1rem;
}

.footer-title {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-card.span-3 { grid-column: span 2; }
}

@media (max-width: 768px) {
    .hero { min-height: 100svh; }
    .hero-actions { flex-direction: column; width: 100%; gap: 1rem; }
    .hero-actions .btn { width: 100%; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.span-2, .bento-card.span-3 { grid-column: span 1; }
    .bento-icon { display: none; }
    .bento-card { padding: 1.5rem; }
    .bento-content h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
    .bento-content p { font-size: 0.9rem; }
    .steps-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .footer-brand { align-items: center; display: flex; flex-direction: column; }
}

@media (max-width: 450px) {
    header .container { padding: 0 1rem; }
    header .container > div { gap: 0.75rem; }
    .logo { font-size: 1.25rem; }
    .btn-outline { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .btn-lang { padding: 0.25rem; font-size: 0.8rem; }
    .hero { min-height: 100svh; }
    .badge { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
    .hero h1 { font-size: clamp(2.7rem, 10vw, 3.8rem); }
    .hero-subtitle { font-size: 0.85rem; }
    .hero-actions { margin-bottom: 0; }
    .hero-actions .btn { padding: 0.7rem 1.25rem; font-size: 0.85rem; }
}
