/* YalaSahelha holding page. Ink on Bone. English holds the left edge, Arabic the right, the name sits on the axis between them. */

@font-face {
  font-family: "YS Latin";
  src: url("/fonts/ys-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YS Arabic";
  src: url("/fonts/ys-arabic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f0e0c;
  --bone: #f2ede4;
  --latin: "YS Latin", system-ui, sans-serif;
  --arabic: "YS Arabic", "YS Latin", system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --between: clamp(2rem, 6vw, 6rem);
  --lockup-ratio: 2.563;
  --lockup-room: 25rem;
  color-scheme: light;
}

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

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

body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: var(--gutter);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--latin);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  font-synthesis: none;
}

h1,
p {
  margin: 0;
  font-weight: 400;
}

[lang="en"] {
  font-family: var(--latin);
}

[lang="ar"] {
  font-family: var(--arabic);
  font-size: 1.12em;
  line-height: 1.75;
  letter-spacing: 0;
}

[lang="ar"] bdi {
  font-size: 0.9em;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

[lang="ar"] a,
a[lang="ar"] {
  text-underline-offset: 0.35em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.2em;
}

::selection {
  background: var(--ink);
  color: var(--bone);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home {
  grid-template-rows: 1fr auto;
  row-gap: 2.5rem;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  row-gap: 1.75rem;
}

.lockup {
  justify-self: center;
  width: 100%;
  margin-block-end: 1rem;
  font-size: inherit;
}

.lockup svg {
  display: block;
  width: 100%;
  height: auto;
}

.line {
  max-width: 34ch;
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
  text-wrap: balance;
}

.line[lang="ar"] {
  justify-self: end;
  font-size: clamp(1.3125rem, 1.1rem + 0.7vw, 1.6875rem);
  line-height: 1.75;
}

.contact {
  justify-self: center;
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
}

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0.25rem;
  width: 100%;
}

.foot p {
  font-size: 0.875rem;
  line-height: 1.45;
}

.foot p[lang="ar"] {
  font-size: 0.97rem;
  line-height: 1.6;
}

.foot a {
  display: inline-block;
  padding-block: 0.25em;
  margin-inline-start: 0.75em;
}

.doc {
  grid-template-rows: auto 1fr auto;
  row-gap: clamp(2.5rem, 7vh, 4.5rem);
}

.doc > * {
  justify-self: center;
  width: 100%;
  max-width: 72rem;
}

.names {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.names a {
  text-decoration: none;
}

.names a:hover {
  text-decoration: underline;
}

.title,
.parallel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--between);
}

.title {
  row-gap: 0.25rem;
  margin-block-end: clamp(1.5rem, 4vh, 2.5rem);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.1;
}

.title [lang="ar"] {
  line-height: 1.3;
}

.parallel {
  row-gap: 2.5rem;
}

.parallel > div {
  display: grid;
  align-content: start;
  row-gap: 1rem;
}

.parallel p {
  text-wrap: pretty;
}

@media (min-width: 40rem) {
  .stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--between);
  }

  .lockup,
  .contact {
    grid-column: 1 / -1;
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--between);
    align-items: baseline;
  }
}

@media (min-width: 48rem) {
  .title,
  .parallel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .title {
    align-items: baseline;
  }

  .parallel {
    row-gap: 1rem;
  }

  .parallel > div {
    grid-template-rows: subgrid;
    align-items: baseline;
  }

  .rows-2 > div {
    grid-row: span 2;
  }

  .rows-7 > div {
    grid-row: span 7;
  }
}

@media (min-width: 60rem) {
  .stage {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-content: stretch;
    align-items: baseline;
    row-gap: 2.5rem;
  }

  .lockup {
    align-self: center;
    width: min(100%, 90rem, max(24rem, calc((100svh - var(--lockup-room)) * var(--lockup-ratio))));
    margin-block-end: 0;
  }

  .line[lang="en"] {
    grid-column: 1;
    grid-row: 2;
  }

  .contact {
    grid-column: 2;
    grid-row: 2;
  }

  .line[lang="ar"] {
    grid-column: 3;
    grid-row: 2;
  }
}
