@import url("https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,400;0,600;1,400&family=Manufacturing+Consent&display=swap");


/* =============================================
   ROOT
============================================= */
:root {
  --bg: #f6e8eb;
  --surface: #fff5f7;

  --text: #39171d;
  --text-muted: #87656b;

  --blood: #790d1b;
  --blood-dark: #490811;
  --blood-soft: #ad3547;

  --border: #c78f99;

  --shadow: rgba(73, 8, 17, .18);

  --bg-image:
    url("https://i.postimg.cc/MKGhydLy/argyle9.png");

  --bg-size: 100px auto;
  --bg-scroll-speed: 40s;
}


/* =============================================
   BASE
============================================= */
* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  font-family: "Cormorant", serif;

  overflow: hidden;
}


/* =============================================
   MOVING BACKGROUND
============================================= */
body::before {
  content: "";

  position: fixed;
  inset: 0;

  z-index: -2;

  background-image:
    var(--bg-image);

  background-size:
    var(--bg-size);

  background-position:
    center 0;

  background-repeat:
    repeat;

  animation:
    background-scroll
    var(--bg-scroll-speed)
    linear
    infinite;
}

body::after {
  content: "";

  position: fixed;
  inset: 0;

  z-index: -1;

  background:
    radial-gradient(
      circle at center,
      rgba(255, 245, 247, .12),
      rgba(121, 13, 27, .16)
    );

  pointer-events: none;
}


/* Scroll DOWN */
@keyframes background-scroll {
  from {
    background-position:
      center 0;
  }

  to {
    background-position:
      center 1000px;
  }
}


/* =============================================
   SELECT
============================================= */
.select-screen {
  display: grid;
  place-items: center;

  min-height: 100vh;

  padding:
    40px
    24px;
}

.profile-select {
  width: 100%;
  max-width: 900px;

  text-align: center;
}

.select-header {
  margin-bottom: 32px;
}

.select-cross {
  display: block;

  margin-bottom: 4px;

  color: var(--blood);

  font-size: 1.4rem;
}

.select-header h1 {
  margin: 0;

  color: var(--blood);

  font-family:
    "Manufacturing Consent",
    serif;

  font-size:
    clamp(
      3rem,
      8vw,
      5.5rem
    );

  font-weight: normal;

  text-shadow:
    0 2px 0
    rgba(255, 255, 255, .5);
}

.select-header p {
  margin:
    -4px
    0
    0;

  color: var(--text-muted);

  font-size: 1rem;
  font-style: italic;
}


/* =============================================
   PROFILES
============================================= */
.profile-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 22px;
}

.profile {
  position: relative;

  display: block;

  width: 150px;
  height: 190px;

  padding: 0;

  background:
    var(--surface);

  border:
    2px
    solid
    var(--border);

  border-radius:
    75px
    75px
    8px
    8px;

  box-shadow:
    0 8px 20px
    var(--shadow),
    inset 0 0 0 4px
    rgba(255, 255, 255, .4);

  overflow: hidden;

  cursor: pointer;

  transition:
    transform .45s ease,
    border-color .45s ease,
    box-shadow .45s ease,
    filter .45s ease;
}

.profile:hover,
.profile.active {
  transform:
    translateY(-6px)
    scale(1.025);

  border-color:
    var(--blood);

  box-shadow:
    0 12px 26px
    var(--shadow),
    0 0 18px
    rgba(121, 13, 27, .16);
}

.profile img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform .6s ease,
    filter .6s ease;
}

.profile:hover img,
.profile.active img {
  transform:
    scale(1.035);
}

.profile::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      160deg,
      rgba(255, 255, 255, .24),
      transparent 35%
    );

  pointer-events: none;
}


/* =============================================
   TOOLTIP
============================================= */
#profile-tooltip {
  position: fixed;

  z-index: 9999;

  width: max-content;
  max-width: 230px;

  padding:
    9px
    12px;

  background:
    rgba(255, 245, 247, .96);

  color:
    var(--text);

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

  border-radius: 4px;

  box-shadow:
    3px 3px 0
    var(--blood-dark),
    0 6px 20px
    var(--shadow);

  font-size: .95rem;
  line-height: 1.25;
  text-align: left;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transform:
    translateY(4px);

  transition:
    opacity .18s ease,
    visibility .18s ease,
    transform .18s ease;
}

#profile-tooltip.show {
  opacity: 1;
  visibility: visible;

  transform:
    translateY(0);
}

.tooltip-name {
  display: block;

  color:
    var(--blood);

  font-size: 1.1rem;
  font-weight: 600;
}

.tooltip-handle {
  display: block;

  color:
    var(--text-muted);

  font-style: italic;
}

.tooltip-description {
  display: block;

  margin-top: 5px;
}

.tooltip-enter {
  display: block;

  margin-top: 6px;

  color:
    var(--blood-soft);

  font-size: .75rem;
  font-style: italic;
}


/* =============================================
   PAGE LEAVE FADE
============================================= */
.page-fade {
  position: fixed;
  inset: 0;

  z-index: 99999;

  background: #ffffff;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity .65s ease;
}

body.leaving .page-fade {
  opacity: 1;
}


/* =============================================
   MOBILE
============================================= */
@media (max-width: 600px) {
  body {
    overflow-y: auto;
  }

  .select-screen {
    padding:
      30px
      18px;
  }

  .profile-grid {
    gap: 14px;
  }

  .profile {
    width: 125px;
    height: 160px;
  }

  #profile-tooltip {
    max-width: 190px;
  }
}


/* =============================================
   ACCESSIBILITY
============================================= */
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }

  .profile,
  .profile img,
  #profile-tooltip,
  .page-fade {
    transition: none;
  }
}