/* ============================================
   Landing Page — Home/Index
   ============================================ */

/* ===== THEME VARIABLES ===== */
:root {
    --primary: #4f6ef7;
    --primary-dark: #3b5bdb;
    --primary-rgb: 79, 110, 247;
    --accent: #7c3aed;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #263348;
    --bg-nav: rgba(15, 23, 42, 0.85);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.06);
    --border-btn: rgba(255, 255, 255, 0.15);
    --card-alpha: 0.03;
    --shadow-alpha: 0.4;
    --is-light: 0;
}

/* Light base themes */
html[data-theme="light"],
html[data-theme="lightred"] {
    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-nav: rgba(255, 255, 255, 0.9);
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --border-btn: rgba(0, 0, 0, 0.15);
    --card-alpha: 0.04;
    --shadow-alpha: 0.1;
    --is-light: 1;
}

/* Accent overrides */
html[data-theme="blue"]     { --primary: #1572E8; --primary-dark: #1260c4; --primary-rgb: 21, 114, 232;  --accent: #1572E8; }
html[data-theme="purple"]   { --primary: #6861CE; --primary-dark: #5a54b5; --primary-rgb: 104, 97, 206;  --accent: #6861CE; }
html[data-theme="green"]    { --primary: #008E11; --primary-dark: #007a0e; --primary-rgb: 0, 142, 17;    --accent: #00b514; }
html[data-theme="orange"]   { --primary: #db6700; --primary-dark: #c25c00; --primary-rgb: 219, 103, 0;   --accent: #e87800; }
html[data-theme="lightred"] { --primary: #911726; --primary-dark: #7a1320; --primary-rgb: 145, 23, 38;   --accent: #c41d33; }
html[data-theme="darkred"]  { --primary: #911726; --primary-dark: #7a1320; --primary-rgb: 145, 23, 38;   --accent: #c41d33; }

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ===== NAV ===== */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 0;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

.landing-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.nav-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-brand-sub {
    font-size: 0.65rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-item {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link-item:hover {
    color: var(--text);
    background: rgba(var(--primary-rgb), 0.06);
}

/* --- Theme selector in nav --- */

.nav-theme-toggle {
    position: relative;
}

.nav-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.nav-theme-btn:hover {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.06);
}

.theme-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, var(--shadow-alpha));
    z-index: 200;
    min-width: 160px;
}

.theme-dropdown.show { display: block; }

.theme-dropdown-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 4px;
}

.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.15);
}

.theme-btn.active::after {
    content: '\F272';
    font-family: 'bootstrap-icons';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* --- Login button --- */

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
}

.btn-login:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
}

/* ===== HERO ===== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.4);
    color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-btn);
}

.btn-hero-outline:hover {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--text);
}

/* --- Hero mockup --- */

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-mockup {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, var(--shadow-alpha));
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dot-red { background: #ff5f57; }
.mockup-dot-yellow { background: #febc2e; }
.mockup-dot-green { background: #28c840; }

.mockup-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mockup-card {
    background: rgba(var(--primary-rgb), var(--card-alpha));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.mockup-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.mockup-card h4 {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mockup-card p {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== FEATURES ===== */

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
    transition: all 0.3s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(var(--primary-rgb), 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, var(--shadow-alpha));
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ===== QUICK ACCESS ===== */

.quick-access {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(var(--primary-rgb), 0.04) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px;
}

.quick-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(var(--primary-rgb), var(--card-alpha));
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.quick-card:hover {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--text);
    transform: translateX(4px);
}

.quick-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.quick-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.quick-card .arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.quick-card:hover .arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* ===== FOOTER ===== */

.landing-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

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

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

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--primary);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 992px) {
    .hero h1 { font-size: 2.4rem; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-cards { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
}

@media (max-width: 576px) {
    .hero h1 { font-size: 1.8rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .quick-access { padding: 28px 20px; }
    .nav-links .nav-link-item { display: none; }
}
