@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("./playfair-display-latin.woff2") format("woff2");
}

:root {
  --profile-radius: 30px;
  --profile-width: 566px;
  color: #000;
  background: transparent;
  font-family: "Playfair Display", Georgia, serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: transparent;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  color: #000;
}

a,
button {
  font: inherit;
}

button {
  color: inherit;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("./images/fawni-hero.webp") center / 100% 100%
    no-repeat;
  filter: blur(50px);
  pointer-events: none;
}

.profile-card {
  position: relative;
  width: min(100%, var(--profile-width));
  margin: 34px auto 0;
  border-radius: var(--profile-radius);
  background: #fff;
  box-shadow: 0 1px 10px 2px rgba(0, 0, 0, 0.5);
}

.main-scroll {
  display: flex;
  flex-direction: column;
  padding-bottom: 1px;
}

.hero-sticky {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 546px;
  margin-bottom: 26px;
}

.hero-image {
  position: relative;
  width: var(--profile-width);
  max-width: 100%;
  height: 546px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--profile-radius) var(--profile-radius) 0 0;
}

.hero-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.hero-main-overlay,
.hero-scroll-overlay {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.hero-main-overlay {
  z-index: 1;
  border-radius: var(--profile-radius) var(--profile-radius) 0 0;
}

.hero-scroll-overlay {
  z-index: 2;
}

.top-profile-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 12;
  display: flex;
  width: min(100%, var(--profile-width));
  height: 50px;
  align-items: center;
  padding: 10px 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.top-profile-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: 0;
  will-change: opacity;
}

.top-profile-identity {
  display: flex;
  align-items: center;
  padding-left: 15px;
  opacity: 0;
  will-change: opacity;
}

.top-profile-avatar {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  overflow: hidden;
  border-radius: 50%;
}

.top-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-profile-identity strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.scroll-view {
  position: relative;
  z-index: 3;
  top: -165px;
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: -165px;
}

.identity {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.identity::before {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: clamp(180px, 32vw, 260px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 12%,
    rgba(255, 255, 255, 0.34) 46%,
    rgba(255, 255, 255, 0.82) 76%,
    #fff 100%
  );
  content: "";
  pointer-events: none;
}

.identity > h1,
.identity > .handle,
.identity > .socials {
  position: relative;
  z-index: 2;
}

.identity h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 750;
  line-height: 40px;
  letter-spacing: 0.25px;
}

.handle {
  width: 100%;
  margin: 0;
  padding-bottom: 8px;
  color: rgba(0, 0, 0, 0.75);
  font-size: 14px;
  font-weight: 500;
  line-height: 15px;
}

.socials {
  display: flex;
  width: 160px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px 0 11px 2px;
}

.social-icon-wrapper {
  display: flex;
  width: 40px;
  height: 40px;
  flex-shrink: 1;
  padding: 1px;
}

.socials a,
.socials button {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.socials img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-content {
  position: relative;
  z-index: 3;
  padding: 0 14px 28px;
  border-radius: 0 0 var(--profile-radius) var(--profile-radius);
  background: #fff;
}

.email-card {
  display: flex;
  width: 100%;
  height: 52px;
  margin-top: 0;
  align-items: center;
  gap: 0;
  padding: 0 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(13, 14, 54, 0.1);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

.email-card img {
  width: 17px;
  height: 24px;
  flex: 0 0 auto;
  margin-right: 9px;
}

.email-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.featured-card {
  position: relative;
  height: 151px;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
}

.featured-image,
.featured-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.featured-image {
  object-fit: cover;
}

.featured-shade {
  z-index: 3;
  background: linear-gradient(
    180deg,
    rgba(35, 6, 35, 0) 0%,
    rgba(6, 13, 18, 0.6) 128.76%
  );
}

.link-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 9;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.featured-label {
  position: absolute;
  right: 6.55px;
  bottom: 6px;
  left: 6.55px;
  z-index: 4;
  display: flex;
  min-height: 23px;
  align-items: flex-end;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.art-link {
  position: relative;
  display: flex;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  padding: 6px 7px;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  line-height: 22px;
  text-decoration: none;
}

.art-link img {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.art-link span {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.welcome-counter {
  display: flex;
  width: 320px;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin: 80px auto 0;
  padding: 10px 0;
  text-align: center;
  transform: translateY(-24px);
}

.welcome-counter-icon {
  display: block;
  width: 82px;
  height: 82px;
  margin-bottom: 4px;
  object-fit: contain;
}

.welcome-counter-title {
  margin: 0;
  color: #000;
  font-size: 26px;
  font-weight: 700;
  line-height: 34px;
}

.welcome-counter-value {
  display: block;
  margin-top: 4px;
  color: #000;
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 52px;
}

.welcome-counter-note {
  margin: 2px 0 0;
  color: rgba(0, 0, 0, 0.48);
  font-size: 16px;
  line-height: 22px;
}

.toast {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  html,
  body {
    background: #fff;
  }

  .page-backdrop {
    display: none;
  }

  .profile-card {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-sticky {
    height: 100vw;
    margin-bottom: 6.933vw;
  }

  .hero-image {
    width: 100vw;
    height: 100vw;
    border-radius: 0;
  }

  .hero-main-overlay {
    border-radius: 0;
  }

  .top-profile-header {
    width: 100%;
    height: 13.333vw;
    padding: 2.667vw 0;
  }

  .top-profile-identity {
    padding-left: 4vw;
  }

  .top-profile-avatar {
    width: 8vw;
    height: 8vw;
    margin-right: 2.667vw;
  }

  .top-profile-identity strong {
    font-size: 4.267vw;
    line-height: 6.4vw;
  }

  .scroll-view {
    top: -44vw;
    margin-bottom: -44vw;
  }

  .identity::before {
    top: auto;
    bottom: -1px;
    height: 53.3333vw;
  }

  .handle {
    margin: 1.6px 0 0;
    padding-bottom: 8px;
    font-weight: 500;
    line-height: 15px;
  }

  .socials {
    width: 42.708vw;
    gap: 0;
    padding: 2px 0 3.733vw 2px;
  }

  .social-icon-wrapper {
    width: calc((100vw - 4vw) / 9);
    height: calc((100vw - 4vw) / 9);
  }

  .profile-content {
    padding: 0 16px 28px;
    border-radius: 0;
  }

  .email-card {
    width: calc(100% + 4px);
    height: auto;
    margin-top: 0;
    margin-left: -2px;
    gap: 0;
    padding: 3.733vw;
    border-radius: 4vw;
    font-size: 3.733vw;
    font-weight: 600;
    line-height: 4.8vw;
  }

  .email-card img {
    width: 4.533vw;
    height: 4.533vw;
    margin-right: 2.4vw;
  }

  .featured-grid {
    gap: 12px;
    margin-top: 0;
  }

  .featured-card {
    height: 28.27vw;
    border-radius: 4vw;
  }

  .featured-card::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      180deg,
      rgba(35, 6, 35, 0) 0%,
      rgba(6, 13, 18, 0.6) 128.76%
    );
    content: "";
    pointer-events: none;
  }

  .link-badge {
    top: 2.36vw;
    left: 2.3vw;
    width: 4.8vw;
    height: 4.8vw;
  }

  .featured-label {
    right: 1.1vw;
    bottom: 1.35vw;
    left: 1.1vw;
    min-height: 23px;
    font-size: 3.733vw;
    font-weight: 600;
    line-height: 1.3;
  }

  .art-link {
    height: 46px;
    margin-top: 2.667vw;
    padding: 1.6vw 1.86vw;
    border-radius: 40vw;
    font-size: 3.5vw;
    font-weight: 600;
    line-height: 22px;
  }

  .art-link img {
    width: 10.01vw;
    height: 10.01vw;
  }

  .welcome-counter {
    width: min(320px, 84vw);
    min-height: clamp(210px, 58.667vw, 230px);
    margin-top: clamp(52px, 14.933vw, 72px);
    padding: 2.667vw 0;
  }

  .welcome-counter-icon {
    width: clamp(74px, 21.867vw, 88px);
    height: clamp(74px, 21.867vw, 88px);
    margin-bottom: 1.067vw;
  }

  .welcome-counter-title {
    font-size: clamp(23px, 6.4vw, 28px);
    line-height: clamp(30px, 8.533vw, 36px);
  }

  .welcome-counter-value {
    margin-top: 1.067vw;
    font-size: clamp(40px, 11.733vw, 50px);
    line-height: clamp(48px, 13.867vw, 58px);
  }

  .welcome-counter-note {
    margin-top: 0.533vw;
    font-size: clamp(15px, 4.267vw, 17px);
    line-height: clamp(20px, 5.867vw, 24px);
  }
}

@media (max-width: 370px) {
  .email-card {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}
