/* Lora (SIL Open Font License, fonts/OFL.txt), served from this site: no outside requests.
   The same typeface the app uses for headings. */
@font-face { font-family: "Lora"; src: url("/fonts/lora-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --plum: #4A1838;
  --pink: #D84A63;
  --pink-text: #B8324B; /* pink dark enough for text and links on cream (5.2:1) */
  --cream: #FDF7F4;
  --card: #FFFFFF;
  --ink: #2E2128;
  --muted: #6E5F67;
  --line: #EEDFE3;
  --tint: #F9ECEF;
  --tint-border: #EBCFD6;
  --on-dark: #FFFFFF; /* text on plum */
  --frame: #241A20; /* phone frames around the app screens */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}

a { color: var(--pink-text); text-underline-offset: 3px; }
a:hover { color: var(--plum); }
a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 4px; }

/* Keyboard users can jump past the header; hidden until focused. */
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 14px; background: var(--plum); color: var(--on-dark); border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; color: var(--on-dark); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Header: small logo on every page */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); }
.brand img { width: 44px; height: auto; display: block; }
.brand span { font: 600 22px/1 var(--serif); letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 18px; font-size: 15px; }
.site-nav a { color: var(--plum); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); color: var(--plum); line-height: 1.25; font-weight: 600; }
h1 { font-size: 40px; margin: 0 0 12px; }
h2 { font-size: 28px; margin: 56px 0 16px; }
h3 { font-size: 19px; margin: 0 0 6px; }

/* Home hero: the logo, prominent */
.hero { text-align: center; padding: 48px 0 8px; }
.hero img { width: min(320px, 78vw); height: auto; display: block; margin: 0 auto 24px; }
/* Optical centring: the feathers reach further left than the arrowhead does right,
   so the heart's bottom point sits 6.16% of the logo's width right of centre.
   Shift it back so the point lines up with the heading (scales with the logo). */
.hero picture img { transform: translateX(-6.16%); }
.hero .tagline { font: italic 21px/1.5 var(--serif); color: var(--muted); margin: 0 auto; max-width: 30em; }

.lead { font-size: inherit; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.cards p { margin: 0; color: var(--ink); }

/* "How Cheramor works": two columns on wider screens, a small icon on each card */
.features { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* The last card ("Support when it matters") gets its own full-width row, set apart with the tint. */
.features li.wide { grid-column: 1 / -1; background: var(--tint); border-color: var(--tint-border); }
.features li.wide .icon { background: var(--card); }
.icon {
  width: 40px; height: 40px; padding: 8px; margin-bottom: 10px; display: block;
  border-radius: 12px; background: var(--tint);
  fill: none; stroke: var(--pink-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* "See how it works": cropped app screens in phone frames. Everything here is scoped to .shots,
   so the section can't change anything else on the page. Desktop: two phones side by side, 320px wide.
   Phones: a swipe row; each phone is 76% of the screen (260-300px), so the next one peeks in. */
.shots { display: grid; grid-template-columns: repeat(2, 320px); justify-content: center; gap: 40px 36px; margin-top: 28px; }
.shots figure { margin: 0; }
.shots .phone { position: relative; padding: 8px 8px 0; border-radius: 40px 40px 0 0; background: var(--frame); }
/* The screens are cropped: frame and screen fade into the page at the bottom. A plain gradient
   overlay, not a CSS mask (iPhone Safari can draw masked elements inside a scrolling row as nothing). */
.shots .phone::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--cream));
}
.shots img { display: block; width: 100%; height: auto; border-radius: 32px 32px 0 0; }
.shots figcaption { margin-top: 12px; text-align: center; }
.shots:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; border-radius: 12px; }
.shots-note { color: var(--muted); font-style: italic; text-align: center; margin-top: 24px; }
@media (max-width: 720px) {
  .shots {
    display: flex; justify-content: flex-start; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 24px -20px 0; padding: 0 20px 12px; scroll-padding-left: 20px;
  }
  .shots figure { flex: none; width: 76vw; min-width: 260px; max-width: 300px; scroll-snap-align: start; }
}

.note {
  background: var(--tint);
  border-left: 4px solid var(--pink);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0;
}
.note p { margin: 0; }
.note p + p { margin-top: 8px; }

/* "Want early access? Email us": a mailto link styled as a button (no form, nothing collected). */
.button {
  display: inline-block; margin: 6px 0 4px; padding: 12px 22px; border-radius: 999px;
  background: var(--plum); color: var(--on-dark); font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--pink-text); color: var(--on-dark); }

.contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.contact a { font-size: 19px; font-weight: 600; word-break: break-all; }
.contact p { margin: 4px 0 0; color: var(--muted); }
.resources a { word-break: normal; }
.resources strong { font: 600 19px/1.4 var(--serif); color: var(--plum); }
.resources p { color: var(--ink); }
.resources p a { font-size: inherit; font-weight: 600; }

main { padding-bottom: 48px; }
main.page { padding-top: 40px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
/* Menu links at least 24px tall to tap (WCAG 2.2 target size). */
.site-nav a, .site-footer nav a { display: inline-block; padding: 6px 0; }
.site-footer nav a + a::before { content: "|"; color: var(--line); margin-right: 10px; display: inline-block; }
.site-footer p { margin: 4px 0; }

/* Legal pages (drafts only for now) */
.draft-banner {
  background: var(--plum);
  color: var(--on-dark);
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
}
.legal h2 { font-size: 24px; margin-top: 40px; }
.legal h3 { font-size: 18px; margin-top: 24px; }
.legal li { margin: 6px 0; }
.legal blockquote { margin: 16px 0; padding: 12px 18px; background: var(--tint); border-radius: 10px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; margin-top: 44px; }
  /* Phones: a slightly smaller header so the name, Support and Resources fit on one line at 320px. */
  .site-header .wrap { padding: 0 16px; gap: 12px; }
  .brand { gap: 8px; }
  .brand img { width: 36px; }
  .brand span { font-size: 19px; }
  .site-nav { gap: 12px; font-size: 14px; }
  .hero { padding-top: 32px; }
  .hero img { margin-bottom: 20px; }
}

a[href^="tel:"] { white-space: nowrap; }
