/* Eunoia's website, in the app's design: the cream canvas, black ink, BioRhyme (Georgia until it has loaded), and the
   app's cards, chips, buttons, shadow and glow (docs/DESIGN_TOKENS.md). */

/* BioRhyme (fonts/OFL.txt). The emails load the regular weight from here too, so keep the file names. */
@font-face {
  font-family: "BioRhyme";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/BioRhyme-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "BioRhyme";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/BioRhyme-Bold.woff2") format("woff2");
}

:root {
  --canvas: #fdf5ed;
  --ink: #000000;
  --ink-secondary: #4d4d4d;
  --surface: #ffffff;
  --link: #264190;
  --hairline: rgba(0, 0, 0, 0.1);
  --primary: #b1bee3;
  --swans-down: #d8eded;
  --peach: #fee5b6;
  --we-peep: #f6d7de;
  --snuff: #dad4ec;
  --pampas: #efede7;
  --radius: 10px;
  /* The app's `standard` shadow, under cards, chips and buttons. */
  --shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
  /* The app's `panelGlow`: a radial #BDC2E8 to #E6DEE9 glow at 40% over the canvas. */
  --glow: radial-gradient(50% 50% at 50% 50%, rgba(189, 194, 232, 0.4) 0%, rgba(189, 194, 232, 0.4) 38%,
    rgba(230, 222, 233, 0.4) 100%);
  --measure: 40rem;
  --serif: "BioRhyme", Georgia, "Times New Roman", Times, serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  z-index: 1;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

/* logo.png, which the emails show too: the app's logo on the canvas colour. */
.wordmark {
  display: inline-block;
  line-height: 0;
}

.wordmark img {
  display: block;
  width: 120px;
  height: auto;
}

.tagline {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--we-peep);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  background: #f1c8d1;
}

.site-nav a[aria-current="page"] {
  border-color: var(--ink);
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 400;
  margin: 1.5rem 0 0.5rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 400;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.25rem;
}

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

li + li {
  margin-top: 0.35rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink);
}

.meta {
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* The home page's opening: the glow the app puts behind its control cards, with one of its illustrations. */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--glow);
}

.hero h1 {
  margin: 0;
}

.hero .lead {
  grid-column: 1 / -1;
  margin: 0;
}

.hero-art {
  display: block;
  width: 97px;
  height: auto;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.features li {
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
}

/* The app's line icons. */
.feature-icon {
  display: block;
  width: auto;
  height: 36px;
  margin-bottom: 0.5rem;
}

.features h2 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.features p {
  margin: 0;
  font-size: 0.95rem;
}

.features li:nth-child(6n + 1) { background: var(--swans-down); }
.features li:nth-child(6n + 2) { background: var(--peach); }
.features li:nth-child(6n + 3) { background: var(--we-peep); }
.features li:nth-child(6n + 4) { background: var(--snuff); }
.features li:nth-child(6n + 5) { background: var(--pampas); }
.features li:nth-child(6n + 6) { background: var(--primary); }

.steps li::marker {
  font-weight: 700;
}

/* The app's primary button: cornflower blue, an ink outline, radius 10 and the standard shadow. */
.button {
  display: inline-block;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--primary);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: #c3cdea;
}

.button:active {
  transform: scale(0.97);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.6;
}

.notice {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--swans-down);
}

.notice.warning {
  background: var(--peach);
}

.notice > :first-child {
  margin-top: 0;
}

.notice > :last-child {
  margin-bottom: 0;
}

[hidden] {
  display: none !important;
}

dl {
  margin: 0 0 1rem;
}

dt {
  font-weight: 700;
  margin-top: 1rem;
}

dd {
  margin: 0.25rem 0 0;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

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

.site-nav li + li,
.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.65rem;
  }
}
