/* The Index: one quiet word in every header (and, on the home page, top right once the opening has passed) that
   opens every product full screen, each with its point in its colour, as on the home page. It stands in for a header
   bar (iShatat, 2026-10-29). Its own colours and type, so it looks the same over every product's page. */
@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

/* the word that opens it, beside a product's own header link */
.bar-end { display: flex; align-items: center; gap: 30px; }
.doc-bar { display: flex; align-items: center; justify-content: space-between; }
.doc-bar .index-open, .index-float {
  position: relative; color: rgba(241, 240, 236, .64); font: 500 11px/1 "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 125%; letter-spacing: .26em; text-transform: uppercase; text-decoration: none; transition: color .3s;
}
.doc-bar .index-open:hover, .index-float:hover { color: #F1F0EC; }
.doc-bar .index-open::after, .index-float::after { content: ''; position: absolute; inset: -12px -8px; }
/* home: it waits for the opening to pass, then comes in */
.index-float {
  position: fixed; z-index: 40; top: 26px; right: clamp(20px, 5vw, 80px);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .5s cubic-bezier(.65, 0, .25, 1), transform .5s cubic-bezier(.65, 0, .25, 1), visibility 0s .5s, color .3s;
}
.si-float-on .index-float { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
html:not(.js) .index-float { display: none; }

/* the Index itself */
.si-locked, .si-locked body { overflow: hidden; }
.site-index {
  --ink: #F1F0EC; --ink-2: rgba(241, 240, 236, .64); --ink-3: rgba(241, 240, 236, .36); --hair: rgba(241, 240, 236, .12);
  --ease: cubic-bezier(.65, 0, .25, 1); --gutter: clamp(20px, 5vw, 80px);
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(14, 15, 17, .97); color: var(--ink);
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; text-align: left;
  opacity: 0; transition: opacity .45s var(--ease);
}
@supports (backdrop-filter: blur(1px)) { .site-index { background: rgba(14, 15, 17, .9); backdrop-filter: blur(18px); } }
.site-index.on { opacity: 1; }
.site-index[hidden] { display: none; }
.si-top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }
.si-home { display: block; width: 34px; color: var(--ink); }
.si-home svg { display: block; width: 100%; height: auto; }
.si-close {
  position: relative; appearance: none; border: 0; padding: 0; background: none; color: var(--ink-2); cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1; font-stretch: 125%; letter-spacing: .26em; text-transform: uppercase; transition: color .3s;
}
.si-close:hover { color: var(--ink); }
.si-close::after { content: ''; position: absolute; inset: -14px -10px; }
.site-index :focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; border-radius: 2px; }

.si-list { flex: 1; display: grid; align-content: center; margin: 0; padding: 4vh 0; list-style: none; }
.si-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); align-items: end; gap: 6px 32px; padding-block: 14px; border-bottom: 1px solid var(--hair); }
.si-list li:first-child { border-top: 1px solid var(--hair); }
.si-list a, .si-link { display: inline-flex; align-items: baseline; justify-self: start; color: var(--ink); text-decoration: none; overflow: hidden; }
.si-name {
  display: block; font-size: clamp(40px, 6vw, 92px); font-weight: 400; font-stretch: 125%; letter-spacing: .01em; line-height: 1;
  text-transform: uppercase; transform: translateY(105%); transition: transform .7s var(--ease), color .35s;
  transition-delay: calc(.06s + var(--n) * .06s);
}
.si-pt {
  display: inline-block; width: .15em; height: .15em; margin-inline-start: .07em; border-radius: 50%; background: var(--c);
  transform: scale(0); transition: transform .5s var(--ease);
  transition-delay: calc(.38s + var(--n) * .06s);
}
.si-q { padding-bottom: .5em; color: var(--ink-2); font-size: clamp(15px, 1.2vw, 18px); opacity: 0; transition: opacity .6s var(--ease); transition-delay: calc(.3s + var(--n) * .06s); }
.on .si-name, .on .si-pt { transform: none; }
.on .si-q { opacity: 1; }
.si-soon .si-name { color: var(--ink-3); }
/* one at a time: the others step back while a product is pointed at */
@media (hover: hover) {
  .si-list:has(a:hover) li:not(:has(a:hover)) .si-name { color: var(--ink-3); }
  .si-list a:hover .si-pt { transform: scale(1.5); transition-delay: 0s; }
}
.si-more { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; padding-top: 22px; color: var(--ink-2); font-size: 14px; }
.si-more a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink-3); transition: border-color .3s; }
.si-more a:hover { border-color: var(--ink); }

/* in Arabic (src/parts/site-index-ar.html): right to left, Arabic words in IBM Plex Sans Arabic and never spaced out;
   Latin product names keep their own direction, so the point follows the name */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("athar/fonts/ibm-plex-sans-arabic-300-arabic.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
.site-index:lang(ar) { text-align: right; }
.site-index :lang(ar) { font-family: "IBM Plex Sans Arabic", "Mona Sans", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.site-index .si-close:lang(ar) { font-size: 15px; font-weight: 300; font-stretch: 100%; }
.site-index .si-name:lang(ar) { font-weight: 300; font-stretch: 100%; line-height: 1.25; }
.doc-bar .index-open:lang(ar) { font-family: "IBM Plex Sans Arabic", "Mona Sans", sans-serif; font-size: 15px; font-weight: 300; font-stretch: 100%; letter-spacing: 0; }

@media (max-width: 760px) {
  .si-list li { grid-template-columns: minmax(0, 1fr); align-items: start; padding-block: 16px; }
  .si-q { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-index, .si-name, .si-pt, .si-q, .index-float { transition: none !important; }
}
