/* ============================================
   UBT EPS TOPIK Landing Page Stylesheet
   Modern, Premium Design with Dark/Light Theme
   ============================================ */

/* ===== CSS Variables - Light Theme ===== */
:root[data-theme="light"] {
    /* Primary Colors - Purple/Blue Theme */
    --color-primary: #5B4FCF;
    --color-primary-dark: #4839B4;
    --color-primary-light: #7B6EE6;
    --color-secondary: #4F46E5;
    --color-accent: #8B5CF6;

    /* Background Colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F8F9FA;
    --color-bg-tertiary: #F1F3F5;
    --color-bg-card: #FFFFFF;

    /* Text Colors */
    --color-text-primary: #1A1F36;
    --color-text-secondary: #4A5568;
    --color-text-tertiary: #718096;
    --color-text-inverse: #FFFFFF;

    /* Border & Shadow */
    --color-border: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(91, 79, 207, 0.15);
    --shadow-xl: 0 20px 60px rgba(91, 79, 207, 0.2);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5B4FCF 0%, #8B5CF6 100%);
    --gradient-secondary: linear-gradient(135deg, #4F46E5 0%, #7B6EE6 100%);
    --gradient-accent: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

/* ===== CSS Variables - Dark Theme ===== */
:root[data-theme="dark"] {
    /* Primary Colors */
    --color-primary: #7B6EE6;
    --color-primary-dark: #5B4FCF;
    --color-primary-light: #9F93F0;
    --color-secondary: #6366F1;
    --color-accent: #A78BFA;

    /* Background Colors */
    --color-bg-primary: #0F1419;
    --color-bg-secondary: #1A1F2E;
    --color-bg-tertiary: #252B3B;
    --color-bg-card: #1E2432;

    /* Text Colors */
    --color-text-primary: #F7FAFC;
    --color-text-secondary: #CBD5E0;
    --color-text-tertiary: #A0AEC0;
    --color-text-inverse: #1A1F36;

    /* Border & Shadow */
    --color-border: #2D3748;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7B6EE6 0%, #A78BFA 100%);
    --gradient-secondary: linear-gradient(135deg, #6366F1 0%, #9F93F0 100%);
    --gradient-accent: linear-gradient(135deg, #A78BFA 0%, #C4B5FD 100%);
}

/* ===== Global Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ===== Navigation Bar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.logo-text .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector */
.language-selector {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    border-color: var(--color-primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    background: var(--color-primary);
    color: white;
    transform: rotate(20deg);
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition: all 0.3s ease;
}

:root[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

:root[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-tertiary);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hero-image {
    animation: fadeInRight 0.8s ease 0.2s backwards;
}

.phone-mockup {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
    filter: drop-shadow(0 20px 60px rgba(91, 79, 207, 0.3));
}

.app-screen {
    width: 100%;
    height: auto;
    border-radius: 30px;
    border: 8px solid var(--color-text-primary);
}

/* Hero Background Effects */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    top: -250px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-accent);
    bottom: -200px;
    left: -100px;
    animation-delay: -10s;
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
    background: var(--color-bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-title {
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.feature-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ===== Screenshots Section ===== */
.screenshots {
    padding: 100px 0;
    background: var(--color-bg-secondary);
}

.screenshots-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-bg-tertiary);
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary);
    border-radius: 10px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    text-align: center;
    max-width: 500px;
}

.screenshot-item img {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin: 0 auto 1rem;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.screenshot-item img:hover {
    transform: scale(1.05);
}

.screenshot-caption {
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--color-bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.vision-mission {
    margin: 3rem 0;
    display: grid;
    gap: 2rem;
}

.vm-item h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.vm-item ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.vm-item li {
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
}

.story {
    margin-top: 3rem;
}

.story h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--gradient-primary);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== Download Section ===== */
.download {
    padding: 100px 0;
    background: var(--color-bg-secondary);
}

.download-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.download-text {
    text-align: left;
}

.download-text .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.download-text p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.qr-wrapper {
    text-align: center;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
}

.qr-code svg {
    width: 100%;
    height: 100%;
}

.qr-text {
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-tertiary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: var(--color-text-secondary);
    max-width: 400px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-tertiary);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-card);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .download-content {
        grid-template-columns: 1fr;
    }

    .download-text {
        text-align: center;
    }

    .download-text .section-title {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 80px 0 60px;
    }

    .features,
    .screenshots,
    .about,
    .download {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .language-selector {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Print Styles ===== */
@media print {

    .navbar,
    .theme-toggle,
    .back-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }
}