/* ============================================================
   Shared stylesheet for Meomi document pages
   (Privacy Policy, Terms & Conditions, Child Safety Standards)
   Palette matches the Alura main site (dark theme + brand
   gradient) in a simplified, document-friendly layout.
   ------------------------------------------------------------
   NOTE ON DEVELOPER NAME:
   The navbar brand is "Alura" and links back to the main page.
   Keep the legal name "Alura Company Limited" — exactly as it
   appears on the Google Play store listing — in the policy prose
   and the copyright line:
     - meomi/privacy/index.html       (intro paragraph, footer)
     - meomi/terms/index.html         (intro, safety alert, footer)
     - meomi/child-safety/index.html  (intro, alert, contact, footer)
     - lib/src/index.html             (footer © line)
   ============================================================ */

:root {
    --dark-bg: #0F172A;
    --dark-surface: #1E293B;
    --border: rgba(255, 255, 255, 0.08);
    --text: #E2E8F0;
    --muted: #94A3B8;
    --brand-1: #FFF3C7;
    --brand-2: #FFC8A2;
    --brand-3: #B7E3FF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection {
    background: #FFC8A2;
    color: #0F172A;
}

/* ---------- Header ---------- */
.site-header {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    min-height: 5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 0 1.5rem;
}

.header-inner {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-gradient {
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.doc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.doc-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.doc-nav a:hover,
.doc-nav a.active {
    color: #ffffff;
}

.lang-switch {
    position: relative;
    flex-shrink: 0;
}

.lang-switch-current {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
}

.lang-switch-current svg {
    width: 0.85rem;
    height: 0.85rem;
}

.lang-switch-current:hover,
.lang-switch-current[aria-expanded="true"] {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

.lang-switch-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 60;
    min-width: 4.5rem;
    padding: 0.25rem;
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.lang-switch-menu button {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.lang-switch-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .site-header {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ---------- Main content ---------- */
.page {
    flex: 1;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* Page title: semantic <h1> used on the Child Safety page */
.page h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.page h1::after {
    content: "";
    display: block;
    width: 4rem;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3));
    margin-top: 0.75rem;
}

/* Page title: first <strong> on the Privacy and Terms pages */
.page > strong:first-child {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    border-left: none;
    padding-left: 0;
}

.page > strong:first-child::after {
    content: "";
    display: block;
    width: 4rem;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--brand-1), var(--brand-2), var(--brand-3));
    margin-top: 0.75rem;
}

/* Section headings */
.page h2,
main strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 2rem 0 0.75rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--brand-2);
}

/* Inline bold labels inside paragraphs stay inline */
main p strong {
    display: inline;
    font-size: inherit;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding-left: 0;
    border-left: none;
}

main li strong {
    display: inline;
    font-size: inherit;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding-left: 0;
    border-left: none;
}

.page p {
    color: var(--muted);
    margin: 0.75rem 0;
}

.page ul {
    color: var(--muted);
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}

.page li {
    margin-bottom: 0.4rem;
}

.page a {
    color: var(--brand-3);
    text-decoration: none;
}

.page a:hover {
    text-decoration: underline;
}

.page hr {
    border: none;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.effective-date {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 2.5rem;
}

/* Safety-critical callout box (Terms + Child Safety pages) */
.safety-alert {
    background: rgba(229, 62, 62, 0.08);
    border-left: 4px solid #E53E3E;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.safety-alert > strong,
.safety-alert h2 {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: #FCA5A5;
    margin: 0 0 0.75rem;
    padding-left: 0;
    border-left: none;
}

.safety-alert p,
.safety-alert ul {
    color: var(--text);
}

.safety-alert p strong {
    display: inline;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding-left: 0;
    border-left: none;
}

.safety-alert a {
    color: var(--brand-3);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 1.5rem;
}

.footer-inner {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--muted);
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
}

.footer-inner a:hover {
    color: #ffffff;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
    .page {
        padding: 1.5rem 1.25rem 3rem;
    }
}
