@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url(fonts/archivo-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url(fonts/archivo-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format('woff2'); }

:root {
  --ink: #10443b;
  --teal: #086354;
  --mid: #2b8171;
  --light: #b6d5cc;
  --pale: #e4f0eb;
  --cream: #f6f4ec;
  --paper: rgba(255, 255, 255, 0.86);
  --line: rgba(16, 68, 59, 0.16);
  --muted: #4c6660;
  --amber: #d98a16;
  --alert: #d4402f;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --arabic: 'Plex Arabic', 'Geeza Pro', 'Noto Sans Arabic', Tahoma, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: fixed; left: 0; right: 0; pointer-events: none; z-index: 2; }
.shade.t { top: 0; height: 120px; background: linear-gradient(rgba(246,244,236,.82), rgba(246,244,236,0)); }
.shade.b { bottom: 0; height: 260px; background: linear-gradient(rgba(246,244,236,0), rgba(246,244,236,.78) 55%, rgba(246,244,236,.9)); }

/* top bar */
.top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 28px 14px; z-index: 5; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand .name { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.01em; color: var(--ink); line-height: 1; }
.brand .ar { font-family: var(--arabic); font-weight: 600; font-size: 22px; color: var(--mid); line-height: 1; }
.brand .sub { font-size: 15px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { border: 1.5px solid var(--line); background: var(--paper); backdrop-filter: blur(8px); border-radius: 999px; padding: 7px 13px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); min-height: 34px; transition: background .25s, color .25s, border-color .25s; }
.pill.done { background: var(--pale); border-color: transparent; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.progress { position: fixed; top: 66px; left: 28px; right: 28px; height: 3px; background: rgba(16, 68, 59, 0.1); border-radius: 3px; z-index: 5; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 3px; transition: width .2s linear; }

/* stage card, top left */
.card { position: fixed; top: 86px; left: 28px; width: min(340px, 34vw); background: var(--paper); backdrop-filter: blur(10px); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 18px 16px; z-index: 4; box-shadow: 0 10px 30px rgba(16, 68, 59, 0.08); transition: opacity .35s, transform .35s; }
.card.hide { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.card .k { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card .big { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.02; color: var(--ink); margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.card .big small { font-size: 20px; font-weight: 600; margin-left: 4px; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 16px; }
.card .row:first-of-type { border-top: 0; }
.card .row b { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .note { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.card .bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; align-items: end; height: 64px; margin: 10px 0 4px; }
.card .bars span { display: block; background: var(--mid); border-radius: 4px 4px 2px 2px; min-height: 3px; transition: height .25s, background .25s; }
.card .bars-x { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; font-size: 11px; color: var(--muted); text-align: center; }
.card svg.fc { width: 100%; height: 120px; display: block; margin-top: 8px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--pale); color: var(--teal); }
.tag.warn { background: #fde6e2; color: var(--alert); }
.tag.ok { background: var(--pale); color: var(--teal); }

/* real data box, top right */
.databox { position: fixed; top: 86px; right: 28px; width: 260px; display: flex; align-items: center; gap: 12px; background: var(--paper); backdrop-filter: blur(10px); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 12px 10px 14px; z-index: 4; text-decoration: none; box-shadow: 0 8px 24px rgba(16, 68, 59, 0.07); transition: transform .2s, box-shadow .2s; }
.databox:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(16, 68, 59, 0.12); }
.databox .n { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--teal); line-height: 1; }
.databox .t { font-size: 13.5px; line-height: 1.25; color: var(--ink); }
.databox .t b { display: block; font-weight: 700; }
.databox .go { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--teal); }

/* phone, right */
.phone { position: fixed; right: 28px; top: calc(86px + 62px + 14px); bottom: 96px; aspect-ratio: 9 / 19; max-height: 560px; z-index: 4; }
.phone .body { position: absolute; inset: 0; border-radius: 42px; background: #0f1513; padding: 9px; box-shadow: 0 24px 50px rgba(16, 40, 34, 0.32), inset 0 0 0 2px #2c3532; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: linear-gradient(165deg, #2f7f70 0%, #134a40 55%, #0d2f29 100%); color: #fff; }
.phone .island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 32%; height: 22px; background: #000; border-radius: 20px; z-index: 3; }
.phone .status { position: absolute; top: 12px; left: 22px; right: 20px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; z-index: 2; }
.phone .lock { position: absolute; top: 15%; left: 0; right: 0; text-align: center; }
.phone .lock .d { font-size: 14px; font-weight: 600; opacity: .85; }
.phone .lock .clock { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 6.4vh, 64px); letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.phone .loc { position: absolute; bottom: 9%; left: 0; right: 0; text-align: center; font-size: 12.5px; opacity: .8; }
.phone .loc b { display: block; font-size: 14px; opacity: 1; }
.phone .alert { position: absolute; left: 10px; right: 10px; top: 33%; background: rgba(245, 245, 247, 0.96); color: #111; border-radius: 22px; padding: 14px 14px 12px; transform: translateY(16px) scale(.96); opacity: 0; transition: opacity .4s, transform .4s; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.phone.alerted .alert { opacity: 1; transform: none; }
.phone.alerted .loc { opacity: 0; }
.phone .alert .h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--alert); }
.phone .alert .h svg { width: 18px; height: 18px; }
.phone .alert .h span:last-child { margin-left: auto; color: #6b6b70; font-weight: 600; text-transform: none; }
.phone .alert .ar { font-family: var(--arabic); direction: rtl; text-align: right; font-size: 13.5px; line-height: 1.55; margin-top: 8px; font-weight: 600; }
.phone .alert .en { font-size: 13px; line-height: 1.35; margin-top: 6px; color: #222; }
.phone .alert .ok { margin-top: 10px; border-top: 1px solid #d8d8dc; padding-top: 8px; text-align: center; font-weight: 700; color: #0a64d8; font-size: 14px; }
.phone.alerted .body { animation: buzz .5s ease-in-out 3; }
.phone.alerted .screen::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px rgba(212, 64, 47, .75); border-radius: 34px; animation: glow 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes buzz { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-3px) rotate(-.6deg); } 40% { transform: translateX(3px) rotate(.6deg); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
@keyframes glow { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.phone .cap { position: absolute; left: 0; right: 0; bottom: -28px; text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }

/* labels on the 3D scene */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.lbl { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); background: rgba(255,255,255,.92); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px; transition: opacity .3s; }
.lbl.warn { color: #fff; background: var(--alert); border-color: var(--alert); }
.lbl.storm { color: #fff; background: #4d5a63; border-color: #4d5a63; }
.lbl.hide { opacity: 0; }

/* bottom */
.bottom { position: fixed; left: 28px; right: 28px; bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; z-index: 5; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.caption { max-width: min(640px, 52vw); }
.caption h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.1vw, 44px); line-height: 1.06; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.caption p { margin-top: 8px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.4; color: #24453e; max-width: 560px; }
.caption .chip { display: inline-block; font-size: 13px; font-weight: 700; color: var(--teal); background: var(--pale); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.controls .btns { display: flex; gap: 8px; }
.btn { border: 1.5px solid var(--ink); background: rgba(255,255,255,.9); border-radius: 12px; padding: 9px 16px; font-family: var(--display); font-weight: 600; font-size: 14px; min-height: 44px; min-width: 44px; }
.btn.primary { background: var(--ink); color: #fff; min-width: 92px; }
.btn:focus-visible, .pill:focus-visible, .databox:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.keys { font-size: 12px; color: var(--muted); }

/* end card */
.endcard { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -54%) scale(.97); width: min(620px, 92vw); background: rgba(255,255,255,.95); border: 1.5px solid var(--line); border-radius: 26px; padding: 30px 32px 28px; z-index: 6; box-shadow: 0 30px 70px rgba(16,68,59,.18); opacity: 0; pointer-events: none; transition: opacity .45s, transform .45s; text-align: center; }
.endcard.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -54%); }
.endcard .k { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mid); }
.endcard h2 { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.1; margin: 8px 0 18px; }
.endcard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.endcard .stat { background: var(--pale); border-radius: 16px; padding: 14px 10px; }
.endcard .stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--teal); line-height: 1.05; }
.endcard .stat span { font-size: 14px; line-height: 1.3; display: block; margin-top: 4px; }
.endcard .cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 14px; padding: 13px 22px; font-family: var(--display); font-weight: 800; font-size: 16px; min-height: 48px; }

/* phones and small windows */
.toast { display: none; }
@media (max-width: 900px) {
  .phone { display: none; }
  .databox { top: auto; bottom: 150px; right: 16px; width: auto; max-width: 220px; padding: 8px 10px; }
  .databox .n { font-size: 22px; }
  .toast { display: block; position: fixed; left: 12px; right: 12px; top: 112px; z-index: 6; background: rgba(245,245,247,.97); color: #111; border-radius: 18px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); transform: translateY(-12px); opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; }
  .toast.show { opacity: 1; transform: none; }
  .toast .h { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--alert); }
  .toast .ar { font-family: var(--arabic); direction: rtl; text-align: right; font-size: 13px; margin-top: 4px; font-weight: 600; }
  .toast .en { font-size: 13px; margin-top: 3px; line-height: 1.3; }
}
@media (max-width: 700px) {
  .top { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px 8px; }
  .brand .sub { display: none; }
  .pills { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; padding: 6px 11px; font-size: 12px; }
  .progress { top: 98px; left: 16px; right: 16px; }
  .card { top: 110px; left: 16px; width: calc(100% - 32px); padding: 12px 14px; }
  .card .big { font-size: 34px; }
  .card svg.fc { height: 86px; }
  .card .bars { height: 40px; }
  .toast { top: 112px; }
  .bottom { left: 16px; right: 16px; bottom: 12px; flex-direction: column; align-items: stretch; gap: 10px; }
  .caption { max-width: none; }
  .caption p { font-size: 14.5px; }
  .controls { align-items: stretch; }
  .controls .btns { justify-content: space-between; }
  .btn { padding: 8px 10px; flex: 1; }
  .btn.fs, .keys { display: none; }
  .databox { top: 12px; bottom: auto; right: 16px; padding: 6px 10px; border-radius: 999px; gap: 6px; }
  .databox .n, .databox .t span { display: none; }
  .databox .t b { font-size: 13px; }
  .databox .go { font-size: 15px; }
  .endcard { padding: 22px 18px; }
  .endcard h2 { font-size: 26px; }
  .endcard .stat b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .phone.alerted .body { animation: none; } }

/* site navigation shared by every page (added 27 Nov 2026) */
.sitenav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sitenav a { font-family: var(--display); font-weight: 600; font-size: 14.5px; text-decoration: none; padding: 8px 14px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; color: var(--ink); }
.sitenav a:hover { background: var(--pale); }
.sitenav a[aria-current=page] { background: var(--ink); color: #fff; }
.sitenav a:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.drivebox { position: fixed; top: 86px; right: 300px; width: 260px; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; z-index: 4; text-decoration: none; box-shadow: 0 8px 24px rgba(16, 68, 59, 0.18); transition: transform .2s; }
.drivebox:hover { transform: translateY(-1px); }
.drivebox .t { font-size: 13.5px; line-height: 1.25; }
.drivebox .t b { display: block; font-family: var(--display); font-weight: 800; font-size: 16px; }
.drivebox .go { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 18px; }
@media (max-width: 980px) { .drivebox { display: none; } }
