/* Mizan website. One family (Readex Pro, Latin + Arabic), the app's cream and forest green,
   and the four score colours as the only accents. */
:root {
  --cream: #F6F1E4;
  --paper: #FFFDF7;
  --sand: #EDE6D3;
  --line: #E0D8C4;
  --forest: #1F5F46;
  --forest-deep: #164634;
  --mint: #DCE8DF;
  --ink: #17251F;
  --muted: #5E6862;
  --excellent: #1E9E57;
  --good: #7FAE2E;
  --poor: #E0821C;
  --bad: #D2412F;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: 'HEXP' 0;
}
[dir='rtl'] body { line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: var(--forest); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.015em; }
[dir='rtl'] h1, [dir='rtl'] h2, [dir='rtl'] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--paper); padding: 8px 14px; z-index: 10; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--cream) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.2rem; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 400; }
.nav a:hover { color: var(--forest); }
.lang { font-size: 0.95rem; text-decoration: none; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 99px; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--forest); color: var(--cream); text-decoration: none; font-weight: 500; padding: 14px 24px; border-radius: 99px; border: 0; font: inherit; cursor: pointer; }
.btn:hover { background: var(--forest-deep); }
.btn.ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--forest); }
.btn.ghost:hover { background: var(--mint); }
.top .btn { padding: 10px 18px; font-size: 0.95rem; }
@media (max-width: 860px) { .nav { display: none; } .top .lang { margin-inline-start: auto; } }

/* Hero: the balance */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); font-weight: 600; }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); margin-top: 22px; max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .soon { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.scale { background: var(--paper); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(31, 95, 70, 0.45); }
.scale-art { width: 100%; height: auto; overflow: visible; }
.scale-art .tilt { transform-box: view-box; transform-origin: 200px 64px; transform: rotate(var(--tilt, 0deg)); transition: transform 1.2s cubic-bezier(.3, 1.4, .5, 1); }
.scale-art .hang { transform-box: view-box; transition: transform 1.2s cubic-bezier(.3, 1.4, .5, 1); }
.scale-art .hang.l { transform-origin: 46px 64px; transform: rotate(calc(var(--tilt, 0deg) * -1)); }
.scale-art .hang.r { transform-origin: 354px 64px; transform: rotate(calc(var(--tilt, 0deg) * -1)); }
.scale-art .load { transition: fill .6s; }
.readout { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 10px; }
.ring { --v: 0; --c: var(--neutral, #B9B29F); width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--paper) 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--v) * 1%), var(--sand) 0); transition: --v 1s; }
.ring b { font-size: 1.7rem; font-weight: 600; line-height: 1; }
.ring small { display: block; font-size: 0.7rem; color: var(--muted); text-align: center; }
.readout .name { font-weight: 500; }
.readout .verdict { font-size: 1.3rem; font-weight: 600; }
.readout .why { color: var(--muted); font-size: 0.92rem; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.picker button { font: inherit; font-size: 0.88rem; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.picker button[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@property --v { syntax: '<number>'; inherits: false; initial-value: 0; }

/* Sections */
section { padding-block: clamp(64px, 9vw, 120px); }
.band { background: var(--paper); }
.band.dark { background: var(--forest); color: var(--cream); }
.band.dark a:not(.btn) { color: var(--cream); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }
.dark .section-head p, .dark .muted { color: #C7D8CE; }

/* Independence */
.pledges { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2px; background: rgba(246, 241, 228, 0.18); border-radius: var(--radius-lg); overflow: hidden; }
.pledge { background: var(--forest); padding: 28px 26px 32px; }
.pledge h3 { font-size: 1.25rem; margin-bottom: 10px; }
.pledge p { color: #C7D8CE; font-size: 0.98rem; }
.pledge svg { width: 30px; height: 30px; margin-bottom: 18px; color: var(--cream); }
.funding { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; }
.funding strong { font-weight: 500; }

/* Steps: scan, score, swap (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: var(--cream); font-weight: 600; margin-bottom: 18px; }
.steps h3 { font-size: 1.35rem; margin-bottom: 8px; }
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Score explained */
.score-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 860px) { .score-grid { grid-template-columns: 1fr; } }
.split { display: flex; height: 64px; border-radius: 16px; overflow: hidden; font-weight: 500; font-size: 0.95rem; }
.split div { display: flex; align-items: center; padding-inline: 16px; color: var(--paper); }
.split .n { flex: 60; background: var(--forest); }
.split .a { flex: 30; background: #4C8A6E; }
.split .o { flex: 10; background: var(--good); padding-inline: 8px; justify-content: center; }
.split-key { display: grid; gap: 14px; margin-top: 24px; }
.split-key p { color: var(--muted); }
.split-key strong { color: var(--ink); font-weight: 500; }
.bands { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bands li { display: flex; align-items: center; gap: 14px; background: var(--cream); border-radius: var(--radius-sm); padding: 14px 18px; }
.bands .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.bands .range { margin-inline-start: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }

/* Gulf features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--paper); border-radius: 22px; padding: 26px; }
.feature.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: var(--forest); color: var(--cream); }
.feature.wide p { color: #C7D8CE; }
@media (max-width: 760px) { .feature.wide { grid-template-columns: 1fr; } }
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { color: var(--muted); }
.ar-sample { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; line-height: 1.5; direction: rtl; text-align: right; }
[dir='rtl'] .ar-sample { direction: ltr; text-align: left; }

/* Mission */
.mission { max-width: 760px; }
.mission p { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.5; font-weight: 300; }
.mission p + p { margin-top: 22px; }
[dir='rtl'] .mission p { line-height: 1.8; }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.person { background: var(--paper); border-radius: 22px; padding: 24px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--forest); color: var(--cream); display: grid; place-items: center; font-size: 1.6rem; font-weight: 600; margin-bottom: 18px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.15rem; }
.person .role { color: var(--forest); font-weight: 500; font-size: 0.95rem; margin: 2px 0 10px; }
.person p { color: var(--muted); font-size: 0.97rem; }
.person.open { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.person.open .avatar { background: var(--sand); color: var(--forest); }
.story { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.story h3 { font-size: 1.35rem; }
.story div p + p { margin-top: 14px; }
.story div p { color: var(--muted); max-width: 64ch; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; gap: 12px; } }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 500; font-size: 1.08rem; display: flex; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-inline-start: auto; font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--forest); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 66ch; }

/* Call to action + footer */
.cta { text-align: start; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 18ch; }
.cta .btn { background: var(--cream); color: var(--forest); }
.cta .btn:hover { background: var(--mint); }
footer { padding-block: 56px 40px; font-size: 0.95rem; }
footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
footer h4 { font-size: 0.95rem; font-weight: 600; margin: 0 0 10px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: var(--forest); text-decoration: underline; }
footer .fine { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr; } footer .cols > :first-child { grid-column: 1 / -1; } }

/* Legal page */
.doc { max-width: 760px; padding-block: 56px 96px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.doc .updated { color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.doc p, .doc li { color: #3A4741; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-inline-start: 22px; display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scale-art .tilt, .scale-art .hang, .ring { transition: none; }
}
@media (max-width: 520px) {
  .split { font-size: 0.78rem; height: 56px; }
  .split div { padding-inline: 10px; line-height: 1.2; }
}
