/* Genin & Cie */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #1d2433;
  --ink-soft: #565d6b;
  --line: #d9dce2;
  --underline: #a3a8b3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "Book Antiqua", Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Language switch */

.topline {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.25rem;
  font-size: 0.9375rem;
}

/* Letterhead */

.letterhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 3rem;
  padding-top: 2.5rem;
}

.wordmark {
  margin: 0;
  font-size: clamp(2.625rem, 1.75rem + 4vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.wordmark a {
  text-decoration: none;
}

.descriptor {
  margin: 0.875rem 0 0;
  font-size: 1.3125rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--ink-soft);
}

.sender {
  font-size: 1rem;
  font-style: normal;
  line-height: 1.5;
  color: var(--ink-soft);
}

.letterhead.is-compact .wordmark {
  font-size: 2.25rem;
}

.letterhead.is-compact .descriptor {
  margin-top: 0.5rem;
  font-size: 1.125rem;
}

/* Text */

main {
  padding: 4.5rem 0 4rem;
}

.lead {
  max-width: 26em;
  margin: 0 0 3.5rem;
  font-size: clamp(1.3125rem, 1.15rem + 0.6vw, 1.5rem);
  line-height: 1.45;
  text-wrap: pretty;
}

main section {
  max-width: 34em;
}

main section + section {
  margin-top: 2.75rem;
}

h1,
h2 {
  font-weight: 400;
}

main h1 {
  margin: 0 0 2.5rem;
  font-size: 2.25rem;
  line-height: 1.15;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.25;
}

p {
  margin: 0 0 0.85em;
}

main p {
  -webkit-hyphens: auto;
  hyphens: auto;
}

p:last-child {
  margin-bottom: 0;
}

address {
  font-style: normal;
}

/* Lining figures where numbers are read, not just seen */
address,
.site-footer p {
  font-variant-numeric: lining-nums proportional-nums;
}

a[href^="tel:"] {
  white-space: nowrap;
  font-variant-numeric: lining-nums proportional-nums;
}

.nowrap {
  white-space: nowrap;
}

main address {
  margin: 0 0 0.85em;
}

.note {
  margin: -1.5rem 0 2.5rem;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--ink-soft);
}

.meta {
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Links */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.25rem 1.5rem;
}

/* Small screens */

@media (max-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }

  .page {
    padding: 0 1.25rem;
  }

  .letterhead {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 1.75rem;
  }

  .sender {
    margin-top: 1.5rem;
  }

  main {
    padding: 3rem 0;
  }

  .lead {
    margin-bottom: 2.5rem;
  }

  h2 {
    font-size: 1.3125rem;
  }

  main h1 {
    font-size: 1.875rem;
  }

  .letterhead.is-compact .wordmark {
    font-size: 2rem;
  }
}

/* Print */

@media print {
  .topline,
  .site-footer nav {
    display: none;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  main {
    padding: 2rem 0;
  }

  a {
    text-decoration: none;
  }
}
