/*
  Path to Pin site styles. One file for every page, in the manner of the Kindhour site
  (kindhour.quietcockatoo.com): same layout, classes and type, with Path to Pin's own colours
  taken from its app icon:
  - 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;
  - a sunrise sky over warm paper (light) and an evening fairway (dark), the app's fairway green
    for links and buttons;
  - grouped rounded cards like the app's Settings, and glass buttons.
  No all-capitals anywhere. No web fonts, no images from elsewhere.
*/

:root {
  --bg: #f7f3ea;            /* paper, as in the season book */
  --card: #fffdf8;
  --text: #15241b;          /* deep green ink */
  --soft: #55615a;
  --line: rgba(21, 36, 27, .12);
  --link: #1a6b41;          /* the app's fairway green, a shade deeper for small text */
  --button: #1e7a4a;        /* the app's accent colour */
  --button-text: #ffffff;
  --pill: #15241b;
  --pill-text: #ffffff;
  --glass: rgba(255, 255, 255, .55);
  --glass-edge: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(21, 36, 27, .06), 0 8px 24px rgba(21, 36, 27, .06);
  --sky: linear-gradient(#f3c77a, #f8e2b5 55%, var(--bg));   /* the icon's sunrise */
  --bg-alt: #fffdf8;
  --bar: rgba(247, 243, 234, .72);
  --ring: rgba(21, 36, 27, 0);
  --band: #0f3a25;          /* the statement band: the icon's deep green */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1d16;          /* the course after sunset */
    --card: #182b21;
    --text: #ffffff;
    --soft: #b3c2b8;
    --line: rgba(255, 255, 255, .12);
    --link: #7fd3a0;
    --button: #5cb985;
    --button-text: #0b1a12;
    --pill: #f7f3ea;
    --pill-text: #15241b;
    --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(#0a1510, #173325 50%, var(--bg));
    --bg-alt: #132419;
    --bar: rgba(15, 29, 22, .72);
    --ring: rgba(255, 255, 255, .14);
    --band: #08160f;
  }
}

* { 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 Plus adds: one item to a line with a tick, as in the app. */
.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);
}
.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 4rem;
  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: #15241b;
  box-shadow: 0 0 0 1px var(--ring), 0 2px 6px rgba(21, 36, 27, .14), 0 30px 70px rgba(21, 36, 27, .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; }

/* Apple Watch screens in a plain rounded frame, each with a caption. */
.watches { display: flex; gap: 1.2rem; justify-content: center; margin: 0; padding: 0; }
.watches figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.watch {
  width: min(11.5rem, 40vw);
  padding: .6rem;
  border-radius: 2.6rem;
  background: #15241b;
  box-shadow: 0 0 0 1px var(--ring), 0 2px 6px rgba(21, 36, 27, .14), 0 24px 50px rgba(21, 36, 27, .25);
}
.watch img { display: block; width: 100%; height: auto; border-radius: 2rem; }
.watches figcaption { font-size: .941rem; line-height: 1.35; color: var(--soft); text-align: center; max-width: 11.5rem; }
.watches figcaption strong { color: var(--text); font-weight: 600; }

.strip {
  display: block; width: 100%; max-width: 62rem; height: auto;
  border-radius: 1.25rem;
  box-shadow: 0 0 0 1px var(--ring), 0 20px 50px rgba(21, 36, 27, .2);
}
.icons {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 1.4rem;
  font-size: .941rem; color: var(--soft);
}
.icons li { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.icons img { width: 4rem; height: 4rem; border-radius: 22.5%; box-shadow: 0 0 0 1px var(--ring), 0 4px 12px rgba(21, 36, 27, .18); }

@media (min-width: 52rem) {
  .feature-inner { grid-template-columns: 1fr 1fr; text-align: left; justify-items: start; }
  .feature-inner > .phone, .feature-inner > .phones, .feature-inner > .watches { 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: #b8cbbf; --text: #ffffff; --link: #8fdcab;
}
.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 a { color: var(--soft); }

[hidden] { display: none !important; }

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