/* getchao.app: colors and type follow the Chào store screenshots
   (green icon sunburst, one bright color per screen, Nunito, cream app UI). */

@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("fonts/nunito-900.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --cream: #fff9f0;
  --paper: #ffffff;
  --ink: #2b2723;
  --ink-soft: #5c544c;
  --line: #efe4d4;

  /* Store screenshot colors, and darker shades that carry white text at AA contrast. */
  --green-light: #7bd68f;
  --green: #3fae5e;
  --green-deep: #1f7a3f;
  --orange: #e8762c;
  --orange-deep: #b14e0c;
  --pink: #e85c8a;
  --pink-deep: #b3305f;
  --purple: #7c5ce2;
  --purple-deep: #5b3cc4;
  --blue: #2688e6;
  --blue-deep: #1663b0;
  --teal: #209678;
  --teal-deep: #0f6e57;
  --amber: #de8c16;
  --amber-deep: #9a5a00;
  --indigo: #4654b0;
  --indigo-deep: #3a47a0;

  --radius: 22px;
  --shadow: 0 2px 0 rgba(43, 39, 35, .06), 0 12px 32px rgba(43, 39, 35, .10);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 700 1.0625rem/1.6 "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; }
h1, h2, h3 { font-weight: 900; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; text-decoration: none; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.on-color :focus-visible, .site-header :focus-visible { outline-color: #fff; }

/* Green hero: the app icon's radial green, a soft glow, and rice terraces along the bottom.
   No rays: a ray burst from one point can read as the Rising Sun Flag. */
.sunburst {
  position: relative;
  background:
    url("img/terraces.svg") bottom / 100% 180px no-repeat,
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 50% 30%, var(--green-light) 0%, var(--green) 55%, var(--green-deep) 120%);
  color: #fff;
}

/* Header */
.site-header { position: relative; z-index: 2; padding: 16px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.5rem; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }
.site-nav ul { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 800; }
.site-nav a:hover { background: rgba(255, 255, 255, .18); }
@media (max-width: 560px) { .site-nav .optional { display: none; } }

/* Hero */
.hero { padding-bottom: 72px; overflow: hidden; }
.hero-grid { display: grid; gap: 24px; align-items: center; padding-top: 24px; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.15fr .85fr; padding-top: 40px; } }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); text-shadow: 0 3px 0 rgba(0, 0, 0, .10); }
.hero .lead { font-size: clamp(1.125rem, 2.2vw, 1.3rem); margin-top: 18px; max-width: 36em; text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.hero .fine { margin-top: 14px; font-weight: 800; }
.hero-art { position: relative; justify-self: center; width: min(420px, 82vw); }
.hero-art img { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .22)); }
.bubble {
  position: absolute; left: -6%; top: 6%; background: var(--paper); color: var(--ink);
  padding: 12px 18px; border-radius: 20px 20px 20px 6px; font-weight: 900; font-size: 1.25rem;
  box-shadow: var(--shadow); transform: rotate(-4deg);
}
.bubble small { display: block; font-weight: 700; font-size: .85rem; color: var(--ink-soft); }

/* Store badges: Apple 54px; the Google PNG has padding, so it is drawn larger with negative margins. */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.store-badges a { display: inline-block; border-radius: 10px; }
.store-badges .apple img { display: block; height: 54px; width: auto; }
.store-badges .google img { display: block; height: 80px; width: auto; margin: -13px; }
.center .store-badges { justify-content: center; }

/* Wavy edge between colored bands */
.wave { display: block; width: 100%; height: 48px; margin-top: -47px; position: relative; }

/* Screenshot strip */
.gallery { padding: 64px 0 48px; }
.gallery h2, .section-head h2 { font-size: clamp(2rem, 5vw, 2.9rem); }
.section-head { max-width: 44em; }
.section-head p { margin-top: 12px; font-size: 1.15rem; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 28px 16px 24px; margin: 0 -16px;
  scrollbar-width: thin; scrollbar-color: var(--green) transparent;
}
@media (min-width: 640px) { .strip { margin: 0 -28px; padding-left: 28px; padding-right: 28px; } }
.strip li { scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img { width: 100%; border-radius: 26px; box-shadow: var(--shadow); object-fit: contain; aspect-ratio: 600 / 1304; background: var(--line); }
.strip li:nth-child(odd) img { transform: rotate(-1.5deg); }
.strip li:nth-child(even) img { transform: rotate(1.5deg) translateY(10px); }
.strip-hint { color: var(--ink-soft); font-size: .95rem; }

/* Colored feature bands */
.band { padding: 72px 0 84px; position: relative; }
.band.on-color { color: #fff; }
.band.purple { background: var(--purple-deep); }
.band.orange { background: var(--orange-deep); }
.band.blue { background: var(--blue-deep); }
.band.teal { background: var(--teal-deep); }
.band.cream { background: var(--cream); }
.band .section-head p { opacity: .96; }

.cards { display: grid; gap: 18px; margin-top: 36px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.three { grid-template-columns: repeat(3, 1fr); } .cards.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 22px 22px 24px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.card h3 { font-size: 1.2rem; margin: 14px 0 6px; }
.card p { color: var(--ink-soft); font-size: 1rem; }
.chip { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14); }
.chip svg { width: 26px; height: 26px; }
.c-green { background: var(--green-deep); } .c-orange { background: var(--orange-deep); } .c-pink { background: var(--pink-deep); }
.c-purple { background: var(--purple-deep); } .c-blue { background: var(--blue-deep); } .c-teal { background: var(--teal-deep); }
.c-amber { background: var(--amber-deep); } .c-indigo { background: var(--indigo-deep); }

/* Band with art on the side */
.band-art { display: grid; gap: 24px; align-items: end; }
@media (min-width: 880px) { .band-art { grid-template-columns: 1fr 240px; } }
.band-art img { width: 200px; justify-self: center; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .25)); }

/* Pricing */
.plans { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 3px solid var(--line); }
.plan.featured { border-color: var(--pink); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 900; font-size: .9rem; background: var(--green-deep); color: #fff; }
.plan.featured .tag { background: var(--pink-deep); }
.plan h3 { font-size: 1.5rem; margin-top: 14px; }
.amount { font-size: 2.6rem; font-weight: 900; margin: 6px 0 12px; }
.plan ul { margin: 0; padding-left: 1.2em; }
.plan li { margin: 6px 0; }
.plan li::marker { color: var(--green); }
.plan.featured li::marker { color: var(--pink); }
.note { margin-top: 16px; font-size: .95rem; color: var(--ink-soft); }

/* Get the app */
.get { padding: 80px 0 96px; text-align: center; overflow: hidden; }
.get img.travis { width: 190px; margin: 0 auto 8px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .22)); }
.get h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.get p { margin-top: 10px; font-size: 1.2rem; }

/* Support */
.support { padding: 64px 0 72px; }
.support .box { background: var(--paper); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.support h2 { font-size: 2rem; }
.email { font-size: 1.35rem; font-weight: 900; color: var(--blue-deep); word-break: break-word; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.links a { font-weight: 800; color: var(--blue-deep); }

/* Footer */
.site-footer { background: var(--ink); color: #f3ece2; padding: 32px 0 40px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: #fff; font-weight: 800; }
.site-footer p + p { margin-top: 4px; color: #cfc5b8; }

/* Legal pages: the green header covers the top of the page, behind the header and the title. */
.legal-page {
  background:
    url("img/terraces.svg") 0 300px / 100% 160px no-repeat,
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 38%) top / 100% 460px no-repeat,
    radial-gradient(circle at 50% 30%, var(--green-light) 0%, var(--green) 55%, var(--green-deep) 120%) top / 100% 460px no-repeat,
    var(--cream);
}
.legal-page .on-color { color: #fff; }
.legal-hero { padding-bottom: 64px; min-height: 380px; }
.legal-hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); margin-top: 24px; }
.legal-hero .lead { margin-top: 8px; font-size: 1.2rem; }
.legal-hero .updated { margin-top: 6px; font-weight: 800; opacity: .95; }
.crumb { font-weight: 800; padding-top: 8px; }
.crumb a { color: #fff; }
.legal { padding: 8px 0 72px; }
.legal .doc { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px 36px; margin-top: -40px; position: relative; max-width: 820px; }
@media (min-width: 640px) { .legal .doc { padding: 40px 48px 48px; } }
.legal h2 { font-size: 1.45rem; margin: 34px 0 10px; color: var(--green-deep); }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: #3d3731; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.25em; margin: 10px 0; }
.legal li { margin: 7px 0; }
.legal li::marker { color: var(--green); }
.legal a { color: var(--blue-deep); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 404 */
.full { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.full h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.full p { margin-top: 10px; font-size: 1.2rem; }
.full a { color: #fff; font-weight: 900; }
