/* ============ Waraqat — waraqat.app ============
   Privacy-first PDF tools. Emerald identity, matches the app theme. */

:root {
  --green: #0E9E6E;
  --green-dark: #0A7C56;
  --green-soft: #E3F5EC;
  --ink: #0F1F19;
  --muted: #5B6B64;
  --faint: #9AA8A1;
  --bg: #F5F8F6;
  --card: #FFFFFF;
  --line: #E6ECE8;

  /* tool category accents (from the app) */
  --c-organize-fg:#0E9E6E; --c-organize-bg:#E3F5EC;
  --c-edit-fg:#7C3AED;     --c-edit-bg:#F1EAFE;
  --c-optimize-fg:#2563EB; --c-optimize-bg:#E6EEFD;
  --c-convert-fg:#D97706;  --c-convert-bg:#FDF0DC;
  --c-security-fg:#DC2626; --c-security-bg:#FDECEC;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 40px -12px rgba(11,27,20,.14);
  --shadow-soft: 0 4px 20px -8px rgba(11,27,20,.12);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Tajawal", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 76px 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,248,246,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-soft); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: 15px;
  padding: 8px 14px; border-radius: 10px; transition: .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--green-soft); }
.nav-links a.cta {
  color: #fff; background: var(--green); font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.nav-links a.cta:hover { background: var(--green-dark); color: #fff; }

/* Language switch */
.lang-switch { display: inline-flex; gap: 2px; background: var(--surfaceAlt, #EAF0EC); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-inline-start: 4px; }
.lang-switch button {
  font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  border: none; background: transparent; color: var(--muted);
  padding: 5px 11px; border-radius: 999px; transition: .15s; line-height: 1;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--green); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: 16px;
  padding: 15px 26px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 24px -8px rgba(14,158,110,.6); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn svg { width: 22px; height: 22px; }

/* App Store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 16px;
  box-shadow: var(--shadow-soft); transition: transform .15s, opacity .2s;
}
.store-badge:hover { transform: translateY(-2px); color: #fff; }
.store-badge svg { width: 30px; height: 30px; flex: none; }
.store-badge .sb-small { font-size: 11px; opacity: .85; line-height: 1; margin-bottom: 3px; }
.store-badge .sb-big { font-size: 20px; font-weight: 700; line-height: 1; }
.store-badge.soon { background: #1c2a24; }
.store-badge.soon .sb-big { font-weight: 700; }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-soft); color: var(--green-dark);
  font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero-copy .eyebrow svg { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.18; margin: 0 0 16px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .accent { color: var(--green); }
.hero .lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 18px; color: var(--faint); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 16px; height: 16px; }

/* Phone mockup (CSS recreation of the app home) */
.phone-stage { display: flex; justify-content: center; position: relative; }
.phone-stage::before {
  content: ""; position: absolute; inset: -10% -20%;
  background: radial-gradient(circle at 50% 40%, rgba(14,158,110,.18), transparent 62%);
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: 300px; background: #0b0f0d; border-radius: 44px; padding: 12px;
  box-shadow: 0 40px 80px -30px rgba(11,27,20,.5), 0 0 0 2px rgba(0,0,0,.04);
}
.phone-screen { background: var(--bg); border-radius: 33px; overflow: hidden; height: 600px; position: relative; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 108px; height: 28px; background: #0b0f0d; border-radius: 999px; z-index: 3; }
.ps-inner { padding: 44px 16px 16px; }
.ps-row .txt { text-align: start; }
[dir="ltr"] .ps-banner { justify-content: flex-start; }
[dir="ltr"] .ps-title, [dir="ltr"] .ps-row .txt { text-align: left; }
.ps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ps-title { font-size: 24px; font-weight: 800; }
.ps-title small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.ps-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.ps-logo svg { width: 26px; height: 26px; }
.ps-search { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--faint); font-size: 13px; margin-bottom: 10px; }
.ps-banner { background: var(--green-soft); color: var(--green-dark); border-radius: 12px; padding: 10px 14px; font-size: 12px; font-weight: 700; margin-bottom: 14px; display:flex; align-items:center; gap:6px; justify-content:flex-end;}
.ps-row { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 9px; box-shadow: 0 2px 8px -6px rgba(11,27,20,.15); }
.ps-row .txt { flex: 1; text-align: right; }
.ps-row .txt b { display: block; font-size: 14px; font-weight: 700; }
.ps-row .txt span { font-size: 11px; color: var(--muted); }
.ps-ic { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.ps-ic svg { width: 22px; height: 22px; }

/* ---------- Trust bar ---------- */
.trust { background: var(--ink); color: #fff; padding: 22px 0; }
.trust .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.trust .item { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; opacity: .95; }
.trust .item svg { width: 20px; height: 20px; color: #2FD39F; }

/* ---------- Section heading ---------- */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.sec-head .kicker { color: var(--green); font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 38px); margin: 8px 0 12px; font-weight: 800; letter-spacing: -.4px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- Tools grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; align-items: center; gap: 15px; transition: .18s;
}
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.tool .t-ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tool .t-ic svg { width: 26px; height: 26px; }
.tool b { font-size: 16px; font-weight: 700; display: block; }
.tool span { font-size: 13.5px; color: var(--muted); }
.tool .badge-soon { font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 999px; margin-inline-start: 6px; vertical-align: middle; }

/* ---------- Features / why ---------- */
.why { background: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
}
.feature .f-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feature .f-ic svg { width: 30px; height: 30px; }
.feature h3 { font-size: 21px; margin: 0 0 8px; font-weight: 800; }
.feature p { color: var(--muted); font-size: 16px; margin: 0; }

/* ---------- Screens gallery ---------- */
.shots { background: linear-gradient(180deg, var(--green-soft), var(--bg)); }
.shots-row { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.shots-row img { width: 240px; border-radius: 30px; box-shadow: 0 30px 60px -24px rgba(11,27,20,.4); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--green); color: #fff; text-align: center; border-radius: 28px; padding: 56px 30px; box-shadow: var(--shadow); }
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; font-weight: 800; }
.cta-band p { font-size: 18px; opacity: .92; margin: 0 0 26px; }
.cta-band .store-badge { background: #fff; color: var(--ink); }
.cta-band .store-badge:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfe0d8; padding: 54px 0 34px; }
.footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.footer .brand { color: #fff; }
.footer .f-about { max-width: 300px; color: #9db0a6; font-size: 15px; margin-top: 14px; }
.footer h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: #9db0a6; }
.footer a:hover { color: #2FD39F; }
.footer .bottom { border-top: 1px solid #28322b; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #7f9389; font-size: 14px; }

/* ---------- Content pages (privacy / support) ---------- */
.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 54px 0 44px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 10px; font-weight: 800; }
.page-hero p { color: var(--muted); font-size: 18px; margin: 0; }
.page-hero .updated { color: var(--faint); font-size: 14px; margin-top: 8px; }
.doc { max-width: 780px; }
.doc .card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 16px;
}
.doc .card.hl { background: var(--green); color: #fff; border: none; }
.doc .card.hl h2, .doc .card.hl a { color: #fff; }
.doc h2 { font-size: 20px; margin: 0 0 12px; color: var(--green); font-weight: 800; }
.doc p { margin: 0 0 12px; font-size: 16.5px; }
.doc p:last-child { margin-bottom: 0; }
.doc ul { margin: 0; padding-inline-start: 22px; }
.doc li { margin-bottom: 9px; font-size: 16.5px; }
.doc .en { direction: ltr; text-align: left; margin-top: 46px; padding-top: 30px; border-top: 2px solid var(--line); }

/* FAQ */
.faq { max-width: 780px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 22px; margin-bottom: 12px; transition: .2s;
}
.faq details[open] { box-shadow: var(--shadow-soft); }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 17px;
  padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q-plus { color: var(--green); font-size: 24px; font-weight: 400; transition: transform .2s; flex: none; }
.faq details[open] summary .q-plus { transform: rotate(45deg); }
.faq .a { padding: 0 0 18px; color: var(--muted); font-size: 16px; }
.contact-card {
  background: var(--green-soft); border-radius: var(--radius); padding: 34px; text-align: center; margin-top: 34px;
}
.contact-card h3 { font-size: 22px; margin: 0 0 8px; }
.contact-card p { color: var(--muted); margin: 0 0 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  section { padding: 56px 0; }
  .hero { padding: 34px 0 10px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .hero-copy { order: 1; }
  .phone-stage { order: 2; margin-top: 30px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.cta) { display: none; }
}
@media (max-width: 520px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool { padding: 18px; }
  .phone { width: 264px; }
  .phone-screen { height: 540px; }
}
