/* Here My Story — marketing site.
   Colours and type follow the app (lib/theme.dart): navy ink, the logo's
   blue, and poppy kept for pins and the one main action. Bricolage Grotesque
   is the interface; Newsreader is used only for memories, the same rule the
   app follows for your own words. */

:root {
  --mist: #F0F5FA;
  --paper: #FFFFFF;
  --ink: #062752;
  --blue: #1A6FAE;
  --blue-soft: #DCEBF7;
  --water: #C3DBEF;
  --poppy: #F2476A;
  --poppy-deep: #D9335A;
  --muted: #5B6B80;
  --line: #D8E2EE;

  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: 24px;
  --band: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1168px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); padding: 10px 14px; border-radius: 10px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand img { height: 44px; width: auto; display: block; }
.site-nav { display: flex; gap: 26px; margin-left: 8px; }
.site-nav a, .signin {
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 8px 0;
}
.site-nav a:hover, .signin:hover { text-decoration: underline; }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 22px; }

.button {
  display: inline-block;
  background: var(--poppy);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 14px;
}
.button:hover { background: var(--poppy-deep); color: #fff; }
.button-small { padding: 10px 18px; border-radius: 12px; }

/* ---------- Home: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: var(--band);
}
.hero h1 {
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 22px;
}
.hero .lede { font-size: 21px; line-height: 1.45; max-width: 29em; margin-bottom: 30px; }
.fineprint { margin-top: 14px; font-size: 15.5px; color: var(--muted); }

/* The map. Pins and their stories are real text laid over a drawn map. */
.map {
  position: relative;
  aspect-ratio: 1 / 0.94;
  border-radius: 32px;
  background: var(--blue-soft);
  overflow: hidden;
}
.map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  margin: 0;
}
.pin p {
  margin: 0 0 8px;
  width: max-content;
  max-width: 14.5em;
  background: var(--paper);
  border-radius: 14px;
  padding: 10px 14px 9px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.35;
  box-shadow: 0 6px 20px rgba(6, 39, 82, 0.13);
}
.pin span {
  display: block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pin svg { width: 30px; height: 40px; display: block; flex: none; }
.pin-1 { left: 66%; top: 31%; }
.pin-2 { left: 27%; top: 50%; }
.pin-3 { left: 70%; top: 70%; }
.pin-4 { left: 30%; top: 93%; }

@media (prefers-reduced-motion: no-preference) {
  .pin svg { animation: drop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
  .pin p { animation: surface 0.45s ease-out both; }
  .pin-1 svg { animation-delay: 0.25s; } .pin-1 p { animation-delay: 0.55s; }
  .pin-2 svg { animation-delay: 0.6s; }  .pin-2 p { animation-delay: 0.9s; }
  .pin-3 svg { animation-delay: 0.95s; } .pin-3 p { animation-delay: 1.25s; }
  .pin-4 svg { animation-delay: 1.3s; }  .pin-4 p { animation-delay: 1.6s; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-34px); } }
@keyframes surface { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Home: sections ---------- */

.band { padding: var(--band) 0; }
.band-paper { background: var(--paper); }
.band h2 {
  font-size: clamp(30px, 3.8vw, 44px);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.band .intro { font-size: 19px; color: var(--muted); max-width: 36em; }
.more { display: inline-block; margin-top: 28px; font-weight: 600; }

/* "A map of your life, not your trips": statement left, the four reasons right. */
.difference { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; }
.difference .intro { font-size: 20px; color: var(--ink); }
.reasons { margin: 0; }
.reasons div { padding: 20px 0; border-top: 1px solid var(--line); }
.reasons div:last-child { border-bottom: 1px solid var(--line); }
.reasons dt { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 4px; }
.reasons dd { margin: 0; color: var(--muted); max-width: 34em; }

/* How it works: a real sequence, so it is numbered. */
.steps {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 16px;
  border-radius: 50%;
  background: var(--blue-soft); color: var(--ink);
  font-weight: 700; font-size: 18px;
}
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--muted); }

/* What people map: a legend. Each row is a kind of map, with one pin from it. */
.legend { list-style: none; margin: 36px 0 0; padding: 0; }
.legend li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 8px 24px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.legend li:last-child { border-bottom: 1px solid var(--line); }
.legend li > svg { width: 24px; height: 32px; margin-top: 2px; }
.legend h3 { font-size: 23px; margin-bottom: 6px; }
.legend h3 a { color: var(--ink); text-decoration: none; }
.legend h3 a:hover { color: var(--blue); text-decoration: underline; }
.legend p { color: var(--muted); max-width: 32em; }
.legend blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
}

/* Map or journal: the same four stories as the hero, as the app lists them. */
.views { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.journal {
  background: var(--paper);
  border-radius: 24px;
  padding: 10px 0 14px;
  box-shadow: 0 10px 34px rgba(6, 39, 82, 0.08);
}
.band-paper .journal { background: var(--mist); box-shadow: none; }
.journal h3 {
  font-weight: 400; font-size: 24px; color: var(--muted);
  letter-spacing: -0.02em; padding: 16px 26px 4px;
}
.journal ul { list-style: none; margin: 0; padding: 0; }
.journal li { padding: 9px 26px; }
.journal strong { display: block; font-weight: 600; font-size: 17px; }
.journal span { display: block; font-family: var(--serif); font-size: 16.5px; color: var(--muted); }

/* A location-locked story, as a reader sees it away from the place and at it. */
.lock-demo { display: grid; gap: 16px; }
.lock-card {
  position: relative;
  background: var(--paper);
  border-radius: 20px;
  padding: 20px 26px 22px 68px;
  box-shadow: 0 10px 34px rgba(6, 39, 82, 0.08);
}
.band-paper .lock-card { background: var(--mist); box-shadow: none; }
.lock-card svg { position: absolute; left: 24px; top: 22px; width: 26px; height: 35px; }
.lock-card .state { font-size: 14.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.lock-card strong { display: block; font-size: 19px; }
.lock-card span { color: var(--muted); }
.lock-card blockquote { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.45; }
.lock-card-shut { margin-right: 48px; }
.lock-card-open { margin-left: 48px; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 32px 0 0; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 16.5px; }
caption { text-align: left; color: var(--muted); font-size: 15.5px; padding-bottom: 10px; caption-side: bottom; padding-top: 12px; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px 14px 0; border-top: 1px solid var(--line); }
thead th { border-top: 0; font-size: 15px; color: var(--muted); font-weight: 600; padding-bottom: 10px; }
tbody th { font-weight: 700; width: 22%; }
tbody tr.us th, tbody tr.us td { background: var(--blue-soft); }
tbody tr.us th { padding-left: 16px; border-radius: 12px 0 0 12px; }
tbody tr.us td:last-child { border-radius: 0 12px 12px 0; }
tbody tr.us th, tbody tr.us td, tbody tr.us + tr th, tbody tr.us + tr td { border-top-color: transparent; }

/* ---------- Questions and answers ---------- */

.qa-list { max-width: 46em; margin-top: 28px; }
.qa { padding: 22px 0; border-top: 1px solid var(--line); }
.qa-list .qa:last-child { border-bottom: 1px solid var(--line); }
.qa h3 { font-size: 21px; line-height: 1.25; margin-bottom: 8px; letter-spacing: -0.01em; }
.qa p { color: var(--muted); }
.qa p + p { margin-top: 10px; }
.prose .qa { border: 0; padding: 0; margin-top: 1.8em; }
.prose .qa p { color: var(--ink); }

/* ---------- Call to action ---------- */

.cta {
  margin: 64px 0 0;
  padding: 40px;
  border-radius: 28px;
  background: var(--blue-soft);
}
.cta h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.025em; margin-bottom: 10px; }
.cta p { max-width: 30em; margin-bottom: 24px; font-size: 18px; }
.cta .fineprint { margin: 14px 0 0; font-size: 15.5px; }
.closing .cta { margin-top: 0; }

/* ---------- Documents: guides, use cases, comparisons ---------- */

.doc { padding-top: 8px; padding-bottom: var(--band); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.crumbs li + li::before { content: "/"; color: var(--muted); margin-right: 6px; }
.crumbs a { color: var(--muted); }

.doc-head { max-width: 50rem; padding: 28px 0 36px; }
.doc-head h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.doc-head .lede { font-size: 21px; line-height: 1.45; max-width: 34em; }
.dateline { margin-top: 18px; font-size: 15px; color: var(--muted); }

.doc-grid { display: grid; grid-template-columns: minmax(0, 44rem) minmax(0, 1fr); gap: 72px; align-items: start; }
.contents { position: sticky; top: 24px; border-left: 1px solid var(--line); padding-left: 22px; }
.contents h2 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 10px; }
.contents ol { list-style: none; margin: 0; padding: 0; font-size: 15.5px; }
.contents li { margin-bottom: 8px; line-height: 1.3; }
.contents a { color: var(--ink); text-decoration: none; }
.contents a:hover { text-decoration: underline; color: var(--blue); }

.prose { font-size: 18.5px; line-height: 1.6; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font-size: clamp(26px, 3vw, 33px); letter-spacing: -0.025em; margin: 2.1em 0 0.6em; }
.prose h3 { font-size: 21.5px; line-height: 1.25; letter-spacing: -0.01em; margin: 1.7em 0 0.45em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 700; }
.prose .table-scroll { margin: 0 0 1.4em; }
.prose table { font-size: 16px; line-height: 1.45; }
/* A table with many columns may run past the text column, up to the page width. */
.prose .table-wide { width: min(1120px, 100vw - 2 * var(--gutter)); }
.prose .cta { margin: 2.6em 0 0; }
.prose .cta h2 { margin-top: 0; }
.prose .cta p { margin-bottom: 24px; }
.prose .cta .fineprint { margin: 14px 0 0; }
.note { color: var(--muted); font-size: 16.5px; }

/* A memory, shown the way the app shows one: the story in a serif, on paper. */
.memory {
  margin: 1.8em 0;
  padding: 22px 26px 20px 62px;
  background: var(--paper);
  border-radius: 18px;
  position: relative;
}
.memory::before {
  content: "";
  position: absolute; left: 22px; top: 22px; width: 24px; height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 46'%3E%3Cpath d='M17 44C9 33 2 25 2 17a15 15 0 0 1 30 0c0 8-7 16-15 27z' fill='%23F2476A'/%3E%3Ccircle cx='17' cy='17' r='5.5' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / contain;
}
.memory blockquote { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.5; }
.memory figcaption { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.memory-label { font-size: 15px; color: var(--muted); margin: 1.8em 0 -1.2em; }

/* Long numbered lists of questions and prompts. */
.prose ol.asks { list-style: none; padding: 0; counter-reset: none; }
.prose ol.asks li {
  counter-increment: ask;
  display: grid; grid-template-columns: 2.4em minmax(0, 1fr);
  padding: 9px 0; margin: 0;
  border-top: 1px solid var(--line);
}
.prose ol.asks li::before { content: counter(ask); color: var(--muted); font-size: 15px; font-weight: 600; padding-top: 0.2em; }
.prose.count-asks, .count-asks { counter-reset: ask; }

.sources { font-size: 16px; line-height: 1.5; }
.sources li { margin-bottom: 0.7em; }

.page-list { list-style: none; margin: 0; padding: 0; }
.page-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.page-list li:last-child { border-bottom: 1px solid var(--line); }
.page-list a { font-weight: 700; font-size: 21px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.page-list a:hover { color: var(--blue); text-decoration: underline; }
.page-list p { margin: 4px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 40em; }
.prose .page-list { padding: 0; }
.prose .page-list li { margin: 0; }

.related { margin-top: 72px; max-width: 44rem; }
.related h2 { font-size: 24px; margin-bottom: 16px; }

.doc-hub .doc-grid, .doc-page .doc-grid { grid-template-columns: minmax(0, 46rem); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 16px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 40px 64px; }
.footer-about img { height: 40px; width: auto; display: block; margin-bottom: 16px; }
.footer-about p { color: var(--muted); max-width: 24em; margin-bottom: 12px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-nav h2 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 9px; line-height: 1.3; }
.footer-nav a { color: var(--ink); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.copyright a { margin-left: 18px; color: var(--muted); }

/* ---------- Smaller screens ---------- */

@media (max-width: 1000px) {
  .doc-grid { grid-template-columns: minmax(0, 44rem); gap: 0; }
  .contents { position: static; grid-row: 1; margin-bottom: 36px; }
  .site-nav { gap: 20px; }
}

@media (max-width: 860px) {
  :root { --band: 56px; --gutter: 20px; }
  .site-header .wrap { flex-wrap: wrap; gap: 6px 16px; padding-top: 16px; padding-bottom: 10px; }
  .brand img { height: 36px; }
  .site-nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; white-space: nowrap; }
  .site-nav a { font-size: 15px; padding: 8px 0; }
  .site-actions { gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 20px; }
  .hero .lede { font-size: 19px; }
  .map { max-width: 560px; }
  .difference, .views { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .legend li { grid-template-columns: 26px minmax(0, 1fr); }
  .legend blockquote { grid-column: 2; margin-top: 6px; font-size: 18px; }
  .pin p { font-size: 15px; max-width: 12.5em; padding: 8px 12px; }
  .lock-card-shut { margin-right: 20px; }
  .lock-card-open { margin-left: 20px; }
  .cta { padding: 28px 24px; border-radius: 22px; }
  .prose { font-size: 18px; }
  .memory { padding: 18px 20px 16px 54px; }
  .memory::before { left: 18px; top: 18px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  /* The hero's own button is on screen, so the header keeps only Sign in. */
  .site-actions .button { display: none; }
  /* Three pins, re-spaced for a narrow, taller map. */
  .map { aspect-ratio: 1 / 1.12; }
  .pin-1 { left: 62%; top: 36%; }
  .pin-2 { left: 32%; top: 64%; }
  .pin-3 { left: 66%; top: 93%; }
  .pin-4 { display: none; }
  .footer-nav { grid-template-columns: 1fr; }
}
