/* Latin subsets of the variable Bricolage Grotesque (weight 200-800, width 75-100). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  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: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  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: "Amiri Quran";
  src: url("/fonts/amiri-quran-arabic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --page: #eceff1;
  --ink: #0f1a20;
  --muted: #526069;
  --line: #c5cdd2;

  --elpia: #107f59;
  --elpia-soft: #ddf1e7;
  --elpia-spark: #f0a531;

  --elifba: #131f18;
  --elifba-gold: #f2a900;
  --elifba-text: #dbe8e0;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 1.5rem;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
}
.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark span { color: var(--muted); font-weight: 400; }

.lang { display: flex; gap: 0.25rem; }
.lang button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
.lang button:hover:not([aria-pressed="true"]) { border-color: var(--ink); color: var(--ink); }

/* Intro */
.intro { padding: clamp(2.5rem, 9vw, 7rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem); }
.intro h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(3rem, 11.5vw, 9.5rem);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.intro p { max-width: 36rem; margin: 0; font-size: 1.25rem; color: var(--muted); }

/* App bands */
.apps { display: grid; gap: 0; }

.app {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter);
  overflow: hidden;
}
.app-text { max-width: 34rem; position: relative; z-index: 1; }
.app h2 {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.app h2 a { text-decoration: none; }
/* The whole band is clickable through the heading link. */
.app h2 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.app p { margin: 0 0 1rem; }
.app .lead { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.app .go { margin: 1.5rem 0 0; font-weight: 700; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; }
.app:hover .go, .app:focus-within .go { text-decoration-thickness: 4px; }
.app:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: -6px; }
.app a:focus-visible { outline: none; }

.app-art { position: relative; min-height: 14rem; }

/* Elpia: a drop, a smaller drop and a spark */
.elpia { background: var(--elpia); color: #fff; }
.elpia h2 a { color: #fff; }
.drop {
  position: absolute;
  right: 8%;
  top: 50%;
  width: clamp(11rem, 26vw, 20rem);
  aspect-ratio: 1;
  background: var(--elpia-soft);
  border-radius: 0 50% 50% 50%;
  transform: translateY(-50%) rotate(45deg);
}
.drop.small {
  right: 34%;
  top: 74%;
  width: clamp(3.5rem, 8vw, 6rem);
  background: #0b5e40;
}
.spark {
  position: absolute;
  right: 4%;
  top: 14%;
  width: clamp(2rem, 4.5vw, 3.5rem);
  aspect-ratio: 1;
  background: var(--elpia-spark);
  border-radius: 50%;
}

/* elifba: gold Arabic letters on dark green */
.elifba { background: var(--elifba); color: var(--elifba-text); }
.elifba h2 a { color: var(--elifba-gold); }
.app-art[lang="ar"] { display: flex; justify-content: flex-start; align-items: center; gap: clamp(0.5rem, 3vw, 2rem); }
.letter {
  font-family: "Amiri Quran", serif;
  font-size: clamp(6rem, 17vw, 13rem);
  line-height: 1;
  color: var(--elifba-gold);
}
.letter.l2 { color: var(--elifba-text); opacity: 0.85; }
.letter.l3 { color: var(--elifba-gold); opacity: 0.45; }

footer { padding: 2rem var(--gutter) 3rem; color: var(--muted); font-size: 0.95rem; }
footer p { margin: 0; }

@media (min-width: 52rem) {
  .app { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .app-art { min-height: 20rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .drop { animation: settle 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  @keyframes settle {
    from { transform: translateY(-140%) rotate(45deg); opacity: 0; }
    to { transform: translateY(-50%) rotate(45deg); opacity: 1; }
  }
}
