/* PrettyCat landing. Palette and type come from the app (src/css/quasar.variables.scss). */

@font-face {
  font-family: "Quicksand";
  src: url("../fonts/quicksand-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("../fonts/quicksand-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("../fonts/kalam-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Same cream as the promo video background, so the video blends into the page. */
  --paper: #fbf8e2;
  --paper-deep: #f4eed3;
  --white: #fbfffe;
  --ink: #151b19;
  --ink-soft: #46524d;
  --leaf: #4da386;
  --leaf-dark: #3e8f74;
  --leaf-ink: #1b5743;
  --mint: #8dd7be;
  --blush: #fb9b95;
  --blush-light: #ffc4bf;
  --honey: #edda97;
  --honey-dark: #d8ae70;
  --sky: #61c9ea;
  --sky-light: #c3eefc;

  --font: "Quicksand", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 34rem;
  --radius-panel: 28px;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

.pixel {
  image-rendering: pixelated;
}

a {
  color: var(--leaf-ink);
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 100px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  color: var(--leaf-ink);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Buttons mirror GameButton.vue: pill, bold, wide tracking. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 100px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.btn:active {
  transform: translateY(2px);
}

.btn-primary {
  background: var(--leaf);
  color: var(--white);
  box-shadow: 0 4px 0 var(--leaf-ink);
}

.btn-primary:hover {
  background: var(--leaf-dark);
}

.btn-primary:active {
  box-shadow: 0 2px 0 var(--leaf-ink);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-weight: 400;
}

.btn-secondary:hover {
  background: var(--paper-deep);
}

.btn__icon {
  flex: none;
  margin-left: -4px;
}

.btn-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.875rem;
}

/* Header */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo img {
  width: 150px;
  height: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background: var(--paper-deep);
  font-size: 0.875rem;
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 100px;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}

/* Hero */

.hero {
  padding: clamp(8px, 2vw, 24px) 0 clamp(48px, 8vw, 96px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

/* Sticker lettering, same white outline and soft drop as the PrettyCat logo. */
.hero__title {
  font-size: clamp(2.75rem, 1.4rem + 5.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--leaf);
  text-shadow:
    0 -4px 0 var(--white), 3px -3px 0 var(--white), 4px 0 0 var(--white), 3px 3px 0 var(--white),
    0 4px 0 var(--white), -3px 3px 0 var(--white), -4px 0 0 var(--white), -3px -3px 0 var(--white),
    0 -6px 0 var(--white), 5px -3px 0 var(--white), 6px 0 0 var(--white), 5px 4px 0 var(--white),
    0 6px 0 var(--white), -5px 4px 0 var(--white), -6px 0 0 var(--white), -5px -3px 0 var(--white),
    0 12px 18px rgba(27, 87, 67, 0.16);
}

.hero__lead {
  margin-top: 22px;
  max-width: var(--measure);
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero__media {
  position: relative;
}

/* Feathered edges hide any colour drift between the video encode and the page. */
.hero__video {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 704;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 11%, #000 89%, transparent),
    linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 11%, #000 89%, transparent),
    linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}

/* Generic section rhythm */

.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section--deep {
  background: var(--paper-deep);
}

.section__intro {
  max-width: var(--measure);
}

.section__intro > p {
  margin-top: 18px;
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

/* Together: notes left on the fridge */

.fridge {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-panel);
  background: var(--white);
  box-shadow: 0 2px 0 rgba(27, 87, 67, 0.08);
}

.note {
  position: relative;
  max-width: 21rem;
  padding: 18px 22px 14px;
  font-family: var(--hand);
  font-size: 1.3rem;
  line-height: 1.35;
  color: #2d2a24;
  box-shadow: 0 6px 14px rgba(60, 50, 20, 0.1);
}

.note::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 72px;
  height: 22px;
  margin-left: -36px;
  background: rgba(251, 255, 254, 0.7);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transform: rotate(-3deg);
}

.note__sign {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  text-align: right;
  opacity: 0.7;
}

.note--a {
  background: var(--blush-light);
  transform: rotate(-2deg);
}

.note--b {
  justify-self: end;
  background: #d6f1e6;
  transform: rotate(1.5deg);
}

.note--c {
  background: #f6ebbf;
  transform: rotate(-1deg);
}

.fridge__letter {
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 96px;
  transform: rotate(8deg);
}

.perks {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.perks li {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
}

.perks img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.perks strong {
  display: block;
  color: var(--ink);
}

.perks span {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Cats: status panel copied from the in-game cat profile */

.status {
  padding: 26px 28px 30px;
  border-radius: var(--radius-panel);
  background: var(--white);
  box-shadow: 0 2px 0 rgba(27, 87, 67, 0.08);
}

.status__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.status__head img {
  width: 120px;
  margin: -28px -8px -10px -20px;
}

.status__name {
  font-size: 1.35rem;
  color: var(--ink);
}

.status__level {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.bar {
  margin-top: 14px;
}

.bar__label {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}

.bar__track {
  position: relative;
  height: 28px;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid #2c5a4a;
  border-radius: 8px;
  background: var(--track);
}

.bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: 7px;
  background: var(--fill);
}

.bar__value {
  position: relative;
  display: block;
  line-height: 26px;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--white);
}

.bar--happy {
  --track: #c39b63;
  --fill: var(--honey);
}

.bar--food,
.bar--energy {
  --track: var(--mint);
  --fill: var(--mint);
}

.bar--food .bar__value,
.bar--energy .bar__value {
  color: var(--ink-soft);
}

.bar--hygiene {
  --track: #cf6b6b;
  --fill: var(--blush);
}

.cat-facts {
  display: grid;
  gap: 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.cat-facts h3 {
  margin-bottom: 4px;
}

.cat-facts p {
  color: var(--ink-soft);
}

.litter {
  margin-top: clamp(48px, 7vw, 80px);
}

/* Cats sit on a shelf; their names are written on the shelf edge below them. */
.litter__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
  background: linear-gradient(#d9c9a0, #d9c9a0) left bottom 36px / 100% 6px no-repeat;
}

.litter__cat {
  display: grid;
  justify-items: center;
  margin: 0;
}

.litter__cat img {
  width: clamp(72px, 10vw, 120px);
  margin-bottom: -4px;
}

.litter__cat figcaption {
  height: 36px;
  padding-top: 8px;
  font-family: var(--hand);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.litter__cat--exotic figcaption {
  color: #6c3f99;
}

.litter__caption {
  margin-top: 18px;
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* Chaos: the scratched couch choice */

.dilemma {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-panel);
  background: var(--white);
}

.dilemma__scene {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 240px;
  padding: 24px;
  border-radius: 20px;
  background: var(--paper-deep);
}

/* Couch and cat keep their in-game proportions (140px couch, 96px cat). */
.dilemma__couch {
  width: 210px;
  margin-right: 90px;
}

/* Animations are rows of the in-game sprite sheet (see src/game/animations/petAnimations.ts),
   played at the game's speed: idle 0.1, sleep and petting 0.15 frames per tick. */
.dilemma__cat {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 144px;
  height: 144px;
  margin-left: -10px;
  background: url("../img/cats/ginger-idle.png") 0 0 / auto 100% no-repeat;
  image-rendering: pixelated;
  animation: cat-strip-12 2s steps(12) infinite;
}

/* Loads the other two strips up front so the swap doesn't flash empty. */
.dilemma__scene::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  background-image: url("../img/cats/ginger-sleep.png"), url("../img/cats/ginger-petting.png");
}

.dilemma[data-choice="scold"] .dilemma__cat {
  background-image: url("../img/cats/ginger-sleep.png");
  animation: cat-strip-13 1.45s steps(13) infinite;
}

.dilemma[data-choice="ignore"] .dilemma__cat {
  background-image: url("../img/cats/ginger-petting.png");
  animation: cat-strip-12 1.33s steps(12) infinite;
}

@keyframes cat-strip-12 {
  to { background-position: -1728px 0; }
}

@keyframes cat-strip-13 {
  to { background-position: -1872px 0; }
}

.dilemma__scratch {
  position: absolute;
  left: 50%;
  top: 34px;
  margin-left: 10px;
  font-family: var(--hand);
  font-size: 1.4rem;
  color: #b85a5a;
  transform: rotate(-10deg);
}

.dilemma[data-choice] .dilemma__scratch {
  visibility: hidden;
}

.dilemma__question {
  margin-top: 10px;
  color: var(--ink-soft);
}

.dilemma__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.dilemma__result {
  min-height: 3.2em;
  margin-top: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--mint);
  color: var(--ink);
}

.dilemma__result:empty {
  border-color: transparent;
}

.dilemma__reset {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--leaf-ink);
  text-decoration: underline;
  cursor: pointer;
}

/* Home: house and furniture catalogue */

.home-art {
  position: relative;
}

.home-art__house {
  width: min(420px, 80%);
  margin: 0 auto;
}

.home-art__item {
  position: absolute;
  width: clamp(54px, 8vw, 88px);
}

.home-art__item--1 { left: 0; top: 6%; }
.home-art__item--2 { right: 2%; top: 0; }
.home-art__item--3 { left: 2%; bottom: 8%; }
.home-art__item--4 { right: 0; bottom: 14%; }

.unlocks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.unlocks li {
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px #e3dcb9;
  font-size: 0.9375rem;
}

/* Hunting and aquarium */

.section--tank {
  background: var(--sky-light);
}

.prey {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.prey img {
  width: 54px;
}

.tank-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  margin-top: clamp(36px, 5vw, 56px);
}

.tank-row img {
  width: clamp(48px, 7vw, 72px);
}

.fish-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.fish-card {
  padding: 22px;
  border-radius: 22px;
  background: var(--white);
}

/* In-game sprite next to a photo of the real species, as in the aquarium. */
.fish-card__art {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.fish-card__sprite {
  width: 104px;
}

.fish-card__photo {
  width: 64px;
  height: 64px;
  margin-left: -10px;
  border: 3px solid var(--white);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(20, 60, 80, 0.15);
}

.fish-card p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Download */

.download {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.download__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.download__side {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.download__cat {
  width: 160px;
}

.qr {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 16px;
  max-width: 320px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.qr img {
  width: 112px;
  height: 112px;
}

/* Phones and tablets can't scan their own screen. */
@media (hover: none) and (pointer: coarse) {
  .qr {
    display: none;
  }
}

/* Footer */

.site-footer {
  padding: 40px 0 48px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Legal page */

.legal {
  max-width: 44rem;
  padding-bottom: 80px;
}

.legal h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  margin: 24px 0 8px;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 36px 0 8px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.2em;
}

/* Layout breakpoints */

@media (max-width: 900px) {
  .hero .wrap,
  .split,
  .dilemma,
  .download {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__media {
    max-width: 560px;
    margin: 0 auto;
  }

  .split--media-first .split__media {
    order: -1;
  }

  .fish-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .download__side {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .site-header__nav .btn {
    display: none;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .litter__row {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 18px;
    background: none;
  }

  .litter__cat {
    background: linear-gradient(#d9c9a0, #d9c9a0) left bottom 36px / 100% 6px no-repeat;
  }

  .fridge__letter {
    right: -6px;
    width: 72px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .dilemma .dilemma__cat {
    animation: none;
  }
}
