/* Imara's public website. The look is the app's own (docs/design-v9b/README.md):
   Jost, the stone ground, off-white cards with radius 30, big lowercase titles,
   small spaced capitals above sections, burnt orange as the one action colour,
   colour carried by the shapes, flat (no shadows, no gradients).

   Every colour below is a value of app/lib/theme/palette.dart: Palette.light,
   and Palette.dark under prefers-color-scheme. Change a colour there first,
   then here. */

:root {
  color-scheme: light dark;
  --ink: #1C1A1F;
  --muted: #5F5B63;
  --label: #75716B;
  --ground: #EDEBE7;
  --card: #FAF9F7;
  --field: #F3F1ED;
  --raised: #FFFFFF;
  --line: #E4E1DB;
  --ember: #C2531B;
  --ember-deep: #A3441A;
  --ember-tint: #F6DDD0;
  --plum: #6B47C8;
  --plum-tint: #E9E3F5;
  --green: #0E8A66;
  --green-mark: #0E8A66;
  --green-tint: #DDF3EA;
  --butter: #F2C14E;
  --rose: #C9658F;
  --on-ink: #FFFFFF;
  --white: #FFFFFF;
  --ink-fixed: #1C1A1F;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F5F5F7;
    --muted: #B4B4B6;
    --label: #A2A2A4;
    --ground: #000000;
    --card: #1C1C1E;
    --field: #2C2C2E;
    --raised: #363638;
    --line: #3A3A3C;
    --ember: #C2531B;
    --ember-deep: #F0895A;
    --ember-tint: #441D09;
    --plum: #8466D6;
    --plum-tint: #281F40;
    --green: #188E6B;
    --green-mark: #63CBA8;
    --green-tint: #083225;
    --butter: #E0B347;
    --rose: #CE6C95;
    --on-ink: #000000;
  }
  /* The lion is ink lines on nothing: on dark his lines are drawn in the
     page's ink by the same colour matrix the app uses (lionOnDark). */
  .lion { filter: url(#lion-on-dark); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 Jost, "Avenir Next", system-ui, sans-serif;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 14px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 600; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .chip:focus-visible { border-radius: 999px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: 20px; top: -80px; z-index: 10;
  background: var(--ink); color: var(--on-ink); padding: 12px 20px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }

/* ── The head of every page ───────────────────────────── */
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 22px 0 6px; }
.word {
  font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -0.02em;
  text-decoration: none; color: var(--ink); padding: 6px 0;
}
.site-nav { flex: 1 1 100%; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--field); color: var(--ink);
  font-weight: 500; font-size: 15px; text-decoration: none;
}
.chip:hover { background: var(--line); }
.chip[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
@media (min-width: 900px) {
  .site-nav { flex: 0 1 auto; margin-left: auto; }
}

/* ── Page heads: the big lowercase title ──────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 34px 0 10px; }
.title {
  font-weight: 700; font-size: clamp(52px, 13vw, 112px); line-height: 0.95;
  letter-spacing: -0.025em;
}
.line {
  font-weight: 500; font-size: 13px; line-height: 1.5; letter-spacing: 0.14em;
  color: var(--muted); text-transform: lowercase; margin: 16px 0 0;
}
.lead { font-size: 20px; line-height: 1.5; max-width: 34em; margin: 22px 0 0; }
.page-head .mark { flex: none; width: 88px; }
@media (min-width: 900px) { .page-head .mark { width: 140px; } }

/* ── Labels, cards, rows ──────────────────────────────── */
.caps {
  font-weight: 500; font-size: 12px; line-height: 1.4; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px 6px;
}
.card .caps { color: var(--label); margin-left: 0; }
.card { background: var(--card); border-radius: 30px; padding: 26px 24px; }
@media (min-width: 900px) { .card { padding: 34px 36px; } }
.card > :last-child { margin-bottom: 0; }
.h2 { font-size: clamp(36px, 8vw, 52px); line-height: 1; letter-spacing: -0.025em; margin: 0 0 14px; }
.h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

section { margin: 44px 0 0; }
@media (min-width: 900px) { section { margin-top: 64px; } }

.dots { list-style: none; margin: 4px 0 18px; }
.dots li { position: relative; padding: 5px 0 5px 22px; }
.dots li::before {
  content: ""; position: absolute; left: 4px; top: 16px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--ink);
}

.more {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.more svg { width: 18px; height: 18px; }
.link { color: var(--ember-deep); font-weight: 600; text-underline-offset: 3px; }
.ink-link { font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

.rows { list-style: none; display: grid; gap: 8px; margin: 0; }
.rows > li, .rows > div { background: var(--card); border-radius: 22px; padding: 18px 20px; }
.rows dt { font-weight: 600; }
.rows dd { margin: 4px 0 0; color: var(--muted); }

/* ── The shapes that carry colour ─────────────────────── */
.shape {
  display: grid; place-items: center; aspect-ratio: 1; background: var(--c, var(--ember));
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.s-circle { border-radius: 50%; }
.s-flower { -webkit-mask-image: url(shapes/flower.svg); mask-image: url(shapes/flower.svg); }
.s-cloud { -webkit-mask-image: url(shapes/cloud.svg); mask-image: url(shapes/cloud.svg); }
.s-hex { -webkit-mask-image: url(shapes/hex.svg); mask-image: url(shapes/hex.svg); }
.s-soft { -webkit-mask-image: url(shapes/soft.svg); mask-image: url(shapes/soft.svg); }
.c-plum { --c: var(--plum); }
.c-green { --c: var(--green); }
.c-butter { --c: var(--butter); }
.c-rose { --c: var(--rose); }
.c-ember { --c: var(--ember); }
.shape svg { width: 38%; height: 38%; color: var(--white); }
.c-butter svg { color: var(--ink-fixed); }

/* An icon on a shape is drawn in a box of its own so the mask does not clip it. */
.badge { position: relative; display: grid; place-items: center; width: 72px; aspect-ratio: 1; }
.badge .shape { position: absolute; inset: 0; }
.badge svg { position: relative; width: 28px; height: 28px; color: var(--white); }
.badge.on-butter svg { color: var(--ink-fixed); }

/* ── The welcome cluster: three shapes and the lion in front ── */
.cluster { position: relative; width: min(402px, 100%); aspect-ratio: 402 / 330; margin: 0 auto; }
.cluster > * { position: absolute; }
.cluster .k1 { left: 11.44%; top: 5.45%; width: 32.84%; }
.cluster .k2 { right: 9.95%; top: 0; width: 27.86%; }
.cluster .k3 { left: 37.31%; top: 35.76%; width: 37.31%; }
.cluster .lion { left: 14.43%; bottom: 1.82%; height: 45.45%; width: auto; }

.hero { display: grid; gap: 28px; align-items: center; padding-top: 18px; }
.hero .title { font-size: clamp(56px, 15vw, 128px); }
.hero .say { font-weight: 600; font-size: clamp(26px, 5.4vw, 38px); line-height: 1.15; letter-spacing: -0.015em; max-width: 16em; margin: 22px 0 0; }
.hero .sub { color: var(--muted); font-size: 18px; margin: 14px 0 0; max-width: 32em; }
.soon { margin: 22px 0 0; font-weight: 500; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 40px; padding-top: 40px; }
}

/* ── A phone with a real screen of the app ─────────────── */
.shot { position: relative; margin: 0; display: grid; justify-items: center; padding: 48px 0 0; }
.shot .back { position: absolute; width: 62%; max-width: 300px; top: 0; }
.shot .back.left { left: 0; }
.shot .back.right { right: 0; }
.phone {
  position: relative; width: min(270px, 74vw); aspect-ratio: 540 / 1172;
  border-radius: 38px; overflow: hidden; background: var(--ground);
  border: 1px solid var(--line);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin: 14px 0 0; color: var(--muted); font-size: 15px; text-align: center; max-width: 270px; }

/* ── One kind of user: words beside a phone ───────────── */
.role { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) {
  .role { grid-template-columns: 1fr 1fr; gap: 56px; }
  .role.flip .role-text { order: 2; }
}

.trio { display: grid; gap: 12px; }
@media (min-width: 700px) { .trio { grid-template-columns: repeat(3, 1fr); } }
.trio .card { display: flex; flex-direction: column; gap: 14px; }
.trio .card p { margin: 0; }

.duo { display: grid; gap: 12px; }
@media (min-width: 800px) { .duo { grid-template-columns: 1fr 1fr; } }

/* ── The one action: a compact centred pill ───────────── */
.act { text-align: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; min-width: 210px; padding: 0 30px; border-radius: 999px;
  background: var(--ember); color: var(--white); font-weight: 600; font-size: 17px;
  text-decoration: none;
}
.btn:active { opacity: 0.85; }
.btn svg { width: 20px; height: 20px; }
.act .lion { height: 120px; width: auto; margin: 0 auto 6px; }
.act .ground-line { width: 160px; height: 2px; background: var(--ink); margin: 0 auto 26px; }
.act .h2 { margin-top: 0; }
.act p { max-width: 30em; margin-left: auto; margin-right: auto; }
.act .after { margin: 14px auto 0; color: var(--muted); font-size: 15px; }
.act p, .lead, .say { text-wrap: balance; }

/* ── Lists of steps ───────────────────────────────────── */
.steps { list-style: none; counter-reset: s; display: grid; gap: 8px; margin: 6px 0 0; }
.steps li {
  counter-increment: s; position: relative; background: var(--field); border-radius: 22px;
  padding: 14px 18px 14px 60px; min-height: 52px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 15px; line-height: 1;
}
.place { font-weight: 600; }

/* ── Long pages of words (privacy, terms, deleting an account) ── */
.prose { max-width: 46em; }
.prose h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; margin: 36px 0 12px; }
.prose h3 { font-size: 20px; line-height: 1.25; margin: 24px 0 8px; font-weight: 600; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose .card { margin: 14px 0; }
.draft {
  background: var(--ember-tint); color: var(--ember-deep); border-radius: 22px;
  padding: 16px 20px; font-weight: 600; margin: 24px 0 0;
}
.draft > span { display: block; font-weight: 400; color: var(--ink); margin-top: 4px; }
.after-grid { margin: 14px 6px 0; }
.todo { color: var(--ember-deep); font-weight: 600; }
.kv { display: grid; gap: 0; margin: 10px 0 14px; }
.kv > div { padding: 12px 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; }
.kv dt { font-weight: 600; }
.kv dd { margin: 2px 0 0; color: var(--muted); }
@media (min-width: 700px) {
  .kv > div { display: grid; grid-template-columns: 14em 1fr; gap: 20px; }
  .kv dd { margin: 0; }
}

/* ── The foot of every page ───────────────────────────── */
.site-foot { margin: 64px 0 0; padding: 30px 0 46px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 26px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-foot ul { list-style: none; display: grid; gap: 2px; }
.site-foot .caps { margin-left: 0; }
.site-foot li a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.site-foot li a:hover { text-decoration: underline; }
.site-foot .fine { color: var(--muted); font-size: 14px; margin: 26px 0 0; }

/* ── 404 ──────────────────────────────────────────────── */
.lost { text-align: center; padding: 40px 0 0; }
.lost .lion { height: 150px; width: auto; margin: 0 auto; }
.lost .ground-line { width: 220px; height: 2px; background: var(--ink); margin: 0 auto 30px; }

@media (prefers-reduced-motion: no-preference) {
  .chip, .btn { transition: background-color 0.15s ease, opacity 0.15s ease; }
}
.lost .lead { margin-left: auto; margin-right: auto; }
