/* Adoquena — colours and shapes taken from the poster. Logical properties only,
   so the same rules hold for the Arabic (rtl) and Spanish (ltr) runs. */

/* Lalezar — the poster's Arabic face (SIL OFL 1.1, see fonts/OFL-Lalezar.txt), subset to
   Arabic. It has one weight; the range stops browsers faking a bold on top. */
@font-face {
  font-family: 'Lalezar';
  src: url('fonts/lalezar-arabic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

/* Anton and Permanent Marker — the poster's Latin faces, subset to Latin.
   Anton is SIL OFL 1.1, Permanent Marker is Apache 2.0; licences are in fonts/. */
@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Permanent Marker';
  src: url('fonts/permanent-marker-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sand: #e9d4a6;
  --stone: #f2ece1;
  --ink: #161616;
  --red: #d0392b;

  --ar: 'Lalezar', 'Noto Kufi Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  --es: 'Anton', Impact, Haettenschweiler, 'Arial Narrow Bold', 'Arial Narrow', sans-serif;
  --hand: 'Permanent Marker', 'Marker Felt', 'Comic Sans MS', 'Segoe Print', cursive;
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--ar);
  font-size: 1.125rem;
  line-height: 1.7;
}

img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

p,
h1,
h2,
figure {
  margin: 0;
}

a {
  color: inherit;
}

[lang='es'] {
  font-family: var(--es);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  background: var(--ink);
}

.hero img {
  inline-size: 100%;
  max-inline-size: min(36rem, 75%);
  margin-inline: auto;
  /* Torn side edges: a jagged outline generated once, in percentages so it
     scales with the image. Top and bottom stay straight. */
  clip-path: polygon(
    1.9% 0.0%, 1.82% 2.85%, 1.13% 4.49%, 3.37% 6.73%,
    3.46% 8.12%, 3.67% 11.08%, 4.0% 12.97%, 3.13% 15.41%,
    4.0% 16.9%, 4.0% 19.29%, 1.95% 21.31%, 1.46% 23.84%,
    2.21% 26.88%, 1.61% 27.97%, 2.2% 29.75%, 1.95% 33.16%,
    0.85% 35.34%, 0.78% 37.61%, 0.2% 38.97%, 1.29% 41.75%,
    1.1% 42.7%, 3.15% 45.07%, 2.44% 48.3%, 1.76% 49.92%,
    3.68% 51.58%, 2.58% 55.13%, 2.78% 57.28%, 2.09% 57.93%,
    0.66% 61.03%, 0.2% 62.58%, 0.2% 64.94%, 2.1% 66.93%,
    2.0% 69.36%, 2.16% 71.71%, 1.4% 73.41%, 0.85% 76.6%,
    1.82% 78.64%, 2.66% 81.15%, 3.39% 82.48%, 3.84% 84.36%,
    4.0% 87.47%, 2.88% 88.61%, 3.22% 91.27%, 2.59% 92.8%,
    1.64% 96.05%, 0.64% 97.42%, 0.71% 100.0%, 96.29% 100.0%,
    96.21% 98.43%, 96.86% 96.31%, 96.59% 92.89%, 96.49% 90.64%,
    97.44% 89.13%, 96.93% 87.4%, 97.02% 84.84%, 96.0% 82.57%,
    96.51% 81.17%, 96.92% 78.47%, 97.26% 76.56%, 96.72% 74.34%,
    96.21% 71.96%, 96.0% 69.33%, 96.0% 67.56%, 96.0% 64.93%,
    96.0% 63.39%, 96.14% 60.68%, 96.19% 58.65%, 97.12% 57.24%,
    98.23% 54.89%, 99.0% 51.88%, 98.2% 50.61%, 97.94% 47.72%,
    98.62% 45.38%, 98.98% 43.73%, 98.85% 41.59%, 99.8% 38.74%,
    99.55% 36.95%, 99.8% 34.48%, 97.33% 32.51%, 96.48% 30.26%,
    96.99% 29.05%, 97.83% 26.22%, 96.47% 24.03%, 96.74% 21.61%,
    97.38% 19.86%, 98.26% 17.86%, 99.18% 15.86%, 99.7% 12.36%,
    99.8% 11.24%, 99.8% 7.95%, 99.66% 6.48%, 99.34% 4.48%,
    96.95% 2.94%, 97.3% 0.0%
  );
}

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25em 0.75em;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--stone);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.star {
  color: var(--red);
}

/* --- layout -------------------------------------------------------------- */

main {
  max-inline-size: 54rem;
  margin-inline: auto;
  padding: 2rem 1rem 0;
}

section + section {
  margin-block-start: 3rem;
}

.label {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em 1em;
  margin-block-end: 1.75rem;
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 800;
}

/* --- next meeting -------------------------------------------------------- */

.next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  align-items: center;
  max-inline-size: 42rem;
  margin-inline: auto;
}

.when {
  text-align: center;
}

.day {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.75em;
  font-size: 1.375rem;
  font-weight: 800;
}

.day [lang='es'] {
  letter-spacing: 0.15em;
}

.day > :first-child {
  color: var(--red);
}

.date {
  font-family: var(--es);
  font-size: clamp(4.5rem, 16vw, 6rem);
  line-height: 0.95;
}

.date i {
  color: var(--red);
  font-style: normal;
}

.hour {
  font-family: var(--es);
  font-size: 1.75rem;
  line-height: 1.1;
}

.note {
  display: grid;
  gap: 0.15em;
  margin-block-start: 1rem;
  color: var(--red);
  font-weight: 700;
}

.note [lang='es'] {
  font-family: var(--hand);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.book {
  justify-self: center;
  text-align: center;
}

.book img {
  max-inline-size: clamp(11rem, 45vw, 14rem);
  margin-inline: auto;
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-3deg);
}

.book figcaption {
  display: grid;
  gap: 0.1em;
  margin-block-start: 1.25rem;
}

.book .btn {
  justify-self: center;
  margin-block-start: 0.75rem;
}

.book .title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.5em;
}

.book strong {
  font-size: 1.25rem;
  font-weight: 800;
}

.welcome {
  margin-block-start: 2rem;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

/* --- cards --------------------------------------------------------------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.card {
  flex: 0 1 24rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--stone);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
}

.card h2 {
  display: flex;
  justify-content: center;
  gap: 0.75em;
  font-size: 1.1rem;
  font-weight: 800;
}

.card h2 [lang='es'] {
  color: var(--red);
}

.place {
  color: var(--red);
  font-size: 1.4rem;
}

.btn {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2em 0.7em;
  min-block-size: 2.75rem;
  align-items: center;
  padding: 0.5rem 1.1rem;
  background: var(--ink);
  color: var(--stone);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  background: var(--red);
}

a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.free {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  margin-block-start: 1.25rem;
  color: var(--red);
}

.free [lang='es'] {
  font-size: 0.9rem;
}

.stamp {
  display: grid;
  place-items: center;
  inline-size: 5.5rem;
  aspect-ratio: 1;
  border: 3px solid var(--red);
  border-radius: 50%;
  outline: 2px solid var(--red);
  outline-offset: 3px;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
  transform: rotate(-12deg);
}

/* --- poster -------------------------------------------------------------- */

.poster {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}

.poster img {
  max-inline-size: min(100%, 14rem);
  margin-inline: auto;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

/* --- footer -------------------------------------------------------------- */

footer {
  margin-block-start: 3rem;
  padding: 1.5rem 1rem 1.75rem;
  background: var(--ink);
  color: var(--stone);
  text-align: center;
}

footer p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.25em 0.75em;
  font-size: 1rem;
  line-height: 1.4;
}

footer .mark {
  font-family: var(--es);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer [lang='ar'] {
  font-size: 1.15em;
}

footer .star {
  margin-inline: 0.35em;
  font-family: var(--ar);
  letter-spacing: 0;
}
