/* ============================================================
   Levely Up Tech Solutions -- Design System
   Charcoal & Teal, clean and professional
   ============================================================ */

:root {
    --charcoal-900: #12161b;
    --charcoal-800: #1b2129;
    --charcoal-700: #262e38;
    --charcoal-600: #384250;

    --teal-600: #0d9488;
    --teal-500: #14b8a6;
    --teal-400: #2dd4bf;
    --teal-100: #d3f5f1;

    --gray-50: #f7f9fa;
    --gray-100: #eef1f3;
    --gray-200: #e2e6ea;
    --gray-400: #9aa5b1;
    --gray-500: #667085;
    --gray-700: #344054;
    --gray-900: #101418;

    --white: #ffffff;
    --danger: #dc2626;
    --danger-bg: #fdecec;
    --success: #15803d;
    --success-bg: #e9f7ef;

    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.06);
    --shadow-md: 0 6px 20px rgba(16, 20, 24, 0.08);
    --shadow-lg: 0 20px 45px rgba(16, 20, 24, 0.14);
    --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
}

h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.9rem; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 16px; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-500); }
ul { padding-left: 1.2rem; }
li { margin-bottom: 8px; }

img { max-width: 100%; display: block; }

/* ---------------- Header ---------------- */
.site-header {
    background: var(--charcoal-900);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}
.brand:hover { color: var(--white); }

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
    color: var(--charcoal-900);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--white); }
.brand-sub { font-size: 0.72rem; color: var(--teal-400); text-transform: uppercase; letter-spacing: 0.08em; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--white); background: var(--charcoal-700); }
.site-nav a.active { color: var(--white); background: var(--charcoal-700); }

.nav-cta {
    background: var(--teal-500) !important;
    color: var(--charcoal-900) !important;
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal-400) !important; }

.nav-cta-ghost {
    border: 1px solid var(--charcoal-600);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* ---------------- Alerts ---------------- */
.alert { padding: 14px 0; font-weight: 500; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.98rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal-500); color: var(--charcoal-900); }
.btn-primary:hover { background: var(--teal-400); color: var(--charcoal-900); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--charcoal-900); color: var(--white); }
.btn-dark:hover { background: var(--charcoal-700); color: var(--white); }
.btn-outline { background: transparent; color: var(--gray-900); border: 1px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(160deg, var(--charcoal-900) 0%, var(--charcoal-800) 55%, var(--charcoal-700) 100%);
    color: var(--white);
    padding: 96px 0 110px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-eyebrow {
    display: inline-block;
    color: var(--teal-400);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}
.hero h1 { color: var(--white); font-size: 3rem; }
.hero p.lead { color: var(--gray-400); font-size: 1.15rem; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }

.stat-row { display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; }
.stat-row .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--white); }
.stat-row .stat-label { color: var(--gray-400); font-size: 0.85rem; }

/* ---------------- Sections ---------------- */
.section { padding: 84px 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header .eyebrow {
    color: var(--teal-600);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.feature-card .icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--teal-100);
    color: var(--teal-600);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    margin-bottom: 18px;
}

/* ---------------- Product grid / cards ---------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .thumb { aspect-ratio: 16/10; background: var(--charcoal-800); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.product-card p { color: var(--gray-500); font-size: 0.94rem; flex: 1; }
.product-card .price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}
.price-tag { font-weight: 800; font-size: 1.2rem; color: var(--gray-900); }

/* ---------------- Product sales page ---------------- */
.product-hero { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 56px 0; }
.product-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--charcoal-900);
    box-shadow: var(--shadow-lg);
}
.video-wrap iframe, .video-wrap video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.buy-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.buy-box .price-tag { font-size: 2rem; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; color: var(--gray-500); font-size: 0.85rem; }
.trust-row span { display: flex; align-items: center; gap: 6px; }

.product-body { padding: 64px 0; }
.product-body-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 48px; }
.included-card {
    background: var(--charcoal-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 26px;
}
.included-card h4 { color: var(--white); }
.included-card ul { list-style: none; padding: 0; }
.included-card li { padding-left: 28px; position: relative; color: var(--gray-400); }
.included-card li::before {
    content: '\2713';
    position: absolute; left: 0; top: 0;
    color: var(--teal-400); font-weight: 700;
}

/* ---------------- Blog ---------------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.blog-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 26px; }
.blog-card .date { color: var(--gray-400); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.post-content { max-width: 760px; margin: 0 auto; }
.post-content img { border-radius: var(--radius); margin: 24px 0; }

/* ---------------- Forms ---------------- */
.form-page { max-width: 440px; margin: 64px auto; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 40px; }
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--gray-900); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.98rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px var(--teal-100);
}
textarea { resize: vertical; min-height: 120px; }
.field-hint { color: var(--gray-400); font-size: 0.82rem; margin-top: 4px; }
.form-footer-link { text-align: center; margin-top: 20px; color: var(--gray-500); font-size: 0.92rem; }

/* ---------------- Account / LMS ---------------- */
.account-header { background: var(--charcoal-900); color: var(--white); padding: 48px 0; }
.account-header h1 { color: var(--white); margin-bottom: 4px; }
.account-header p { color: var(--gray-400); margin: 0; }

.owned-product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.owned-product-card .thumb { width: 120px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--charcoal-800); }
.owned-product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.owned-product-card .actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.lesson-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
.lesson-list { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.lesson-list a {
    display: block;
    padding: 16px 20px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    font-weight: 500;
    font-size: 0.94rem;
}
.lesson-list a:last-child { border-bottom: none; }
.lesson-list a:hover, .lesson-list a.active { background: var(--gray-50); color: var(--teal-600); }

.file-list { list-style: none; padding: 0; }
.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}
.file-list li:last-child { border-bottom: none; }

/* ---------------- Tables (admin) ---------------- */
table.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.92rem; }
table.admin-table th { background: var(--gray-50); color: var(--gray-500); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }

.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 76px); }
.admin-sidebar { background: var(--charcoal-900); color: var(--white); padding: 32px 0; }
.admin-sidebar a { display: block; padding: 12px 28px; color: var(--gray-400); font-weight: 500; font-size: 0.94rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--white); background: var(--charcoal-700); }
.admin-content { padding: 40px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); }
.stat-card .label { color: var(--gray-500); font-size: 0.85rem; }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px; }
.repeatable-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-muted { background: var(--gray-100); color: var(--gray-500); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--charcoal-900); color: var(--gray-400); padding: 48px 0; margin-top: 80px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--gray-400); }
.footer-nav a:hover { color: var(--white); }
.footer-copy { font-size: 0.85rem; margin: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
    .hero-inner, .product-hero-grid, .product-body-grid, .lesson-layout { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; overflow-x: auto; padding: 12px; }
    h1 { font-size: 2.1rem; }
}

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: 76px; left: 0; right: 0;
        background: var(--charcoal-900);
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        display: none;
        gap: 4px;
    }
    .site-nav.open { display: flex; }
    .repeatable-row { grid-template-columns: 1fr; }
}
