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

@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 dark;
  --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;

  /* Theme roles */
  --link: #1663b0;
  --accent-text: #1f7a3f;
  --hero-a: #7bd68f;
  --hero-b: #3fae5e;
  --hero-c: #1f7a3f;
  --card-edge: rgba(0, 0, 0, .12);

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

/* Dark theme: warm near-black like the app's dark mode, deeper greens in the header. */
@media (prefers-color-scheme: dark) {
  .site-footer { background: #0b0907; }
  :root {
    --cream: #15110d;
    --paper: #241e18;
    --ink: #f7efe4;
    --ink-soft: #cdc1b3;
    --line: #3b3229;
    --link: #8ec5ff;
    --accent-text: #8ddfa2;
    --hero-a: #3f9a5a;
    --hero-b: #26713f;
    --hero-c: #0f3a1e;
    --card-edge: rgba(0, 0, 0, .45);
    --shadow: 0 2px 0 rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .45);
  }
}

*, *::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: #2b2723; 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(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 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: 56px; 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, 60vw); }
.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; }
/* No max-width here: with the negative margins it shrank the image width and squashed the badge. */
.store-badges img { max-width: none; }
.center .store-badges { justify-content: center; }

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

/* One section per store screenshot, tinted with that screenshot's color. */
.shot-sec { padding: 40px 0; background: var(--tint); }
.shot-grid { display: grid; gap: 20px; align-items: center; }
@media (min-width: 820px) {
  .shot-sec { padding: 48px 0; }
  .shot-grid { grid-template-columns: 250px 1fr; gap: 64px; }
  .shot-sec:nth-of-type(even) .shot-grid { grid-template-columns: 1fr 250px; }
  .shot-sec:nth-of-type(even) .shot-media { order: 2; }
}
.shot-media { justify-self: center; width: min(250px, 54vw); }
/* Phones: heading first, then the image. */
@media (max-width: 819px) { .shot-media { order: 2; } .shot-text { text-align: center; margin: 0 auto; } }
.shot-media img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }
.shot-text { max-width: 34em; }
.shot-text .step { display: inline-block; font-weight: 900; font-size: .95rem; color: #fff; background: var(--acc); padding: 3px 12px; border-radius: 999px; }
.shot-text h2 { font-size: clamp(2rem, 5vw, 3rem); color: var(--acc-text); margin-top: 14px; }
.shot-text p { margin-top: 12px; font-size: 1.15rem; color: var(--ink); }
.s-green  { --tint: #e8f6ec; --acc: var(--green-deep);  --acc-text: var(--green-deep); }
.s-orange { --tint: #fdeee3; --acc: var(--orange-deep); --acc-text: var(--orange-deep); }
.s-pink   { --tint: #fdebf1; --acc: var(--pink-deep);   --acc-text: var(--pink-deep); }
.s-purple { --tint: #f0ebfd; --acc: var(--purple-deep); --acc-text: var(--purple-deep); }
.s-blue   { --tint: #e6f1fc; --acc: var(--blue-deep);   --acc-text: var(--blue-deep); }
.s-teal   { --tint: #e3f4ef; --acc: var(--teal-deep);   --acc-text: var(--teal-deep); }
.s-amber  { --tint: #fcf0dc; --acc: var(--amber-deep);  --acc-text: var(--amber-deep); }
.s-indigo { --tint: #e9ebf8; --acc: var(--indigo-deep); --acc-text: var(--indigo-deep); }
@media (prefers-color-scheme: dark) {
  .s-green  { --tint: #12241a; --acc-text: #8ddfa2; }
  .s-orange { --tint: #2a1a10; --acc-text: #ffb27a; }
  .s-pink   { --tint: #2a1520; --acc-text: #ff9dbe; }
  .s-purple { --tint: #1e1832; --acc-text: #bba8ff; }
  .s-blue   { --tint: #111f30; --acc-text: #8ec5ff; }
  .s-teal   { --tint: #0f2420; --acc-text: #7fd9bf; }
  .s-amber  { --tint: #2a1f0c; --acc-text: #ffc66b; }
  .s-indigo { --tint: #171a33; --acc-text: #aab3ff; }
}

/* Colored feature bands */
.band { padding: 56px 0 64px; 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: 12px; margin-top: 28px; }
@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 var(--card-edge); }
.card h3 { font-size: 1.2rem; margin: 14px 0 6px; }
/* Phones: cards become compact rows, icon on the left. */
@media (max-width: 639px) {
  .card { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 16px; }
  .card .chip { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; }
  .card .chip svg { width: 22px; height: 22px; }
  .card h3 { margin: 0 0 2px; font-size: 1.1rem; }
}
.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: 16px; margin-top: 28px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--paper); border-radius: var(--radius); padding: 22px 24px; 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: 48px 0 64px; text-align: center; overflow: hidden; }
.get img.travis { width: 140px; 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: 40px 0 48px; }
.support .box { background: var(--paper); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.support h2 { font-size: 2rem; }
.email { font-size: 1.35rem; font-weight: 900; color: var(--link); word-break: break-word; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.links a { font-weight: 800; color: var(--link); }

/* Footer */
.site-footer { background: #2b2723; 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(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 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(--accent-text); }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink); }
.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(--link); 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; }
