/* Shared styling for the legal pages (privacy, terms). Mirrors the landing
   page's palette so the pages don't feel bolted on. */

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

:root {
  --teal: #1FC7C4;
  --teal-deep: #0E9B98;
  --teal-ink: #0A6E6C;
  --teal-wash: #E6F8F8;
  --yellow-wash: #FFF6DE;
  --cream: #FDF7EC;
  --ink: #12333A;
  --ink-soft: #5A757C;
  --ink-faint: #8FA5AA;
  --line: #E3ECEC;
  --font-latin: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-latin);
  color: var(--ink);
  background: #fff;
  line-height: 1.72;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); }

a { color: var(--teal-deep); text-decoration: underline; }
a:hover { color: var(--teal-ink); }

.wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ── header ── */
header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  position: sticky; top: 0; z-index: 10;
}
.nav { height: 66px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font-size: 19px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); }
.nav-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang, .home {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  background: none; cursor: pointer; font-family: inherit; text-decoration: none;
  transition: .15s;
}
.lang:hover, .home:hover { border-color: var(--teal); color: var(--teal-deep); }

/* ── document ── */
.doc {
  padding: 52px 0 72px;
  background:
    radial-gradient(820px 360px at 92% -10%, var(--teal-wash) 0%, transparent 62%),
    radial-gradient(640px 300px at 0% 4%, var(--yellow-wash) 0%, transparent 58%);
}
.eyebrow {
  display: inline-block; background: var(--teal-wash); color: var(--teal-ink);
  padding: 5px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 800;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  letter-spacing: -1px; line-height: 1.15; margin-bottom: 12px;
}
.updated { font-size: 14px; color: var(--ink-faint); margin-bottom: 22px; }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin: 0 0 34px; padding: 0; list-style: none;
}
.toc a {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--teal-deep); border-color: var(--teal); }

.summary {
  background: var(--cream); border-radius: 14px;
  padding: 22px 26px; margin-bottom: 40px;
}
.summary b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.summary ul { margin: 10px 0 0; padding-inline-start: 20px; }
.summary li { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 5px; }

h2 {
  font-size: 21px; font-weight: 800; letter-spacing: -.4px;
  margin: 40px 0 12px; padding-top: 8px; scroll-margin-top: 84px;
}
h3 { font-size: 16.5px; font-weight: 800; margin: 26px 0 8px; }
p { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 15px; }
p strong, li strong { color: var(--ink); font-weight: 700; }
ul, ol { margin: 0 0 16px; padding-inline-start: 22px; }
li { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14.5px; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 800; font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .5px; }
td { color: var(--ink-soft); }
.tbl-wrap { overflow-x: auto; }

.callout {
  border-inline-start: 3px solid var(--teal);
  background: var(--teal-wash); border-radius: 0 12px 12px 0;
  padding: 16px 20px; margin: 22px 0;
}
html[dir="rtl"] .callout { border-radius: 12px 0 0 12px; }
.callout p { margin: 0; font-size: 14.5px; color: var(--teal-ink); }
.callout p strong { color: var(--teal-ink); }

.contact-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 22px 0 36px;
}
.contact-grid > div {
  padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff;
}
.contact-grid strong, .contact-grid span { display: block; }
.contact-grid strong { margin-bottom: 4px; font-size: 13px; color: var(--ink-faint); }
.contact-grid span { color: var(--ink); font-size: 15px; }
.policy-nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── password reset ── */
.reset-doc { min-height: calc(100vh - 168px); }
.reset-card {
  max-width: 560px; margin: 24px auto; padding: 32px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(18, 51, 58, .08);
}
.reset-card form { margin-top: 24px; }
.reset-card label {
  display: block; margin: 16px 0 6px; color: var(--ink);
  font-size: 14px; font-weight: 700;
}
.reset-card input {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1px solid #C8D8DA; border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit;
}
.reset-card input:focus {
  border-color: var(--teal-deep); outline: 3px solid rgba(31, 199, 196, .16);
}
.reset-card small { display: block; margin-top: 6px; color: var(--ink-faint); }
.reset-submit {
  width: 100%; min-height: 48px; margin-top: 22px; padding: 11px 18px;
  border: 0; border-radius: 10px; background: var(--teal-deep);
  color: #fff; cursor: pointer; font: inherit; font-weight: 800;
}
.reset-submit:hover { background: var(--teal-ink); }
.reset-submit:disabled { cursor: wait; opacity: .65; }
.form-status { min-height: 24px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.form-status.error { color: #A12E2E; }
.form-status.success {
  padding: 13px 15px; border-radius: 10px;
  background: var(--teal-wash); color: var(--teal-ink);
}

/* ── footer ── */
footer { border-top: 1px solid var(--line); padding: 34px 0; background: #fff; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-l { display: flex; align-items: center; gap: 10px; }
.foot-l img { width: 28px; height: 28px; border-radius: 8px; }
.foot-l b { font-size: 15px; font-weight: 800; color: var(--ink); }
.foot small { font-size: 13px; color: var(--ink-faint); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { font-size: 13.5px; color: var(--ink-soft); text-decoration: none; }
.foot nav a:hover { color: var(--teal-deep); }

@media (prefers-reduced-motion: no-preference) {
  .doc .wrap > * {
    animation: rise .55s var(--ease) both;
  }
  .doc .wrap > *:nth-child(1) { animation-delay: .02s; }
  .doc .wrap > *:nth-child(2) { animation-delay: .06s; }
  .doc .wrap > *:nth-child(3) { animation-delay: .1s; }
  .doc .wrap > *:nth-child(4) { animation-delay: .14s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 640px) {
  .doc { padding: 36px 0 54px; }
  .contact-grid { grid-template-columns: 1fr; }
  .reset-card { margin: 0 auto; padding: 24px 20px; }
  .foot { flex-direction: column; text-align: center; }
  .foot-l { justify-content: center; }
  .foot nav { justify-content: center; }
}
