/*
  Hat Bag Bottle site styles. One file for every page, in the manner of the Kindhour and
  Path to Pin sites (same layout, classes and type), with Hat Bag Bottle's own colours from
  docs/DESIGN.md:
  - the system San Francisco font, sized like Apple's text styles (body 17, title3 20,
    large title 34, subheadline 15, footnote 13); on iPhone and iPad it follows the reader's
    own text size through -apple-system-body;
  - the app's morning ground (light) and evening ground (dark), flat, no gradients
    (DESIGN.md: "Avoid: gradients");
  - white cards like the app's panels, the "done" green for links and buttons, and a
    stitched name label (dashed border in a child's colour) as the one decorative detail.
  No all-capitals anywhere. No web fonts, no images, nothing from elsewhere.
  Colours appear only in the variables below.
*/

:root {
  --bg: #eceeea;            /* ground, morning */
  --card: #ffffff;          /* surface */
  --text: #171a1f;          /* ink */
  --soft: #535a63;          /* muted text */
  --line: rgba(23, 26, 31, .12);
  --link: #1b6b45;          /* done / added green */
  --button: #1b6b45;
  --button-text: #ffffff;
  --bar: rgba(236, 238, 234, .78);
  --shadow: 0 1px 2px rgba(23, 26, 31, .06), 0 8px 24px rgba(23, 26, 31, .06);
  --child-a: #1f5fa8;       /* mock-up child colour: blue */
  --child-a-tint: #dce8f5;
  --child-b: #b4500a;       /* mock-up child colour: orange */
  --child-b-tint: #f8e3cf;
  --child-b-ink: #9a4408;   /* the orange, a shade deeper so the name label passes 4.5:1 on its tint */
  --band: #14181f;          /* the evening ground, for the one dark band */
  --band-text: #ffffff;
  --band-soft: #c3cad3;
  --band-link: #7fd3a0;     /* the done green, lightened for the dark band */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;          /* ground, evening */
    --card: rgba(255, 255, 255, .07);   /* translucent white over ground */
    --text: #ffffff;
    --soft: #c3cad3;
    --line: rgba(255, 255, 255, .14);
    --link: #7fd3a0;        /* the done green, lightened for the dark ground (about 10:1) */
    --button: #7fd3a0;
    --button-text: #0d1a12;
    --bar: rgba(20, 24, 31, .78);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --child-a: #8db8ea;     /* the child colours, lightened to read on the dark ground */
    --child-a-tint: rgba(141, 184, 234, .12);
    --child-b: #f0a970;
    --child-b-tint: rgba(240, 169, 112, .12);
    --child-b-ink: #f0a970;
    --band: #0c0f14;
    --band-text: #ffffff;
    --band-soft: #c3cad3;
    --band-link: #7fd3a0;
  }
}

* { box-sizing: border-box; }

html {
  font-size: 106.25%;       /* 17px, Apple's body size */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Only on iPhone and iPad: the reader's own text size (Dynamic Type). */
@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;
  overflow-wrap: break-word;
}

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; }

/* 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;
  min-height: 3rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1rem;
}
.brand {
  color: var(--text); text-decoration: none;
  font-size: 1rem; font-weight: 600;               /* headline */
}
.topbar nav { display: flex; gap: 1.3rem; font-size: .882rem; }
.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; }

/* Page header for reading pages: flat ground, no gradient */

.head { padding: 1rem 1rem 2rem; }
.head-inner { max-width: 40rem; margin: 0 auto; }
main, .site-footer { max-width: 42rem; margin: 0 auto; }
.home .site-footer { max-width: 64rem; }

.page-title {
  font-size: 2rem; line-height: 1.2; font-weight: 700;   /* large title */
  margin: 2rem 0 .4rem;
}
.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 > :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 h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0; }
.card p, .card li { margin: .5rem 0; }
.card ul, .card ol { padding-left: 1.3rem; margin: .5rem 0; }

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

/* A quoted string from the app, such as the camera permission text */
.quote {
  margin: .6rem 0; padding: .6rem .9rem;
  border-left: 3px solid var(--link);
  background: var(--bg);
  border-radius: 0 .6rem .6rem 0;
}

.split { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .split { grid-template-columns: 1fr 1fr; } }
.split .card { margin: 0; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.2rem; padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--button); color: var(--button-text);
  font-weight: 600; text-decoration: none;
}
.button:hover { filter: brightness(1.06); text-decoration: none; }

/* Home page: big centred headlines, one idea per section */

.landing { max-width: none; padding: 0; }
.hero { text-align: center; padding: 3.5rem 1rem 4rem; }
.eyebrow { font-size: 1.176rem; font-weight: 600; margin: 0 0 .4rem; }
.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: 1.05; font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 auto .9rem; max-width: 14ch;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.176rem, 2.4vw, 1.5rem); line-height: 1.35; color: var(--soft);
  margin: 0 auto 1.4rem; max-width: 32ch;
}
.hero .note { margin: 0; font-size: 1rem; }

.feature { padding: 4.5rem 1rem; }
.feature.alt { background: var(--card); }
.feature-inner {
  max-width: 62rem; margin: 0 auto;
  display: grid; gap: 2.4rem; align-items: center; justify-items: center;
  text-align: center;
}
.feature h2, .statement h2, .pricing h2 {
  text-wrap: balance;
  font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; 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: 34ch;
}
.feature p strong, .statement p strong { color: var(--text); font-weight: 600; }

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

/* A day laid out in words: the app's Today panel, drawn without pictures.
   Each child has a stitched name label in their colour and an emblem shape, so colour is
   never the only signal. */
.day {
  width: min(22rem, 100%);
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  text-align: left;
}
.feature.alt .day { background: var(--bg); box-shadow: none; }
.day-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 .8rem; }
.child { border-radius: .9rem; padding: .7rem .8rem; margin: .6rem 0 0; }
.child.a { background: var(--child-a-tint); }
.child.b { background: var(--child-b-tint); }
.label {
  display: inline-block;
  padding: .1rem .6rem;
  border: 2px dashed currentColor;                /* the stitched iron-on name label */
  border-radius: .4rem;
  font-weight: 700;
  transform: rotate(-1.2deg);
}
.child.a .label { color: var(--child-a); }
.child.b .label { color: var(--child-b-ink); }
.child p { margin: .45rem 0 0; color: var(--text); font-size: 1rem; line-height: 1.4; }

/* The one dark band, for a single big message */
.statement {
  background: var(--band); color: var(--band-text);
  text-align: center; padding: 5rem 1rem;
}
.statement h2 { max-width: 18ch; margin-left: auto; margin-right: auto; }
.statement p { color: var(--band-soft); max-width: 38ch; }
.statement p strong { color: var(--band-text); }
.statement a { color: var(--band-link); }
.statement :focus-visible { outline-color: var(--band-link); }

/* What's free and what the one-time unlock adds */
.pricing { padding: 4.5rem 1rem 3rem; text-align: center; }
.pricing .intro { margin-bottom: 2.2rem; }
.pricing .split { max-width: 46rem; margin: 0 auto; text-align: left; }
.pricing .card { padding: 1.3rem 1.4rem; }
.pricing .card h2 { font-size: 1.3rem; letter-spacing: 0; margin: 0 0 .4rem; }
.pricing .card p.lead { color: var(--soft); margin: .2rem 0 .4rem; }
.pricing .note { text-align: center; margin-top: 1.2rem; font-size: 1rem; }

/* 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; flex-wrap: wrap; gap: 1.2rem; }
.site-footer a { color: var(--soft); }

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