/* Shared styling for iDrive legal pages (privacy, terms, delete-account).
   Matches the marketing site's design system. */

:root {
    --paper: #F6F3EE;
    --surface: #FFFFFF;
    --ink: #101B2D;
    --ink-soft: #57616F;
    --ink-faint: #8A93A0;
    --brand: #0A7CD8;
    --brand-deep: #075CA6;
    --brand-tint: #E3F0FB;
    --accent: #FF7A50;
    --accent-tint: #FFE7DD;
    --line: rgba(16, 27, 45, 0.09);
    --line-strong: rgba(16, 27, 45, 0.16);
    --shadow-sm: 0 2px 8px rgba(16, 27, 45, 0.05);
    --shadow-md: 0 12px 34px rgba(16, 27, 45, 0.09);
    --shadow-lg: 0 30px 70px rgba(16, 27, 45, 0.16);
    --r-lg: 24px;
    --r-md: 16px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}
html[lang="ar"] body { font-family: 'Cairo', 'Rubik', sans-serif; }

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- Header (floating pill, same as marketing) ---------- */
header { position: sticky; top: 14px; z-index: 100; padding: 0 16px; }
.nav-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 14px 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.back-home {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink-soft); font-size: 0.92rem; font-weight: 500;
    padding: 8px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.back-home:hover { background: rgba(16, 27, 45, 0.05); color: var(--ink); text-decoration: none; }
.back-home svg { width: 15px; height: 15px; }
html[dir="rtl"] .back-home svg { transform: scaleX(-1); }

/* Language dropdown */
.lang { position: relative; }
.lang-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(16, 27, 45, 0.05); border: none; cursor: pointer;
    font-family: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink);
    padding: 9px 14px; border-radius: 999px; transition: background 0.2s;
}
.lang-toggle:hover { background: rgba(16, 27, 45, 0.09); }
.lang-toggle svg { width: 16px; height: 16px; }
.lang-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 10px);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    padding: 6px; min-width: 168px; display: none; overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: none; cursor: pointer; font-family: inherit;
    font-size: 0.95rem; color: var(--ink); text-align: start;
    padding: 10px 12px; border-radius: 10px; transition: background 0.15s;
}
.lang-menu button:hover { background: var(--paper); }
.lang-menu button.active { background: var(--brand-tint); color: var(--brand-deep); font-weight: 600; }
.lang-menu .flag { font-size: 1.05rem; }

/* ---------- Document sheet ---------- */
.content {
    max-width: 820px;
    margin: 40px auto 72px;
    padding: 0 20px;
}
.sheet {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    padding: 56px clamp(24px, 5vw, 64px);
}

.doc-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 600; color: var(--brand-deep);
    background: var(--brand-tint); padding: 7px 14px; border-radius: 999px;
    margin-bottom: 18px;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.last-updated { color: var(--ink-faint); font-size: 0.95rem; margin-bottom: 8px; }
.sheet > .lang-content > section:first-of-type { margin-top: 28px; }

h2 {
    font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em;
    margin-bottom: 12px; padding-inline-start: 14px; position: relative;
}
h2::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 4px; bottom: 4px;
    width: 4px; border-radius: 999px; background: var(--accent);
}
h3 { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }

section { margin-bottom: 30px; }
p { color: var(--ink-soft); margin-bottom: 12px; }
ul, ol { color: var(--ink-soft); padding-inline-start: 22px; margin-bottom: 12px; }
li { margin-bottom: 8px; }
strong { color: var(--ink); font-weight: 600; }

/* Callout + step cards (delete-account) */
.warning {
    background: var(--accent-tint); border: 1px solid rgba(255, 122, 80, 0.3);
    border-radius: var(--r-md); padding: 20px 22px; margin: 24px 0;
}
.warning h3 { color: #C8532E; }
.warning p { color: #8a4a30; margin-bottom: 0; }
.step {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 12px;
}
.step h3 { color: var(--brand-deep); margin-bottom: 4px; }
.step p { margin-bottom: 0; }

.doc-footer {
    margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
    color: var(--ink-faint); font-size: 0.95rem;
}
.doc-footer p { color: var(--ink-faint); margin-bottom: 6px; }

@media (max-width: 600px) {
    .back-home span { display: none; }
    .sheet { padding: 32px 22px; }
    .content { margin: 24px auto 48px; }
}
