/* Crayon Plants — the website. Crayon Pets' paper (crayonpets-lp/site/static/site.css), in the app's
   colours (lib/app/theme/app_theme.dart): cream paper, a leaf's green for what can be tapped, a
   pot's terracotta for the little marks. Sides are logical (inline-start, inline-end) so that the
   Arabic page (dir="rtl") turns round; the pictures are never mirrored. No script. */

:root {
  --paper: #EFE8DA;
  --paper-light: #F7F2E7;
  --paper-shade: #DCD2BD;
  --ink: #2A2A30;
  --ink-soft: #4E4A47;
  --muted: #6B6A72;
  --leaf: #3F6B4C;
  --leaf-deep: #2A4A34;
  --terracotta: #C4673F;
  --terracotta-deep: #9A4A27;
  --faint: rgba(42, 42, 48, .14);
  --sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --latin: "CP Josefin", "Josefin Sans", system-ui, sans-serif;
  --tracking: .04em;
}
:lang(ja), :lang(zh-Hans), :lang(zh-Hant), :lang(ko) { --tracking: .1em; }
/* Thai, Devanagari and Arabic letters join up; spacing them out would pull them apart. */
:lang(th), :lang(hi), :lang(ar) { --tracking: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* The tooth of the paper. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .29 0 0 0 0 .2 0 0 0 .16 -.02'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  font: 16px/1.75 var(--sans);
}
a { color: var(--leaf); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) p, :lang(ko) li { word-break: keep-all; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) .tagline, :lang(ja) .line { word-break: auto-phrase; }

/* The bar along the top: the name, and the languages. */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.mark { font: 600 12px/1 var(--latin); letter-spacing: .34em; color: var(--leaf); text-decoration: none; padding: 10px 0; }
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; font-size: 13px; color: var(--muted);
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { background: rgba(63, 107, 76, .09); color: var(--leaf); }
.langs svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.langs ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); margin: 0; padding: 8px; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(9em, 1fr)); gap: 2px;
  background: var(--paper-light); border-radius: 14px; box-shadow: 0 12px 34px rgba(60, 48, 30, .16);
  max-height: min(70vh, 560px); overflow: auto; width: max-content; max-width: calc(100vw - 32px);
}
.langs li a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.langs li a:hover { background: rgba(63, 107, 76, .09); }
.langs li a[aria-current] { color: var(--leaf); background: rgba(63, 107, 76, .12); }

/* The little marks: a stroke of terracotta crayon, and a leaf. */
.rule { display: block; width: 24px; height: 3px; margin: 0 auto 16px; border-radius: 2px; background: var(--terracotta); }

/* The top: the icon, the name, the line from the store and the badge. */
.hero { max-width: 40em; margin: 0 auto; padding: 84px 16px 30px; text-align: center; }
.icon { display: block; width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 25px; box-shadow: 0 1px 0 rgba(42, 42, 48, .08), 0 10px 26px rgba(80, 60, 30, .16); }
.hero h1 { margin: 0; font-weight: normal; }
.name {
  display: block; font-family: var(--serif); font-weight: var(--serif-weight);
  font-size: clamp(32px, 1.2rem + 2.6vw, 52px); line-height: 1.25; letter-spacing: .05em; color: var(--ink);
}
.latin { display: block; margin-top: 12px; font: 600 12px/1 var(--latin); letter-spacing: .42em; text-indent: .42em; color: var(--leaf); }
.tagline {
  margin: 16px 0 0; font-family: var(--serif); font-weight: var(--serif-weight);
  font-size: clamp(17px, 1rem + .5vw, 21px); line-height: 1.7; letter-spacing: var(--tracking); color: var(--leaf-deep);
  text-wrap: balance;
}
.lead { max-width: 32em; margin: 16px auto 26px; color: var(--ink-soft); line-height: 1.9; text-wrap: pretty; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.badge { display: inline-block; border-radius: 9px; }
.badge img { display: block; height: 48px; width: auto; }

/* The screenshots: a strip to scroll through, all six in a row on a wide screen. */
.shots { padding: 10px 0 18px; }
.strip {
  display: flex; gap: 14px; margin: 0 auto; padding: 8px 16px 18px; list-style: none; max-width: 1240px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--paper-shade) transparent;
}
.strip li { flex: none; scroll-snap-align: start; }
.strip img { display: block; width: min(64vw, 250px); height: auto; border-radius: 16px; background: var(--paper-shade); box-shadow: 0 8px 22px rgba(80, 60, 30, .14); }
@media (min-width: 1100px) {
  .strip { justify-content: center; overflow: visible; }
  .strip li { flex: 1 1 0; min-width: 0; }
  .strip img { width: 100%; }
}

/* What the app does: the description from the store, a section a card. */
.about { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; }
.intro { max-width: 36em; margin: 0 auto 34px; text-align: center; }
.line {
  margin: 0; font-family: var(--serif); font-weight: var(--serif-weight);
  font-size: clamp(20px, 1rem + 1vw, 27px); line-height: 1.6; letter-spacing: var(--tracking); color: var(--ink); text-wrap: balance;
}
.intro p:not(.line) { margin: 16px 0 0; color: var(--ink-soft); text-wrap: pretty; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.card { position: relative; padding: 22px 22px 18px; border-radius: 20px; background: var(--paper-light); }
/* Its edge drawn in crayon (the filter is in each page, #crayon). */
.card::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--paper-shade); border-radius: 20px; filter: url(#crayon); pointer-events: none; }
.card.pro { grid-column: 1 / -1; }
.card.pro::before { border-color: var(--terracotta); }
.card.pro p { max-width: 46em; }
.card h2 {
  margin: 0 0 10px; font-family: var(--serif); font-weight: var(--serif-weight);
  font-size: clamp(18px, 1rem + .35vw, 21px); line-height: 1.5; letter-spacing: var(--tracking); color: var(--leaf-deep);
}
.card.pro h2 { color: var(--terracotta-deep); }
.card p, .card li { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink-soft); }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { position: relative; padding-inline-start: 20px; }
.card li + li { margin-top: 8px; }
.card li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .66em; width: 9px; height: 9px;
  border-radius: 0 70% 0 70%; background: var(--leaf); opacity: .85;
}
.closing { max-width: 34em; margin: 34px auto 22px; text-align: center; color: var(--ink-soft); }

/* The pages in English and Japanese: support, the privacy policy, account deletion. */
.doc { max-width: 46em; margin: 0 auto; padding: max(92px, 12vh) 16px 40px; }
.doc > .rule { margin-bottom: 18px; }
.doc h1 {
  margin: 0; text-align: center; font-family: var(--serif); font-weight: var(--serif-weight);
  font-size: clamp(26px, 1.1rem + 1.4vw, 36px); line-height: 1.35; letter-spacing: .05em;
}
.doc .updated { margin: 10px 0 28px; text-align: center; font-size: 13px; color: var(--muted); }
.doc h2 { margin: 2.1em 0 .5em; font: 650 17px/1.5 var(--sans); color: var(--ink); }
.doc p, .doc li { font-size: 15px; line-height: 1.95; color: var(--ink-soft); }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc li { margin: 4px 0; }
.doc a { word-break: break-word; }
.doc .lead { margin: 18px auto 8px; text-align: center; font-size: 16px; }
.doc .mail { font-size: clamp(18px, 1rem + .6vw, 22px); }

/* The page that is not there. */
.lost { max-width: 34em; margin: 0 auto; padding: max(110px, 16vh) 16px 60px; text-align: center; }
.lost .icon { width: 96px; height: 96px; border-radius: 22px; filter: saturate(.7); transform: rotate(-4deg); }
.lost .line + .line { margin-top: 6px; }
.lost .links { margin-top: 28px; }

/* The foot of each page. */
.foot { padding: 34px 16px max(42px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--faint); margin-top: 20px; }
.foot nav { line-height: 2.1; }
.foot a { color: var(--ink-soft); white-space: nowrap; }
.foot .sister { margin: 14px 0 0; }
.foot .sister a { color: var(--leaf); }
.foot .copy { margin: 14px 0 0; font-size: 12px; }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
