/* hadid7.org: palette and type from the Forged design reference (Spiresen/Hadid/Forged-html). */

@font-face {
  font-family: "Archivo";
  src: url(fonts/archivo-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Archivo";
  src: url(fonts/archivo-latin-ext.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Amiri Quran";
  src: url(fonts/amiri-quran-arabic.woff2) format("woff2");
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --ground: #0B110F;
  --rule: #22302B;
  --text: #8E9A94;
  --faint: #5E6B65;
  --ink: #E8EBE6;
  --iron: #6A9784;
  --lattice: 0.1;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #E8EBE6;
    --rule: #C9D0CB;
    --text: #4A5752;
    --faint: #5E6B65;
    --ink: #0E1513;
    --iron: #2E5244;
    --lattice: 0.09;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.6 "Archivo", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The lattice: eight-point stars, strongest at the edges and gone behind the text. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url(brand/pattern.svg) center / 80px 80px;
  opacity: var(--lattice);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 45%, #000 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 45%, #000 100%);
}

main {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

h1 { margin: 0; line-height: 0; }

.mark { width: min(440px, 82vw); height: auto; }
.mark .word { fill: var(--ink); }
.mark .seven { fill: var(--iron); }

/* Rule with a khatam at its centre. */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(240px, 60vw);
  margin: 56px 0 44px;
  color: var(--iron);
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.divider svg { width: 14px; height: 14px; flex: none; }

blockquote { margin: 0; }

.ayah {
  margin: 0;
  font: 400 clamp(22px, 4.6vw, 30px) / 2.15 "Amiri Quran", "Amiri", serif;
  color: var(--ink);
}

.meaning {
  margin: 22px auto 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.75;
}

.cite {
  display: block;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.name {
  margin: 48px 0 0;
  font-size: 13px;
  color: var(--faint);
}

nav { margin-top: 56px; }

nav a {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease;
}
nav a:hover { border-color: var(--iron); }
nav a:focus-visible { outline: 2px solid var(--iron); outline-offset: 3px; }
nav .title { font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }
nav .host { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

footer {
  margin-top: 72px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  nav a { transition: none; }
}
