@font-face { font-family: Trenda; src: url(assets/fonts/Trenda-Regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Trenda; src: url(assets/fonts/Trenda-Semibold.woff) format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: Trenda; src: url(assets/fonts/Trenda-Bold.woff) format('woff'); font-weight: 700; font-display: swap; }
/* Arabic: Tajawal (SIL OFL, Arabic subset only), so Latin text and digits still render in Trenda. */
@font-face { font-family: Tajawal; src: url(assets/fonts/Tajawal-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: Tajawal; src: url(assets/fonts/Tajawal-500.woff2) format('woff2'); font-weight: 500 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: Tajawal; src: url(assets/fonts/Tajawal-700.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  --green: #347763;
  --green-dark: #285d4d;
  --green-tint: #e7f0ec;
  --ink: #2b2a2a;
  --muted: #66625c;
  --line: #e4e1da;
  --bg: #f7f6f2;
  --card: #fff;
  --good: #347763;
  --warn: #b7791f;
  --bad: #b5452f;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(43 42 42 / .06), 0 8px 24px rgb(43 42 42 / .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.55 Trenda, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 7vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 5vw, 2rem); }
h3 { font-size: 1.15rem; margin-top: 2rem; }
p { margin: 0 0 1rem; }
a { color: var(--green); }
[hidden] { display: none !important; }
html[lang="ar"] body { font-family: Tajawal, Trenda, system-ui, sans-serif; line-height: 1.7; }
html[lang="ar"] * { letter-spacing: 0 !important; } /* spacing breaks Arabic letter joining */
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

/* Header / footer */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand img { display: block; height: 22px; width: auto; }
.top-links { display: flex; align-items: center; gap: 16px; }
.top-link { font-size: .875rem; color: var(--muted); text-decoration: none; }
.top-link:hover { color: var(--green); }

main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 24px 16px 8px; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: .6rem; }
.lede { font-size: 1.05rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 54px; padding: 0 24px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.link { display: block; margin: 20px auto 0; background: none; border: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 12px; }

/* Quiz */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; background: var(--line); }
.quiz h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); margin-bottom: 20px; }
.quiz-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.progress { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .3s ease; }
.count { font-size: .9rem; font-weight: 600; color: var(--muted); min-width: 3.2em; text-align: end; font-variant-numeric: tabular-nums; }
.legend { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.legend b { color: var(--ink); font-weight: 600; }
.legend span { white-space: nowrap; }
.q-list { display: grid; gap: 12px; }
.q {
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; scroll-margin: 96px; transition: border-color .2s;
}
.q:has(input:checked) { border-color: var(--green-tint); }
.q-text { display: flex; gap: 12px; margin: 0 0 14px; font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.q-num {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; margin-top: -1px;
  border-radius: 50%; background: var(--green-tint); color: var(--green); font-size: .8rem;
}
.q:has(input:checked) .q-num { background: var(--green); color: #fff; }

/* Segmented Yes / Partly / No built on native radios */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px;
  font-weight: 600; color: var(--ink); background: var(--card); transition: background .15s, border-color .15s, color .15s;
}
@media (hover: hover) { .seg input:hover + span { border-color: var(--green); } }
.seg input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.seg input[value="yes"]:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.seg input[value="partly"]:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.seg input[value="no"]:checked + span { background: var(--bad); border-color: var(--bad); color: #fff; }
#q-form { gap: 16px; margin-top: 0; }

/* Lead form */
form { display: grid; gap: 14px; margin-top: 8px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input {
  font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  min-height: 52px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-tint); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* honeypot; off-screen offsets would scroll in RTL */
.form-error { color: var(--bad); font-weight: 600; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.fine { font-size: .82rem; color: var(--muted); text-align: center; margin: 0; }

/* Lead pop-up: bottom sheet on mobile, centred card on desktop. Backdrop only dims, so answers stay readable. */
.details {
  width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; padding: 22px 20px calc(16px + env(safe-area-inset-bottom));
  border: 0; border-radius: 20px 20px 0 0; background: var(--card); color: var(--ink); box-shadow: 0 -8px 40px rgb(0 0 0 / .18); overflow-y: auto;
}
.details[open] { animation: sheet-up .28s cubic-bezier(.2, .7, .2, 1); }
.details::backdrop { background: rgb(43 42 42 / .35); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.details h2 { font-size: 1.3rem; padding-inline-end: 44px; outline: none; }
.details .eyebrow { margin-bottom: .3rem; }
.details .lede { font-size: .95rem; margin: 0 0 4px; }
.details form { gap: 10px; }
.details input { min-height: 48px; }
.dialog-close {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
body:has(.details[open]) { overflow: hidden; }

/* Results */
.score-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 20px; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--good); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .7, .2, 1); }
.ring-fg[data-tone="warn"] { stroke: var(--warn); }
.ring-fg[data-tone="bad"] { stroke: var(--bad); }
.ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-num span { font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-num small { color: var(--muted); font-weight: 600; }
.score-card h2 { font-size: 1.35rem; }
.score-card .eyebrow { margin-bottom: .4rem; }

.pill { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; margin: 0; }
[data-tone="good"].pill { background: var(--green-tint); color: var(--good); }
[data-tone="warn"].pill { background: #f8eedd; color: var(--warn); }
[data-tone="bad"].pill { background: #f6e3de; color: var(--bad); }

.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.bar-head { display: flex; justify-content: space-between; font-weight: 600; font-size: .95rem; }
.bar-pct { font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--good); }
.bars small { font-size: .8rem; color: var(--good); font-weight: 600; }
[data-tone="warn"] .bar span { background: var(--warn); }
[data-tone="warn"] small { color: var(--warn); }
[data-tone="bad"] .bar span { background: var(--bad); }
[data-tone="bad"] small { color: var(--bad); }

.cta { margin-top: 28px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px 20px; }
.cta h3 { margin-top: 0; font-size: 1.35rem; }
.cta p { color: #cfccc6; }

.cta-actions { display: grid; gap: 12px; }
/* Offer as a ticket: notches are circles in the card colour cut into the edges. */
.offer {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  margin: 20px 0 22px; padding: 18px 24px; border-radius: 12px; border: 1.5px dashed rgb(255 255 255 / .4);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}
.offer::before, .offer::after { content: ''; position: absolute; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--ink); }
.offer::before { inset-inline-start: -11px; }
.offer::after { inset-inline-end: -11px; }
.offer-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: #f5c451; color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cta .offer-name { margin: 8px 0 0; color: #fff; font-size: 1.05rem; font-weight: 600; }
.cta .offer-price { margin: 0; color: #fff; font-weight: 600; white-space: nowrap; }
.offer-price small { color: rgb(255 255 255 / .75); font-size: .85rem; font-weight: 400; }
.offer-price b { font-size: 2.4rem; line-height: 1; }
/* Saudi riyal sign (SAMA, 2025): inline SVG until fonts ship U+20C1. Glyph from @emran-alhaddad/saudi-riyal-font (OFL). */
.sar { height: 1.7rem; width: auto; fill: currentColor; vertical-align: -.05em; }
.btn-wa { background: #25d366; color: #0b3d22; gap: 10px; }
.btn-wa:hover { background: #1fbe5b; }
.btn-wa svg { width: 22px; height: 22px; }
.wa-fab {
  position: fixed; inset-inline-end: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / .2);
}
.wa-fab svg { width: 30px; height: 30px; }

/* Footer: mirrors nombur.com */
.site-foot { margin-top: 48px; background: #f5f7fa; color: #333; font-size: 1.05rem; }
.foot-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; max-width: 1200px; margin: 0 auto; padding: 48px 20px 32px; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand img { display: block; height: 34px; width: auto; margin-bottom: 20px; }
.foot-brand p { color: #000; line-height: 1.6; max-width: 360px; margin-bottom: 24px; }
.social { display: flex; gap: 6px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #000; transition: color .15s; }
.social a:hover { color: var(--green); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.foot-col h2 { font-size: 1.15rem; color: #000; margin-bottom: 14px; letter-spacing: 0; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-col a { color: #333; text-decoration: none; }
.foot-col a:hover { color: var(--green); }
.copy { max-width: 1200px; margin: 0 auto; padding: 24px 20px 88px; /* bottom room for the WhatsApp button */ border-top: 1px solid #c9cdd2; text-align: center; font-size: .9rem; font-weight: 600; color: #000; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Desktop */
@media (min-width: 900px) {
  .top { padding: 18px 40px; }
  .brand img { height: 26px; }
  main { padding-top: 56px; }
  .btn { width: auto; }
  main:has(#quiz:not([hidden])) { max-width: 1120px; }
  .quiz { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 48px; align-items: start; }
  .section-img { position: sticky; top: 24px; height: min(620px, calc(100vh - 48px)); margin: 0; }
  .q { display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 24px; padding: 18px 20px; }
  .q-text { margin: 0; }
  .details { max-width: 520px; margin: auto; padding: 36px 32px 28px; border-radius: var(--radius); }
  .details[open] { animation-name: pop-in; }
  @keyframes pop-in { from { transform: translateY(16px); opacity: 0; } }
  #lead-form .btn { width: 100%; }
  .score-card { flex-direction: row; text-align: start; gap: 32px; padding: 32px; }
  .bars { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .cta { padding: 36px; }
  .foot-inner { grid-template-columns: 1.4fr 1fr 1fr; padding: 72px 40px 48px; }
  .foot-brand { grid-column: auto; }
  .copy { padding-bottom: 32px; }
  .cta-actions { display: flex; flex-wrap: wrap; }
  .wa-fab { inset-inline-end: 28px; bottom: 28px; }
}
