/* === Font === */
@font-face {
    font-family: 'CustomFont';
    src: url('../font/cs.ttf') format('truetype');
    font-display: swap;
}

/* === Variables === */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --accent: #ff6a00;
    --accent-hover: #ff8b33;
    --text-primary: #f0f0f0;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

/* === Typography === */
.cs-font-h1 {
    font-family: 'CustomFont', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 0;
    text-shadow: 0 0 40px rgba(255, 106, 0, 0.3);
}

code {
    background: rgba(255, 106, 0, 0.15);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* === Links === */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.accent-link {
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}

.accent-link:hover {
    border-bottom-color: var(--accent-hover);
}

/* === Hero Section === */
.hero-section {
    position: relative;
    padding: 80px 0 30px;
    overflow: hidden;
    text-align: center;
}

.hero-bg-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-logo {
    border-radius: 24px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 30px rgba(255, 106, 0, 0.25));
    object-fit: contain;
}

.hero-subtitle {
    font-family: 'CustomFont', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

/* === Buttons === */
.btn-accent {
    background: linear-gradient(135deg, var(--accent), #e05500);
    color: #fff;
    border: none;
    padding: 12px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 106, 0, 0.35);
    color: #fff;
}

.btn-accent:active {
    transform: translateY(0);
}

/* === Sections === */
.content-section {
    padding: 30px 0;
}

.content-section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    font-family: 'CustomFont', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: #fff;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.2;
}

.section-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* === Glass Cards === */
.categories-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    justify-content: center;
    align-items: stretch;
}

.categories-row > .category-col {
    flex: 1 1 0;
    max-width: 280px;
    min-width: 0;
    display: flex;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 106, 0, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
}

.glass-card .card-img-wrapper {
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.glass-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.glass-card:hover .card-img-top {
    transform: scale(1.03);
}

.glass-card .card-body {
    padding: 1.5rem;
    flex: 1;
}

.glass-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.glass-card .card-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.glass-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 1.5rem;
}

.glass-card .card-footer small {
    color: var(--text-muted);
}

.glass-card .card-footer a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.glass-card .card-footer a:hover {
    color: var(--accent);
}

/* === Video === */
.video-wrapper {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.3);
    margin: 1rem auto 0;
    max-width: 320px;
}

.demo-video {
    display: block;
    width: 100%;
    height: auto;
}

/* === QR Code === */
.qr-wrapper {
    display: block;
    background: #fff;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin: 0 auto 1.5rem;
    width: fit-content;
}

.qr-code {
    display: block;
    width: 220px;
    height: auto;
    border-radius: 8px;
}

.try-it-cta {
    display: flex;
    justify-content: center;
}

.try-it-cta .btn-accent {
    margin-left: 0;
    margin-right: 0;
}

/* === Footer === */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    text-align: center;
}

.footer-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition);
}

.footer-github:hover {
    color: #fff;
}

.footer-github svg {
    transition: transform var(--transition);
}

.footer-github:hover svg {
    transform: scale(1.1);
}

/* === Fade-in Animations === */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in the card grid */
.row > .col-md-6:nth-child(2) .fade-in,
.row > .col-lg-4:nth-child(2) .fade-in {
    transition-delay: 0.1s;
}

.row > .col-md-6:nth-child(3) .fade-in,
.row > .col-lg-4:nth-child(3) .fade-in {
    transition-delay: 0.2s;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 50px;
    }

    .hero-logo {
        width: 350px;
        height: 350px;
    }

    .content-section {
        padding: 24px 0;
    }

    .qr-code {
        width: 180px;
    }

    .glass-card:hover {
        transform: none;
    }

    .categories-row {
        flex-wrap: wrap;
    }

    .categories-row > .category-col {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* === Error page === */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
