@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/tajawal-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/tajawal-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/tajawal-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/tajawal-arabic-800-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 400 500; src: url(/fonts/tajawal-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family: "Tajawal"; font-style: normal; font-display: swap; font-weight: 700 800; src: url(/fonts/tajawal-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122; }
  :root {
    --font: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
    /* خلفية غامقة دائمًا (ثيم ميم اوفيس الليلي) */
    color-scheme: dark;
    --bg: #121213; --surface: #1D1D1E; --line: #333335;
    --fg: #F2EFE8; --muted: #A8A398;
    --gold: #D4AE68; --gold-ink: #E2C27F; --gold-tint: #342A19; --gold-line: #5A4724;
    --hero: #222223; --hero-fg: #F4F0E6; --hero-muted: #B9B3A5;
    --sel-bg: #C49A4A; --sel-fg: #241A0E; --btn-ink: #2A2A2B; --err: #FF8A80;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.6; min-height: 100vh; }
  main { max-width: 480px; margin: 0 auto; padding: 18px 16px 40px; }



  /* النموذج */
  form, .done { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
  .field { margin-bottom: 18px; }
  label.lbl, legend { display: block; font-weight: 700; margin: 0 0 6px; padding: 0; font-size: 15px; }
  fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
  .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
  textarea, input[type=tel], input[type=text], select {
    width: 100%; font: inherit; color: var(--fg); background: var(--bg);
    border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 46px; transition: border-color .2s, box-shadow .2s;
  }
  textarea { min-height: 104px; resize: vertical; }
  .ltr { direction: ltr; text-align: right; }
  textarea:focus, input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-tint); }
  .err { color: var(--err); font-size: 13px; margin-top: 6px; }
  .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

  /* التفاصيل الإضافية */
  details.more { border: 1.5px dashed var(--gold-line); border-radius: 16px; margin: 4px 0 18px; background: var(--bg); }
  details.more > summary {
    list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 700; color: var(--gold-ink);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
  }
  details.more > summary::-webkit-details-marker { display: none; }
  details.more > summary small { font-weight: 400; color: var(--muted); font-size: 12.5px; display: block; }
  details.more > summary .chev { width: 22px; height: 22px; flex: none; transition: transform .25s; }
  details.more[open] > summary .chev { transform: rotate(180deg); }
  details.more > summary:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 2px; border-radius: 14px; }
  .more-body { padding: 4px 16px 4px; border-top: 1px solid var(--line); padding-top: 16px; }
  details.more[open] .more-body { animation: rise .35s ease both; }

  .seg { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
  .seg input, .chips input, .radios input { position: absolute; opacity: 0; pointer-events: none; }
  .seg label { text-align: center; padding: 9px 6px; cursor: pointer; font-weight: 500; border-inline-start: 1.5px solid var(--line); }
  .seg label:first-of-type { border-inline-start: 0; }
  .seg input:checked + label { background: var(--sel-bg); color: var(--sel-fg); font-weight: 700; }
  .seg input:focus-visible + label, .chips input:focus-visible + label, .radios input:focus-visible + label { outline: 3px solid var(--gold-line); outline-offset: 2px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chips label { cursor: pointer; padding: 5px 13px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14.5px; background: var(--surface); }
  .chips input:checked + label { border-color: var(--gold); background: var(--gold-tint); font-weight: 700; }
  .row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  @media (max-width: 420px) { .row { grid-template-columns: minmax(0,1fr); } }
  .affix { position: relative; }
  .affix input { padding-inline-end: 52px; }
  .affix i { position: absolute; inset-block: 0; inset-inline-end: 12px; display: grid; align-items: center; font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
  .radios { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .radios label { cursor: pointer; padding: 4px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface); }
  .radios input:checked + label { border-color: var(--gold); background: var(--gold-tint); font-weight: 700; }

  .summary { border-radius: 14px; background: var(--bg); border: 1px solid var(--line); padding: 12px 14px; font-size: 14.5px; margin-bottom: 16px; }
  .summary .cap { font-size: 12px; color: var(--gold-ink); font-weight: 700; margin-bottom: 2px; }
  .summary .l1 { font-weight: 700; }
  .summary .dim { color: var(--muted); }

  .consent { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; align-items: start; font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 4px; }
  .consent input { width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--gold-ink); }

  button.send { position: relative; overflow: hidden; width: 100%; margin-top: 12px; font: inherit; font-weight: 800; font-size: 18px; cursor: pointer;
    background: linear-gradient(135deg, #D8B36E, #C49A4A 55%, #B8883A); color: var(--btn-ink); border: 0; border-radius: 14px; padding: 14px;
    box-shadow: 0 6px 16px rgba(196,154,74,.35); transition: transform .15s, box-shadow .15s; }
  button.send::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: shine 4.5s ease-in-out infinite; }
  @keyframes shine { 0%,55% { left: -60%; } 80%,100% { left: 130%; } }
  button.send:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(196,154,74,.42); }
  button.send:active { transform: translateY(1px); }
  button.send:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }

  .done { display: none; text-align: center; padding: 30px 20px; }
  .done.show { display: block; animation: rise .5s ease both; }
  .done svg { width: 72px; height: 72px; margin-bottom: 10px; }
  .done .ring { fill: var(--gold-tint); stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 190; stroke-dashoffset: 190; }
  .done .tick { fill: none; stroke: var(--gold-ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
  .done.show .ring { animation: draw .7s ease forwards; }
  .done.show .tick { animation: draw .4s .55s ease forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .done h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
  .done p { margin: 0 0 8px; color: var(--muted); }
  .done .recap { color: var(--fg); font-weight: 700; }
  .again { margin-top: 14px; background: none; border: 0; color: var(--gold-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

  .rise { animation: rise .6s ease both; }
  .d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .28s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .done .ring, .done .tick { stroke-dashoffset: 0; }
  }

  /* بداية الصفحة بالشكل القديم: الشعار يرسم نفسه + الخطوات الثلاث تضيء بالتناوب */
  .top2 { display: flex; align-items: center; gap: 12px; padding-block: 6px 18px; }
  .logo { width: 46px; height: 50px; flex: none; overflow: visible; }
  .logo .clip { fill: none; stroke: url(#goldGrad); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
  .brand { font-weight: 800; font-size: 24px; line-height: 1.1; }
  .brand .name { background: linear-gradient(100deg, #8a6a3a, #c49a4a 45%, #e6d3a3 60%, #b08d4f); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .brand small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }
  .story h1 { font-weight: 800; font-size: clamp(26px, 7vw, 34px); line-height: 1.35; margin: 0 0 10px; text-wrap: balance; }
  .story .lead { color: var(--muted); margin: 0 0 24px; }
  ol.steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 22px; position: relative; }
  ol.steps::before { content: ""; position: absolute; inset-block: 16px; inset-inline-start: 15px; width: 2px; background: var(--line); }
  ol.steps::after { content: ""; position: absolute; inset-block-start: 16px; inset-inline-start: 15px; width: 2px; background: var(--gold); height: calc(100% - 32px); transform-origin: top; transform: scaleY(0.04); animation: fill 9s ease-in-out infinite; }
  ol.steps li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 14px; align-items: start; position: relative; z-index: 1; }
  ol.steps .n { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold-ink); background: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 15px; animation: on 9s ease-in-out infinite; }
  ol.steps li:nth-child(2) .n { animation-delay: 3s; }
  ol.steps li:nth-child(3) .n { animation-delay: 6s; }
  ol.steps b { display: block; font-weight: 700; }
  ol.steps span { color: var(--muted); font-size: 15px; }
  .promises { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
  .promises li { font-size: 14px; background: var(--gold-tint); color: var(--gold-ink); padding: 4px 12px; border-radius: 999px; }
  @keyframes on { 0%,28% { background: var(--gold); color: #241A0E; transform: scale(1.12); } 34%,100% { background: var(--bg); color: var(--gold-ink); transform: scale(1); } }
  @keyframes fill { 0% { transform: scaleY(0.04); } 70%,100% { transform: scaleY(1); } }
  @media (prefers-reduced-motion: no-preference) {
    .logo .clip { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s ease-out .15s forwards; }
    .logo g { animation: settle 1.2s ease-out 1.2s both; transform-origin: 60px 165px; transform-box: view-box; }
    .brand { animation: rise .7s ease-out 1s both; }
    @keyframes settle { from { transform: rotate(-8deg); } to { transform: rotate(0); } }
  }
  @media (prefers-reduced-motion: reduce) { ol.steps::after { transform: scaleY(1); } }
/* إضافات النسخة الفعلية */
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-slot { min-height: 0; margin: 4px 0 0; }
.foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.foot a { color: var(--gold-ink); text-decoration: none; margin: 0 8px; }
.foot a:hover, .foot a:focus-visible { text-decoration: underline; }
.consent a { color: var(--gold-ink); }
.form-err { color: var(--err); font-size: 14px; margin: 10px 0 0; min-height: 0; }
button.send[disabled] { opacity: .65; cursor: progress; }
.confirm { margin-top: 18px; padding: 14px; border: 1px dashed var(--gold-line); border-radius: 14px; background: var(--bg); text-align: start; }
.confirm b.code { direction: ltr; unicode-bidi: isolate; letter-spacing: 3px; color: var(--gold-ink); font-size: 18px; }
.confirm p { color: var(--fg); margin: 0 0 10px; font-size: 14.5px; }
a.wa { display: block; text-align: center; text-decoration: none; background: #1f8f55; color: #fff; font-weight: 800; padding: 12px; border-radius: 12px; }
a.wa:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.small { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
button.copy { display: block; width: 100%; margin-top: 10px; font: inherit; font-weight: 700; color: var(--gold-ink); background: var(--bg); border: 1.5px solid var(--gold-line); border-radius: 12px; padding: 10px; cursor: pointer; }
button.copy[hidden] { display: none; }
button.copy:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.doc { max-width: 680px; margin: 0 auto; padding: 22px 18px 50px; }
.doc h1 { font-size: 26px; font-weight: 800; margin: 8px 0 6px; }
.doc h2 { font-size: 18px; font-weight: 700; color: var(--gold-ink); margin: 24px 0 6px; }
.doc p, .doc li { color: var(--fg); font-size: 15.5px; }
.doc ul { padding-inline-start: 22px; }
.doc .draft { background: var(--gold-tint); border: 1px solid var(--gold-line); color: var(--gold-ink); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.doc mark { background: #5A4724; color: #FFE7B0; padding: 0 6px; border-radius: 6px; }
.doc a { color: var(--gold-ink); }
