/* Tibyan Labs. Lapis and gold, after illuminated manuscripts. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Reem Kufi";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/reem-kufi-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Reem Kufi";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/reem-kufi-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Reem Kufi";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/reem-kufi-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f5f7fb;
  --ink: #141a2a;
  --mist: #556079;
  --lapis: #1e3a8a;
  --lapis-hover: #162c6b;
  --on-lapis: #f5f7fb;
  --gold: #b08328;
  --gold-text: #87610f;
  --rule: #dce1ec;
  --hero-word: #1e3a8a;
  --measure: 38rem;
  --display: "Reem Kufi", "Geeza Pro", "Noto Kufi Arabic", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1633;
    --ink: #e8ecf5;
    --mist: #a4aeca;
    --lapis: #afc1ff;
    --lapis-hover: #cbd6ff;
    --on-lapis: #0d1633;
    --gold: #d8b25a;
    --gold-text: #d8b25a;
    --rule: #25315c;
    --hero-word: #d8b25a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--lapis);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--lapis-hover); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.5rem 1rem;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }

.mark-star {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linejoin: round;
}
.mark-dot { fill: var(--lapis); }

.site-nav a { font-weight: 600; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 24ch;
  font-size: clamp(1.6rem, 3.1vw, 2.35rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.lede {
  margin: 0 0 2rem;
  max-width: var(--measure);
  color: var(--mist);
}

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 0.4rem;
  background: var(--lapis);
  color: var(--on-lapis);
  font-weight: 650;
  text-decoration: none;
}
.button:hover {
  background: var(--lapis-hover);
  color: var(--on-lapis);
}

.name {
  margin: 0;
  text-align: right;
}

.name-word {
  display: block;
  padding-block: 0.05em;
  font-family: var(--display);
  font-size: clamp(6rem, 19vw, 15rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--hero-word);
  /* Revealed right to left, the direction Arabic is written. */
  animation: write 1.3s cubic-bezier(0.22, 0.7, 0.2, 1) 0.15s both;
}

.name-gloss {
  display: block;
  margin-top: 0.25rem;
  color: var(--mist);
  animation: fade 0.6s ease-out 1.2s both;
}

.translit {
  font-family: var(--display);
  font-size: 1.15em;
  color: var(--ink);
}

@keyframes write {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.section h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--lapis);
}

.section-body > p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}
.section-body > p:last-child { margin-bottom: 0; }

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product { padding-inline-end: 2rem; }
.product + .product {
  padding-inline: 2rem 0;
  border-inline-start: 1px solid var(--rule);
}

.product h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.3;
}

.product p { margin: 0 0 0.75rem; }

.product .status {
  margin: 0;
  color: var(--gold-text);
  font-size: 0.95rem;
  font-weight: 650;
}

.services {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.services li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 0.4rem;
}
.services li::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.email {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--mist);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.legal { max-width: 40rem; }

/* Long-form pages: privacy notice, 404 */

.doc {
  max-width: 44rem;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}
.doc h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--lapis);
}
.doc h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.3;
}
.doc p, .doc ul { margin: 0 0 1rem; }
.doc li { margin-bottom: 0.4rem; }
.updated { color: var(--mist); }

/* Small screens */

@media (max-width: 46rem) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .name { order: -1; text-align: left; }

  .section { grid-template-columns: minmax(0, 1fr); }

  .products { grid-template-columns: minmax(0, 1fr); }
  .product { padding-inline-end: 0; }
  .product + .product {
    margin-top: 1.75rem;
    padding: 1.75rem 0 0;
    border-inline-start: 0;
    border-top: 1px solid var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  .name-word, .name-gloss { animation: none; }
}
