@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* Assorted variables */
:root {
  --text-size-small: 0.64rem;
  --text-size-caption: 0.8rem;
  --text-size-body: 1rem;
  --text-size-h6: 1.25rem;
  --text-size-h5: 1.56rem;
  --text-size-h4: 1.95rem;
  --text-size-h3: 2.44rem;
  --text-size-h2: 3.05rem;
  --text-size-h1: 3.81rem;

  --purple: rgb(66, 36, 105)
}

body {
    font-size: var(--text-size-md);
    margin-inline: auto;
    padding: 1cm;
    max-width: 100ch;
    color: white;
    background: var(--purple);
    font-family: sans-serif;
}

img.logo {
    display: block;
    width: 50%;
    margin-inline: auto;
    padding: 1em 0;
}

p.tagline {
    font-size: var(--text-size-h6);
    text-align: center;
    margin-block: 1em;
    width: 50ch;
    margin-inline: auto;
    line-height: 1.5;
}

p.heading {
    font-weight: bold;
    font-size: var(--text-size-h3);
    text-align: center;
    font-family: "Josefin Sans", sans-serif;
    margin-top: 2em;
}

a {
    color: inherit;
    text-decoration: none;
}

a[href^="mailto:"] {
    text-decoration: 1px underline dotted currentColor;
}

.wrapper-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-inline: auto;
    align-items: center;
}

.wrapper-vertical a.card p {
    padding: 1rem;
}

.wrapper-cards {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-inline: auto;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

a.card {
    transition: scale 250ms;
    width: 30ch;
    border-radius: 0.5rem;
    background: white;
    color: var(--purple);
    display: grid;
    grid-auto-flow: row;
}
a.card:hover {
    scale: 1.05;
}

a.card p {
    margin: 0;
    padding: 0.33rem 1rem;
    align-self: start;
}

a.card p.title {
    font-weight: bold;
    font-family: "Josefin Sans", sans-serif;
    font-size: var(--text-size-h6);
}

a.card p.subtitle {
    font-weight: bold;
    font-family: "Josefin Sans", sans-serif;
}

a.card img {
    width: 100%;
    height: 20ch;
    object-fit: cover;
    border-radius: 0.5em 0.5em 0 0;
    padding-bottom: 0.33rem;
}

a.card:has(img) {
    padding-bottom: 0.5rem;
    grid-template-rows: auto 2em 1.5em 1fr;
}

a.card img.align-top { object-position: top; }
a.card img.align-bottom { object-position: bottom; }

.wrapper-cards .break {
    display: block;
    flex-basis: 100%;
    height: 0;
}

.flex-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    line-height: 1.5;
}

.flex-wrapper > div:nth-of-type(2n) {
    text-align: right;
    align-self: flex-end;
}

.flex-wrapper > div {
    max-width: 80ch;
}

.flex-wrapper p {
    margin-block-start: 0;
    text-wrap: balance;
}

.flex-wrapper .title {
    font-family: "Josefin Sans", sans-serif;
    font-size: var(--text-size-h5);
    margin: 0;
}

.flex-wrapper .title a {
    text-decoration: 1px underline dotted currentColor;
}


@media (max-width: 600px) {
    body { padding: 1rem; }
    p.tagline { width: 100%; font-size: var(--text-size-body); }

    .flex-wrapper > div:nth-of-type(2n) { text-align: unset; align-self: unset; }
    .flex-wrapper > div { width: 100%; }
}