:root {
  --mcat-paper: #fdf9f5;
  --mcat-canvas: #f5f6f7;
  --mcat-ink: #17191c;
  --mcat-muted: #4f5358;
  --mcat-coral: #ff6f7d;
  --mcat-coral-dark: #f45466;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--mcat-ink);
  background: var(--mcat-canvas);
  font-family: var(--bs-body-font-family);
}

.home-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.home-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: var(--mcat-paper);
}

.home-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 7svh, 5.75rem) clamp(1.25rem, 7vw, 4.75rem) clamp(2rem, 5svh, 4rem);
}

.home-header {
  width: min(100%, 36rem);
}

.title-heart {
  display: block;
  margin-bottom: clamp(1.5rem, 3svh, 2.75rem);
  color: var(--mcat-coral);
  font-size: clamp(1.6rem, 5vw, 2.25rem);
}

.title-art {
  display: block;
  width: min(100%, 34rem);
  margin-inline: auto;
}

.title-accent {
  width: 3rem;
  margin-block: clamp(1.25rem, 2.5svh, 2rem);
  border: 0;
  border-top: .3rem solid #ffafb4;
  border-radius: 999px;
  opacity: 1;
}

.home-description {
  color: var(--mcat-ink);
  font-size: clamp(1.05rem, 3.5vw, 1.45rem);
  line-height: 1.9;
  letter-spacing: .08em;
}

.intro-panel {
  width: min(100%, 35rem);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(1.25rem, 3svh, 2.5rem);
}

.hero-cat {
  width: min(100%, 34rem);
  max-height: 50svh;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.home-primary-button {
  width: min(100%, 28rem);
  min-height: 3.75rem;
  margin-top: clamp(1rem, 2svh, 2rem);
  border: 0;
  border-radius: 999px;
  background-color: var(--mcat-coral);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  letter-spacing: .08em;
}

.home-primary-button:hover,
.home-primary-button:focus-visible,
.home-primary-button:active {
  background-color: var(--mcat-coral-dark) !important;
}

.qr-panel {
  width: min(100%, 33rem);
  padding-top: clamp(2rem, 4svh, 3.25rem);
}

.love-divider {
  width: min(100%, 30rem);
  margin: 0 auto clamp(2rem, 4svh, 3rem);
  color: var(--mcat-coral);
  font-size: 1.65rem;
}

.love-divider .border-top {
  border-top-style: dashed !important;
}

.qr-instruction {
  margin-bottom: clamp(1.5rem, 3svh, 2.25rem);
  color: var(--mcat-ink);
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  letter-spacing: .04em;
}

.qr-frame {
  width: min(76vw, 23rem);
  padding: clamp(.65rem, 2vw, 1rem);
  border: clamp(.25rem, 1vw, .4rem) solid #ffc2c5;
  border-radius: clamp(1.25rem, 4vw, 2.25rem);
  background: #fff;
}

#qrImage {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.status-row {
  margin-top: clamp(1.75rem, 4svh, 3rem);
  font-size: clamp(1rem, 3.2vw, 1.2rem);
}

.qr-decoration {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.qr-branch {
  top: -1.5rem;
  right: -1rem;
  width: clamp(9rem, 25vw, 13rem);
}

.qr-corner {
  right: -3rem;
  bottom: -3.5rem;
  width: clamp(16rem, 70vw, 22rem);
}

@media (min-width: 768px) {
  .home-page {
    padding: 1.5rem;
  }

  .home-stage {
    width: min(100%, 46rem);
    height: min(calc(100svh - 3rem), 62rem);
    min-height: min(44rem, calc(100svh - 3rem));
    border: 1px solid #e8e3dd;
    border-radius: 1.6rem;
    box-shadow: 0 1rem 3rem rgb(44 48 52 / 8%);
  }

  .home-content {
    height: 100%;
    min-height: 0;
    padding-top: clamp(2.5rem, 5svh, 3.5rem);
    padding-bottom: clamp(1.75rem, 3svh, 2.5rem);
  }

  .title-heart {
    margin-bottom: clamp(1rem, 2svh, 1.5rem);
  }

  .title-accent {
    margin-block: clamp(.8rem, 1.8svh, 1.25rem);
  }

  .home-description {
    line-height: 1.7;
  }

  .intro-panel {
    padding-top: clamp(.75rem, 1.5svh, 1.25rem);
  }

  .hero-cat {
    max-height: 43svh;
  }

  .qr-panel {
    padding-top: clamp(1rem, 2svh, 1.5rem);
  }

  .love-divider {
    margin-bottom: clamp(1rem, 2svh, 1.5rem);
  }

  .qr-instruction {
    margin-bottom: clamp(1rem, 2svh, 1.5rem);
  }

  .qr-frame {
    width: min(38vh, 20rem);
  }

  .status-row {
    margin-top: clamp(1rem, 2svh, 1.5rem);
  }

  .qr-corner {
    right: -1.5rem;
    bottom: -4.5rem;
    width: clamp(22rem, 42vw, 28rem);
  }
}

@media (max-width: 575.98px) {
  .home-content {
    padding-top: clamp(2rem, 6svh, 3.5rem);
  }

  .title-heart {
    margin-bottom: 1.25rem;
  }

  .title-accent {
    margin-block: 1rem;
  }

  .hero-cat {
    max-height: 43svh;
  }

  .qr-panel {
    padding-top: 1.5rem;
  }

  .love-divider {
    margin-bottom: 1.5rem;
  }

  .qr-frame {
    width: min(72vw, 17.5rem);
  }
}

@media (min-width: 1600px), (min-width: 1200px) and (max-height: 900px) {
  .home-stage {
    width: min(88vw, 78rem);
    height: min(calc(100svh - 3rem), 56rem);
    min-height: 0;
  }

  .home-content {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: 1fr;
    gap: clamp(3rem, 5vw, 5rem);
    padding: clamp(1.5rem, 4svh, 3.5rem) clamp(3rem, 5vw, 5rem);
  }

  .home-header {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 100%;
  }

  .title-art {
    width: min(100%, 31rem);
  }

  .intro-panel,
  .qr-panel {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: 100%;
  }

  .intro-panel {
    height: 100%;
    padding-top: 0;
    flex: none;
    justify-content: center;
    gap: clamp(1.25rem, 3svh, 2rem);
  }

  .hero-cat {
    width: 100%;
    max-height: min(60svh, 31rem);
  }

  .home-primary-button {
    width: min(100%, 25rem);
    margin-top: 0;
  }

  .qr-panel {
    padding-top: 0;
  }

  .love-divider {
    width: min(100%, 29rem);
  }

  .qr-frame {
    width: min(42svh, 18rem);
  }

  .qr-branch {
    width: clamp(11rem, 14vw, 16rem);
  }

  .qr-corner {
    right: -1rem;
    bottom: -5rem;
    width: clamp(23rem, 30vw, 28rem);
  }
}

@media (max-height: 800px) and (min-width: 576px) {
  .home-page {
    padding-block: 1rem;
  }

  .home-stage {
    height: calc(100svh - 2rem);
    min-height: 0;
  }

  .home-content {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .title-heart {
    margin-bottom: .6rem;
    font-size: 1.5rem;
  }

  .title-accent {
    margin-block: .5rem;
  }

  .home-description {
    font-size: 1rem;
    line-height: 1.5;
  }

  .intro-panel {
    justify-content: center;
    gap: 1rem;
    padding-top: .5rem;
  }

  .hero-cat {
    max-height: 34svh;
  }

  .home-primary-button {
    min-height: 3.25rem;
    margin-top: 0;
    font-size: 1.1rem;
  }

  .qr-panel {
    padding-top: 1rem;
  }

  .love-divider {
    margin-bottom: 1rem;
  }

  .qr-frame {
    width: min(46vh, 20rem);
  }

  .status-row {
    margin-top: 1rem;
  }
}

@media (min-width: 1200px) and (max-height: 900px) {
  .qr-corner {
    right: -1rem;
    bottom: -3rem;
    width: 20rem;
  }
}
