:root {
  --ink: #4b3528;
  --muted: #806b5d;
  --gold: #a97a51;
  --paper: rgba(255, 250, 246, 0.87);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  height: 100%;
  overflow: hidden;
  background: #f8eee7;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #f8eee7;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

a {
  color: inherit;
}

.site-shell {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  padding: 12px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.site-shell::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: #f8eee7 url("/background-desktop.png") center / 100% 100% no-repeat;
}

.site-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(255, 249, 245, 0.12);
  pointer-events: none;
}

.profile-card {
  position: relative;
  width: min(100%, 560px);
  padding: 36px 40px 30px;
  border: 1px solid rgba(157, 118, 85, 0.2);
  border-radius: 280px 280px 42px 42px;
  background: linear-gradient(180deg, rgba(249, 239, 232, 0.76), rgba(247, 233, 224, 0.84));
  box-shadow: 0 24px 70px rgba(109, 76, 52, 0.14), inset 0 0 0 5px rgba(255, 247, 241, 0.2);
  backdrop-filter: blur(3px);
  transform: scale(0.7);
  transform-origin: top center;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(180, 143, 110, 0.3);
  border-radius: inherit;
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 184px;
  height: 116px;
  margin: 0 auto -7px;
  object-fit: contain;
}

.tagline {
  margin: 0;
  color: #7b5a43;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.hero-photo-wrap {
  position: relative;
  width: 86%;
  height: 255px;
  margin: 12px auto -6px;
  overflow: hidden;
  border-radius: 110px 110px 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.intro-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.intro-copy h1 {
  margin: 4px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 4vw, 29px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.affiliate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 27px;
  border-radius: 999px;
  color: #fffdfb;
  background: linear-gradient(180deg, #b58960, #996d48);
  box-shadow: 0 5px 16px rgba(132, 91, 56, 0.2);
  font-size: 17px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.affiliate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(132, 91, 56, 0.27);
}

.ornament {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 170px;
  margin: 6px auto 5px;
  color: #ad815d;
  font-size: 12px;
}

.ornament span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 123, 86, 0.7));
}

.ornament span:last-child {
  transform: scaleX(-1);
}

.link-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
}

.link-card {
  min-height: 60px;
  display: grid;
  grid-template-columns: 42px 1fr 24px;
  align-items: center;
  gap: 13px;
  padding: 8px 14px;
  border: 1px solid rgba(133, 96, 69, 0.17);
  border-radius: 13px;
  background: rgba(255, 249, 245, 0.64);
  box-shadow: 0 3px 9px rgba(91, 65, 48, 0.08);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 7px 18px rgba(91, 65, 48, 0.12);
  outline: none;
}

.link-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 2px 5px rgba(89, 59, 39, 0.13);
}

.link-icon img {
  display: block;
  width: 23px;
  height: 23px;
}

.link-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.link-copy strong {
  color: #2f2824;
  font-size: 15px;
  font-weight: 700;
}

.link-copy small {
  overflow: hidden;
  color: #5f554f;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  color: #3f342e;
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

.thank-you {
  position: relative;
  z-index: 1;
  margin: 9px 0 8px;
  padding: 7px 12px;
  border: 1px solid rgba(143, 102, 72, 0.15);
  border-radius: 999px;
  color: #856d5e;
  background: rgba(255, 253, 251, 0.24);
  font-size: 12px;
  text-align: center;
}

.thank-you span {
  color: #aa7a55;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 5px;
}

.social-row a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(120, 88, 67, 0.22);
  border-radius: 50%;
  background: #9a724f;
  box-shadow: inset 0 0 0 4px rgba(255, 248, 242, 0.86);
  transition: transform 160ms ease;
}

.social-row a:hover,
.social-row a:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.social-row img {
  width: 16px;
  height: 16px;
}

.copyright {
  margin: 11px 0 0;
  color: #5f5047;
  font-size: 10.5px;
  text-align: center;
}

@media (max-width: 640px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .site-shell {
    height: 100svh;
    min-height: 100svh;
    align-items: flex-start;
    padding: 12px 0 0;
    overflow: hidden;
  }

  .site-shell::before {
    position: absolute;
    background-image: url("/background-mobile.png");
    background-position: top center;
    background-size: 100% 100%;
  }

  .profile-card {
    width: clamp(290px, 82vw, 430px);
    padding: 30px 18px 24px;
    border-radius: 230px 230px 34px 34px;
    transform: scale(0.7);
    transform-origin: top center;
  }

  .brand-logo {
    width: 160px;
    height: 101px;
  }

  .tagline {
    font-size: 8.5px;
    letter-spacing: 0.27em;
  }

  .hero-photo-wrap {
    width: 94%;
    height: clamp(210px, 56vw, 270px);
    margin-top: 10px;
  }

  .intro-copy h1 {
    font-size: clamp(21px, 6vw, 27px);
  }

  .affiliate-button {
    min-height: 40px;
    padding-inline: 22px;
    font-size: 16px;
  }

  .link-card {
    min-height: 57px;
    grid-template-columns: 40px 1fr 20px;
    gap: 11px;
    padding: 7px 11px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 640px) and (min-height: 900px) {
  .profile-card {
    transform: scale(0.78);
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  .profile-card {
    transform: scale(0.6);
  }
}

@media (max-width: 640px) and (max-height: 680px) {
  .profile-card {
    transform: scale(0.54);
  }
}

@media (max-width: 640px) and (max-height: 600px) {
  .profile-card {
    transform: scale(0.46);
  }
}

@media (min-width: 641px) and (orientation: portrait) {
  .site-shell::before {
    background-image: url("/background-mobile.png");
  }
}

@media (min-width: 641px) and (max-height: 820px) {
  .profile-card {
    transform: scale(0.62);
  }
}

@media (min-width: 641px) and (max-height: 720px) {
  .profile-card {
    transform: scale(0.56);
  }
}

@media (min-width: 641px) and (max-height: 640px) {
  .profile-card {
    transform: scale(0.49);
  }
}

@media (min-width: 641px) and (min-height: 950px) {
  .profile-card {
    transform: scale(0.77);
  }
}

@media (min-width: 641px) and (min-height: 1050px) {
  .profile-card {
    transform: scale(0.88);
  }
}

@media (min-width: 641px) and (min-height: 1200px) {
  .profile-card {
    transform: scale(0.98);
  }
}

@media (max-width: 370px) {
  .profile-card {
    width: 84vw;
    padding-inline: 14px;
  }

  .hero-photo-wrap {
    width: 98%;
  }

  .intro-copy h1 {
    font-size: 20px;
  }

  .link-copy small {
    max-width: 180px;
  }
}

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