/* ================================================================
   TOS PAGE — DESIGN TOKENS
   Tema halaman ini sengaja dibuat berbeda dari landing page utama
   (yang gelap): putih/off-white dengan sentuhan glass tipis, supaya
   halaman legal terasa seperti dokumentasi, bukan halaman promosi.
   Aksen warna (oranye/biru) dan font tetap mengikuti identitas
   Loffely Cloud agar tetap satu keluarga dengan situs utama.
   ================================================================ */
:root {
    --bg: #f7f7f5;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --border: rgba(15, 15, 20, 0.08);
    --border-strong: rgba(15, 15, 20, 0.14);

    --text: #17171a;
    --text-dim: #5c5c66;
    --text-faint: #8d8d97;

    --orange: #ea580c;
    --orange-soft: rgba(234, 88, 12, 0.1);
    --blue: #0284c7;

    --radius: 12px;
    --radius-lg: 16px;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --shadow: 0 1px 2px rgba(15, 15, 20, 0.04), 0 8px 24px rgba(15, 15, 20, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Dekorasi background: blur halus, opacity rendah, tidak mengganggu keterbacaan */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-decor span {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.16;
}
.bg-decor .blob-1 { width: 420px; height: 420px; top: -120px; left: -100px; background: var(--orange); }
.bg-decor .blob-2 { width: 380px; height: 380px; top: 20%; right: -140px; background: var(--blue); }
.bg-decor .blob-3 { width: 320px; height: 320px; bottom: -100px; left: 30%; background: var(--orange); opacity: 0.1; }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ================================================================
   SCROLL PROGRESS
   ================================================================ */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: var(--orange);
    z-index: 200;
    transition: width 0.1s linear;
}

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    background: rgba(247, 247, 245, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.95rem; }
.brand-logo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.topbar nav { display: flex; align-items: center; gap: 1.6rem; }
.topbar nav a {
    font-size: 0.88rem;
    color: var(--text-dim);
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.active { color: var(--text); border-bottom-color: var(--orange); }
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 3.2rem 1.5rem 2.4rem;
    text-align: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--orange);
    background: var(--orange-soft);
    border: 1px solid rgba(234, 88, 12, 0.18);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.hero-subtitle { font-size: 1rem; color: var(--text-dim); margin-bottom: 1.1rem; }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-bottom: 1.4rem;
}
.hero-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.hero-note {
    font-size: 0.88rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ================================================================
   SEARCH
   ================================================================ */
.search-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1.5rem 1.6rem; }
.search-box {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
}
.search-box input {
    width: 100%;
    padding: 0.65rem 0.9rem 0.65rem 2.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface-solid);
    font-size: 0.88rem;
    color: var(--text);
    box-shadow: var(--shadow);
}
.search-box input:focus { border-color: var(--orange); }
.search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 0.85rem;
}
.search-count { text-align: center; font-size: 0.78rem; color: var(--text-faint); margin-top: 0.5rem; min-height: 1em; }

/* ================================================================
   LAYOUT
   ================================================================ */
.tos-layout {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* --- Sidebar (desktop) --- */
.tos-sidebar {
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: 0.5rem;
}
.sidebar-group { margin-bottom: 1.3rem; }
.sidebar-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0.3rem 0.6rem;
}
.sidebar-group ul { list-style: none; }
.sidebar-group a {
    display: block;
    font-size: 0.86rem;
    color: var(--text-dim);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-group a:hover { background: rgba(15, 15, 20, 0.03); color: var(--text); }
.sidebar-group a.active {
    color: var(--orange);
    background: var(--orange-soft);
    border-left-color: var(--orange);
    font-weight: 600;
}

/* --- Mobile section select --- */
.mobile-section-select { display: none; }
.mobile-section-select select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface-solid);
    font-size: 0.88rem;
    color: var(--text);
    box-shadow: var(--shadow);
    -webkit-appearance: none;
    appearance: none;
}

/* --- Content --- */
.tos-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2.2rem 2.4rem;
}
.tos-group { margin-bottom: 2.6rem; }
.tos-group:last-child { margin-bottom: 0; }
.tos-group-heading {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.tos-group-desc { font-size: 0.86rem; color: var(--text-faint); margin: -0.2rem 0 1.2rem; }

.tos-clause { padding: 1.4rem 0; border-bottom: 1px solid var(--border); scroll-margin-top: 4.5rem; }
.tos-clause:last-child { border-bottom: none; padding-bottom: 0; }
.clause-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.clause-title {
    font-size: 1.02rem;
    font-weight: 600;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}
.clause-number { font-family: var(--mono); color: var(--orange); font-size: 0.92rem; }
.copy-link-btn {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 0.76rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-link-btn:hover { color: var(--orange); border-color: var(--orange); }
.copy-link-btn.copied { color: var(--orange); border-color: var(--orange); }

.tos-clause p { font-size: 0.92rem; line-height: 1.75; color: var(--text-dim); margin-bottom: 0.7rem; }
.tos-clause p:last-child { margin-bottom: 0; }
.tos-clause ul { padding-left: 1.2rem; margin-bottom: 0.7rem; }
.tos-clause ul:last-child { margin-bottom: 0; }
.tos-clause li { font-size: 0.92rem; line-height: 1.75; color: var(--text-dim); margin-bottom: 0.25rem; }

/* Highlight hasil pencarian */
.tos-clause mark { background: var(--orange-soft); color: var(--text); border-radius: 3px; padding: 0 2px; }
.tos-clause.search-dim { opacity: 0.32; }
.tos-clause.search-hide { display: none; }

/* ================================================================
   FOOTER
   ================================================================ */
.tos-footer {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem 2.4rem;
}
.tos-footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.tos-footer-brand { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; }
.tos-footer-tag { font-size: 0.82rem; color: var(--text-faint); }
.tos-footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.tos-footer-links a { font-size: 0.84rem; color: var(--text-dim); }
.tos-footer-links a:hover { color: var(--orange); }
.tos-footer-copy { width: 100%; text-align: center; font-size: 0.78rem; color: var(--text-faint); margin-top: 1.4rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .tos-layout { grid-template-columns: 1fr; gap: 1.2rem; }
    .tos-sidebar { display: none; }
    .mobile-section-select { display: block; margin-bottom: 0.4rem; }
    .tos-content { padding: 1.5rem 1.3rem; }
    .topbar nav { display: none; }
    .nav-toggle { display: flex; }
}

@media (max-width: 900px) {
    .topbar-mobile-nav {
        display: none;
        width: 100%;
        max-width: 1160px;
        margin: 0 auto;
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.8rem 1.5rem 1rem;
    }
    .topbar-mobile-nav.open { display: flex; }
    .topbar-mobile-nav a {
        font-size: 0.9rem;
        color: var(--text-dim);
        padding: 0.55rem 0.3rem;
        border-bottom: 1px solid var(--border);
    }
    .topbar-mobile-nav a.active { color: var(--orange); font-weight: 600; }
}

@media (max-width: 560px) {
    .hero { padding: 2.2rem 1.2rem 1.8rem; }
    .hero h1 { font-size: 1.5rem; }
    .tos-content { padding: 1.2rem 1rem; }
    .clause-title { font-size: 0.96rem; }
}
