/* ============================================================
   us_legal_app.css — Legal Documents Hub
   Design: 1:1 with business_main.css
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar { display: none; }

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    color: #111111;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==================== NAV ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.25s ease;
}

.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.05); }

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.18s ease;
    flex-shrink: 0;
}

.nav-logo:hover { opacity: 0.7; }

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.nav-logo .big { color: #111111; }
.nav-logo .bite { color: rgba(0,0,0,0.25); font-weight: 400; }

.nav-back {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #888888;
    padding: 8px 16px;
    border-radius: 50px;
    background: #f4f4f4;
    transition: background 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}

.nav-back:hover { background: #ebebeb; color: #111111; }

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    max-width: 1120px;
    margin: 92px auto 80px;
    padding: 0 40px;
}

/* ==================== LEGAL HEADER ==================== */
.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1.1;
}

.legal-header p {
    font-size: 1.05rem;
    color: rgba(0,0,0,0.55);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

/* ==================== APP NAVIGATION ==================== */
.app-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 40px 0 60px;
    flex-wrap: wrap;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 60px;
}

.app-nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: #888888;
    background: transparent;
    border: none;
    padding: 10px 24px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 50px;
    transition: color 0.18s ease, background 0.18s ease;
}

.app-nav-link:hover { color: #111111; }

.app-nav-link.active {
    color: #ffffff;
    background: #111111;
}

/* ==================== APP SECTION ==================== */
.app-section {
    display: none;
    margin-bottom: 80px;
    padding-bottom: 80px;
    border-bottom: 2px solid #f0f0f0;
}

.app-section.active { display: block; }
.app-section:last-of-type { border-bottom: none; }

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.1;
}

.section-header p {
    font-size: 1.05rem;
    color: rgba(0,0,0,0.55);
    line-height: 1.6;
}

/* ==================== TAB BAR ==================== */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.tab-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.925rem;
    font-weight: 600;
    color: #888888;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 24px;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

.tab-btn:hover { color: #111111; }

.tab-btn.active {
    color: #111111;
    border-bottom-color: #111111;
}

/* ==================== CONTENT SECTION ==================== */
.content-section {
    display: none;
    background: #ffffff;
}

.content-section.active { display: block; }

.content-section h1 {
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.1;
}

.content-section p:first-of-type {
    font-size: 0.95rem;
    color: #888888;
    margin-bottom: 36px;
    font-weight: 500;
}

.content-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111111;
    margin: 36px 0 16px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    line-height: 1.3;
}

.content-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
    margin: 28px 0 12px;
    letter-spacing: -0.01em;
}

.content-section p {
    font-size: 0.95rem;
    color: rgba(0,0,0,0.65);
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-section p strong {
    color: #111111;
    font-weight: 700;
}

.content-section p + p { margin-top: 0; }

.content-section p + h2,
.content-section p + h3 { margin-top: 28px; }

.content-section ul,
.content-section ol {
    padding-left: 24px;
    margin: 16px 0 20px;
}

.content-section li {
    font-size: 0.95rem;
    color: rgba(0,0,0,0.65);
    line-height: 1.8;
    margin-bottom: 8px;
}

.content-section li::marker { color: rgba(0,0,0,0.3); }

.content-section a {
    color: #111111;
    font-weight: 600;
    text-decoration: underline;
    transition: opacity 0.18s ease;
}

.content-section a:hover { opacity: 0.7; }

.doc-list {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.doc-link {
    display: block;
    width: 100%;
    background: #f7f7f7;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    padding: 14px 16px;
    color: #111111;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.doc-link:hover {
    background: #f1f1f1;
    border-color: #dddddd;
    opacity: 1;
}

/* ==================== SCROLL EFFECT ==================== */
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.05); }

/* ==================== RESPONSIVE — TABLET ==================== */
@media (max-width: 1024px) {
    .nav { padding: 0 24px; }
    .main-container { padding: 0 24px; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ==================== RESPONSIVE — MOBILE ==================== */
@media (max-width: 768px) {
    .nav {
        padding: 0 16px;
        height: 60px;
    }

    .nav-logo h1 { font-size: 1.2rem; }
    .nav-back { display: none; }

    .main-container {
        margin: 80px auto 60px;
        padding: 0 16px;
    }

    .legal-header {
        margin-bottom: 40px;
    }

    .legal-header h1 {
        font-size: clamp(1.8rem, 6vw, 2.6rem);
    }

    .legal-header p {
        font-size: 0.95rem;
    }

    .app-nav {
        gap: 8px;
        padding: 32px 0 48px;
        margin-bottom: 48px;
    }

    .app-nav-link {
        font-size: 0.9rem;
        padding: 10px 18px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 0.98rem;
    }

    .tab-bar {
        gap: 4px;
        padding-bottom: 28px;
        margin-bottom: 32px;
    }

    .tab-btn {
        font-size: 0.84rem;
        padding: 10px 16px;
    }

    .content-section h1 {
        font-size: 1.6rem;
    }

    .content-section h2 {
        font-size: 1rem;
    }

    .content-section p {
        font-size: 0.9rem;
    }

    .footer {
        padding: 60px 20px 32px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== RESPONSIVE — MOBILE SMALL ==================== */
@media (max-width: 480px) {
    .nav-logo h1 { font-size: 1.1rem; }

    .main-container {
        margin: 70px auto 40px;
        padding: 0 12px;
    }

    .legal-header h1 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .legal-header p {
        font-size: 0.88rem;
    }

    .app-nav {
        flex-direction: column;
        gap: 6px;
        padding: 24px 0 32px;
        border-bottom: none;
        margin-bottom: 32px;
    }

    .app-nav-link {
        width: 100%;
        text-align: left;
        font-size: 0.95rem;
        padding: 12px 16px;
        border-radius: 12px;
    }

    .app-section {
        margin-bottom: 64px;
        padding-bottom: 64px;
        border-bottom: 1px solid #f0f0f0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .tab-bar {
        flex-direction: column;
        gap: 2px;
        padding-bottom: 16px;
        margin-bottom: 24px;
        border-bottom: none;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
        font-size: 0.8rem;
        padding: 10px 12px;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-left-color: #111111;
        border-bottom-color: transparent;
    }

    .content-section h1 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .content-section h2 {
        font-size: 0.95rem;
        margin: 20px 0 10px;
    }

    .content-section p,
    .content-section li {
        font-size: 0.84rem;
        line-height: 1.7;
    }

    .content-section ul,
    .content-section ol {
        padding-left: 18px;
        margin: 12px 0 16px;
    }

    .footer {
        padding: 40px 16px 24px;
    }

    .footer-legal {
        gap: 12px;
        width: 100%;
        flex-wrap: wrap;
    }
}
