/* ═══════════════════════════════════════════════
   DEGARDE — Shared Design System
   Used by: index.html · privacy.html · contact.html
   ═══════════════════════════════════════════════ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Cairo:wght@300;400;600;700&display=swap');

/* ── TOKENS ── */
:root {
  --bg:             #0c0f0e;
  --surface:        #141918;
  --surface2:       #1c2220;
  --border:         rgba(255,255,255,0.07);
  --accent:         #3ecf8e;
  --accent-dim:     rgba(62,207,142,0.10);
  --accent-glow:    rgba(62,207,142,0.22);
  --text:           #e8ede9;
  --muted:          #7a8a7e;
  --faint:          #3a4840;
  --warn-bg:        rgba(255,180,60,0.08);
  --warn-border:    rgba(255,180,60,0.28);
  --warn-text:      #f5c06a;
  --error:          rgba(255,90,90,0.9);
  --error-bg:       rgba(255,90,90,0.08);
  --error-border:   rgba(255,90,90,0.25);
  --success-bg:     rgba(62,207,142,0.08);
  --success-border: rgba(62,207,142,0.3);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── BASE BODY ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
body.ar { font-family: "Cairo", sans-serif; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; gap: 24px;
  background: rgba(12,15,14,0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}

.brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #0c0f0e;
}

.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }

.brand-tag {
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(62,207,142,0.3);
  padding: 2px 8px; border-radius: 999px;
}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }

.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }

.nav-right { display: flex; align-items: center; gap: 12px; }

/* ── LANG SWITCH ── */
.lang-switch {
  position: relative; display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}

.lang-switch .indicator {
  position: absolute; top: 3px; left: 3px;
  height: calc(100% - 6px); width: calc(50% - 3px);
  background: var(--accent); border-radius: 999px;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}

.lang-switch.ar-active .indicator { transform: translateX(100%); }

.lang-switch button {
  position: relative; z-index: 1;
  border: 0; background: transparent;
  padding: 6px 16px; border-radius: 999px;
  cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--muted); transition: color 0.2s;
  min-width: 80px; text-align: center;
}
.lang-switch button.active { color: #0c0f0e; }

/* ── BUTTONS ── */
.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #0c0f0e;
  border: 0; border-radius: 10px; padding: 9px 18px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-download:hover { opacity: 0.88; }
.btn-download:active { transform: scale(0.97); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #0c0f0e;
  border: 0; border-radius: 12px; padding: 14px 24px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 22px;
  font-family: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: rgba(62,207,142,0.4); background: var(--surface); }

/* ── LANGUAGE HELPERS ── */

/* Block/section toggle (privacy.html, contact.html) */
.lang       { display: none; }
.lang.active { display: block; }
.lang-flex   { display: none; }
.lang-flex.active { display: flex; }

/* RTL content blocks */
.rtl { direction: rtl; font-family: "Cairo", sans-serif; }
.rtl ul li { flex-direction: row-reverse; }

/* Inline bilingual text (index.html) */
.l-ar { display: none; }
body.ar .l-fr { display: none; }
body.ar .l-ar { display: revert; }

/* ── SECTION UTILITIES ── */
.container { max-width: 1140px; margin: 0 auto; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}

/* Large display heading — index.html */
.section-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400; line-height: 1.1;
  color: var(--text); margin-bottom: 16px;
}
.section-title em { font-style: italic; color: var(--accent); }

.section-desc {
  color: var(--muted); font-size: 15.5px; max-width: 560px; line-height: 1.75;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── FOOTER BASE ── */
footer a, .footer a { color: var(--accent); text-decoration: none; opacity: 0.8; }
footer a:hover, .footer a:hover { opacity: 1; }

/* ── KEYFRAMES ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.8; transform: translate(-50%, -50%) scale(1.06); }
}

/* ── MOBILE NAV (all pages) ── */
@media (max-width: 820px) {
  .nav { padding: 0 20px; }
  .brand-tag { display: none; }
  .nav-links { display: none; }
}
