:root {
  --pink: #ef8fb5;
  --pink-hover: #e97da9;
  --pink-border: #f1bfd2;

  --text: #4c3140;
  --text-soft: #a66c83;

  --error: #b14d6d;

  --cat-x: 0px;
  --cat-y: 0px;
}

/* ========================================
   RESET
======================================== */

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;

  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;

  font-family: "Pixelify Sans", system-ui, sans-serif;

  color: var(--text);

  background: radial-gradient(
    circle at 28% 36%,
    #ffffff 0%,
    #fffafb 34%,
    #fcecf3 72%,
    #f8dce8 100%
  );

  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* ========================================
   BACKGROUND
======================================== */

.background-dots {
  position: fixed;

  inset: 0;

  pointer-events: none;

  opacity: 0.32;

  z-index: -1;
}

.background-dots::before {
  content: "";

  position: absolute;

  width: 3px;
  height: 3px;

  background: #eba6c1;

  box-shadow:
    13vw 18vh #efbfd1,
    25vw 75vh #f1cada,
    42vw 12vh #efbfd1,
    55vw 81vh #eba6c1,
    69vw 22vh #f1cada,
    81vw 67vh #eba6c1,
    92vw 34vh #efbfd1,
    75vw 89vh #f1cada;
}

/* ========================================
   HEADER
======================================== */

.site-header {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;

  padding: 28px 40px;

  z-index: 100;
}

.brand {
  display: inline-flex;

  align-items: center;

  gap: 10px;

  color: var(--text);

  font-size: 21px;
  font-weight: 600;

  text-decoration: none;
}

.brand-logo {
  display: block;

  width: 28px;
  height: 25px;

  object-fit: contain;

  image-rendering: pixelated;
}

/* ========================================
   COMMON
======================================== */

.eyebrow {
  margin: 0 0 15px;

  color: var(--text-soft);

  font-size: 15px;

  letter-spacing: 0.08em;
}

/* ========================================
   CONFESSION
======================================== */

.hero {
  position: relative;

  min-height: 100vh;
  min-height: 100svh;

  display: flex;

  align-items: center;

  width: min(1180px, 100%);

  margin: 0 auto;

  padding: 100px clamp(30px, 8vw, 110px) 60px;
}

.confession {
  position: relative;

  max-width: 620px;

  z-index: 2;
}

.confession h1 {
  margin: 0;

  font-size: clamp(48px, 6vw, 76px);

  font-weight: 600;

  line-height: 0.98;

  letter-spacing: -0.035em;
}

.confession h1 span {
  display: block;
}

/* ========================================
   CONFESSION BUTTONS
======================================== */

.answer-buttons {
  display: flex;

  align-items: center;

  gap: 13px;

  margin-top: 34px;
}

.answer-button {
  min-width: 118px;

  padding: 13px 28px;

  border-radius: 10px;

  font-size: 18px;
  font-weight: 600;

  cursor: pointer;

  transform-origin: center;

  transition:
    transform 200ms ease,
    opacity 200ms ease,
    background 200ms ease;
}

.yes-button {
  border: 1px solid var(--pink);

  color: white;

  background: var(--pink);

  box-shadow: 0 10px 28px rgba(225, 116, 159, 0.22);
}

.yes-button:hover {
  background: var(--pink-hover);
}

.no-button {
  border: 1px solid var(--pink-border);

  color: #70485b;

  background: rgba(255, 255, 255, 0.7);
}

.no-button.button-eaten {
  animation: buttonEat 220ms steps(4, end) forwards;
}

@keyframes buttonEat {
  from {
    opacity: 1;

    transform: scale(0.3);
  }

  to {
    opacity: 0;

    transform: scale(0);
  }
}

/* ========================================
   CONFESSION CAT
======================================== */

.cat-container {
  position: absolute;

  right: 9%;
  top: 47%;

  width: 82px;

  transform: translate(var(--cat-x), var(--cat-y));

  transition: transform 520ms cubic-bezier(0.22, 0.75, 0.25, 1);

  z-index: 10;
}

.pixel-cat {
  display: block;

  width: 82px;
  height: auto;

  image-rendering: pixelated;

  transform-origin: center bottom;
}

/* ========================================
   CAT WALK
======================================== */

.cat-container.walking .pixel-cat {
  animation: catWalk 260ms steps(2, end) infinite;
}

@keyframes catWalk {
  0% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-4px) rotate(1deg);
  }

  100% {
    transform: translateY(0) rotate(-1deg);
  }
}

/* ========================================
   CAT BITE
======================================== */

.cat-container.biting .pixel-cat {
  animation: catBite 230ms steps(3, end);
}

@keyframes catBite {
  0% {
    transform: scale(1);
  }

  50% {
    transform: translateX(-5px) scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* ========================================
   CAT YES CELEBRATION
======================================== */

.cat-container.celebrating .pixel-cat {
  animation: catCelebrate 720ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes catCelebrate {
  0% {
    transform: translateY(0) rotate(0);
  }

  35% {
    transform: translateY(-32px) rotate(-7deg);
  }

  60% {
    transform: translateY(-18px) rotate(7deg);
  }

  100% {
    transform: translateY(0) rotate(0);
  }
}

.celebration-heart {
  position: absolute;

  left: 50%;
  top: -18px;

  color: var(--pink);

  font-size: 22px;

  opacity: 0;

  transform: translateX(-50%) scale(0);
}

.cat-container.celebrating .celebration-heart {
  animation: heartPop 850ms ease forwards;
}

@keyframes heartPop {
  0% {
    opacity: 0;

    transform: translateX(-50%) translateY(8px) scale(0);
  }

  35% {
    opacity: 1;

    transform: translateX(-50%) translateY(-6px) scale(1.25);
  }

  100% {
    opacity: 0;

    transform: translateX(-50%) translateY(-24px) scale(0.8);
  }
}

/* ========================================
   CONFESSION DIALOGUE
======================================== */

.cat-dialogue {
  position: absolute;

  left: calc(100% + 16px);

  top: 12px;

  width: 230px;

  max-width: calc(100vw - 32px);

  padding: 13px 15px;

  color: var(--text);

  background: #fffdfd;

  border: 3px solid var(--text);

  box-shadow: 5px 5px 0 var(--pink);
}

.cat-dialogue::before {
  content: "";

  position: absolute;

  left: -10px;
  top: 22px;

  width: 14px;
  height: 14px;

  background: #fffdfd;

  border-left: 3px solid var(--text);

  border-bottom: 3px solid var(--text);

  transform: rotate(45deg);
}

.cat-dialogue p {
  margin: 0;

  font-size: 15px;

  line-height: 1.35;
}

/* ========================================
   PLANNER
======================================== */

.planner-screen {
  min-height: 100vh;
  min-height: 100svh;

  display: flex;

  justify-content: center;

  padding: 110px 24px 70px;
}

.planner {
  width: min(760px, 100%);
}

/* ========================================
   PLANNER CAT
======================================== */

.planner-mascot {
  display: flex;

  flex-direction: column;

  align-items: center;

  width: 100%;

  margin-bottom: 12px;
}

.planner-cat {
  display: block;

  width: 68px;
  height: auto;

  image-rendering: pixelated;
}

.planner-cat-dialogue {
  position: relative;

  max-width: calc(100vw - 40px);

  margin-bottom: 16px;

  padding: 9px 14px;

  border: 3px solid var(--text);

  background: #fffdfd;

  box-shadow: 4px 4px 0 var(--pink);

  color: var(--text);

  font-size: 15px;

  text-align: center;

  white-space: nowrap;
}

.planner-cat-dialogue::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -10px;

  width: 13px;
  height: 13px;

  background: #fffdfd;

  border-right: 3px solid var(--text);

  border-bottom: 3px solid var(--text);

  transform: translateX(-50%) rotate(45deg);
}

/* ========================================
   PLANNER HEADING
======================================== */

.planner-heading {
  text-align: center;

  margin-bottom: 42px;
}

.planner-heading h1 {
  margin: 0;

  font-size: clamp(42px, 6vw, 64px);

  line-height: 1;

  font-weight: 600;
}

/* ========================================
   DATE/TIME
======================================== */

.planner-fields {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 16px;
}

.field-group {
  display: flex;

  flex-direction: column;

  gap: 8px;

  min-width: 0;
}

.field-group label {
  color: var(--text);
}

.field-group label span {
  color: var(--text-soft);

  font-size: 13px;

  margin-left: 5px;
}

.field-group input {
  width: 100%;
  min-width: 0;

  padding: 14px 15px;

  border: 1px solid var(--pink-border);

  border-radius: 12px;

  color: var(--text);

  background: rgba(255, 255, 255, 0.72);

  outline: none;
}

.field-group input:focus {
  border-color: var(--pink);

  box-shadow: 0 0 0 4px rgba(239, 143, 181, 0.12);
}

/* ========================================
   TIMEZONE
======================================== */

.timezone-preview {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 16px;

  margin-top: 22px;

  padding: 18px;

  border: 1px solid var(--pink-border);

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.45);
}

.timezone-card {
  display: flex;

  flex-direction: column;

  gap: 6px;

  min-width: 0;
}

.timezone-card strong {
  overflow-wrap: anywhere;
}

.timezone-label {
  color: var(--text-soft);
}

.timezone-divider {
  color: var(--pink);

  font-size: 22px;
}

/* ========================================
   ACTIVITIES
======================================== */

.activity-section {
  margin-top: 42px;
}

.activity-section h2 {
  margin: 0 0 16px;
}

.activity-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 12px;
}

.activity-card {
  display: flex;

  flex-direction: column;

  gap: 6px;

  min-width: 0;

  padding: 17px;

  text-align: left;

  border: 1px solid var(--pink-border);

  border-radius: 12px;

  color: var(--text);

  background: rgba(255, 255, 255, 0.55);

  cursor: pointer;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.activity-card:hover {
  transform: translateY(-2px);
}

.activity-card.selected {
  border-color: var(--pink);

  background: rgba(252, 226, 237, 0.8);
}

.activity-title {
  font-size: 18px;

  font-weight: 600;
}

.activity-description {
  color: var(--text-soft);

  font-size: 14px;

  line-height: 1.35;
}

/* ========================================
   CONFIRM
======================================== */

.planner-error {
  min-height: 20px;

  margin-top: 18px;

  color: var(--error);

  text-align: center;
}

.confirm-date-button {
  width: 100%;

  margin-top: 24px;

  padding: 15px 20px;

  border: 0;

  border-radius: 12px;

  color: white;

  background: var(--pink);

  cursor: pointer;
}

.confirm-date-button:hover:not(:disabled) {
  background: var(--pink-hover);
}

.confirm-date-button:disabled {
  opacity: 0.4;

  cursor: not-allowed;
}

/* ========================================
   CONFIRMATION
======================================== */

.confirmation-screen {
  min-height: 100vh;

  min-height: 100svh;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 105px 24px 60px;
}

.confirmation {
  width: min(560px, 100%);

  text-align: center;
}

/* ========================================
   FINAL CELEBRATING CAT
======================================== */

.confirmation-mascot {
  position: relative;

  width: min(170px, 100%);

  margin: 0 auto 10px;

  display: flex;

  flex-direction: column;

  align-items: center;

  animation: finalMascotBounce 1.8s ease-in-out infinite;
}

/* ========================================
   FINAL DIALOGUE
======================================== */

.final-dialogue {
  position: relative;

  max-width: calc(100vw - 40px);

  margin-bottom: 14px;

  padding: 10px 16px;

  border: 3px solid var(--text);

  background: #fffdfd;

  box-shadow: 5px 5px 0 var(--pink);

  color: var(--text);

  font-size: 15px;

  line-height: 1.2;

  text-align: center;

  white-space: nowrap;
}

.final-dialogue::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -10px;

  width: 13px;
  height: 13px;

  background: #fffdfd;

  border-right: 3px solid var(--text);

  border-bottom: 3px solid var(--text);

  transform: translateX(-50%) rotate(45deg);
}

.confirmation-cat {
  display: block;

  width: 74px;

  height: auto;

  image-rendering: pixelated;

  transform-origin: center bottom;

  animation: finalCatCelebrate 1.8s ease-in-out infinite;
}

@keyframes finalMascotBounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-14px) rotate(-2deg);
  }

  50% {
    transform: translateY(0) rotate(0deg);
  }

  75% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes finalCatCelebrate {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(0deg);
  }

  75% {
    transform: rotate(4deg);
  }
}

/* ========================================
   FINAL HEARTS
======================================== */

.final-heart {
  position: absolute;

  color: var(--pink);

  opacity: 0;

  font-size: 17px;

  animation: finalHeartFloat 1.8s ease-out infinite;
}

.final-heart-one {
  left: 18px;
  top: 54px;

  animation-delay: 0s;
}

.final-heart-two {
  right: 18px;
  top: 44px;

  animation-delay: 0.55s;
}

.final-heart-three {
  left: 50%;
  top: 14px;

  animation-delay: 1.05s;
}

@keyframes finalHeartFloat {
  0% {
    opacity: 0;

    transform: translateY(12px) scale(0.5);
  }

  35% {
    opacity: 1;

    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;

    transform: translateY(-22px) scale(0.75);
  }
}

/* ========================================
   CONFIRMATION CONTENT
======================================== */

.confirmation h1 {
  margin: 0;

  font-size: clamp(50px, 7vw, 72px);
}

.confirmation-card {
  margin-top: 32px;

  padding: 25px;

  border: 1px solid var(--pink-border);

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.58);
}

.confirmation-label {
  display: block;

  color: var(--text-soft);

  margin-bottom: 5px;
}

#confirmed-activity {
  font-size: 23px;
}

.confirmation-time {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 20px;

  margin-top: 25px;

  padding-top: 22px;

  border-top: 1px solid var(--pink-border);
}

.confirmation-time div {
  display: flex;

  flex-direction: column;

  gap: 6px;

  min-width: 0;
}

.confirmation-time strong {
  overflow-wrap: anywhere;
}

.confirmation-time span {
  color: var(--text-soft);
}

.confirmation-message {
  color: var(--text-soft);

  margin-top: 24px;
}

.change-plans-button {
  border: 0;

  color: var(--text-soft);

  background: transparent;

  cursor: pointer;

  text-decoration: underline;
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 820px) {
  .site-header {
    padding: 24px 26px;
  }

  .hero {
    padding-left: 40px;

    padding-right: 40px;
  }

  .cat-container {
    right: 5%;
  }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 720px) {
  .site-header {
    position: absolute;

    padding: 20px 20px;
  }

  .brand {
    font-size: 19px;

    gap: 8px;
  }

  .brand-logo {
    width: 25px;

    height: 23px;
  }

  /* ------------------------------------
       confession
    ------------------------------------ */

  .hero {
    display: block;

    min-height: 100svh;

    width: 100%;

    padding: 125px 22px 250px;

    text-align: center;
  }

  .confession {
    width: 100%;

    max-width: 520px;

    margin: 0 auto;
  }

  .eyebrow {
    margin-bottom: 12px;

    font-size: 14px;
  }

  .confession h1 {
    font-size: clamp(42px, 13vw, 58px);

    line-height: 0.98;
  }

  .answer-buttons {
    justify-content: center;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 30px;

    min-height: 56px;
  }

  .answer-button {
    min-width: 104px;

    padding: 12px 22px;

    font-size: 17px;
  }

  /* ------------------------------------
       cat gets its own area below buttons
    ------------------------------------ */

  .cat-container {
    top: auto;

    right: 24px;

    bottom: 48px;

    width: 68px;

    z-index: 20;
  }

  .pixel-cat {
    width: 68px;
  }

  /* dialogue goes ABOVE cat on phones */

  .cat-dialogue {
    left: 50%;

    top: auto;

    bottom: calc(100% + 18px);

    width: min(230px, calc(100vw - 36px));

    transform: translateX(-50%);

    padding: 12px 14px;

    text-align: left;
  }

  .cat-dialogue::before {
    left: 50%;

    top: auto;

    bottom: -10px;

    width: 14px;

    height: 14px;

    border-left: 0;

    border-bottom: 3px solid var(--text);

    border-right: 3px solid var(--text);

    transform: translateX(-50%) rotate(45deg);
  }

  .cat-dialogue p {
    font-size: 14px;
  }

  /* ------------------------------------
       planner
    ------------------------------------ */

  .planner-screen {
    padding: 100px 18px 50px;
  }

  .planner {
    width: 100%;
  }

  .planner-mascot {
    margin-bottom: 14px;
  }

  .planner-cat {
    width: 60px;
  }

  .planner-cat-dialogue {
    max-width: calc(100vw - 44px);

    font-size: 14px;

    padding: 9px 13px;

    white-space: normal;
  }

  .planner-heading {
    margin-bottom: 32px;
  }

  .planner-heading h1 {
    font-size: clamp(36px, 10vw, 50px);

    line-height: 1;
  }

  /* ------------------------------------
       confirmation
    ------------------------------------ */

  .confirmation-screen {
    align-items: flex-start;

    padding: 105px 18px 50px;
  }

  .confirmation-mascot {
    width: 150px;
  }

  .confirmation-cat {
    width: 66px;
  }

  .final-dialogue {
    max-width: calc(100vw - 44px);

    font-size: 14px;

    padding: 9px 14px;

    white-space: normal;
  }

  .confirmation h1 {
    font-size: clamp(46px, 14vw, 64px);
  }

  .confirmation-card {
    padding: 20px;
  }
}

/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 620px) {
  .planner-fields,
  .activity-grid,
  .confirmation-time {
    grid-template-columns: 1fr;
  }

  .timezone-preview {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .timezone-divider {
    transform: rotate(90deg);
  }
}

/* ========================================
   VERY SMALL PHONES
======================================== */

@media (max-width: 420px) {
  .hero {
    padding: 112px 16px 230px;
  }

  .confession h1 {
    font-size: clamp(38px, 12vw, 48px);
  }

  .answer-buttons {
    gap: 10px;

    margin-top: 25px;
  }

  .answer-button {
    min-width: 94px;

    padding: 11px 18px;

    font-size: 16px;
  }

  .cat-container {
    right: 20px;

    bottom: 38px;

    width: 61px;
  }

  .pixel-cat {
    width: 61px;
  }

  .cat-dialogue {
    width: min(215px, calc(100vw - 30px));

    font-size: 13px;
  }

  .planner-screen {
    padding-left: 14px;

    padding-right: 14px;
  }

  .confirmation-screen {
    padding-left: 14px;

    padding-right: 14px;
  }
}

/* ========================================
   SHORT MOBILE SCREENS
======================================== */

@media (max-width: 720px) and (max-height: 700px) {
  .hero {
    padding-top: 105px;

    padding-bottom: 190px;
  }

  .confession h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .answer-buttons {
    margin-top: 22px;
  }

  .cat-container {
    bottom: 24px;

    width: 56px;
  }

  .pixel-cat {
    width: 56px;
  }
}
