/* Rose Garden game page. Colors come from the in-game paper theme. */

/* Google Sans is hosted on the site (file from the Google Fonts download), nothing is loaded from Google */
@font-face {
  font-family: "Google Sans";
  src: url("../fonts/static/GoogleSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("../fonts/static/GoogleSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* MonteCarlo, only for the hero title. One weight, no cyrillic */
@font-face {
  font-family: "MonteCarlo";
  src: url("../fonts/MonteCarlo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5efe2;
  --sage: #e3ead5;
  --kraft: #efe4cc;
  --ink: #2f2a1f;
  --ink-soft: #463f31;
  --muted: #665e4c;
  --rose: #bf6478;
  --rose-deep: #a0475b;
  --rose-light: #f3dcdd;
  --leaf: #3f6239;
  --line: rgba(58, 52, 38, 0.16);

  --spring: #d9e6c7;
  --summer: #f4e6c3;
  --autumn: #efd8ba;
  --winter: #dde8f0;

  /* no CJK in Google Sans, ja/ko/zh pages fall back to the system font */
  --font: "Google Sans", system-ui, sans-serif;

  --wrap: 1120px;
  color-scheme: light;
}

/* base */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper) url("../img/paper-grain.webp");
  background-blend-mode: multiply;
  color: var(--ink);
  font: 17px/1.6 var(--font);
}

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

a {
  color: var(--leaf);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--rose-deep); }

:focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.skip:focus { left: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
}

h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

/* buttons */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 30px;
  background: var(--rose-deep);
  box-shadow: 0 2px 0 rgba(90, 30, 45, 0.35);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: #8c3b4e;
  color: #fff;
}

.btn--small {
  padding: 9px 16px;
  font-size: 0.95rem;
}

/* header */
.top { padding: 18px 0; }

.top .wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "MonteCarlo", var(--font);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.top nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--rose-deep);
  text-decoration: underline;
}

/* the button in the nav keeps white text, no underline */
.top nav .btn {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.top nav .btn:hover {
  color: #fff;
  text-decoration: none;
}

@media (max-width: 760px) {
  .top nav .nav-link { display: none; }
}

/* language menu */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lang { position: relative; }

.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lang summary::-webkit-details-marker { display: none; }

.lang summary:hover,
.lang[open] summary {
  color: var(--rose-deep);
}

.lang .globe {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.lang ul {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  z-index: 20;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 18px 36px -14px rgba(70, 48, 20, 0.45), 0 0 0 1px var(--line);
}

.top nav .lang a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
}

.top nav .lang a:hover {
  background: var(--sage);
  color: var(--ink);
  text-decoration: none;
}

.top nav .lang a[aria-current="page"] {
  color: var(--rose-deep);
  font-weight: 600;
}

/* small phones */
@media (max-width: 480px) {
  .top .wrap { column-gap: 12px; }

  .brand {
    gap: 8px;
    font-size: 1.3rem;
  }

  .brand img {
    width: 26px;
    height: 26px;
  }

  .top nav { gap: 10px; }

  .btn--small {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* language: globe only, no code */
  .lang summary span[aria-hidden="true"] { display: none; }

  .lang summary .globe {
    width: 22px;
    height: 22px;
  }

  /* the dropdown spans the whole header, two columns, so it stays on screen */
  .lang { position: static; }

  .lang ul {
    top: calc(100% + 6px);
    right: 16px;
    left: 16px;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ladybug {
    left: 0%;
  }
}

/* hero */
/* clip: on windows around 880px the tape on the screenshot pokes past the right edge and the page scrolls sideways */
.hero {
  padding: 36px 0 72px;
  overflow-x: clip;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

/* script font: one weight, no negative tracking */
.hero h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* the subtitle sits inside the h1, keep it in the main font */
.hero h1 .sub {
  display: block;
  margin-top: 0.45em;
  font-family: var(--font);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.hero .intro {
  max-width: 33em;
  margin: 28px 0 30px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.hero .when {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero .when strong {
  color: var(--ink);
  font-weight: 600;
}

.shot {
  position: relative;
  justify-self: center;
  width: min(340px, 100%);
  margin: 0;
}

.shot img {
  border-radius: 26px;
  background: var(--kraft);
  box-shadow: 0 22px 44px -20px rgba(70, 48, 20, 0.45), 0 0 0 1px rgba(58, 52, 38, 0.08);
}

/* washi tape, like on the journal cards in the game */
.shot::before,
.shot::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 112px;
  height: 30px;
  background: rgba(233, 214, 170, 0.78);
  box-shadow: 0 1px 2px rgba(70, 50, 20, 0.12);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 52%);
}

.shot::before {
  top: -12px;
  left: -26px;
  transform: rotate(-32deg);
}

.shot::after {
  right: -34px;
  bottom: 34px;
  transform: rotate(-24deg);
  background: rgba(214, 228, 196, 0.85);
}

.shot .sprig {
  position: absolute;
  left: -58px;
  bottom: -26px;
  width: 104px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: rotate(-12deg);
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero { padding-top: 20px; }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .shot { width: min(300px, 78%); }
}

/* sections */
.section { padding: 80px 0; }

.section .lead {
  max-width: 38em;
  margin: 16px 0 40px;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

/* two plain sections in a row: no double padding */
.section:not(.band) + .section:not(.band) { padding-top: 0; }

@media (max-width: 600px) {
  .section { padding: 60px 0; }
}

.band {
  background-color: var(--sage);
  background-image: url("../img/onedayitblooms/wash.webp");
  background-size: 1024px auto;
  background-blend-mode: multiply;
}

/* who it is for */
.fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 36px;
}

.fit h3 { margin-bottom: 14px; }

.fit ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 26px;
}

.fit li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.fit .not li::before {
  background: transparent;
  border: 1.5px solid var(--muted);
}

.fit .not h3,
.fit .not li {
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .fit {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* what you get */
.gets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 56px;
  margin-top: 36px;
}

.gets h3 { margin-bottom: 8px; }

.gets p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .gets {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* a year of rose care */
.year {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.season {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background-image: url("../img/onedayitblooms/wash.webp");
  background-size: 700px auto;
  background-blend-mode: multiply;
}

.season--spring { background-color: var(--spring); }
.season--summer { background-color: var(--summer); }
.season--autumn { background-color: var(--autumn); }
.season--winter { background-color: var(--winter); }

.season img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 60%;
}

.season .body { padding: 18px 20px 22px; }

.season header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.season header img {
  width: 34px;
  height: 34px;
  aspect-ratio: auto;
}

.season h3 { font-size: 1.45rem; }

.season .months {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

.season p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.roots-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 46em;
  margin: 34px 0 0;
  color: var(--ink-soft);
}

.roots-note img {
  flex: none;
  width: 34px;
  height: 34px;
  margin-top: 2px;
}

@media (max-width: 1020px) {
  .year { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* phones: seasons turn into a row of cards you swipe through */
@media (max-width: 700px) {
  .year {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(78%, 320px);
    gap: 14px;
    margin: 0 -16px;
    padding: 2px 16px 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .year::-webkit-scrollbar { display: none; }

  .season { scroll-snap-align: start; }

  .season .body { padding: 16px 16px 20px; }
}

/* the garden goes on */
.garden {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.garden .text h2 { margin-bottom: 24px; }

.garden .text p {
  max-width: 34em;
  color: var(--ink-soft);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.pair img {
  border-radius: 18px;
  box-shadow: 0 16px 32px -20px rgba(70, 48, 20, 0.5);
}

.pair img:last-child { margin-top: 56px; }

@media (max-width: 860px) {
  .garden {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pair { max-width: 520px; }
}

/* six roses */
.roses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rose {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0;
  border-top: 1px dashed rgba(58, 52, 38, 0.25);
}

.rose .swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(47, 42, 31, 0.12), 0 6px 14px -8px rgba(70, 48, 20, 0.5);
}

.rose h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.rose p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

.rose dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  font-size: 0.95rem;
}

.rose dt { color: var(--muted); }
.rose dd { margin: 0; }

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

/* quiet moments + trailer */
.look {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: center;
}

.look .text h2 { margin-bottom: 24px; }

.look .text p {
  max-width: 34em;
  color: var(--ink-soft);
}

.video {
  position: relative;
  justify-self: center;
  width: min(320px, 100%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 22px;
  background: #2f2a1f;
  box-shadow: 0 22px 44px -20px rgba(70, 48, 20, 0.5);
}

.video button,
.video a.poster {
  all: unset;
  display: block;
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video .play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: rgba(245, 239, 226, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.video .play::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 31px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--rose-deep);
}

.video .label {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  text-align: center;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.video button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
  border-radius: 20px;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 860px) {
  .look {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* questions */
.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 56px;
  margin: 36px 0 0;
}

.faq div { padding: 0 0 18px; }

.faq dt {
  margin-bottom: 6px;
  font-size: 1.18rem;
  font-weight: 600;
}

.faq dd {
  margin: 0;
  color: var(--ink-soft);
}

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

/* closing */
.closing .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.closing p {
  max-width: 34em;
  margin: 10px 0 0;
  color: var(--ink-soft);
}

/* footer */
.foot {
  padding: 44px 0 56px;
  font-size: 0.95rem;
  color: var(--muted);
}

.foot .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 40px;
}

.foot p { margin: 0 0 6px; }

.foot ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 27px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot .legal {
  grid-column: 1 / -1;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .foot .wrap { grid-template-columns: 1fr; }
}

/* social links as icons (files in assets/img/social/), the link text stays for screen readers and search engines */
.foot ul a:is([href*="youtube.com"], [href*="tiktok.com"], [href*="instagram.com"], [href*="reddit.com"], [href*="discord.gg"], [href*="discord.com"], [href*="facebook.com"], [href*="pinterest."]) {
  display: block;
  width: 30px;
  height: 30px;
  margin: -8px -10px;
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
  background: center / 22px 22px no-repeat;
  opacity: 0.7;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.foot ul a:is([href*="youtube.com"], [href*="tiktok.com"], [href*="instagram.com"], [href*="reddit.com"], [href*="discord.gg"], [href*="discord.com"], [href*="facebook.com"], [href*="pinterest."]):is(:hover, :focus-visible) {
  opacity: 1;
  background-color: var(--sage);
}

/* phones: privacy and terms on their own lines, the icons together below them */
@media (max-width: 700px) {
  .foot ul li:has(> a:is([href*="privacy"], [href*="terms"])) { flex-basis: 100%; }
}

/* ladybug: walks back and forth on the top edge of the block it sits in (markup is in the page) */

/* numbers the walk runs on. --walking is 1 while she moves and 0 while she stands, so the legs stop with her */
@property --walking {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

@property --bob {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

@property --step {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

/* the block gets position: relative, unless it already has a position */
:where(:has(> .ladybug)) {
  position: relative;
}

/* the strip she walks on */
.ladybug {
  --bug: 36px; /* her size */
  position: absolute;
  left: 25%;
  bottom: calc(100% - 1px); /* feet right on the edge */
  z-index: 2;
  width: min(140px, 52%);
  container-type: inline-size; /* lets the walk below measure the strip */
  pointer-events: none;
}

/* only the bug itself moves, so nothing sticks out past the strip and the page never gets wider */
.ladybug .walk {
  --road: max(0px, 100cqw - var(--bug));
  display: block;
  width: var(--bug);
  filter: drop-shadow(0 1px 1px rgba(70, 48, 20, 0.3));
  animation: ladybug-walk 36s linear infinite;
}

.ladybug .hop {
  display: block;
  height: calc(var(--bug) * 2 / 3);
  transform-origin: 50% 100%;
  animation: ladybug-hop 36s ease-in-out infinite;
}

.ladybug svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation:
    ladybug-turn 36s ease-in-out infinite,
    ladybug-bob 0.19s ease-in-out infinite alternate;
}

/* legs in two sets of three: one set pushes back on the ground while the other steps forward */
.ladybug .leg {
  transform: translateY(calc(var(--lift) * var(--walking))) rotate(calc(var(--step) * var(--walking)));
  animation: ladybug-step 0.75s linear infinite;
}

.ladybug .leg.b {
  animation-delay: -0.375s;
}

.ladybug .antenna {
  transform: rotate(calc(var(--step) * var(--walking) * 0.2));
  animation: ladybug-step 0.75s linear infinite;
}

/* a small bounce on every step */
.ladybug .body {
  transform: translateY(calc(var(--bob) * var(--walking) * -1.2px));
}

.ladybug .eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: ladybug-blink 36s linear infinite;
}

/* there and back, with a stop on the way. Speed matches the steps, so the feet don't slide */
@keyframes ladybug-walk {
  0%    { transform: translateX(0);                         --walking: 0; }
  0.8%  { --walking: 1; }
  17%   { --walking: 1; }
  17.8% { transform: translateX(calc(var(--road) * 0.5));   --walking: 0; }
  24.4% { transform: translateX(calc(var(--road) * 0.5));   --walking: 0; }
  25.2% { --walking: 1; }
  41.4% { --walking: 1; }
  42.2% { transform: translateX(var(--road));               --walking: 0; }
  48%   { transform: translateX(var(--road));               --walking: 0; }
  48.8% { --walking: 1; }
  68.6% { --walking: 1; }
  69.4% { transform: translateX(calc(var(--road) * 0.4));   --walking: 0; }
  76%   { transform: translateX(calc(var(--road) * 0.4));   --walking: 0; }
  76.8% { --walking: 1; }
  89.6% { --walking: 1; }
  90.4% { transform: translateX(0);                         --walking: 0; }
  100%  { transform: translateX(0);                         --walking: 0; }
}

/* at each end: crouch, hop, land facing the other way */
@keyframes ladybug-hop {
  0%, 43.2%, 46.8%, 91.6%, 95.2%, 100% { transform: translateY(0) scale(1, 1); }
  43.9%, 92.3% { transform: translateY(0) scale(1.08, 0.86); animation-timing-function: ease-out; }
  44.9%, 93.3% { transform: translateY(-8px) scale(0.95, 1.06); animation-timing-function: ease-in; }
  45.8%, 94.2% { transform: translateY(0) scale(1.1, 0.85); }
}

@keyframes ladybug-turn {
  0%, 44%      { transform: rotateY(0deg); }
  45.6%, 92.4% { transform: rotateY(180deg); }
  94%, 100%    { transform: rotateY(360deg); }
}

/* a leg pushes back slowly while it's on the ground, then lifts and swings forward */
@keyframes ladybug-step {
  0%   { --step: -24deg; --lift: 0px; }
  70%  { --step: 24deg;  --lift: 0px; animation-timing-function: ease-in-out; }
  85%  { --lift: -1.6px; }
  100% { --step: -24deg; --lift: 0px; }
}

@keyframes ladybug-bob {
  from { --bob: 0; }
  to   { --bob: 1; }
}

/* blinks when she stops */
@keyframes ladybug-blink {
  0%, 19.4%, 20%, 20.6%, 21.2%, 71.4%, 72%, 100% { transform: scaleY(1); }
  19.7%, 20.9%, 71.7% { transform: scaleY(0.1); }
}

/* reduced motion: she just stands there */
@media (prefers-reduced-motion: reduce) {
  .ladybug .walk,
  .ladybug .hop,
  .ladybug svg,
  .ladybug .leg,
  .ladybug .antenna,
  .ladybug .eye {
    animation: none;
  }
}

/* languages */

/* long words: hyphenate where the browser knows the language */
:is(:lang(de), :lang(ru), :lang(fr), :lang(it), :lang(es), :lang(pt)) :is(p, li, dd, dt, h3) {
  hyphens: auto;
}

:is(:lang(de), :lang(ru), :lang(fr), :lang(it), :lang(es), :lang(pt)) :is(.btn, .lang, .top nav) {
  hyphens: manual;
}

/* Japanese, Korean, Chinese: no tight letter-spacing, more air between lines */
:is(:lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3) {
  letter-spacing: 0;
  line-height: 1.3;
}

:is(:lang(ja), :lang(ko), :lang(zh)) .hero h1 { line-height: 1.05; }
:is(:lang(ja), :lang(ko), :lang(zh)) body { line-height: 1.75; }

/* line breaks */
:lang(ja) :is(h1, h2, h3, dt, .btn) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }
:is(:lang(ja), :lang(zh)) { line-break: strict; }