/* For Apps Sake: the one stylesheet for forappssake.app.
   No JavaScript anywhere on this site, and no third-party request except the
   Google Fonts stylesheet and the font files it points to. */

:root {
  color-scheme: light;

  --cream: #F5EAD8;       /* page */
  --paper: #FBF4E9;       /* cards and boxes */
  --ink: #201E1D;         /* 13.9:1 on cream */
  --muted: #655C54;       /* 5.5:1 on cream */
  --orange: #C67139;      /* accent for shapes; 3.0:1 on cream, so never body text */
  --orange-ink: #9C4F24;  /* links: 5.0:1 on cream, 5.4:1 on paper */
  --sage: #5E9B7E;        /* second accent, shapes only (2.7:1) */
  --sage-ink: #3D6F57;    /* sage as text: 4.9:1 on cream */
  --line: rgba(32, 30, 29, .12);
  --shadow: 0 1px 2px rgba(32, 30, 29, .05), 0 10px 30px rgba(120, 72, 30, .08);
  --shadow-lift: 0 2px 4px rgba(32, 30, 29, .06), 0 16px 40px rgba(120, 72, 30, .12);

  --measure: 720px;
  --gutter: 16px;
  --radius: 20px;

  --display: "Caprasimo", Georgia, "Times New Roman", serif;
  --text: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--cream);
  /* a low sun in the top corner */
  background-image: radial-gradient(circle at 100% 0, rgba(198, 113, 57, .16), rgba(198, 113, 57, 0) 440px);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- type */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.125rem, 1.5rem + 2.8vw, 3.125rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + .9vw, 1.875rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; margin-bottom: .4em; }

p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .5em; }
li::marker { color: var(--orange); }
strong { font-weight: 700; }

a {
  color: var(--orange-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--muted);
}
.meta {
  color: var(--muted);
  font-size: .9375rem;
}
.tagline {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.45;
  color: var(--sage-ink);
  font-weight: 600;
}

ul.plain { list-style: none; padding: 0; }

/* ---------------------------------------------------------------- header */

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
}
.skip:focus {
  left: 16px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
}
.brand .mark { width: 40px; height: 40px; flex: none; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
}
.site-nav a:hover { background: rgba(198, 113, 57, .12); }
.site-nav a[aria-current] {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

main > .wrap { padding-top: 40px; }

/* ---------------------------------------------------------------- home */

.hero { padding-top: 16px; }
.hero h1 { max-width: 14em; }

.section { margin-top: 56px; }
.section > h2 { margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.card h3 { margin: 10px 0 0; font-size: 1.375rem; }
.card p { margin: 0; color: var(--muted); }
.card-more {
  margin-top: auto;
  padding-top: 10px;
  font-weight: 700;
  color: var(--orange-ink);
}

.emblem {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* ---------------------------------------------------------------- app pages */

.app-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.app-head .emblem {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  flex: none;
}
.app-head h1 { margin: 0 0 6px; }
@media (max-width: 480px) {
  .app-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 32px 0 0;
}
.store-button {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.store-button:hover { background: #3A3633; }
.store-button:focus-visible { outline-color: var(--ink); }
.store-soon {
  display: inline-block;
  margin: 0;
  padding: 12px 22px;
  border: 1.5px dashed var(--orange);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
}

.app-links,
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.app-links {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.app-nav {
  margin-bottom: 32px;
  font-size: .9375rem;
}
.app-links a,
.app-nav a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.app-links a:hover,
.app-nav a:hover { border-color: var(--orange); }
.app-nav .app-nav-home { color: var(--sage-ink); }
.app-nav a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* ---------------------------------------------------------------- legal and support */

.summary,
.contact {
  margin: 0 0 1.5em;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: 14px;
}
.summary p:last-child,
.contact p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px 40px;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--orange-ink); }
