/* arfaja.com v2 (docs/2026-10-22-site-v2-spec.md in the planning repo): a light page, the app's
   night look inside the phones, one deep green for actions. Directions are logical
   (inline-start/end), so /ar/ mirrors with dir="rtl" alone. */

@font-face {
  font-family: "Plex Arabic";
  src: url(/assets/fonts/plex-arabic-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url(/assets/fonts/plex-arabic-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plex Arabic";
  src: url(/assets/fonts/plex-arabic-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* The app's night colours (his call 23/10: the app is dark, the site follows it) */
:root {
  --bg: #0f1311;
  --panel: #161c19;
  --sand: #1b221e;
  --ink: #e9eee9;
  --sub: #b3bdb6;
  --dim: #8d9891;
  --line: #29322d;
  --green: #3ddc84;
  --green-hover: #74e6a6;
  --green-soft: rgb(61 220 132 / 0.13);
  --on-green: #0f1311;
  --field: #0b0f0d;
  --field-line: #3a4540;
  --error: #ff8f80;
  --bright: #3ddc84;
  --night: #0f1311;
  --plus: #11281b;
  --amber: #f2c14e;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --radius: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    400 17px/1.6 "Plex Arabic",
    system-ui,
    sans-serif;
}
body:lang(ar) {
  font-size: 18px;
  line-height: 1.75;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--green-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -60px;
  z-index: 3;
  background: var(--green);
  color: var(--on-green);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus {
  top: 8px;
  color: var(--on-green);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
}
.brand span {
  color: var(--dim);
  font-weight: 400;
  font-size: 18px;
}
.brand__mark {
  flex: none;
  display: block;
}
.bar--home {
  height: auto;
  padding-block: clamp(18px, 3vw, 30px) 6px;
}
.bar--home .brand {
  gap: 14px;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1;
  color: var(--bright);
  letter-spacing: -0.01em;
}
.bar--home .brand span {
  font-size: 0.55em;
  color: var(--sub);
}
.bar--home .brand__mark {
  width: clamp(56px, 8vw, 76px);
  height: auto;
}
.bar--home .brand:hover {
  color: var(--bright);
}
.brand:hover {
  color: var(--ink);
}
.lang {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  transition: border-color 0.2s var(--ease);
}
.lang:hover {
  color: var(--ink);
  border-color: var(--green);
}

/* Buttons and the form */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s var(--ease),
    transform 0.15s var(--ease);
}
.btn:hover {
  background: var(--green-hover);
  color: var(--on-green);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.join {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.6);
}
.join label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
}
.join__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.join input[type="email"] {
  flex: 1 1 220px;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  font: inherit;
  color: var(--ink);
  background: var(--field);
}
.join input[type="email"]:focus {
  border-color: var(--green);
  outline: 3px solid rgb(61 220 132 / 0.3);
  outline-offset: 0;
}
.join .btn {
  flex: 0 0 auto;
}
.join__consent {
  font-size: 13.5px;
  color: var(--sub);
  margin: 12px 0 0;
}
.join__check {
  margin-top: 10px;
}
.join__status {
  margin: 12px 0 0;
  font-weight: 500;
}
.join__status:empty {
  display: none;
}
.join__status.is-ok {
  color: var(--green);
}
.join__status.is-error {
  color: var(--error);
}
.join__nojs {
  margin: 0;
  color: var(--sub);
}
/* The form needs JavaScript (Turnstile, spec §4.3): shown only once assets/join.js runs. */
.join form[hidden] {
  display: none;
}

/* Hero */
.hero {
  padding-block: 12px clamp(48px, 8vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.hero__soon {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero h1:lang(ar) {
  letter-spacing: 0;
  line-height: 1.3;
}
.hero__lead {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--sub);
  max-width: 40ch;
  margin: 0 0 26px;
}
.hero__visual {
  position: relative;
  min-height: 560px;
}
.hero__sat {
  position: absolute;
  inset: 40px 0 110px 12%;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--sand);
}
[dir="rtl"] .hero__sat {
  inset: 40px 12% 110px 0;
}
.hero__sat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 74%;
}
.hero__sat figcaption {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  max-width: 38%;
  font-size: 12.5px;
  line-height: 1.4;
  color: #fff;
  background: rgb(15 19 17 / 0.62);
  padding: 5px 10px;
  border-radius: 10px;
}
.hero__phone {
  position: relative;
  z-index: 1;
  width: min(280px, 62%);
  margin: 0;
}
.hero__phone figcaption {
  font-size: 13px;
  color: var(--dim);
  margin-top: 10px;
  max-width: 36ch;
}

/* A phone frame around a real screenshot (the screenshot is never redrawn) */
.phone {
  border-radius: 44px;
  padding: 10px;
  background: #070908;
  box-shadow:
    0 30px 70px -20px rgb(0 0 0 / 0.75),
    0 0 0 1px #34403a,
    inset 0 0 0 2px #1f2622;
}
.phone img {
  border-radius: 34px;
  width: 100%;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    min-height: 0;
    padding-block: 24px;
  }
  .hero__sat,
  [dir="rtl"] .hero__sat {
    inset: 0 0 130px 0;
  }
  .hero__sat figcaption {
    max-width: none;
    inset-inline: 12px;
    text-align: center;
  }
  .hero__phone {
    margin: 60px auto 0;
    width: min(280px, 78%);
  }
}

/* Sections */
section {
  scroll-margin-top: 16px;
}
.block {
  padding-block: clamp(56px, 9vw, 112px);
}
.block--panel {
  background: var(--panel);
  border-block: 1px solid var(--line);
}
h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
h2:lang(ar) {
  letter-spacing: 0;
  line-height: 1.4;
}
.intro {
  max-width: 62ch;
  color: var(--sub);
  margin: 0 0 36px;
}

/* The problem: words beside a real photo */
.problem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.problem ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.problem li {
  position: relative;
  padding-inline-start: 26px;
  color: var(--sub);
}
.problem li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 12px;
  height: 2px;
  background: var(--amber);
}
.problem__answer {
  font-weight: 600;
  font-size: 19px;
  margin: 0;
}
.photo {
  margin: 0;
}
.photo img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 699 / 402;
  object-fit: cover;
}
.photo figcaption {
  font-size: 13px;
  color: var(--dim);
  margin-top: 8px;
}
@media (max-width: 860px) {
  .problem {
    grid-template-columns: 1fr;
  }
}

/* How it works: three real screens, the middle one raised */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.step .phone {
  max-width: 260px;
  margin-inline: auto;
}
.step:nth-child(2) {
  margin-top: -28px;
}
.step h3 {
  font-size: 20px;
  margin: 6px 0 4px;
  font-weight: 600;
}
.step p {
  margin: 0;
  color: var(--sub);
}
.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  margin-top: 18px;
}
.steps__note {
  font-size: 13.5px;
  color: var(--dim);
  margin: 30px 0 0;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .step:nth-child(2) {
    margin-top: 0;
  }
}

/* Before and after: one satellite picture, the green on a slider */
.compare {
  --cut: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
  touch-action: pan-y;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 74%;
}
.compare__after {
  clip-path: inset(0 0 0 var(--cut));
}
[dir="rtl"] .compare__after {
  clip-path: inset(0 var(--cut) 0 0);
}
.compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: var(--cut);
  width: 2px;
  margin-inline-start: -1px;
  background: var(--bright);
  pointer-events: none;
}
.compare__line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: var(--bright);
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.35);
  transition: transform 0.2s var(--ease);
}
.compare input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(input:focus-visible) {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
.compare:hover .compare__line::after {
  transform: scale(1.12);
}
.compare__labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--dim);
  margin: 12px 0 0;
}
.compare__labels b {
  color: var(--green);
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .compare {
    aspect-ratio: 4 / 5;
  }
}

.areas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 36px 0 16px;
}
.areas li {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 500;
}
.areas__out {
  color: var(--dim);
  max-width: 64ch;
  margin: 0;
}

/* Free and Plus */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
}
.plan--plus {
  background: var(--plus);
  color: #edf2ee;
  border-color: #24563a;
}
.plan h3 {
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 600;
}
.plan__note {
  color: var(--dim);
  font-size: 15px;
  margin: 0 0 18px;
}
.plan--plus .plan__note {
  color: #b4beb7;
}
.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plan li {
  position: relative;
  padding-inline-start: 22px;
}
.plan li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--green);
}
.plan--plus li::before {
  background: var(--bright);
}
.plans__after {
  color: var(--sub);
  margin: 16px 0 0;
  font-size: 15px;
}
@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* Honesty */
.seen > * {
  max-width: 820px;
}
.seen p {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--sub);
}
.seen .warn {
  margin-top: 22px;
  padding-inline-start: 16px;
  border-inline-start: 3px solid var(--amber);
  color: var(--ink);
  font-size: 17px;
}

/* Questions */
.faq > * {
  max-width: 820px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-size: 19px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--green);
  font-size: 24px;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq summary:hover {
  color: var(--green);
}
.faq details p {
  margin: 0 0 20px;
  color: var(--sub);
  max-width: 64ch;
}

/* Closing call */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 860px) {
  .closing {
    grid-template-columns: 1fr;
  }
}

/* Our address: assets/email.js builds the link; without JavaScript the "@" comes from CSS, so
   the address never exists as one string in the HTML (email.test.ts). */
.email {
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}
.email__at::before {
  content: "@";
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 36px 44px;
  font-size: 15px;
  color: var(--dim);
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.foot a {
  color: var(--sub);
}
.foot a:hover {
  color: var(--green);
}
.foot p {
  margin: 14px 0 0;
  max-width: 90ch;
}

/* Plain pages: privacy, terms, legal notice, and the list's pages (worker.ts) */
.doc {
  padding-block: 32px 80px;
}
.doc > * {
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.15;
  margin: 16px 0 8px;
  font-weight: 600;
}
.doc h2 {
  font-size: 23px;
  margin: 38px 0 10px;
}
.doc p,
.doc li,
.doc dd {
  color: #cdd5cf;
}
.doc ul {
  padding-inline-start: 22px;
}
.doc li {
  margin-bottom: 6px;
}
.doc dl {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) 1fr;
  gap: 8px 20px;
}
.doc dt {
  color: var(--dim);
}
.doc dd {
  margin: 0;
}
.draft {
  border: 1px solid #7a5a16;
  background: #241c0b;
  color: #f2d48a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
}
.updated {
  color: var(--dim);
  font-size: 15px;
  margin: 0;
}
.flow form {
  margin: 20px 0;
}
@media (max-width: 600px) {
  .doc dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .doc dd {
    margin-bottom: 12px;
  }
}

/* Entry: the hero rises once; nothing loops */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * {
    animation: rise 0.8s var(--ease) both;
  }
  .hero__copy > :nth-child(2) {
    animation-delay: 0.06s;
  }
  .hero__copy > :nth-child(3) {
    animation-delay: 0.12s;
  }
  .hero__copy > :nth-child(4) {
    animation-delay: 0.18s;
  }
  .hero__phone {
    animation: rise 1s var(--ease) 0.15s both;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
