:root {
  color-scheme: light;
  --paper: #fbf8f2;
  --dot: #d8cfc2;
  --ink: #3a2a22;
  --soft: #6f5b50;
  --peach: #fde4d9;
  --petal: #c4563a;
  --line: #e9dfd2;
  --calm: #0e794c;
  --happy: #9d5900;
  --grateful: #8d1c5f;
  --homesick: #932412;
  --tired: #754ac2;
  --sad: #035b9e;
  --display: "Baloo 2", "Be Vietnam Pro", sans-serif;
  --text: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

/* Top bar */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.top nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.top nav a {
  text-decoration: none;
}

.top nav a:hover {
  color: var(--petal);
}

/* Hero */

.hero {
  padding: 40px 0 0;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  line-height: 0.98;
}

.hero .lead {
  max-width: 34rem;
  margin-top: 22px;
  color: var(--soft);
  font-size: 1.2rem;
  line-height: 1.6;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.badge {
  display: inline-flex;
  border-radius: 8px;
}

/* Both badges at one height. Apple's is a vector badge with its own grey
   rim; Google's is only its logo and words, set in a frame drawn to match
   Apple's rim and corners so the two look like a pair. */
.badge img {
  height: 48px;
  width: auto;
}

.badge.play {
  height: 48px;
  padding: 7.3px 10px 6.1px 11px;
  border: 1px solid #a6a6a6;
  border-radius: 9.5px;
  background: #040707;
}

/* The Vietnamese words carry accents, so the mark starts higher. */
.badge.play-vi {
  padding-top: 5px;
  padding-bottom: 6px;
}

.badge.play img {
  height: 100%;
}

/* The garden: one dot per day, a sprite where a memory was planted. */

.garden {
  --cell: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--cell));
  grid-auto-rows: var(--cell);
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 18px;
}

.day {
  position: relative;
}

.day::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 66%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--dot);
}

/* A sprite's box is 36 by 30 units around a 24-unit cell, its root at
   (18, 28): drawn at 1.8 cells wide so neighbours overlap a little. */
.day svg {
  position: absolute;
  left: -40%;
  bottom: calc(34% - var(--cell) * 0.1);
  z-index: 1;
  width: 180%;
  height: 150%;
  overflow: visible;
  transform-origin: 50% 93%;
}

.day.today::after {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--petal);
}

.garden-note {
  margin-top: 14px;
  color: var(--soft);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: no-preference) {
  .garden.planting .day svg {
    animation: plant 520ms cubic-bezier(0.3, 1.5, 0.5, 1) both;
    animation-delay: var(--delay);
  }
}

@keyframes plant {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* Sections */

.section {
  padding: 112px 0 0;
}

.section h2 {
  max-width: 22ch;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.05;
}

.section .intro {
  max-width: 36rem;
  margin-top: 16px;
  color: var(--soft);
}

/* One memory, one sprite */

.plant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  margin-top: 44px;
}

.memory {
  padding: 26px 28px 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(58, 42, 34, 0.35);
}

.memory .when {
  color: var(--soft);
  font-size: 0.88rem;
}

.memory h3 {
  margin: 6px 0 10px;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
}

.memory p {
  color: var(--soft);
}

.moods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  border: 0;
}

.moods legend {
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.mood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.92rem var(--text);
  cursor: pointer;
}

.mood::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.mood[aria-pressed="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, #fff);
}

.grown {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--peach);
}

.grown svg {
  width: 84%;
  aspect-ratio: 36 / 30;
  height: auto;
  margin-top: -14%;
  color: var(--c, var(--calm));
  transition: color 300ms ease;
}

.grown::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 77%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--dot);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 56px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.facts strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
}

.facts span {
  color: var(--soft);
  font-size: 0.98rem;
}

/* Screens */

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.shots img {
  width: 100%;
  border-radius: 18px;
}

/* Privacy */

.private {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px;
}

.private ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.private li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.private li:last-child {
  border-bottom: 0;
}

.private .more {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
}

/* Closing */

.closing {
  padding: 120px 0 96px;
  text-align: center;
}

.closing img.icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 18px;
}

.closing h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.closing p {
  margin-top: 12px;
  color: var(--soft);
}

.closing .badges {
  justify-content: center;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.92rem;
}

.foot nav {
  display: flex;
  gap: 18px;
}

.foot a {
  text-decoration: none;
}

/* Policy and support pages */

.doc {
  max-width: 680px;
  padding: 48px 0 24px;
}

.doc h1 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05;
}

.doc .updated {
  margin-top: 10px;
  color: var(--soft);
}

.doc h2 {
  margin: 36px 0 8px;
  font-size: 1.45rem;
  line-height: 1.25;
}

.doc p + p {
  margin-top: 12px;
}

.doc ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 8px;
}

.doc .switch {
  margin-bottom: 18px;
  font-weight: 600;
}

.doc + .doc {
  margin-top: 48px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .plant,
  .private {
    grid-template-columns: 1fr;
  }

  .grown {
    max-width: 280px;
    order: -1;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .shots {
    grid-template-columns: repeat(4, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .shots img {
    scroll-snap-align: start;
  }

  .section {
    padding-top: 88px;
  }
}

@media (max-width: 560px) {
  .top nav {
    gap: 12px;
    font-size: 0.88rem;
  }

  .top .brand span {
    display: none;
  }

  .garden {
    --cell: 34px;
  }

  .memory {
    padding: 22px;
  }

  .foot {
    flex-direction: column;
  }
}
