/* Tiraz Works · coming soon. Option 03 "The Woven Screen" on one screen: a single nuqta at the centre, two linen rules
   shoot out of it to the edges, then the band opens like a curtain and the promise is woven between the rules.
   The default CSS is the finished state; the motion plays once on load only when motion is allowed. No JavaScript. */
@font-face { font-family: "Noto Kufi Arabic"; font-weight: 600; font-display: swap; src: url(fonts/noto-kufi-arabic-600-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-400-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 600; font-display: swap; src: url(fonts/ibm-plex-sans-var-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400-latin.woff2) format("woff2"); }

:root {
  --ink: #1F2A44; --orange: #E0561B; --linen: #F5F1EA; --dim: rgba(245, 241, 234, .74); --faint: rgba(245, 241, 234, .5);
  --f-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, sans-serif;
  --f-kufi: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --f-en: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--ink); color: var(--linen);
  font-family: var(--f-ar); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
[lang="en"] { font-family: var(--f-en); }

.top { display: flex; justify-content: center; padding-block: clamp(8px, 2vh, 24px); }
.top img { height: clamp(32px, 4.4vh, 44px); width: auto; display: block; }

/* the woven band: full-bleed rules, the promise between them */
.weave { position: relative; align-self: center; margin-inline: calc(-1 * max(20px, env(safe-area-inset-left))); padding-block: clamp(36px, 7vh, 72px); }
.rule { position: absolute; inset-inline: 0; height: 2px; background: var(--linen); transform-origin: 50% 50%; }
.rule-t { top: 0; } .rule-b { top: calc(100% - 2px); }
.pair {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: clamp(20px, 4vw, 64px);
  max-width: 1240px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px);
}
.side { display: grid; gap: clamp(10px, 1.6vh, 18px); }
.side[lang="ar"] { text-align: right; }
.side[lang="en"] { text-align: left; }
.promise { font-weight: 600; color: var(--linen); text-wrap: balance; }
.side[lang="ar"] .promise { font-family: var(--f-kufi); font-size: clamp(28px, 4.4vw, 68px); line-height: 1.4; }
.side[lang="en"] .promise { font-family: var(--f-en); font-size: clamp(26px, 4.1vw, 62px); line-height: 1.12; letter-spacing: -.015em; }
.line { color: var(--dim); max-width: 30em; }
.side[lang="ar"] .line { font-size: clamp(15px, 1.35vw, 20px); line-height: 1.7; margin-inline-start: auto; }
.side[lang="en"] .line { font-size: clamp(14px, 1.2vw, 18px); line-height: 1.5; }
.nq { width: clamp(16px, 1.8vw, 26px); aspect-ratio: 1; background: var(--orange); transform: rotate(45deg); }

.foot { display: grid; justify-items: center; gap: 14px; padding-block: clamp(12px, 3vh, 32px) 0; text-align: center; }
.soon { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.soon [lang="ar"] { font-size: clamp(17px, 1.5vw, 21px); font-weight: 400; }
.soon [lang="en"] { font-family: var(--f-mono); font-size: clamp(12px, 1vw, 14px); letter-spacing: .14em; text-transform: uppercase; }
.soon .dot { width: 6px; height: 6px; background: var(--faint); transform: rotate(45deg); }
.meta { font-family: var(--f-mono); font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.meta a { text-decoration: none; border-bottom: 1px solid var(--faint); padding-bottom: 1px; }
.meta a:hover { color: var(--linen); border-color: var(--orange); }

@media (max-width: 640px) {
  .pair { column-gap: 14px; padding-inline: 16px; }
  .side[lang="ar"] .promise { font-size: clamp(22px, 7vw, 30px); }
  .side[lang="en"] .promise { font-size: clamp(20px, 6.4vw, 28px); }
  .line { display: none; }
  .nq { width: 12px; }
  .weave { padding-block: 32px; }
}

/* the motion: once, on load, and only when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
  .nq { animation: cs-nq .6s var(--ease) .15s both; }
  .rule-t { animation: cs-rt 2.1s var(--ease) .35s both; }
  .rule-b { animation: cs-rb 2.1s var(--ease) .35s both; }
  .side { animation: cs-open 1.2s var(--ease) 1.25s both; }
  .top, .foot { animation: cs-fade .9s ease-out 2s both; }
}
@keyframes cs-nq { from { opacity: 0; transform: rotate(0deg) scale(.2); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
/* the rules are drawn out of the nuqta at the centre line, then part to open the band */
@keyframes cs-rt { 0% { top: calc(50% - 1px); transform: scaleX(0); } 42% { top: calc(50% - 1px); transform: scaleX(1); } 100% { top: 0; transform: scaleX(1); } }
@keyframes cs-rb { 0% { top: calc(50% - 1px); transform: scaleX(0); } 42% { top: calc(50% - 1px); transform: scaleX(1); } 100% { top: calc(100% - 2px); transform: scaleX(1); } }
@keyframes cs-open { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
