/* Bean Counter's colors, from the app's asset catalog (ios/BeanCounter/Assets.xcassets). */
:root {
  color-scheme: light dark;
  --background: #f6f1ea;
  --card: #ffffff;
  --hairline: #e3d8cc;
  --text: #2a1f1a;
  --muted: #685a50;
  --accent: #8a4b2a;
  --on-accent: #ffffff;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1411;
    --card: #261e1a;
    --hairline: #3b2f29;
    --text: #f2e9e1;
    --muted: #a8968a;
    --accent: #d08a5c;
    --on-accent: #1a1411;
  }
}

* {
  box-sizing: border-box;
}

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

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

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

header.site {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

header.site a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
}

header.site img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 22%;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.25;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.25rem;
}

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

li {
  margin-bottom: 0.375rem;
}

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

.lede {
  color: var(--muted);
  font-size: 1.1875rem;
}

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

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

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

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

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.hero img {
  width: 8rem;
  height: 8rem;
  border-radius: 22%;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.15);
}

.hero h1 {
  margin-top: 1.5rem;
}

/* Apple's badge, unchanged and at least 40 px tall, as its guidelines ask. */
.app-store {
  display: inline-block;
  margin-top: 0.5rem;
}

.hero .app-store img {
  width: auto;
  height: 3.25rem;
  border-radius: 0;
  box-shadow: none;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.screenshots li {
  min-width: 0;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.screenshots li > a:first-child {
  display: block;
}

.screenshots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--hairline);
  margin-bottom: 0.375rem;
}

.press-icon {
  width: 6rem;
  height: 6rem;
  border-radius: 22%;
}

footer.site {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.5rem;
}

footer.site a {
  color: var(--muted);
}

footer.site p {
  margin: 0;
}

code {
  font-size: 0.9em;
}

/* The home page's feature sections: text beside one or two screenshots, stacked on narrow screens. */
.feature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  margin: 3rem 0;
}

.feature-text {
  flex: 1 1 16rem;
}

.feature-text h2 {
  margin-top: 0;
}

.feature-screens {
  flex: 1 1 16rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.feature-screens img {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 15rem;
  height: auto;
  border-radius: 1.25rem;
  border: 1px solid var(--hairline);
}

.feature-screens img:not(:only-child) {
  max-width: calc(50% - 0.5rem);
}

/* Free and Pro, side by side on wide screens. */
.plans {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.plans .card {
  margin: 0;
}

.plans h3 {
  margin-top: 0;
  font-size: 1.375rem;
}

.plan-price {
  color: var(--accent);
  font-weight: 600;
}

.plans + .updated {
  margin-top: 1rem;
}

.privacy {
  margin-top: 2.5rem;
}
