/* Madar landing page. One idea carries it: the mark's four quarters are the product's modules around one centre. */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/plex-arabic-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/plex-arabic-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/plex-arabic-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027, U+2030-205E, U+20AC, U+2212; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/plex-arabic-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027, U+2030-205E, U+20AC, U+2212; }
@font-face { font-family: "Alexandria"; font-weight: 300 800; font-display: swap; src: url("../fonts/alexandria-arabic-wght-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Alexandria"; font-weight: 300 800; font-display: swap; src: url("../fonts/alexandria-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027, U+2030-205E, U+20AC, U+2212; }

:root {
    --night: #0e2a33;
    --night-2: #153a45;
    --petrol: #0f5f6b;
    --amber: #e8a33d;
    --paper: #f4f7f6;
    --ink: #15252b;
    --muted: #55666b;
    --line: #d7e0de;
    --on-night: #dbe7e8;
    --display: "Alexandria", "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Plex Arabic", "Segoe UI", Tahoma, sans-serif; font-size: 17px; line-height: 1.8; color: var(--ink); background: var(--paper); }
a { color: var(--petrol); }
h1, h2, h3 { font-family: var(--display); line-height: 1.4; margin: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; max-width: 22em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { inset-inline-start: .5rem; top: .5rem; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
main > section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-lead { color: var(--muted); max-width: 46em; margin-top: .6rem; }

/* Header */
.top { background: var(--night); color: #fff; }
.top-in { display: flex; align-items: center; gap: 1.5rem; padding-block: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: #fff; text-decoration: none; }
.top-nav { display: flex; gap: 1.4rem; margin-inline-start: auto; }
.top-nav a { color: var(--on-night); text-decoration: none; font-size: .95rem; }
.top-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .55rem 1.3rem; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-main { background: var(--amber); color: var(--night); }
.btn-main:hover { background: #f1b454; }
.btn-line { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-line:hover { border-color: #fff; }
.btn-quiet { border-color: rgba(255, 255, 255, .3); color: #fff; min-height: 40px; padding: .3rem 1rem; font-size: .92rem; }
.btn-quiet:hover { border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.actions form { margin: 0; }

/* Hero */
main > .hero { background: var(--night); color: #fff; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 800; line-height: 1.3; letter-spacing: 0; }
.lede { color: var(--on-night); font-size: 1.12rem; max-width: 34em; margin-top: 1.2rem; }
.hero-note { color: var(--on-night); font-size: .9rem; margin-top: 1rem; opacity: .85; }
/* The mark itself, enlarged: four modules around one centre. The lit quarter moves round. */
.ring-figure svg { display: block; width: 100%; max-width: 500px; margin-inline: auto; height: auto; }
.halo { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.5; stroke-dasharray: 2 9; }
.quarter circle { fill: none; stroke: var(--night-2); stroke-width: 96; stroke-dasharray: 226 800; stroke-dashoffset: -11.1; }
.quarter text { font-family: var(--display); font-weight: 600; font-size: 21px; fill: #fff; }
.quarter-1 circle { stroke: var(--amber); }
.quarter-1 text { fill: var(--night); }
.core { fill: #fff; }
.core-label { font-family: var(--display); font-weight: 700; font-size: 22px; fill: var(--night); }
@media (prefers-reduced-motion: no-preference) {
    .quarter circle { animation: lit 12s infinite; }
    .quarter text { animation: lit-text 12s infinite; }
    .quarter-2 circle, .quarter-2 text { animation-delay: 3s; }
    .quarter-3 circle, .quarter-3 text { animation-delay: 6s; }
    .quarter-4 circle, .quarter-4 text { animation-delay: 9s; }
    .quarter-1 circle, .quarter-2 circle, .quarter-3 circle, .quarter-4 circle { stroke: var(--night-2); }
    .quarter-1 text { fill: #fff; }
}
@keyframes lit { 0%, 22% { stroke: var(--amber); } 27%, 100% { stroke: var(--night-2); } }
@keyframes lit-text { 0%, 22% { fill: var(--night); } 27%, 100% { fill: #fff; } }

/* The path: a real sequence, so it is numbered */
.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { counter-increment: step; position: relative; padding: 2.4rem 1.25rem 0 1.25rem; border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; top: -1.05rem; inset-inline-start: 1.25rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--petrol); color: var(--petrol); font-family: var(--display); font-weight: 700; display: grid; place-items: center; line-height: 1; }
.steps li:last-child::before { background: var(--amber); border-color: var(--amber); color: var(--night); }
.steps p { color: var(--muted); font-size: .97rem; margin-top: .4rem; }

/* Modules: a reference list, not a wall of cards */
main > .modules { background: #fff; }
.module-list { margin: 2rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; }
.module-list > div { display: grid; grid-template-columns: 11.5rem 1fr; gap: 1rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.module-list dt { font-family: var(--display); font-weight: 600; color: var(--petrol); }
.module-list dd { margin: 0; color: var(--muted); font-size: .97rem; }

/* Screenshots */
.shot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.shot-grid figure { margin: 0; }
.shot-grid figure:first-child { grid-column: 1 / -1; }
.shot-grid img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(14, 42, 51, .45); }
.shot-grid figcaption { color: var(--muted); font-size: .93rem; margin-top: .6rem; }

/* Plans */
main > .plans { background: #fff; }
.plans-scroll { overflow-x: auto; margin-top: 2rem; }
.plans-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.plans-table th, .plans-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); text-align: center; }
.plans-table tbody th { text-align: start; font-weight: 400; }
.plans-table thead th { vertical-align: bottom; padding-bottom: 1.2rem; border-bottom: 2px solid var(--night); }
.plan-name { display: block; font-family: var(--display); font-weight: 600; color: var(--petrol); }
.plan-price { display: block; font-family: var(--display); font-weight: 800; font-size: 2.2rem; line-height: 1.3; direction: ltr; }
.plan-unit { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
.yes { color: var(--petrol); font-weight: 700; }
.no { color: #a3b1b3; }

/* FAQ */
.faq-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2.5rem; align-items: start; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 1rem 0; font-family: var(--display); font-weight: 600; list-style-position: outside; }
.faq-list details p { color: var(--muted); padding-bottom: 1.1rem; max-width: 42em; }

/* Close and footer */
main > .close { background: var(--night); color: #fff; }
.close h2 { max-width: 18em; }
.foot { background: var(--night); color: var(--on-night); border-top: 1px solid rgba(255, 255, 255, .12); font-size: .92rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 1.4rem; }
.foot a { color: #fff; }
.foot .brand { font-size: 1.05rem; }

@media (max-width: 860px) {
    .top-nav { display: none; }
    .top-in { justify-content: space-between; }
    .hero-in, .faq-in { grid-template-columns: minmax(0, 1fr); }
    .ring-figure svg { max-width: 360px; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
    .module-list { grid-template-columns: minmax(0, 1fr); }
    .shot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .module-list > div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
    .shot-grid { grid-template-columns: minmax(0, 1fr); }
    .actions .btn, .actions form, .actions form .btn { width: 100%; }
}
