/* DigitaBank site styles. One file, system fonts, nothing loaded from another host.
   Colours come from the logo. Coral and mustard are decoration only. */

:root {
  --cream: #FDF7E7;
  --ink: #292E36;
  --ink-soft: #4B515C;
  --teal: #03939C;
  --teal-deep: #02666D;
  --coral: #FD5C60;
  --mustard: #FDB91C;
  --line: #E8DDC3;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block: 1.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* A row of pixel squares in the logo colours. */
body::before {
  content: "";
  flex: none;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--teal) 0 12px,
    var(--cream) 12px 14px,
    var(--coral) 14px 26px,
    var(--cream) 26px 28px,
    var(--mustard) 28px 40px,
    var(--cream) 40px 42px
  );
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

/* The vw cap keeps a long word on a narrow screen when the text size is doubled. */
h1 {
  font-size: min(clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem), 12vw);
  text-wrap: balance;
}

h2 {
  font-size: min(clamp(1.35rem, 1.15rem + 0.9vw, 1.7rem), 10vw);
  margin-top: 2.2em;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

a:not(.button):not(.skip):focus-visible {
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2rem, 62rem);
  margin-inline: auto;
}

.reading .wrap {
  width: min(100% - 2rem, 34rem);
}

.nw {
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip:focus {
  top: 1.25rem;
  color: #fff;
}

.button {
  display: inline-block;
  min-height: 3rem;
  padding: 0.72rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 0;
}

/* Stacked buttons share one width, but never more than the screen has. */
@media (max-width: 34.99em) {
  .actions .button {
    min-width: min(13.5rem, 100%);
  }
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem 0.5rem;
}

.brand {
  display: block;
  width: min(13.5rem, 58vw);
}

/* The logo file has cream around the ink. This lines the ink up with the text. */
.brand img {
  margin-left: -2.7%;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.55rem 0;
  font-weight: 600;
  color: var(--ink);
}

main {
  flex: 1 0 auto;
  padding-block: 1.25rem 3rem;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  text-wrap: balance;
}

.note {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* Home page. The sizes attributes of its pictures repeat the widths set here. */

.home .wrap {
  width: min(100% - 2rem, 70rem);
}

.home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.5rem, 5vh, 4rem) clamp(1.5rem, 4vh, 3rem);
}

.hero {
  text-align: center;
}

.hero-logo {
  width: min(72vw, 22rem, 46vh);
  margin: 0 auto 1.25rem;
}

.hero h1 {
  font-size: min(clamp(1.9rem, 1.2rem + 3.2vw, 3.25rem), 12vw);
  margin-bottom: 0.35em;
}

.hero .lead {
  max-width: 38rem;
  margin: 0 auto 1.25rem;
}

.hero .facts {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.97rem;
  text-wrap: balance;
}

.art-row {
  --gap: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  max-width: 21rem;
  margin: clamp(1.5rem, 4vh, 2.5rem) auto clamp(1.25rem, 3vh, 2rem);
  padding: 0;
  list-style: none;
}

.art-row li {
  width: calc((100% - 2 * var(--gap) - 1px) / 3);
}

.art-row img {
  width: 100%;
}

@media (min-width: 35em) {
  .art-row {
    --gap: clamp(0.5rem, 1.6vw, 1.5rem);
    max-width: none;
  }

  .art-row li {
    width: min(calc((100% - 4 * var(--gap)) / 5), 13rem, 26vh);
  }
}

.site-footer {
  flex: none;
  border-top: 1px solid var(--line);
  padding-block: 1.1rem 1.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem 1.4rem;
  margin: 0 0 0.25rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.7rem 0;
  color: var(--ink);
  font-weight: 600;
}

.site-footer p {
  max-width: 32rem;
  margin: 0 auto 0.6rem;
  text-wrap: balance;
}

/* A short page with one message, centred, with one piece of art. */

.notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notice-art {
  width: min(40vw, 10rem);
  margin: 0 auto 1rem;
}

.notice .actions {
  justify-content: center;
}

.policy h2 {
  border-top: 1px solid var(--line);
  margin-top: 1.8em;
  padding-top: 1.2em;
}

.policy ul {
  padding-left: 1.25rem;
}

.policy address {
  font-style: normal;
  margin-bottom: 1em;
}

.policy li {
  margin-bottom: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body::before,
  .site-nav,
  .skip {
    display: none;
  }

  body {
    background: #fff;
  }
}
