/* CSS Variables */
:root {
    --background: #0b0b10;
    --foreground: #fcfcfd;
    --card: #111118;
    --card-foreground: #fcfcfd;
    --popover: #111118;
    --popover-foreground: #fcfcfd;
    --primary: #9d4edd;
    --primary-foreground: #fcfcfd;
    --secondary: #1e1e2e;
    --secondary-foreground: #a0a0ab;
    --muted: #1e1e2e;
    --muted-foreground: #6b6b76;
    --accent: #ffd700;
    --accent-foreground: #0b0b10;
    --destructive: #ff4757;
    --destructive-foreground: #fcfcfd;
    --border: #2a2a3a;
    --input: #2a2a3a;
    --ring: #9d4edd;
    --chart-1: #9d4edd;
    --chart-2: #c77dff;
    --chart-3: #ffd700;
    --chart-4: #ff6b35;
    --chart-5: #06ffa5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-feature-settings: "cv11", "ss01";
    font-variation-settings: "opsz" 32;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: "Playfair Display", "Times New Roman", serif;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 0 0.75rem;
    }
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-hero-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.shadow-glow {
    box-shadow: rgba(158, 76, 240, 0.45) 0px 0px 40px 0px;
}

.hover-scale {
    transition: all 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.story-link {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.story-link:hover {
    color: var(--foreground);
}

.story-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.story-link:hover::after {
    width: 100%;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 480px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        min-height: 44px;
        width: 100%;
        max-width: none;
    }
}

.btn-primary {
    background: linear-gradient(135deg, #9d4edd 0%, #c77dff 100%);
    color: var(--primary-foreground);
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
    font-size: 1rem;
    height: 3rem;
    padding: 0 2.5rem;
    border-radius: 0.5rem;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--foreground);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    height: 2.75rem;
    padding: 0 2rem;
    border-radius: 0.375rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(20px);
    background: rgba(11, 11, 16, 0.8);
    border-bottom: 1px solid rgba(42, 42, 58, 0.6);
    padding-top: 18px;
    padding-bottom: 18px;
}

@media (max-width: 768px) {
    header {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--foreground);
}

.logo-svg {
    height: 4rem;
    width: auto;
}

@media (max-width: 768px) {
    .logo-svg {
        height: 2.5rem;
    }
}

.nav-links {
    display: none;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-actions .btn-primary {
    position: relative;
    background: 
        radial-gradient(600px at 50% 50%, rgba(158, 76, 240, 0.25), transparent 40%),
        radial-gradient(400px at 20% -10%, rgba(250, 206, 30, 0.18), transparent 30%),
        radial-gradient(400px at 80% 120%, rgba(158, 76, 240, 0.18), transparent 30%);
    font-size: 0.875rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(40, 42, 51);
    box-shadow: rgba(158, 76, 240, 0.35) 0px 0px 20px 0px;
    color: rgb(255, 255, 255);
}

@media (max-width: 480px) {
    .nav-actions .btn-primary {
        font-size: 0.75rem;
        height: 2rem;
        padding: 0 0.5rem;
    }
}


/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 2rem;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(157, 78, 221, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.1) 0%, rgba(255, 215, 0, 0.05) 50%, transparent 100%);
    opacity: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
}

.hero-badge {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.75rem, 8vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: clamp(3rem, 8vw, 6rem);
    }
}

.hero-description {
    max-width: 40rem;
    color: var(--muted-foreground);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 2rem;
    }
}

.hero-actions .btn-primary {
    position: relative;
    background: 
        radial-gradient(1200px at 50% 50%, rgba(158, 76, 240, 0.25), transparent 40%),
        radial-gradient(800px at 20% -10%, rgba(250, 206, 30, 0.18), transparent 30%),
        radial-gradient(800px at 80% 120%, rgba(158, 76, 240, 0.18), transparent 30%);
    font-size: 1rem;
    height: 3rem;
    padding: 0 2.5rem;
    font-weight: 500;
    border-radius: 0.75rem;
    border: 1px solid rgb(40, 42, 51);
    box-shadow: rgba(158, 76, 240, 0.45) 0px 0px 40px 0px;
    color: rgb(255, 255, 255);
}

.hero-actions .btn-secondary {
    background: transparent;
    height: 2.75rem;
    padding: 0 2rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 540px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Force single column on very small screens */
@media (max-width: 539px) {
    .hero-stats {
        grid-template-columns: 1fr !important;
        max-width: 300px;
        margin: 0 auto;
    }
}

.stat-card {
    background: rgba(17, 17, 24, 0.5);
    border: 1px solid rgba(42, 42, 58, 0.6);
    border-radius: 0.5rem;
    padding: 1rem;
    transform: none !important;
    position: relative;
    text-align: center;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    word-break: break-word;
    hyphens: auto;
}

@media (max-width: 480px) {
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Features Section */
.features {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .features {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .features {
        padding: 2rem 0;
    }
}

.features-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: rgba(17, 17, 24, 0.6);
    border: 1px solid rgba(42, 42, 58, 0.6);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(157, 78, 221, 0.1);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feature-icon {
    color: var(--primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-description {
    color: var(--muted-foreground);
}

/* Workflow Section */
.workflow {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.875rem;
    }
}

.workflow-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch;
    }
}

.workflow-step {
    background: rgba(17, 17, 24, 0.5);
    border: 1px solid rgba(42, 42, 58, 0.6);
    border-radius: 0.5rem;
    padding: 2.5rem 1.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    min-height: 10rem;
}

.workflow-step::before {
    content: attr(data-step);
    position: absolute;
    top: -3.0rem;
    left: -0.5rem;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(157, 78, 221, 0.1);
    line-height: 1;
    z-index: 1;
    pointer-events: none;
    font-family: "Playfair Display", serif;
}

.step-number {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-description {
    color: var(--muted-foreground);
    position: relative;
    z-index: 2;
}

/* About Section */
.about {
    padding: 3rem 0;
}

.about-card {
    background: rgba(17, 17, 24, 0.6);
    border: 1px solid rgba(42, 42, 58, 0.6);
    border-radius: 1rem;
    padding: 2rem;
}

.about-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-description {
    color: var(--muted-foreground);
    max-width: 48rem;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    border-top: 1px solid rgba(42, 42, 58, 0.6);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-col;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out;
}

/* Typing Cursor */
.typing-cursor {
    color: var(--accent);
    font-weight: normal;
    animation: none;
}

.typing-cursor.blinking {
    animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
    0%, 50% { 
        opacity: 1; 
    }
    51%, 100% { 
        opacity: 0; 
    }
}

/* Icons */
.icon {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
    stroke-width: 1;
}

.icon-lg {
    width: 3rem;
    height: 3rem;
    stroke-width: 0.5;
}

/* Approach cards alignment */
.approach-card {
    transform: none !important;
    position: relative;
}

/* Demo page styles */
.demo-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.email-input-container {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.email-input {
    width: 100%;
    height: 3.5rem;
    padding: 0 8rem 0 1.5rem;
    background: rgba(17, 17, 24, 0.8) !important;
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 0.75rem;
    color: var(--foreground) !important;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.1) !important;
    background: rgba(17, 17, 24, 0.9) !important;
}

.email-input::placeholder {
    color: var(--muted-foreground) !important;
}

.email-input:autofill,
.email-input:-webkit-autofill,
.email-input:-webkit-autofill:hover,
.email-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(17, 17, 24, 0.9) inset !important;
    -webkit-text-fill-color: var(--foreground) !important;
    background: rgba(17, 17, 24, 0.9) !important;
}

.email-input:valid {
    background: rgba(17, 17, 24, 0.8) !important;
    color: var(--foreground) !important;
}

.email-submit-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 2.5rem;
    padding: 0 1.5rem;
    background: 
        radial-gradient(1200px at 50% 50%, rgba(158, 76, 240, 0.25), transparent 40%),
        radial-gradient(800px at 20% -10%, rgba(250, 206, 30, 0.18), transparent 30%),
        radial-gradient(800px at 80% 120%, rgba(158, 76, 240, 0.18), transparent 30%);
    color: var(--primary-foreground);
    border: 1px solid rgb(40, 42, 51);
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: rgba(158, 76, 240, 0.35) 0px 0px 20px 0px;
}

.email-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-50%) scale(1.02);
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 2rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Responsive utilities */
.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
    .md\:inline-flex {
        display: inline-flex;
    }
}