/* The Ahead look, for the Ahead Workshop site: the colors, font, page, cards and buttons every Ahead app starts
   with, from the starter's brand/ahead.css (which came from Paycheck Ahead's stylesheet, so the names match).
   The parts only apps use (fields, messages, switches, tab bar, chart colors) are left out. This site's own
   pieces are at the bottom. Light and dark follow the phone or computer.

   Colors: "Harbor haze", pewter #909EAE, harbor blue #5C8DC5, taupe #AD9E90 and olive taupe #736F60. The light
   ones tint backgrounds; text and buttons use deeper shades of the same hues. Every text color reads at 4.5:1 or
   better on its background (icons and lines 3:1). */

:root {
  color-scheme: light;
  --plane: #eef1f4;                      /* page background: a pewter tint */
  --surface: #ffffff;                    /* cards */
  --surface-2: #f5f3f0;                  /* insets inside a card: a taupe tint */
  --fill: rgba(144, 158, 174, 0.18);     /* quiet badges: pewter */
  --ink: #1d2125;
  --ink-2: #566170;                      /* deep pewter */
  --muted: #6b6758;                      /* olive taupe */
  --border: rgba(86, 97, 112, 0.16);
  --accent: #3a6aa3;                     /* deep harbor blue: links and buttons */
  --accent-ink: #ffffff;
  --accent-wash: rgba(92, 141, 197, 0.16);
  --accent-wash-2: rgba(92, 141, 197, 0.26);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #121417;
    --surface: #1c1f23;
    --surface-2: #26292d;
    --fill: rgba(144, 158, 174, 0.20);
    --ink: #f2f4f6;
    --ink-2: #b3bcc7;                    /* pewter */
    --muted: #a39b8f;                    /* taupe */
    --border: rgba(144, 158, 174, 0.22);
    --accent: #86afdd;                   /* light harbor blue, with dark text on buttons */
    --accent-ink: #0f1b2a;
    --accent-wash: rgba(111, 159, 214, 0.20);
    --accent-wash-2: rgba(111, 159, 214, 0.30);
    --shadow: none;
  }
}

/* The page */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--font-display); }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.022em; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.012em; }
h3 { font-size: 16px; font-weight: 650; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-bottom: 64px; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* Buttons: one primary per screen, the rest plain */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 0;
  background: var(--accent-wash); color: var(--accent); font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-wash-2); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent-wash); }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* This site: the top, the app cards, About and Contact */
.top { padding-top: 72px; padding-bottom: 40px; }
.wordmark {
  display: flex; align-items: center; gap: 16px;
  font-size: 44px; font-weight: 700; letter-spacing: -0.028em;
}
.wordmark .mark { flex: none; border-radius: 12px; }
.accent { color: var(--accent); }
.tagline { margin: 14px 0 0; max-width: 34em; color: var(--ink-2); font-size: 20px; line-height: 1.4; }

.section-title { margin: 0 0 14px; }
.apps {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.app { display: flex; flex-direction: column; margin: 0; padding: 20px; }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.app-logo { display: block; flex: none; border-radius: 12px; }
.app-name { font-size: 18px; }
.app-line { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.app-note { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent); font-size: 13px; font-weight: 600;
}
.badge-soon { background: var(--fill); color: var(--ink-2); }
.app-foot { margin-top: auto; padding-top: 16px; }  /* the button, at the bottom so a row's buttons line up */

.prose h2 { margin-bottom: 8px; }
.prose p { margin: 0 0 10px; max-width: 40em; }
.prose p:last-child { margin-bottom: 0; }

main.wrap { padding-bottom: 12px; }
.foot { padding-bottom: 40px; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .top { padding-top: 40px; padding-bottom: 28px; }
  .wordmark { font-size: 34px; gap: 12px; }
  .wordmark .mark { width: 44px; height: 44px; border-radius: 10px; }
  .tagline { font-size: 18px; }
}
