/*
  Nom de Plume Analytique Inc. : the company website.

  The look is the game's own (research/design/handoff/tokens.json): Aegean blue and whitewash, flat colours, a 3 px
  ink outline and a hard flat shadow on cards and buttons, Commissioner for reading and Gentium Plus for names.
  Rules kept here: nothing under 16 px, links are underlined (never colour alone), buttons and links are at least
  44 px tall, no animation, no scripts, nothing loaded from another site.
*/

@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner/Commissioner-latin-greek.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Plus";
  src: url("../fonts/gentiumplus/GentiumPlus-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Plus";
  src: url("../fonts/gentiumplus/GentiumPlus-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Plus";
  src: url("../fonts/gentiumplus/GentiumPlus-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --whitewash: #f6f3eb;
  --ink: #2b2118;
  --blue: #1e62a8;
  --blue-deep: #0f3e73;
  --plaster: #e9d9b8;
  --ochre: #c99a3e;
  --muted: #5a4f44;
  --step: #d6d0c0;
  --radius: 24px;
  --hard: 4px 5px 0 var(--blue-deep);
  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Gentium Plus", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem; /* 18 px: nothing on the site is smaller than 16 px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--whitewash);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--blue-deep);
}

:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--whitewash);
}
.on-blue :focus-visible,
.band :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--whitewash);
  box-shadow: 0 0 0 7px var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--whitewash);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 16px;
  font-weight: 700;
}
.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* The header: the company's name, the pages, and the other language */
.site-header {
  background: var(--whitewash);
  border-bottom: 3px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}
.brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35rem;
  min-height: 44px;
  align-content: center;
  color: var(--ink);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}
.brand:hover {
  color: var(--blue);
}
.brand small {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.9rem;
  border: 3px solid transparent;
  border-radius: 16px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.nav a:hover {
  background: var(--plaster);
}
.nav a[aria-current="page"] {
  background: var(--blue);
  border-color: var(--ink);
  color: var(--whitewash);
}
.nav .lang {
  border-color: var(--ink);
  background: var(--whitewash);
}

/* The blue band: the game's own blue screen, with whitewash cards on it */
.band {
  background: var(--blue);
  color: var(--whitewash);
  border-bottom: 3px solid var(--ink);
  padding-block: 2rem 2.5rem;
}
.band h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 6.5vw, 3.25rem);
  line-height: 1.15;
}
.band .lead {
  margin: 0;
  max-width: 40rem;
}
.band > .wrap > a:not(.btn),
.band .lead a {
  color: var(--whitewash);
}
.band--home .wrap {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .band--home .wrap {
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
  }
}

.card {
  background: var(--whitewash);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard);
  padding: 1.25rem 1.5rem;
}
.card > :first-child {
  margin-top: 0;
}
.card > :last-child {
  margin-bottom: 0;
}
.card a:not(.btn) {
  color: var(--blue);
}
.card h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.frame {
  margin: 0;
  overflow: hidden;
  background: var(--whitewash);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard);
}
.frame img {
  width: 100%;
}
.frame--narrow {
  max-width: 42rem;
  margin: 1.5rem 0;
}
.frame figcaption {
  padding: 0.75rem 1rem;
  border-top: 3px solid var(--ink);
  background: var(--whitewash);
}

/* Buttons: a main one (blue, on a whitewash card) and a plain one */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.5rem 1.5rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn--main {
  background: var(--blue);
  color: var(--whitewash);
}
.btn--main:hover {
  background: var(--blue-deep);
  color: var(--whitewash);
}
.btn--plain {
  background: var(--whitewash);
  color: var(--ink);
}
.btn--plain:hover {
  background: var(--plaster);
  color: var(--ink);
}
.btn:active {
  transform: translate(2px, 3px);
  box-shadow: 2px 2px 0 var(--blue-deep);
}

/* Page content */
main {
  display: block;
}
.section {
  padding-block: 2.5rem;
}
.section + .section {
  padding-top: 0;
}
.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
}
.section h3 {
  margin: 0 0 0.25rem;
  font-size: 1.3125rem;
  line-height: 1.25;
}
.prose {
  max-width: 40rem;
}
.prose > h2 {
  margin-top: 2.25rem;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}
.prose > .card,
.prose > .notice {
  margin-bottom: 0.5rem;
}
.prose ul,
.prose ol {
  padding-left: 1.4rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.lead {
  font-size: 1.25rem;
}
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 44rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64rem) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* A whole card is one big link: the heading's link is stretched over the card */
.card--link {
  position: relative;
  display: flex;
  flex-direction: column;
}
.card--link h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.card--link h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card--link h3 a:focus-visible {
  outline: none;
  box-shadow: none;
}
.card--link:has(a:focus-visible) {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}
.card--link p {
  margin: 0;
}

.name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

.badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.1rem 1rem;
  background: var(--ochre);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--ochre);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard);
}
.notice strong {
  font-size: 1.5rem;
  line-height: 1.2;
}
.notice p {
  margin: 0;
}

.mail {
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Questions and answers, with no scripts: the browser opens and closes them */
details {
  margin-bottom: 1rem;
  background: var(--whitewash);
  border: 3px solid var(--ink);
  border-radius: 16px;
}
summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
details[open] summary {
  border-bottom: 3px solid var(--ink);
}
details > :not(summary) {
  margin: 0;
  padding: 0.75rem 1.25rem 1rem;
}

dl.facts {
  margin: 0 0 1rem;
}
dl.facts dt {
  font-weight: 700;
}
dl.facts dd {
  margin: 0 0 0.75rem;
}

/* The footer */
.site-footer {
  margin-top: 1rem;
  padding-block: 2rem;
  background: var(--blue);
  color: var(--whitewash);
  border-top: 3px solid var(--ink);
}
.site-footer a {
  color: var(--whitewash);
}
.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: 1.2fr 1fr;
  }
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer p {
  margin: 0 0 0.5rem;
}
