/* ============================================
   SPARK Web — Glassmorphism Design System
   Single-window layout matching reference
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-page: #C8C8C8;

    --glass-bg: rgba(244, 244, 244, 0.9);
    --glass-border: rgba(200, 200, 200, 0.5);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
    --glass-blur: 30px;

    --grad-1: rgba(210, 200, 215, 0.35);
    --grad-2: rgba(195, 200, 220, 0.3);
    --grad-3: rgba(215, 210, 205, 0.25);
    --grad-4: rgba(200, 205, 220, 0.2);

    --text-primary: #1A1A1A;
    --text-secondary: #5A5A5A;
    --text-muted: #8A8A8A;

    --accent-dark: #1A1A1A;
    --accent-orange: #A08860;
    --accent-orange-light: #C8A97E;

    --bg-secondary: rgba(0, 0, 0, 0.03);
    --bg-container-inner: rgba(0, 0, 0, 0.02);
    --border-color: rgba(0, 0, 0, 0.12);

    --font-display: 'Onest', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --radius-window: 28px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;
}

[data-theme="dark"] {
    --bg-page: #111111;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);

    --grad-1: rgba(40, 40, 40, 0.3);
    --grad-2: rgba(30, 30, 30, 0.25);
    --grad-3: rgba(50, 50, 50, 0.2);
    --grad-4: rgba(35, 35, 35, 0.2);

    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --text-muted: #5a5a5a;

    --accent-dark: #f0f0f0;
    --accent-orange: #C8A97E;
    --accent-orange-light: #D4BC98;

    --bg-secondary: rgba(255, 255, 255, 0.04);
    --bg-container-inner: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.07);
}

html {
    scroll-behavior: smooth;
    font-size: 120%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--bg-page);
}

/* ============================================
   Glass Window — the single container
   ============================================ */
.glass-window {
    position: relative;
    width: 100%;
    max-width: 1400px;
    min-height: 80vh;
    border-radius: var(--radius-window);
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* Glass effect */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-window--page {
    overflow-y: visible;
}

/* Internal gradient mesh — the colorful background */
.glass-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 25% 75%, var(--grad-1) 0%, transparent 70%),
        radial-gradient(ellipse 60% 70% at 75% 30%, var(--grad-2) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 50% 50%, var(--grad-3) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 85% 75%, var(--grad-4) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Navigation — top of the window
   ============================================ */
.nav-bar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo svg circle {
    stroke: var(--text-primary);
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link--active {
    color: var(--text-secondary);
}

/* Nav Pills — keeping the classes but minimal styling in nav */
.nav-pill {
    display: none;
    /* Hidden in this layout — "Войти" is in CTA, "Блог" hidden */
}

/* Theme toggle */
.nav-hash {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--text-muted);
    margin-left: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06), inset 0 -1px 3px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .nav-hash {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.nav-hash:hover {
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-hash:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Hero Content — left side
   ============================================ */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 40px 20px 80px;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 300;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0;
}

.hero-title strong {
    font-weight: 700;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: 480px;
}

/* CTA button — dark pill like in reference */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #C8A97E, #A08860);
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 -1px 4px rgba(255, 255, 255, 0.3);
    width: fit-content;
}

[data-theme="dark"] .hero-cta {
    background: #e8e8f0;
    color: #1a1a2e;
    box-shadow: 0 4px 16px rgba(232, 232, 240, 0.1);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.25);
}

[data-theme="dark"] .hero-cta:hover {
    box-shadow: 0 8px 24px rgba(232, 232, 240, 0.15);
}

.hero-cta svg {
    width: 15px;
    height: 15px;
}

/* ============================================
   Chat Showcase — glass cards below CTA
   ============================================ */
.chat-showcase {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 40px 50px;
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 -1px 4px rgba(255, 255, 255, 0.35);
    min-height: 72px;
}

[data-theme="dark"] .chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.chat-text {
    font-family: var(--font-body);
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-primary);
    font-weight: 500;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 -1px 3px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .chat-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.chat-input-plus {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    flex-shrink: 0;
}

.chat-input-text {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-input-send {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dark);
    color: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

[data-theme="dark"] .chat-input-send {
    background: #e8e8f0;
    color: #1a1a2e;
}

.chat-input-send:hover {
    transform: scale(1.05);
}

@keyframes fadeText {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   Silk Streaks Texture — Devialet-style
   ============================================ */

.silk-streaks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
}

.silk-svg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    animation: silkDrift 20s ease-in-out infinite alternate;
}

@keyframes silkDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(15px, -10px) scale(1.02);
    }
}

[data-theme="dark"] .silk-streaks {
    opacity: 0.15;
}

[data-theme="dark"] .founder-line,
[data-theme="dark"] .founder-line-side {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .founder-divider {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .founder-photo-placeholder {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-cta {
    background: #f0f0f0;
    color: #111;
}

[data-theme="dark"] .hero-cta:hover {
    background: #d0d0d0;
}

[data-theme="dark"] .headline-annotations::before,
[data-theme="dark"] .headline-annotations::after {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   About Section — two-column with divider
   ============================================ */

.about-section {
    position: relative;
    z-index: 3;
    padding: 80px 80px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-headline-block {
    text-align: center;
    margin-bottom: 60px;
}

.headline-annotations {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    padding: 12px 0;
}

.headline-annotations.top {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.headline-annotations.bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.headline-annotations span {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.hero-headline {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(34px, 3.5vw, 52px);
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.01em;
}

.hero-headline strong {
    font-weight: 700;
}

.dna-wrapper {
    display: inline-block;
    vertical-align: middle;
    margin: 0 6px;
    transform: rotate(18deg);
}

.dna-inline {
    display: block;
    width: auto;
    height: 1.6em;
    animation: dnaSpin 8s linear infinite;
}

@keyframes dnaSpin {

    0%,
    100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(180deg);
    }
}

.about-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}

.about-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 40px;
    letter-spacing: 0.02em;
}

.about-columns {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.about-col {
    flex: 1;
    padding: 0 36px;
}

.about-col p {
    font-family: var(--font-body);
    font-size: 0.885rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

.about-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border-color);
    flex-shrink: 0;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding: 14px 32px;
    background: var(--text-primary);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.94rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.hero-cta:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Founder Quote Section --- */
.founder-section {
    padding: 0 80px;
    margin-top: auto;
    margin-bottom: 40px;
}

.founder-line {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.founder-line-decorated {
    display: flex;
    align-items: center;
    gap: 16px;
}

.founder-line-side {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.founder-star {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.founder-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 24px 0;
    max-width: 800px;
    margin: 0 auto;
}

.founder-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.founder-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.founder-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.founder-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.founder-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.founder-role {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.founder-quote {
    font-family: var(--font-body);
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    text-align: right;
    flex: 1;
}

/* --- Content Showcase Carousel --- */
.showcase-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 0 16px 30px;
    position: relative;
}

.carousel-track-wrapper {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.carousel-track {
    display: flex;
    gap: 6px;
    animation: carouselScroll 35s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.showcase-card {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
    padding: 22px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s ease;
    overflow: hidden;
}

.showcase-card:hover {
    background: rgba(0, 0, 0, 0.07);
}

.card-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 0;
    align-self: flex-start;
}

.showcase-card h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.showcase-card p {
    font-family: var(--font-body);
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
}

/* ============================================
   Scroll-down indicator — bottom of window
   ============================================ */
.scroll-down {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0 32px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s;
    align-self: center;
}

.scroll-down:hover {
    color: var(--text-primary);
}

.scroll-down-arrow {
    width: 1px;
    height: 36px;
    background: var(--text-muted);
    position: relative;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

.scroll-down-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
}

.scroll-down-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 500;
}

@keyframes scrollBounce {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(5px);
    }
}

/* ============================================
   Animations — entry
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-visual {
    animation: fadeInUp 1s ease-out 0.15s both;
}

.scroll-down {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* ============================================
   Legacy — hide removed elements
   ============================================ */
.pixel-canvas,
.pixel-decoration,
.hero-typography,
.hero-big-text,
.hero-big-text--outline,
.hero-play-btn,
.hero-device,
.device-frame,
.device-screen {
    display: none !important;
}

/* --- Hero Right Text --- */
.hero-right-text {
    position: absolute;
    bottom: 80px;
    right: 56px;
    max-width: 220px;
    z-index: 4;
}

.hero-right-text p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    line-height: 1.65;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    body {
        padding: 20px;
    }

    .glass-window {
        min-height: auto;
    }

    .hero-content {
        padding: 32px 32px 0 40px;
    }

    .hero-visual {
        width: 280px;
        height: 280px;
        right: 20px;
    }

    .hero-title {
        font-size: clamp(28px, 3.5vw, 42px);
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .glass-window {
        min-height: auto;
        border-radius: 20px;
    }

    .nav-bar {
        padding: 16px 20px;
    }

    .nav-link {
        font-size: 0.72rem;
        padding: 6px 10px;
    }

    .hero-content {
        padding: 24px 24px 0;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(24px, 5.5vw, 34px);
    }

    .hero-subtitle {
        font-size: 0.82rem;
    }

    .hero-visual {
        width: 180px;
        height: 180px;
        right: 10px;
        top: 15%;
        opacity: 0.4;
    }

    .chat-showcase {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .nav-link {
        display: none;
    }

    .hero-visual {
        display: none;
    }

    .hero-title {
        font-size: 26px;
    }

    .glass-window {
        min-height: auto;
    }
}