/**
 * WooCodForm — one stylesheet, both reading directions.
 *
 * Everything directional uses logical properties (inline-start, margin-inline)
 * so the Arabic pages need no separate stylesheet and no overrides: setting
 * dir="rtl" on <html> is the whole change.
 */

/* ------------------------------------------------------------------ tokens */

:root {
  --brand: #970096;
  --brand-dark: #7a007a;
  --brand-tint: #fdf4fd;
  --ink: #14121a;
  --ink-2: #3f3b4a;
  --ink-3: #6b6577;
  --line: #e6e1ea;
  --bg: #ffffff;
  --bg-2: #fbf8fc;
  --ok: #16a34a;
  --ok-tint: #eafaf0;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(20, 18, 26, .05), 0 8px 24px rgba(20, 18, 26, .06);
  --shadow-lg: 0 2px 4px rgba(20, 18, 26, .04), 0 18px 48px rgba(151, 0, 150, .12);

  --wrap: 1140px;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[lang="ar"] {
  --font: "Cairo", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
}

/* ------------------------------------------------------------------- reset */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.35; }

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }

img, svg, picture { max-width: 100%; height: auto; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ layout */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-2); }

.section__head {
  max-width: 46rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--ink-3);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .35rem .9rem;
  border-radius: 100px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  padding: .8rem 1.2rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { inset-inline-start: 0; color: #fff; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.02em;
  text-decoration: none;
  flex: 0 0 auto;
}
.logo svg, .logo img { width: 30px; height: 30px; }
.logo b { color: var(--brand); font-weight: 700; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 1.6vw, 1.4rem);
  margin-inline-start: auto;
}

/* :not(.btn) matters: without it this rule outranks .btn--primary on
   specificity and paints the Get Premium label dark grey on purple. */
.site-nav a:not(.btn) {
  color: var(--ink-2);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:not(.btn):hover { color: var(--brand); }

.site-nav__links { display: flex; gap: clamp(.6rem, 1.6vw, 1.4rem); }

@media (max-width: 860px) {
  .site-nav__links { display: none; }
}

@media (max-width: 560px) {
  .site-header .btn { display: none; }
}

/* --------------------------------------------------------------- language */

.lang {
  position: relative;
  flex: 0 0 auto;
}

.lang__button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.lang__button:hover { border-color: var(--brand); color: var(--brand); }

.lang__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + .5rem);
  min-width: 10rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.lang__menu[hidden] { display: none; }

.lang__menu a {
  display: block;
  padding: .5rem .7rem;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: .92rem;
  text-decoration: none;
}
.lang__menu a:hover { background: var(--bg-2); color: var(--brand); }
.lang__menu a[aria-current="true"] { color: var(--brand); font-weight: 600; }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font: inherit;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(151, 0, 150, .26);
}
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { padding: .55rem 1.05rem; font-size: .9rem; }
.btn--lg { padding:1rem 1.9rem; font-size: 1.05rem; }

/* -------------------------------------------------------------------- hero */

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(60rem 30rem at 80% -10%, rgba(151, 0, 150, .07), transparent 60%),
    radial-gradient(40rem 24rem at 0% 0%, rgba(22, 163, 74, .05), transparent 60%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  color: var(--ink-3);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.hero__note {
  font-size: .88rem;
  color: var(--ink-3);
}

.hero__art img {
  width: 100%;
  border-radius: var(--radius-lg);
}

/* ------------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}

@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  padding: 1.4rem 1.2rem;
  background: #fff;
  text-align: center;
}
.stat__value {
  display: block;
  color: var(--brand);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
}
.stat__label {
  display: block;
  margin-top: .3rem;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------- cards */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

@media (max-width: 880px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-3); font-size: .97rem; margin: 0; }

.card--brand {
  border-color: rgba(151, 0, 150, .28);
  box-shadow: var(--shadow-lg);
}

.card__tag {
  display: inline-block;
  margin-bottom: .9rem;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.card__tag--free { background: var(--bg-2); color: var(--ink-3); }
.card__tag--pro { background: var(--brand); color: #fff; }

/* --------------------------------------------------------------- tick list */

.ticks li {
  display: flex;
  gap: .65rem;
  margin-bottom: .7rem;
  font-size: .96rem;
  line-height: 1.6;
}
.ticks li:last-child { margin-bottom: 0; }

.ticks svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: .2rem;
  color: var(--ok);
}

/* ------------------------------------------------------------------- table */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 40rem;
}

table.compare th,
table.compare td {
  padding: .85rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.compare thead th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}

table.compare thead th.is-us { background: var(--brand-tint); color: var(--brand); }
table.compare td.is-us { background: rgba(151, 0, 150, .035); font-weight: 600; color: var(--ink); }

table.compare tbody th {
  font-weight: 500;
  color: var(--ink-2);
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td { border-bottom: 0; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 600;
}
.mark--yes { color: var(--ok); }
.mark--no { color: var(--ink-3); font-weight: 500; }
.mark--partial { color: #b45309; }
.mark svg { width: 17px; height: 17px; }

/* ----------------------------------------------------------------- pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  align-items: start;
}

@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.plan--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
}

.plan__badge {
  position: absolute;
  top: -.7rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: .2rem .8rem;
  border-radius: 100px;
  background: var(--brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
html[dir="rtl"] .plan__badge { transform: translateX(50%); }

.plan__name { margin-bottom: .15rem; font-size: 1.05rem; }
.plan__desc { margin-bottom: 1rem; font-size: .88rem; color: var(--ink-3); }

.plan__price {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-bottom: 1.2rem;
  color: var(--ink);
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
}
.plan__period { font-size: .82rem; font-weight: 500; color: var(--ink-3); }

.plan .ticks { margin-bottom: 1.4rem; }
.plan .ticks li { font-size: .9rem; }

.plan .btn { margin-top: auto; width: 100%; }

.plan__note {
  margin-top: clamp(1.5rem, 4vw, 2.2rem);
  font-size: .88rem;
  color: var(--ink-3);
  text-align: center;
}

/* --------------------------------------------------------------------- faq */

.faq { max-width: 48rem; margin-inline: auto; }

.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-inline-start: auto;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }

.faq details > div {
  padding-bottom: 1.3rem;
  color: var(--ink-3);
  font-size: .97rem;
}

/* ------------------------------------------------------------------ prose */

.prose { max-width: 46rem; margin-inline: auto; }
.prose h2 { margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }

/* -------------------------------------------------------------------- cta */

.cta-band {
  padding-block: clamp(3rem, 7vw, 4.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand) 0%, #6a0069 100%);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 34rem; margin-inline: auto; color: rgba(255, 255, 255, .88); }
.cta-band .btn--primary { background: #fff; color: var(--brand); box-shadow: none; }
.cta-band .btn--primary:hover { background: #f7eef7; color: var(--brand-dark); }
.cta-band .btn--ghost { border-color: rgba(255, 255, 255, .5); background: transparent; color: #fff; }
.cta-band .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.6rem;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  margin-top: var(--section-y);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: .92rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 2.5rem;
}

@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer h2 {
  margin-bottom: .8rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }

.site-footer__tagline {
  max-width: 22rem;
  margin-top: .8rem;
  color: var(--ink-3);
  font-size: .9rem;
}

.site-footer__base {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: .82rem;
}
.site-footer__base p { margin-bottom: .4rem; }

/* ------------------------------------------------------------------- misc */

.center { text-align: center; }
.mt-2 { margin-top: 1.5rem; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
