@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-brand: #db7c89;
  --color-blush: #fdf1f2;
  --color-ink: #2e1a1f;
  --color-ink-soft: #6b4a52;
  --color-accent-dark: #a3364a;
  --color-white: #fff;
  --radius-large: 1.75rem;
  --radius-medium: 1.25rem;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1.5rem;
  padding: 1rem;
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 3px;
}

.hearts {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hearts span {
  position: absolute;
  bottom: -3rem;
  width: var(--heart-size, 1.5rem);
  height: var(--heart-size, 1.5rem);
  background: url('../img/heart.svg') center / contain no-repeat;
  opacity: 0;
  animation: heart-float var(--heart-duration, 16s) linear infinite;
  animation-delay: var(--heart-delay, 0s);
}

.hearts span:nth-child(1) {
  left: 6%;
  --heart-size: 1.25rem;
  --heart-duration: 17s;
}

.hearts span:nth-child(2) {
  left: 18%;
  --heart-size: 2rem;
  --heart-duration: 22s;
  --heart-delay: -6s;
}

.hearts span:nth-child(3) {
  left: 34%;
  --heart-size: 1rem;
  --heart-duration: 15s;
  --heart-delay: -11s;
}

.hearts span:nth-child(4) {
  left: 52%;
  --heart-size: 1.5rem;
  --heart-duration: 20s;
  --heart-delay: -3s;
}

.hearts span:nth-child(5) {
  left: 67%;
  --heart-size: 1.125rem;
  --heart-duration: 18s;
  --heart-delay: -14s;
}

.hearts span:nth-child(6) {
  left: 80%;
  --heart-size: 2.25rem;
  --heart-duration: 24s;
  --heart-delay: -8s;
}

.hearts span:nth-child(7) {
  left: 92%;
  --heart-size: 1.25rem;
  --heart-duration: 16s;
  --heart-delay: -1s;
}

@keyframes heart-float {
  0% {
    transform: translateY(0) rotate(-10deg);
    opacity: 0;
  }

  12% {
    opacity: 0.4;
  }

  85% {
    opacity: 0.25;
  }

  100% {
    transform: translateY(-112vh) rotate(14deg);
    opacity: 0;
  }
}

.page {
  width: 100%;
  max-width: 62rem;
  margin: auto;
}

.frame {
  position: relative;
  padding: 2rem 1.25rem;
  background: var(--color-white);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-large);
  box-shadow: 0.5rem 0.5rem 0 var(--color-blush);
  transition: box-shadow 0.4s var(--ease-soft);
}

.hero {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}

.avatar {
  display: block;
  width: 10.5rem;
  height: 10.5rem;
  border-radius: 50%;
  animation: avatar-breathe 6s ease-in-out infinite;
}

@keyframes avatar-breathe {
  50% {
    transform: translateY(-0.375rem) rotate(1.5deg);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.875rem;
  background: var(--color-blush);
  border: 2px solid var(--color-brand);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 800;
}

.status img {
  width: 1rem;
  height: 1rem;
  animation: heart-beat 1.8s ease-in-out infinite;
}

@keyframes heart-beat {
  0%,
  40%,
  100% {
    transform: scale(1);
  }

  20% {
    transform: scale(1.25);
  }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding: 0.25rem 0.875rem;
  background: var(--color-accent-dark);
  border: 2px solid var(--color-accent-dark);
  color: var(--color-white);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 800;
}

.live-badge[hidden] {
  display: none;
}

.live-badge::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-white);
  border-radius: 50%;
  animation: live-dot 1.4s ease-in-out infinite;
}

@keyframes live-dot {
  50% {
    opacity: 0.35;
  }
}

.frame.is-live {
  animation: live-frame 2.4s ease-in-out infinite;
}

@keyframes live-frame {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(219 124 137 / 45%);
  }

  50% {
    box-shadow: 0 0 0 0.75rem rgb(219 124 137 / 0%);
  }
}

.hero-title {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-announcement {
  margin-top: 0.5rem;
  color: var(--color-accent-dark);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.125rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
}

.hero-text {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--color-ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-brand);
  color: var(--color-ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s var(--ease-soft);
}

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

.icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentcolor;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-brand);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.25s,
    transform 0.25s var(--ease-soft);
}

.social-link:hover {
  background: var(--color-blush);
  transform: translateY(-2px);
}

.topics {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.topic {
  padding: 1.25rem;
  background: var(--color-white);
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-medium);
  transition: transform 0.3s var(--ease-soft);
}

.topic:hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.topic:nth-child(2) {
  background: var(--color-blush);
}

.topic-title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.3;
}

.topic-text {
  margin-top: 0.25rem;
  color: var(--color-ink-soft);
}

.footer {
  color: var(--color-ink-soft);
  font-size: 0.9375rem;
  text-align: center;
}

.reveal {
  animation: reveal 0.8s var(--ease-soft) both;
  animation-delay: var(--reveal-delay, 0s);
}

.reveal-second {
  --reveal-delay: 0.15s;
}

.reveal-third {
  --reveal-delay: 0.3s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

@media (min-width: 52rem) {
  body {
    padding: 2rem;
  }

  .frame {
    padding: 3rem;
    box-shadow: 0.75rem 0.75rem 0 var(--color-blush);
  }

  .hero {
    grid-template-columns: auto 1fr;
    gap: 3rem;
    text-align: left;
  }

  .avatar {
    width: 15rem;
    height: 15rem;
  }

  .hero-actions,
  .socials {
    justify-content: flex-start;
  }

  .topics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.not-found {
  display: grid;
  justify-items: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hearts span {
    opacity: 0.2;
    bottom: auto;
    top: var(--heart-top, 15%);
  }

  .hearts span:nth-child(even) {
    --heart-top: 70%;
  }
}
