/* The landing page. The page is one day's sky: morning, the day, the evening before, the night, then the day itself.
   Motion: everything below is off for prefers-reduced-motion, and hidden-until-revealed only with JS (html.js). */

h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; margin: 0; }

h1 {
  font-size: clamp(2.5rem, 1.3rem + 4vw, 4.25rem);
  line-height: 1.02;
  max-width: 13ch;
}
h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.125rem);
  line-height: 1.06;
  max-width: 15ch;
}

.lede { font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); max-width: 30ch; margin: 20px 0 0; }
.copy p { max-width: 36ch; margin: 16px 0 0; font-size: 1.1875rem; color: var(--muted); }

section { position: relative; }
main { overflow-x: clip; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .split.flip > :first-child { order: 2; }
}

/* ---------------------------------------------------------------- reveal on scroll */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- phones */

.phone {
  --pw: 270px;
  width: var(--pw);
  aspect-ratio: 1206 / 2622;
  margin: 0;
  padding: calc(var(--pw) * .033);
  border-radius: calc(var(--pw) * .165);
  background: #0E1B2A;
  box-shadow:
    inset 0 0 0 1.5px #33465c,
    0 40px 60px -30px rgb(var(--shadow) / .55),
    0 18px 30px -18px rgb(var(--shadow) / .4);
  flex: none;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--pw) * .135);
  background: var(--surface2);
}

.duo {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  padding: 10px 0 30px;
}
.duo .phone:nth-child(2) {
  --pw: 230px;
  position: absolute;
  z-index: -1;
  top: 64px;
  left: calc(50% + 40px);
  transform: rotate(6deg);
}
.duo .phone:first-child { transform: translateX(-56px) rotate(-2deg); }
.flip .duo .phone:first-child { transform: translateX(56px) rotate(2deg); }
.flip .duo .phone:nth-child(2) { left: auto; right: calc(50% + 40px); transform: rotate(-6deg); }

@media (max-width: 560px) {
  .phone { --pw: 220px; }
  .duo .phone:nth-child(2) { --pw: 168px; left: calc(50% - 2px); top: 52px; }
  .flip .duo .phone:nth-child(2) { right: calc(50% - 2px); }
  .duo .phone:first-child { transform: translateX(-52px) rotate(-2deg); }
  .flip .duo .phone:first-child { transform: translateX(52px) rotate(2deg); }
}

/* ---------------------------------------------------------------- hero: the morning sky */

.hero {
  background: var(--sky-gradient);
  padding-bottom: 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 255 255 / .8), rgb(255 255 255 / 0));
}
.hero::before { left: -4%; top: 58%; }
.hero::after { right: 2%; top: 16%; width: 320px; height: 100px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-top: 8px;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 40px; padding-top: 12px; }
  .hero .copy { padding-top: clamp(24px, 5vh, 64px); }
}

.soon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.soon a {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / .62);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .7), 0 8px 20px -14px rgb(var(--shadow) / .6);
  line-height: 1.2;
}
.soon a:hover { transform: translateY(-2px); }
.soon a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.soon svg { width: 26px; height: 26px; flex: none; color: var(--ink); }
.soon b { display: block; font-weight: 900; font-size: 1rem; }
.soon span { font-size: .8125rem; color: var(--muted); font-weight: 700; }
.free { margin: 14px 0 0; font-size: .9375rem; color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .soon a { background: rgb(26 33 80 / .5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
  :root:not([data-theme="light"]) .hero::before, :root:not([data-theme="light"]) .hero::after { opacity: .12; }
}
:root[data-theme="dark"] .soon a { background: rgb(26 33 80 / .5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }

/* Bông and the balloon countdown */
.stage {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
}
.bong-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 696 / 708;
  overflow: visible;
  margin-bottom: -6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bong-svg .shadow { fill: rgb(var(--shadow) / .22); }

.countdown {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  width: min(100%, 400px);
  padding: 16px 20px 18px;
  border-radius: 28px;
  background: rgb(255 255 255 / .66);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .75), 0 18px 40px -24px rgb(var(--shadow) / .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .countdown { background: rgb(26 33 80 / .55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), 0 18px 40px -24px rgb(0 0 0 / .7); }
}
:root[data-theme="dark"] .countdown { background: rgb(26 33 80 / .55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), 0 18px 40px -24px rgb(0 0 0 / .7); }

.count-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 64px;
}
.count-num {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--heart);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.count-unit { font-weight: 800; font-size: 1.0625rem; }
.count-day { display: block; font-weight: 900; font-size: 1.25rem; line-height: 1.2; }
.countdown[data-today] .count-num { font-size: 2.6rem; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 12px 0 4px;
  background: transparent;
  cursor: pointer;
  --p: 77%;
}
.range::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--heart-top) var(--p), var(--line) var(--p));
}
.range::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--heart-top) var(--p), var(--line) var(--p));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF4D6D' d='M12 20.3l-1.2-1.1C6.4 15.3 3.5 12.6 3.5 9.3 3.5 6.6 5.6 4.5 8.3 4.5c1.5 0 2.9.7 3.7 1.8.8-1.1 2.2-1.8 3.7-1.8 2.7 0 4.8 2.1 4.8 4.8 0 3.3-2.9 6-7.3 9.9z'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 4px 10px -2px rgb(var(--shadow) / .55), inset 0 0 0 1px rgb(0 0 0 / .04);
}
.range::-moz-range-thumb {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF4D6D' d='M12 20.3l-1.2-1.1C6.4 15.3 3.5 12.6 3.5 9.3 3.5 6.6 5.6 4.5 8.3 4.5c1.5 0 2.9.7 3.7 1.8.8-1.1 2.2-1.8 3.7-1.8 2.7 0 4.8 2.1 4.8 4.8 0 3.3-2.9 6-7.3 9.9z'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 4px 10px -2px rgb(var(--shadow) / .55);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--violet); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 3px solid var(--violet); outline-offset: 2px; }
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: .8125rem;
  font-weight: 800;
  color: var(--muted);
}
.hint { margin: 10px 0 0; font-size: .875rem; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- daytime sections */

.day-section { padding: 96px 0; }
.day-section + .day-section { padding-top: 40px; }

/* The balloon row: a bigger balloon is a closer day (inflate() in the app). */
.balloons {
  display: flex;
  align-items: flex-end;
  gap: clamp(10px, 2.4vw, 22px);
  margin: 34px 0 0;
  padding: 18px 22px 16px;
  list-style: none;
  width: fit-content;
  max-width: 100%;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 14px 34px -22px rgb(var(--shadow) / .6);
}
.balloons li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.balloons .bal {
  position: relative;
  display: block;
  height: 120px;
  width: 92px;
  transform-origin: 50% 100%;
}
.balloons .bal::after {
  /* the string, from the knot down to the label */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: calc(120px - 92px * var(--s) * .94);
  margin-left: -1px;
  background: var(--string);
  border-radius: 2px;
}
.balloons .bal img {
  position: absolute;
  left: 50%;
  bottom: calc(120px - 92px * var(--s) * .94);
  width: calc(92px * var(--s));
  height: auto;
  transform: translate(-50%, 2px);
  transform-origin: 50% 95%;
}
.balloons b { font-weight: 900; font-size: 1.125rem; margin-top: 6px; line-height: 1.1; }
.balloons small { font-weight: 700; font-size: .8125rem; color: var(--muted); }
.balloons li:first-child b { color: var(--heart); }
@media (max-width: 420px) {
  .balloons { padding: 14px 14px 12px; gap: 6px; }
  .balloons .bal { width: 64px; height: 100px; }
  .balloons .bal img { width: calc(64px * var(--s)); bottom: calc(100px - 64px * var(--s) * .94); }
  .balloons .bal::after { height: calc(100px - 64px * var(--s) * .94); }
}

/* The gift's way: Saved → Picked → Bought → Wrapped → Given (the app's status dots) */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.flow li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
  font-size: .875rem;
  box-shadow: 0 6px 16px -10px rgb(var(--shadow) / .6);
}
.flow li::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--jade) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.flow li:last-child::before {
  background: var(--heart) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 20.3l-1.2-1.1C6.4 15.3 3.5 12.6 3.5 9.3 3.5 6.6 5.6 4.5 8.3 4.5c1.5 0 2.9.7 3.7 1.8.8-1.1 2.2-1.8 3.7-1.8 2.7 0 4.8 2.1 4.8 4.8 0 3.3-2.9 6-7.3 9.9z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------------------------------------------------------------- family band */

.family {
  background: linear-gradient(180deg, var(--paper) 0%, var(--surface2) 30%, var(--dusk1) 100%);
  padding: 96px 0 120px;
}
.secret {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 24px -16px rgb(var(--shadow) / .7);
  font-weight: 800;
}
.secret .lock {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  color: var(--violet);
}
.secret .lock svg { width: 20px; height: 20px; overflow: visible; }

/* ---------------------------------------------------------------- the evening before (dusk) */

.evening {
  background: linear-gradient(180deg, var(--dusk1) 0%, var(--dusk2) 55%, #FFD3C2 100%);
  padding: 40px 0 150px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .evening { background: linear-gradient(180deg, var(--dusk1) 0%, var(--dusk2) 100%); }
}
:root[data-theme="dark"] .evening { background: linear-gradient(180deg, var(--dusk1) 0%, var(--dusk2) 100%); }

.evening .phone-col { display: flex; justify-content: center; }

/* "Until midnight", the app's dark countdown capsule, ticking live */
.midnight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 420px);
  margin-top: 28px;
  padding: 14px 20px;
  border-radius: 20px;
  background: #1D3A50;
  color: #EAF2FF;
  font-weight: 800;
  box-shadow: 0 18px 30px -18px rgb(29 58 80 / .8);
}
.midnight .clock {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: .02em;
  color: #FF7A92;
  font-variant-numeric: tabular-nums;
}

.stack {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
}
.notif {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 12px;
  padding: 12px 16px 14px 12px;
  border-radius: 24px;
  background: rgb(255 255 255 / .74);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .7), 0 10px 26px -18px rgb(90 60 120 / .55);
  font-size: .9375rem;
  line-height: 1.35;
}
.notif img { width: 38px; height: 38px; border-radius: 10px; grid-row: span 3; }
.notif .app { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; color: var(--muted); font-weight: 700; }
.notif .t { font-weight: 900; }
.notif .b { font-weight: 600; }
.stack .eve .notif { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--heart) 50%, transparent), 0 16px 34px -18px rgb(212 42 76 / .5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notif { background: rgb(26 33 80 / .7); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
}
:root[data-theme="dark"] .notif { background: rgb(26 33 80 / .7); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }

/* ---------------------------------------------------------------- the night */

.night {
  --ink: var(--night-ink);
  --muted: var(--night-muted);
  --surface: #1A2150;
  --line: #2D3874;
  --shadow: 0 0 0;
  color: var(--night-ink);
  background:
    url("/assets/stars.svg") 0 0 / 480px 360px repeat,
    linear-gradient(180deg, #161543 0%, var(--night1) 30%, var(--night2) 62%, var(--night3) 100%);
  padding: 60px 0 150px;
  isolation: isolate;
}
.night .twinkle {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/assets/stars.svg") 210px 140px / 380px 285px repeat;
  opacity: .9;
}
.lantern-wrap { position: relative; width: fit-content; margin: 0 0 14px -10px; }
.lantern-wrap::before {
  /* the lantern's warm glow */
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  width: 70%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 201 60 / .55), rgb(255 201 60 / 0));
  z-index: -1;
}
.lantern { width: clamp(150px, 22vw, 210px); }
.night .copy p { color: var(--night-muted); }
.night .phone { box-shadow: inset 0 0 0 1.5px #3f4e8a, 0 40px 70px -30px rgb(0 0 0 / .75); }

/* ---------------------------------------------------------------- the day itself */

.theday {
  /* starts as the cloud bank's colour, then opens into the diagonal sky */
  background: linear-gradient(180deg, var(--day-top) 0, rgb(0 0 0 / 0) 220px), var(--sky-gradient);
  padding: 50px 0 140px;
  overflow: hidden;
  text-align: center;
}
.theday h2, .theday .copy p { margin-left: auto; margin-right: auto; }
.theday h2 { max-width: 18ch; }
.theday .celebrate { width: clamp(150px, 20vw, 200px); margin: 0 auto 10px; }
.trio {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 56px;
}
.trio .phone { --pw: 250px; }
.trio .phone:nth-child(1) { transform: translateX(34px) rotate(-7deg) translateY(30px); }
.trio .phone:nth-child(2) { --pw: 280px; z-index: 1; }
.trio .phone:nth-child(3) { transform: translateX(-34px) rotate(7deg) translateY(30px); }
@media (max-width: 760px) {
  .trio .phone:nth-child(1), .trio .phone:nth-child(3) { display: none; }
}
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.confetti i {
  position: absolute;
  top: -24px;
  width: 10px; height: 16px;
  border-radius: 3px;
  opacity: .85;
}
.theday .wrap { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- promise and CTA */

.promise { padding: 40px 0 20px; text-align: center; }
.promise h2 { margin: 0 auto; max-width: 22ch; }
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.pills li {
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 24px 14px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 14px 30px -20px rgb(var(--shadow) / .6);
}
.pills .ico {
  grid-row: span 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--heart) 13%, transparent);
  color: var(--heart);
}
.pills li:nth-child(2) .ico { background: color-mix(in srgb, var(--jade) 14%, transparent); color: var(--jade); }
.pills li:nth-child(3) .ico { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.pills .ico svg { width: 22px; height: 22px; }
.pills b { font-weight: 900; font-size: 1.125rem; line-height: 1.1; }
.pills span { color: var(--muted); font-weight: 700; font-size: .9375rem; }
.promise p { margin: 22px 0 0; font-weight: 800; }

.cta { padding: 64px 0 60px; text-align: center; }
.cta .sleepy { width: clamp(180px, 26vw, 250px); margin: 0 auto 6px; }
.cta h2 { margin: 0 auto; max-width: 18ch; }
.cta p { margin: 14px auto 0; color: var(--muted); }
.cta .soon { justify-content: center; }
.cta .soon a { background: var(--surface); box-shadow: 0 8px 20px -14px rgb(var(--shadow) / .6); }

@media (max-width: 640px) {
  .day-section { padding: 72px 0; }
  .family { padding: 72px 0 100px; }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .bong-svg.hop .hopper { animation: hop .5s cubic-bezier(.3, .7, .4, 1); }

  /* phones drift a little, each on its own beat */
  .phone { animation: drift 7s ease-in-out infinite; }
  .duo .phone:nth-child(2), .trio .phone:nth-child(1) { animation-delay: -2.5s; animation-duration: 8s; }
  .trio .phone:nth-child(3) { animation-delay: -4s; animation-duration: 7.5s; }

  /* balloon row: inflate one by one, then sway */
  .js .balloons .bal img { transform: translate(-50%, 2px) scale(.15); transition: transform .9s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * .14s + .25s); }
  .js .balloons.in .bal img { transform: translate(-50%, 2px) scale(1); }
  .balloons .bal { animation: sway calc(3.2s + var(--i) * .45s) ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.7s); }

  /* gift flow: each step ticks in turn, then the heart */
  .js .flow li { opacity: .35; transform: scale(.9); transition: opacity .35s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * .45s + .3s); }
  .js .flow li::before { transform: scale(0); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * .45s + .45s); }
  .js .flow.in li { opacity: 1; transform: none; }
  .js .flow.in li::before { transform: scale(1); }
  .js .flow.in li:last-child { animation: given 1.2s ease-in-out 2.6s 2; }

  /* the secret: the lock opens and closes */
  .secret .shackle { animation: shackle 4s ease-in-out infinite; transform-origin: 16px 10px; }

  /* evening: notifications drop in one by one */
  .js .stack li { opacity: 0; transform: translateY(-26px) scale(.96); transition: opacity .5s ease, transform .7s cubic-bezier(.2, .9, .3, 1.2); transition-delay: calc(var(--i) * .55s + .4s); }
  .js .stack.in li { opacity: 1; transform: none; }
  .midnight .clock { animation: glow 2s ease-in-out infinite; }

  /* night: stars twinkle, the lantern glows, Bông floats */
  .night .twinkle { animation: twinkle 3.6s ease-in-out infinite alternate; }
  .lantern-wrap::before { animation: lantern 3.2s ease-in-out infinite; }
  .lantern { animation: float 5s ease-in-out infinite; }

  /* the day: confetti falls, Bông jumps */
  .confetti i { top: -24px !important; animation: fall var(--t, 7s) linear var(--d, 0s) infinite; }
  .theday .celebrate { animation: jump 2.4s cubic-bezier(.3, .7, .4, 1) infinite; transform-origin: 50% 100%; }

  /* the CTA: Bông naps */
  .cta .sleepy { animation: breathe 4.5s ease-in-out infinite; transform-origin: 50% 90%; }

  .pills li { animation: drift 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.6s); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@keyframes hop {
  0% { transform: translateY(0); }
  35% { transform: translateY(-34px); }
  70% { transform: translateY(0); }
  82% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes sway { from { rotate: -5deg; } to { rotate: 5deg; } }
@keyframes given { 0%, 100% { scale: 1; } 40% { scale: 1.12; } }
@keyframes shackle { 0%, 55%, 100% { transform: none; } 65%, 85% { transform: translateY(-3px) rotate(-14deg); } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
@keyframes twinkle { from { opacity: .15; } to { opacity: .95; } }
@keyframes lantern { 0%, 100% { opacity: .7; scale: 1; } 50% { opacity: 1; scale: 1.15; } }
@keyframes fall {
  from { transform: translate3d(0, -40px, 0) rotate(0deg); }
  to { transform: translate3d(var(--x, 30px), 1500px, 0) rotate(var(--r, 540deg)); }
}
@keyframes jump {
  0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(0) scale(1.05, .93); }
  28% { transform: translateY(-28px) scale(.97, 1.04); }
  46% { transform: translateY(0) scale(1.04, .95); }
}
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.02 .98; } }

/* ================================================================ more of the app */

.copy.center { text-align: center; }
.copy.center h2, .copy.center p { margin-left: auto; margin-right: auto; }

/* A fan of three phones: calendar, home, day */
.fan {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 10px 0 40px;
}
.fan .phone { --pw: 190px; }
.fan .phone:nth-child(1) { transform: translateX(50px) translateY(30px) rotate(-8deg); }
.fan .phone:nth-child(2) { --pw: 236px; z-index: 1; }
.fan .phone:nth-child(3) { transform: translateX(-50px) translateY(30px) rotate(8deg); }
@media (max-width: 560px) {
  .fan .phone { --pw: 132px; }
  .fan .phone:nth-child(2) { --pw: 168px; }
  .fan .phone:nth-child(1) { transform: translateX(34px) translateY(20px) rotate(-8deg); }
  .fan .phone:nth-child(3) { transform: translateX(-34px) translateY(20px) rotate(8deg); }
}

/* The remembrance day in the balloon row hangs a paper lantern, like the app */
.balloons .lantern-ico {
  position: absolute;
  left: 50%;
  bottom: calc(120px - 92px * var(--s) * .94);
  width: 30px;
  height: 42px;
  transform: translateX(-50%);
  color: var(--string);
  filter: drop-shadow(0 0 10px rgb(255 201 60 / .6));
}
@media (max-width: 420px) {
  .balloons .lantern-ico { bottom: calc(100px - 64px * var(--s) * .94); width: 24px; height: 34px; }
}

/* Widgets: a Home Screen wall of real widget faces */
.widgets { padding: 30px 0 110px; }
.wall {
  --u: 150px;
  --g: calc(var(--u) * 24 / 170);
  display: grid;
  grid-template-columns: repeat(4, var(--u));
  grid-auto-rows: var(--u);
  grid-template-areas:
    "n t c c"
    "m m r r"
    "m m n2 t2";
  gap: var(--g);
  width: fit-content;
  margin: 44px auto 0;
  padding: 34px;
  border-radius: 46px;
  background:
    radial-gradient(60% 50% at 20% 10%, rgb(255 255 255 / .55), rgb(255 255 255 / 0)),
    var(--sky-gradient);
  box-shadow: 0 40px 80px -40px rgb(var(--shadow) / .6), inset 0 0 0 1px rgb(255 255 255 / .5);
}
.wall .w {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgb(40 60 120 / .22));
}
.a-n { grid-area: n; } .a-t { grid-area: t; } .a-c { grid-area: c; } .a-m { grid-area: m; }
.a-r { grid-area: r; } .a-n2 { grid-area: n2; } .a-t2 { grid-area: t2; }
.styles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  font-weight: 800;
  font-size: .9375rem;
  color: var(--muted);
}
.styles .sw {
  width: 16px; height: 16px;
  border-radius: 6px;
  margin-left: 10px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08);
}
.styles .sw-sky { background: linear-gradient(160deg, #BDF2E6, #B9DDFF 45%, #D9CCFF 85%, #FFD9C7); }
.styles .sw-night { background: linear-gradient(160deg, #23306B, #3B2E78 85%, #5A3A6E); }
.styles .sw-paper { background: #FBF6EC; }
@media (max-width: 720px) {
  .wall {
    --u: calc((100vw - 32px - 28px - 14px) / 2);
    --g: 14px;
    grid-template-columns: repeat(2, var(--u));
    grid-template-areas: "n t" "c c" "m m" "m m" "r r" "n2 t2";
    padding: 14px;
    border-radius: 30px;
  }
}

/* Memories: a string of heart balloons, like the app's timeline */
.memories { padding: 40px 0 100px; }
.hearts {
  position: relative;
  list-style: none;
  margin: 30px 0 0;
  padding: 0 0 0 48px;
  display: grid;
  gap: 14px;
  max-width: 440px;
}
.hearts::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--string);
  transform-origin: 50% 0;
}
.hearts li {
  position: relative;
  display: grid;
  grid-template-columns: 64px auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 26px -18px rgb(var(--shadow) / .6);
}
.hearts li::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 50%;
  width: 34px;
  height: 34px;
  margin-top: -20px;
  background: url("/assets/bong/balloon.webp") center / contain no-repeat;
}
.hearts .pic {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 14px -8px rgb(0 0 0 / .4);
}
.hearts .yr {
  font-weight: 900;
  font-size: .8125rem;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 13%, transparent);
}
.hearts .gift b { display: block; font-weight: 900; line-height: 1.2; }
.hearts .gift small { display: block; color: var(--muted); font-weight: 700; font-size: .8125rem; }
.hearts .rate { color: var(--heart); letter-spacing: 1px; font-size: .875rem; }

/* A sky full of little things: features drift up like balloons */
.extras { padding: 60px 0 0; }
.sky-field {
  position: relative;
  height: 470px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}
.sky-wrap { position: relative; }
.field-bong {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 150px;
  translate: -50% 0;
  z-index: 1;
  pointer-events: none;
}
.sky-field li {
  position: absolute;
  left: var(--x);
  bottom: -70px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 10px;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
  font-size: .9375rem;
  white-space: nowrap;
  box-shadow: 0 12px 24px -16px rgb(var(--shadow) / .7);
  translate: -50% 0;
}
.sky-field li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.3l-1.2-1.1C6.4 15.3 3.5 12.6 3.5 9.3 3.5 6.6 5.6 4.5 8.3 4.5c1.5 0 2.9.7 3.7 1.8.8-1.1 2.2-1.8 3.7-1.8 2.7 0 4.8 2.1 4.8 4.8 0 3.3-2.9 6-7.3 9.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.3l-1.2-1.1C6.4 15.3 3.5 12.6 3.5 9.3 3.5 6.6 5.6 4.5 8.3 4.5c1.5 0 2.9.7 3.7 1.8.8-1.1 2.2-1.8 3.7-1.8 2.7 0 4.8 2.1 4.8 4.8 0 3.3-2.9 6-7.3 9.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sky-field li::after {
  /* the string */
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.5px;
  height: 30px;
  background: var(--string);
}
@media (max-width: 640px) {
  .sky-field { height: 560px; }
  .sky-field li { left: var(--xm); font-size: .8125rem; padding: 7px 12px 7px 8px; white-space: normal; max-width: 44vw; line-height: 1.2; }
  .field-bong { width: 110px; }
}

/* Both platforms */
.platforms {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 0 auto 30px;
}
.platforms .phone { --pw: 210px; }
.platforms .phone:first-child { transform: translateX(16px) rotate(-5deg); }
.platforms .phone.android { transform: translateX(-16px) rotate(5deg) translateY(8px); }
.phone.android { aspect-ratio: 1080 / 2400; border-radius: calc(var(--pw) * .12); }
.phone.android img { border-radius: calc(var(--pw) * .095); }
@media (max-width: 560px) { .platforms .phone { --pw: 160px; } }

@media (prefers-reduced-motion: no-preference) {
  .js .wall .w { opacity: 0; scale: .86; transition: opacity .5s ease, scale .7s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * .09s + .2s); }
  .js .wall.in .w { opacity: 1; scale: 1; }
  .wall.in .w { animation: drift 7s ease-in-out calc(var(--i) * -1.1s) infinite; }

  .js .hearts::before { transform: scaleY(0); transition: transform 1.4s cubic-bezier(.2, .8, .2, 1) .2s; }
  .js .hearts.in::before { transform: none; }
  .js .hearts li { opacity: 0; translate: 30px 0; transition: opacity .5s ease, translate .7s cubic-bezier(.2, .9, .3, 1.1); transition-delay: calc(var(--i) * .35s + .4s); }
  .js .hearts.in li { opacity: 1; translate: 0 0; }
  .js .hearts li::before { scale: 0; transition: scale .6s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * .35s + .55s); }
  .js .hearts.in li::before { scale: 1; }
  .hearts.in li::before { animation: sway 3.4s ease-in-out infinite alternate; transform-origin: 50% 100%; }

  .sky-field li { animation: rise 28s linear var(--d) infinite; }
  .field-bong { animation: float 5s ease-in-out infinite; }
  @media (max-width: 640px) { .sky-field li { animation-duration: 44s; animation-delay: var(--dm); } }
}
@media (prefers-reduced-motion: reduce) {
  .sky-field { height: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 20px var(--gutter) 40px; -webkit-mask-image: none; mask-image: none; }
  .sky-field li { position: static; translate: none; }
  .field-bong { display: none; }
  .sky-field li::after { display: none; }
}
@keyframes rise {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(var(--sway), -290px, 0); }
  100% { transform: translate3d(0, -600px, 0); }
}

/* The evening pair: spread wider so the Live Activity on the Lock Screen shows in full */
@media (min-width: 900px) {
  .evening .duo .phone:first-child { transform: translateX(96px) rotate(2deg); }
  .evening .duo .phone:nth-child(2) { right: calc(50% + 50px); transform: rotate(-5deg); }
}
.duo .phone:only-child { transform: none; }
/* A language without the memories captures: the heart timeline stands alone, centred */
.memories .split:not(:has(.duo)) { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.memories .split:not(:has(.duo)) h2, .memories .split:not(:has(.duo)) .copy p { margin-left: auto; margin-right: auto; }
.memories .split:not(:has(.duo)) .hearts { text-align: left; margin-left: auto; margin-right: auto; }
@media (max-width: 480px) {
  .hearts li { grid-template-columns: 52px auto 1fr; gap: 10px; padding: 10px 12px; }
  .hearts .pic { width: 52px; height: 52px; border-radius: 13px; }
  .hearts .rate { display: none; }
}
