/* JSONPrompter.online - Premium Components */

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 6rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 2rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    pointer-events: none;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.4), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.feature-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(57, 255, 20, 0.1);
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    position: relative;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ===== HOW IT WORKS SECTION ===== */
.how-section {
    padding: 6rem 0;
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .steps-grid {
        flex-direction: column;
    }

    .step-connector {
        transform: rotate(90deg);
    }
}

.step-card {
    flex: 1;
    max-width: 320px;
    padding: 2.5rem 2rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    pointer-events: none;
}

.step-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    position: relative;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.step-connector {
    color: var(--color-text-tertiary);
    opacity: 0.5;
    flex-shrink: 0;
}

/* ===== API SECTION ===== */
.api-section {
    padding: 6rem 0;
}

.api-demo {
    max-width: 760px;
    margin: 0 auto;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.api-demo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    pointer-events: none;
}

.code-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.code-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.code-tab:hover {
    color: var(--color-text-secondary);
}

.code-tab.active {
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.code-block {
    background: #0a0a0c;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    padding: 1.75rem;
    margin: 0;
    color: var(--color-text-secondary);
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
}

/* ===== FOOTER ===== */
.footer {
    padding: 5rem 0 2.5rem;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2.5rem;
    }
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo {
    margin-bottom: 1.25rem;
}

.footer-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}


.footer-company {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-top: 1rem;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

@media (max-width: 480px) {
    .footer-links {
        gap: 2rem;
        flex-wrap: wrap;
    }
}

.footer-col h4 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    transition: all var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-text);
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.75rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-accent);
    color: var(--color-text);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    backdrop-filter: blur(12px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-title,
.hero-subtitle,
.hero-cta,
.hero-stats {
    animation: fadeInUp 0.6s ease-out backwards;
}

.hero-title {
    animation-delay: 0s;
}

.hero-subtitle {
    animation-delay: 0.1s;
}

.hero-cta {
    animation-delay: 0.2s;
}

.hero-stats {
    animation-delay: 0.3s;
}

/* Feature cards stagger animation */
.feature-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.15s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.25s;
}

.feature-card:nth-child(5) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(6) {
    animation-delay: 0.35s;
}

/* Step cards stagger animation */
.step-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.step-card:nth-child(1) {
    animation-delay: 0.1s;
}

.step-card:nth-child(3) {
    animation-delay: 0.2s;
}

.step-card:nth-child(5) {
    animation-delay: 0.3s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero {
        padding: calc(6rem + 60px) 0 4rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .prompt-types {
        justify-content: center;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        display: none;
    }

    .nav-link-icon {
        display: flex;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .generator-section {
        padding: 1rem 0 4rem;
    }

    .features-section,
    .how-section,
    .api-section {
        padding: 4rem 0;
    }
}

/* ===== SELECTION ===== */
::selection {
    background: var(--color-accent);
    color: white;
}

/* ===== FOCUS STATES ===== */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===== SMOOTH SCROLL ANCHOR OFFSET ===== */
[id] {
    scroll-margin-top: 80px;
}