/* --- CSS VARIABLES --- */
:root {
    --primary-color: #0052CC;
    --primary-hover: #0047B3;
    --text-dark: #172B4D;
    --text-light: #42526E;
    --bg-light: #F4F5F7;
    --bg-white: #FFFFFF;
    --border-color: #DFE1E6;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
button { font-family: inherit; }

/* --- NAVIGATION --- */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.logo a { display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--text-dark); }

/* Desktop Nav */
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; color: var(--text-light); }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s; background-color: var(--text-dark); }

/* --- LAYOUT UTILS --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.btn:hover { background-color: var(--primary-hover); }
.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 10px;
}
.btn-outline:hover { background-color: #E6EFFC; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: 3px; }

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: 1.5rem; }
.hero p { font-size: 1.25rem; color: var(--text-light); max-width: 600px; margin: 0 auto 2.5rem auto; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.hero-buttons .btn-outline { margin-left: 0; }

/* --- APPS GRID --- */
.apps-section { padding: 4rem 0; background-color: var(--bg-light); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; margin-bottom: 0.5rem; }

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.app-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.app-icon {
    width: 64px; height: 64px;
    background-color: #E6EFFC;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin-bottom: 1.5rem;
}
.app-card p { color: var(--text-light); margin-bottom: 1.5rem; flex-grow: 1; }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- DOCS & LEGAL LAYOUT --- */
.doc-container {
    display: flex; max-width: 1200px; margin: 0 auto; padding: 2rem; gap: 3rem;
}
.doc-sidebar {
    flex: 0 0 250px;
    position: sticky; top: 100px; height: fit-content;
    border-right: 1px solid var(--border-color); padding-right: 1.5rem;
}
.doc-sidebar h3 { font-size: 0.9rem; text-transform: uppercase; color: var(--text-light); margin-bottom: 1rem; }
.doc-sidebar li { margin-bottom: 0.5rem; }
.doc-sidebar a:hover { color: var(--primary-color); }
.doc-content { flex: 1; min-width: 0; }
.doc-header { border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.doc-tag {
    background: #E3FCEF; color: #006644; padding: 4px 8px;
    border-radius: 3px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
}
.doc-section { margin-bottom: 3rem; scroll-margin-top: 100px; }
.doc-section h2 { font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--bg-light); padding-bottom: 0.5rem; }
.doc-section ul, .doc-section ol { margin-left: 1.5rem; margin-bottom: 1rem; color: var(--text-light); }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text-light); margin-bottom: 1rem; font-weight: 600; }
.back-link:hover { color: var(--primary-color); }

/* --- FOOTER --- */
footer { margin-top: auto; background: var(--text-dark); color: white; padding: 3rem 2rem; text-align: center; }
footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem; }
footer a { color: #DEEBFF; opacity: 0.9; }
footer a:hover { opacity: 1; text-decoration: underline; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    header { padding: 1rem 1.5rem; }
    .menu-toggle { display: block; z-index: 101; }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed; top: 0; right: 0;
        height: 100vh; width: 70%; background: white;
        flex-direction: column; padding: 5rem 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transform: translateX(100%); transition: transform 0.3s ease-in-out;
    }
    .nav-links.active { transform: translateX(0); }
    
    .doc-container { flex-direction: column; padding: 1.5rem; }
    .doc-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; position: relative; top: 0; width: 100%; }
    .app-actions .btn, .app-actions .btn-small { flex: 1; text-align: center; }
}