/* ============================================ */
/* HARITICA SHOWCASE - APPLE-STYLE LANDING PAGE */
/* ============================================ */

/* ---- RESET & BASE ---- */
html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(0, 144, 193, 0.2);
    color: #022f40;
}

/* ---- FLOATING NAV ---- */
.floating-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.floating-nav.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #0090c1, #046e8f);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-download-btn:hover {
    background: linear-gradient(135deg, #046e8f, #022f40);
    transform: scale(1.04);
}

/* ---- HERO ---- */
.hero-app-background {
    background-image: url('../images/home.png');
    background-size: 85%;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.4;
}

/* ---- GLASS TITLE ---- */
.glass-title {
    --color-one: #0090c1;
    --color-two: #38aecc;
    --color-three: #046e8f;

    font-size: clamp(4rem, 14vw, 9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;

    background: linear-gradient(90deg, var(--color-one), var(--color-two), var(--color-three));
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;

    filter: drop-shadow(0 0 30px rgba(0, 144, 193, 0.4))
            drop-shadow(0 0 60px rgba(56, 174, 204, 0.2));

    position: relative;
    display: inline-block;
}

.glass-title::before {
    content: 'Haritica';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 40%, transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    pointer-events: none;
    z-index: 1;
}

.glass-title-wrapper {
    position: relative;
    display: inline-block;
    padding: 0.5rem 2rem;
    margin-bottom: 0.5rem;
}

/* ---- BUTTONS ---- */
.glass-button {
    background: linear-gradient(135deg, #0090c1, #046e8f);
    color: white;
    box-shadow:
        0 4px 16px rgba(0, 144, 193, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-button:hover {
    background: linear-gradient(135deg, #046e8f, #022f40);
    box-shadow:
        0 6px 24px rgba(0, 144, 193, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ghost-button {
    color: #022f40;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(0, 144, 193, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ghost-button:hover {
    background: rgba(0, 144, 193, 0.08);
    border-color: rgba(0, 144, 193, 0.5);
}

.download-cta {
    background: linear-gradient(135deg, #0090c1, #046e8f);
    color: white;
    box-shadow:
        0 4px 20px rgba(0, 144, 193, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    animation: pulse-glow 3s ease-in-out infinite;
}

.download-cta:hover {
    background: linear-gradient(135deg, #046e8f, #022f40);
    box-shadow:
        0 8px 32px rgba(0, 144, 193, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,144,193,0.35), 0 2px 8px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 4px 30px rgba(0,144,193,0.55), 0 2px 12px rgba(0,0,0,0.12); }
}

/* ---- PERSPECTIVE SCREENSHOT FRAME ---- */
.perspective-frame {
    perspective: 1200px;
}

.screenshot-window {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.02),
        0 4px 8px rgba(0,0,0,0.03),
        0 8px 16px rgba(0,0,0,0.04),
        0 16px 32px rgba(0,0,0,0.05),
        0 32px 64px rgba(0,0,0,0.06),
        0 64px 128px rgba(0,0,0,0.04);
    transform: rotateX(6deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.screenshot-window:hover {
    transform: rotateX(2deg);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.03),
        0 4px 8px rgba(0,0,0,0.04),
        0 8px 16px rgba(0,0,0,0.05),
        0 16px 32px rgba(0,0,0,0.06),
        0 32px 64px rgba(0,0,0,0.07),
        0 64px 128px rgba(0,0,0,0.05);
}

.screenshot-window-sm {
    transform: none;
}

.screenshot-window-sm:hover {
    transform: none;
}

.window-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f6f6f6;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.window-title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

.screenshot-img-wrapper {
    position: relative;
    min-height: 200px;
    background: #fafbfc;
}

.screenshot-img {
    display: block;
    width: 100%;
    height: auto;
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #e8f4f8, #d6eef5, #c4e8f0);
    color: #046e8f;
    font-weight: 600;
    font-size: 1.1rem;
    gap: 4px;
}

/* ---- ANALYSIS STRIP ---- */
.analysis-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.analysis-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #183446;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.analysis-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: var(--accent, #0090c1);
}

.chip-icon {
    width: 20px;
    height: 20px;
    color: var(--accent, #0090c1);
}

.chip-icon svg {
    width: 100%;
    height: 100%;
}

/* ---- STICKY SCROLL (FEATURE 1) ---- */
.sticky-wrapper {
    height: 300vh;
    position: relative;
}

.sticky-inner {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow: hidden;
}

.sticky-content {
    max-width: 1152px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.scroll-dots {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
}

.scroll-dot.active {
    background: #0090c1;
    transform: scale(1.4);
}

/* Sticky text stages */
.sticky-text {
    position: relative;
    min-height: 200px;
}

.sticky-stage {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.sticky-stage.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

/* Sticky screenshot stages */
.sticky-screenshot {
    position: relative;
    min-height: 350px;
}

.sticky-img-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.sticky-img-stage.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ---- TERMINAL BLOCK ---- */
.terminal-block {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #1e293b;
}

.terminal-title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.terminal-body {
    padding: 16px 20px;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.8;
}

.terminal-line {
    color: #e2e8f0;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.terminal-prompt {
    color: #22d3ee;
    margin-right: 8px;
    user-select: none;
}

/* ---- DROP ZONE MOCKUP ---- */
.drop-zone-mockup {
    background: #ffffff;
    border-radius: 12px;
    border: 2px dashed rgba(0, 144, 193, 0.3);
    padding: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.drop-zone-mockup:hover {
    border-color: rgba(0, 144, 193, 0.6);
    box-shadow: 0 8px 32px rgba(0, 144, 193, 0.1);
}

.drop-zone-inner {
    border-radius: 10px;
    padding: 40px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0,144,193,0.02) 0%, rgba(0,144,193,0.06) 100%);
}

.drop-zone-icon {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.drop-zone-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.drop-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(0, 144, 193, 0.06);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #183446;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}

/* ---- DECISION TREE ---- */
.decision-tree {
    max-width: 700px;
    margin: 0 auto;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.tree-level-branches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tree-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tree-root {
    background: linear-gradient(135deg, #0090c1, #046e8f);
    color: white;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0,144,193,0.3);
}

.tree-question {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    gap: 4px;
}

.tree-node-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.tree-node-label {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.tree-leaves {
    display: flex;
    gap: 8px;
    margin-top: 0;
}

.tree-leaf {
    background: white;
    border: 1.5px solid var(--leaf-color, #0090c1);
    border-radius: 10px;
    padding: 8px 14px;
    gap: 2px;
}

.tree-leaf-test {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--leaf-color, #0090c1);
}

/* SVG connectors */
.tree-connectors {
    width: 100%;
    height: 50px;
    display: block;
    margin: -2px 0;
}

.tree-connectors-sm {
    width: 100%;
    height: 40px;
    display: block;
    margin: -2px 0;
}

.tree-line {
    fill: none;
    stroke: #d1d5db;
    stroke-width: 2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.decision-tree.animated .tree-line {
    stroke-dashoffset: 0;
}

/* ---- GALLERY ---- */
.gallery-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.gallery-card .screenshot-window {
    transform: none;
}

.gallery-card .screenshot-window:hover {
    transform: none;
}

.gallery-card:hover .screenshot-window {
    box-shadow:
        0 4px 8px rgba(0,0,0,0.03),
        0 8px 16px rgba(0,0,0,0.05),
        0 16px 32px rgba(0,0,0,0.06),
        0 32px 64px rgba(0,0,0,0.07),
        0 64px 128px rgba(0,0,0,0.05);
}

/* ---- PRIVACY BOX ---- */
.privacy-box {
    padding: 48px 32px;
    border: 2px dashed rgba(0, 144, 193, 0.2);
    border-radius: 20px;
    transition: all 0.4s ease;
}

.privacy-box:hover {
    border-style: solid;
    border-color: rgba(0, 144, 193, 0.35);
    background: rgba(0, 144, 193, 0.02);
    box-shadow: 0 8px 32px rgba(0, 144, 193, 0.06);
}

.privacy-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* ---- SCROLL REVEAL ANIMATIONS ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ---- FOCUS & ACCESSIBILITY ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0090c1;
    outline-offset: 2px;
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .screenshot-window {
        transform: none;
        transition: none;
    }

    .screenshot-window:hover {
        transform: none;
    }

    .terminal-line {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tree-line {
        stroke-dashoffset: 0;
        transition: none;
    }

    .sticky-stage, .sticky-img-stage {
        transition: none;
    }

    .floating-nav {
        transition: none;
    }

    .download-cta {
        animation: none;
    }

    .scroll-dot {
        transition: none;
    }

    .analysis-chip {
        transition: none;
    }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    /* Sticky scroll -> sequential on mobile */
    .sticky-wrapper {
        height: auto;
    }

    .sticky-inner {
        position: relative;
        height: auto;
        padding: 48px 24px;
    }

    .sticky-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .scroll-dots {
        display: none;
    }

    .sticky-text {
        min-height: auto;
    }

    .sticky-stage {
        position: relative;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-bottom: 32px;
        padding-bottom: 32px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .sticky-stage:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .sticky-screenshot {
        min-height: auto;
    }

    .sticky-img-stage {
        position: relative;
        opacity: 1;
        transform: none;
        margin-bottom: 24px;
    }

    .sticky-img-stage:last-child {
        margin-bottom: 0;
    }

    /* Tree responsive */
    .tree-level-branches {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tree-connectors {
        display: none;
    }

    /* Analysis strip wraps on mobile */
    .analysis-strip {
        gap: 8px;
    }

    .analysis-chip {
        font-size: 0.8125rem;
        padding: 8px 14px;
    }

    /* Perspective off on mobile */
    .screenshot-window {
        transform: none;
    }

    .screenshot-window:hover {
        transform: none;
    }

    .screenshot-placeholder {
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .glass-title {
        font-size: clamp(3rem, 18vw, 6rem);
    }
}

/* ---- PRINT ---- */
@media print {
    body { background: white; }
    .floating-nav { display: none; }
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
    .screenshot-window {
        box-shadow: 1px 1px 4px rgba(0,0,0,0.1);
        transform: none;
    }
}
