@font-face {
  font-family: "Alexandria";
  src: url("/assets/fonts/alexandria.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* A wooden roshan on a coral-stone wall. Text colours keep at least 4.5:1 on --stone. */
:root {
  --stone: #EFEAE2;
  --line: #DDD5C8;
  --ink: #2B1D14;
  --ink-soft: #5E4D40;
  --wood: #5C3B22;
  --wood-deep: #3F2817;
  --gutter: clamp(20px, 5vw, 64px);
  --font: "Alexandria", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 350;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
}

.site-header,
.hero,
.site-footer {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 6px;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-word {
  width: auto;
  height: 38px;
}

.brand-word-en {
  height: 25px;
}

.lang {
  padding-block: 4px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.lang:hover {
  border-bottom-color: var(--ink);
}

/* Hero */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  padding-block: clamp(24px, 4vh, 72px);
}

.hero-text {
  max-width: 640px;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 1.3rem + 3.9vw, 5rem);
  font-weight: 600;
  line-height: 1.3;
}

/* Each clause of the headline gets its own line. */
.clause {
  display: block;
}

.lead {
  max-width: 32ch;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.8;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: clamp(2rem, 5vh, 3.25rem);
}

.email {
  color: var(--wood);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  font-weight: 500;
  text-decoration: underline 1px;
  text-decoration-color: rgb(92 59 34 / 0.4);
  text-underline-offset: 0.3em;
  unicode-bidi: isolate;
}

.email:hover {
  text-decoration-color: currentColor;
}

.copy {
  padding: 0.45em 1.15em;
  color: var(--wood);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 450;
  background: transparent;
  border: 1px solid rgb(92 59 34 / 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.copy:hover,
.copy.is-done {
  color: var(--stone);
  background: var(--wood);
  border-color: var(--wood);
}

.copy[hidden] {
  display: none;
}

:focus-visible {
  outline: 3px solid var(--wood-deep);
  outline-offset: 4px;
}

/* The roshan photo */

.roshan {
  display: grid;
  justify-self: center;
  margin: 0;
}

.roshan img {
  width: auto;
  max-width: 100%;
  height: min(60vh, 600px);
  height: min(60svh, 600px);
  /* In a column narrower than the photo, crop its sides instead of squeezing it. */
  object-fit: cover;
  background: var(--line);
  border-radius: 2px;
  box-shadow: -12px 18px 30px rgb(43 29 20 / 0.22);
}

.roshan figcaption {
  /* As wide as the photo, without making the figure any wider. */
  contain: inline-size;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.8;
  text-wrap: balance;
}

/* The photo is CC BY 4.0: this credit must stay on the page. */
.credit {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.credit a,
.credit bdi {
  white-space: nowrap;
}

.credit a {
  color: var(--wood);
  text-decoration: underline 1px;
  text-decoration-color: rgb(92 59 34 / 0.4);
  text-underline-offset: 0.25em;
}

.credit a:hover {
  text-decoration-color: currentColor;
}

/* Small text: keep the focus ring off the neighbouring lines. */
.credit a:focus-visible {
  outline-offset: 1px;
}

/* Footer */

.site-footer {
  padding-block: 0 28px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-inner p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Not found page */

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

.notfound h1 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem);
}

.notfound .lead + .lead {
  margin-top: 0.4rem;
  text-align: end;
}

.home-link {
  display: inline-block;
  margin-top: 2.25rem;
  color: var(--wood);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: underline 1px;
  text-decoration-color: rgb(92 59 34 / 0.4);
  text-underline-offset: 0.3em;
}

.home-link:hover {
  text-decoration-color: currentColor;
}

/* English */

html[lang="en"] body {
  line-height: 1.6;
}

html[lang="en"] h1 {
  font-size: clamp(2.125rem, 0.8rem + 2.8vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

html[lang="en"] .lead,
html[lang="en"] .roshan figcaption {
  line-height: 1.6;
}

/* Small screens */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    padding-block: 48px 64px;
  }

  .roshan img {
    width: min(80vw, 340px);
    height: auto;
  }

  .roshan figcaption {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy {
    transition: none;
  }
}
