:root {
  color-scheme: light;
  --paper: #fcf9f0;
  --ink: #134036;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Libre Baskerville", "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 400;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 1.5rem 2rem;
  padding:
    max(1.35rem, env(safe-area-inset-top))
    max(2.25rem, env(safe-area-inset-right))
    0.25rem
    max(2.25rem, env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand img {
  width: 2.85rem;
  max-width: 2.85rem;
  height: 2.85rem;
  flex: none;
  object-fit: cover;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.7rem;
  font-size: 1.05rem;
}

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

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

main {
  width: min(56rem, 100%);
  max-width: 100%;
  min-width: 0;
  align-self: center;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1rem;
  box-sizing: border-box;
  text-align: center;
}

.hero {
  display: block;
  width: min(16.5rem, 78vw);
  height: auto;
  margin: 0.85rem auto 0.15rem;
}

h1 {
  max-width: 100%;
  margin: 0.2rem 0 2.35rem;
  font-size: clamp(2.35rem, 5vw, 3.45rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.apps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 1.6rem;
  scroll-margin-top: 1.5rem;
}

.card {
  width: min(16.75rem, 100%);
  margin: 0;
  padding: 1.55rem 1.25rem 1.3rem;
  background: var(--card);
  border-radius: 1.15rem;
  box-shadow:
    0 14px 32px rgba(36, 48, 40, 0.08),
    0 1px 2px rgba(36, 48, 40, 0.05);
}

.card img {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 0.95rem;
}

h2 {
  margin: 0.9rem 0 0.85rem;
  font-size: 1.7rem;
  font-weight: 400;
}

.view-app {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

a.view-app {
  display: block;
  color: inherit;
  text-decoration: none;
}

.soon {
  margin: 0;
  color: var(--ink);
  font-family: "Libre Baskerville", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.foot {
  margin-top: auto;
}

footer {
  padding: 2.6rem 1.25rem 0.35rem;
  text-align: center;
  scroll-margin-top: 2rem;
}

footer a {
  color: inherit;
  font-size: 1.05rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

footer a:hover,
.nav a:hover,
.brand:hover,
a.view-app:hover,
.page-links a:hover,
main.page a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.treeline {
  display: block;
  width: 100%;
  height: clamp(8.5rem, 22vw, 15rem);
  margin-top: 1.4rem;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

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

::selection {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: center;
    padding-right: max(1.15rem, env(safe-area-inset-right));
    padding-left: max(1.15rem, env(safe-area-inset-left));
    text-align: center;
  }

  .nav {
    justify-content: center;
  }

  .nav a,
  .page-links a,
  a.view-app {
    padding: 0.4rem 0.25rem;
  }

  main {
    width: 100%;
    padding: 0.35rem 1.1rem 1rem;
  }

  h1 {
    margin-bottom: 1.7rem;
    font-size: clamp(1.65rem, 7.4vw, 2.45rem);
  }

  footer a {
    font-size: 0.95rem;
  }
}

main.page {
  width: min(48rem, 100%);
  max-width: 100%;
  padding-inline: 1.35rem;
  text-align: left;
}

@media (max-width: 720px) {
  main.page {
    width: 100%;
    padding-inline: 1.15rem;
  }
}

.page-mark {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  margin: 0.35rem auto 0.15rem;
  border-radius: 0.95rem;
}

main.page h1 {
  margin-bottom: 0.55rem;
  text-align: center;
}

main.page p.tagline {
  margin: 0 0 1.35rem;
  text-align: center;
  font-size: 1.2rem;
}

main.page p {
  margin: 0.9rem 0;
  line-height: 1.6;
}

main.page h1,
main.page h2,
main.page p,
main.page li,
main.page a {
  overflow-wrap: anywhere;
}

main.page h2 {
  margin: 2rem 0 0.35rem;
  font-size: 1.45rem;
  text-align: left;
}

main.page a {
  color: inherit;
}

main.page p.page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.7rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 1.05rem;
}

.page-links a {
  color: inherit;
  text-decoration: none;
}

#choices {
  scroll-margin-top: 1.5rem;
}
