/*
  Stub site styles. One file for every page, in the manner of the Kindhour and Path to Pin
  sites: the same layout, classes and type, with Stub's own colours taken from its app icon
  and its pass cards:
  - the system San Francisco font, sized like Apple's text styles (body 17, title3 20,
    title2 22, large title 34, subheadline 15, footnote 13), and on iPhone and iPad it follows
    the reader's own text size through -apple-system-body;
  - the cream paper of a pass's stub (light) and the app's near-black backdrop (dark), with
    the icon's teal for links and buttons;
  - grouped rounded cards, and glass buttons.
  No all-capitals anywhere. No web fonts, no images from elsewhere.
*/

:root {
  --bg: #f4f1e8;            /* the cream paper of a pass's stub */
  --card: #fffdf8;
  --text: #16181d;          /* the icon's ink */
  --soft: #5a5f63;
  --line: rgba(22, 24, 29, .12);
  --link: #17595d;          /* the icon's teal, a shade deeper for small text */
  --button: #1a5a5e;        /* the icon's teal */
  --button-text: #ffffff;
  --pill: #16181d;
  --pill-text: #ffffff;
  --glass: rgba(255, 255, 255, .55);
  --glass-edge: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(22, 24, 29, .06), 0 8px 24px rgba(22, 24, 29, .06);
  --sky: linear-gradient(#cfdedb, #e6ebe2 55%, var(--bg));   /* the icon's teal, thinned to morning air */
  --bg-alt: #fffdf8;
  --bar: rgba(244, 241, 232, .72);
  --ring: rgba(22, 24, 29, 0);
  --frame: #16181d;         /* the phone around each app screen */
  --band: #123f43;          /* the statement band: the icon's deep teal */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b0b;          /* the app's backdrop */
    --card: #191a1b;
    --text: #f9f5ec;        /* the app's cream */
    --soft: #b4b6b3;
    --line: rgba(255, 255, 255, .12);
    --link: #86cdd0;
    --button: #5fb3b7;
    --button-text: #081c1d;
    --pill: #f4f1e8;
    --pill-text: #16181d;
    --glass: rgba(255, 255, 255, .10);
    --glass-edge: rgba(255, 255, 255, .22);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .2);
    --sky: linear-gradient(#0e2b2d, #0f1a1b 55%, var(--bg));
    --bg-alt: #131414;
    --bar: rgba(12, 11, 11, .72);
    --ring: rgba(255, 255, 255, .14);
    --frame: #232425;
    --band: #0b2426;
  }
}

* { box-sizing: border-box; }

html {
  font-size: 106.25%;       /* 17px, Apple's body size */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* On iPhone and Mac Safari this is the reader's own text size (Dynamic Type). */
/* Only on iPhone and iPad: on a Mac this text style is smaller than 17px. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 6px; }

/* Sky header */

.sky {
  background: var(--sky);
  padding: 1rem 1rem 2.5rem;
}
.sky-inner { max-width: 40rem; margin: 0 auto; }
.sky .page-title { margin-top: 1.2rem; }
main, .site-footer { max-width: 42rem; margin: 0 auto; }
.home .site-footer { max-width: 64rem; }   /* 40rem of content inside 1rem padding, in line with the header */

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none;
  font-size: 1.059rem; font-weight: 600;          /* headline */
}
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 22.5%; box-shadow: var(--shadow); }

.page-title {
  font-size: 2rem; line-height: 1.2; font-weight: 700;   /* large title */
  letter-spacing: .01em;
  margin: 2rem 0 .3rem;
}
.page-lede {
  color: var(--soft);
  font-size: 1.176rem; line-height: 1.35;          /* title3, regular */
  margin: 0;
}

/* Content */

main { padding: 0 1rem 2rem; }

.section-title {
  font-size: .882rem; font-weight: 400; color: var(--soft);   /* subheadline, like a Settings section header */
  margin: 2rem 1rem .45rem;
}

.card {
  background: var(--card);
  border-radius: 1.25rem;                          /* 20pt, as in the app */
  padding: 1rem 1.15rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}
.card[id] { scroll-margin-top: 4rem; }        /* a link to #accessibility stops below the sticky top bar */
.card h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0; }   /* a question inside a card */
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 {
  font-size: 1.176rem; line-height: 1.3; font-weight: 600;  /* title3 */
  margin: 0 0 .4rem;
}
.card p, .card li { margin: .5rem 0; }
.card ul, .card ol { padding-left: 1.3rem; margin: .5rem 0; }

/* A list of rows with hairlines between them, like an inset grouped list */
.rows { list-style: none; padding: 0 !important; margin: 0 !important; }
.rows > li { margin: 0 !important; padding: .8rem 0; border-top: .5px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }
.rows strong { display: block; font-weight: 600; }
.rows span { color: var(--soft); }

.note { color: var(--soft); font-size: .882rem; margin: .4rem 1rem 0; }

.split { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .split { grid-template-columns: 1fr 1fr; } }
.split .card { margin: 0; }
.plan { border-top: .5px solid var(--line); padding-top: .6rem; margin-top: .4rem; }
.plan h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.plan p { margin: .2rem 0 0; }
/* What's free and what the purchase adds: one item to a line with a tick. */
.card ul.ticks { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; }
.card .ticks li { position: relative; margin: 0; padding-left: 1.75rem; line-height: 1.4; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .12em; width: 1.15rem; height: 1.15rem;
  background: var(--link);
  -webkit-mask: url("/images/tick.svg") center / contain no-repeat;
          mask: url("/images/tick.svg") center / contain no-repeat;
}
.card p.lead { color: var(--soft); margin: .2rem 0 0; }
.pricing .card p.lead { color: var(--soft); font-size: .941rem; }
.pricing .card .ticks li { font-size: 1rem; color: var(--text); }
.plan-note { margin: 1rem 0 0 !important; padding-top: .8rem; border-top: .5px solid var(--line); font-size: .941rem !important; color: var(--soft) !important; }

/* Buttons */

.button {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.2rem; padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--button); color: var(--button-text);
  font-weight: 600; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), var(--shadow);
}
.hero .button { display: inline-flex; }
.button:hover { filter: brightness(1.06); text-decoration: none; }

.glass {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), var(--shadow);
  color: var(--text);
  font-size: .882rem; font-weight: 600;
  text-decoration: none;
}

/* Top bar, on every page: glass, stays at the top while you scroll */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bar);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: .5px solid var(--line);
}
.topbar-inner {
  max-width: 62rem; margin: 0 auto; padding: 0 1rem;
  height: 3rem; display: flex; align-items: center; justify-content: space-between;
}
.topbar .brand { font-size: 1rem; gap: .5rem; }
.topbar .brand img { width: 1.6rem; height: 1.6rem; box-shadow: none; }
.topbar nav { display: flex; gap: 1.3rem; font-size: .82rem; }
.topbar nav a { color: var(--text); text-decoration: none; opacity: .8; }
.topbar nav a:hover, .topbar nav a[aria-current] { opacity: 1; }
.topbar nav a[aria-current] { font-weight: 600; }

/* Home page, in the manner of a product page: big centred headlines, one idea per section,
   the app itself as the picture. */

.hero {
  background: var(--sky);
  text-align: center;
  padding: 3.5rem 1rem 5rem;
  overflow: hidden;
}
.landing { max-width: none; padding: 0; }
.eyebrow { font-size: 1.176rem; font-weight: 600; margin: 0 0 .4rem; }
.hero-title {
  font-size: clamp(2.6rem, 8vw, 4.8rem); line-height: 1.05; font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 auto .9rem; max-width: 14ch;
}
.hero-sub {
  font-size: clamp(1.176rem, 2.4vw, 1.5rem); line-height: 1.35; color: var(--soft);
  margin: 0 auto 1.6rem; max-width: 30ch;
}
.hero .phone { margin-top: 2.8rem; }

.phone {
  width: min(18.5rem, 76vw);
  margin: 0 auto;
  padding: .5rem;
  border-radius: 3rem;
  background: var(--frame);
  box-shadow: 0 0 0 1px var(--ring), 0 2px 6px rgba(22, 24, 29, .14), 0 30px 70px rgba(22, 24, 29, .25);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 2.55rem; }

.feature { padding: 5rem 1rem; }
.feature.alt { background: var(--bg-alt); }
.feature-inner {
  max-width: 62rem; margin: 0 auto;
  display: grid; gap: 2.8rem; align-items: center; justify-items: center;
  text-align: center;
}
.feature h2, .statement h2, .pricing h2 {
  text-wrap: balance;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
}
.feature p, .statement p, .pricing .intro {
  font-size: clamp(1.059rem, 2vw, 1.3rem); line-height: 1.45; color: var(--soft);
  margin: 0 auto; max-width: 32ch;
}
.feature p strong, .statement p strong { color: var(--text); font-weight: 600; }
.phones { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.phones { flex-wrap: nowrap; gap: .8rem; }
.phones .phone { width: min(15rem, 44vw); padding: .35rem; border-radius: 2rem; }
.phones .phone img { border-radius: 1.7rem; }
.phones.three { gap: .6rem; }
.phones.three .phone { width: min(13rem, 29vw); padding: .25rem; border-radius: 1.6rem; }
.phones.three .phone img { border-radius: 1.4rem; }
.feature .caption { font-size: .941rem; margin: 0 auto; max-width: none; }

@media (min-width: 52rem) {
  .feature-inner { grid-template-columns: 1fr 1fr; text-align: left; justify-items: start; }
  .feature-inner > .phone, .feature-inner > .phones { justify-self: center; }
  .feature p { margin: 0; }
  .feature.flip .feature-text { order: 2; }
  .feature.wide .feature-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .feature.wide p { margin: 0 auto; }
}

.statement {
  background: var(--band); color: #ffffff;
  text-align: center; padding: 6rem 1rem;
  --soft: #b9cccd; --text: #ffffff; --link: #9bdde0;
}
.statement h2 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.statement p { max-width: 36ch; }
.statement .more { margin-top: 1.4rem; font-size: 1.059rem; }

.pricing { padding: 5rem 1rem 3rem; text-align: center; }
.pricing .intro { margin-bottom: 2.4rem; }
.pricing .split { max-width: 46rem; margin: 0 auto; text-align: left; }
.pricing .card { padding: 1.4rem 1.5rem; }
.pricing .card h2 { font-size: 1.3rem; letter-spacing: 0; margin: 0 0 .4rem; }
.pricing .card p { font-size: 1rem; color: var(--text); }
.pricing .note { text-align: center; margin-top: 1.2rem; }
.faq { padding-top: 1rem; }                     /* the home page questions, right after the pricing cards */
.faq .split { align-items: start; }

/* A gentle rise as each section scrolls in, where the browser can do it without scripts */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: 0; transform: translateY(2.5rem); } to { opacity: 1; transform: none; } }
  }
}

/* Footer */

.site-footer {
  padding: 1.5rem 1rem 3rem;
  color: var(--soft);
  font-size: .765rem;                              /* footnote */
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between;
}
.site-footer nav { display: flex; gap: 1.2rem; }
.site-footer .examples { flex-basis: 100%; }
.site-footer a { color: var(--soft); }

[hidden] { display: none !important; }

@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
