@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  font-family: "DM Sans", sans-serif;
  color: #ffece5;
  background: #12070b;
  font-synthesis: none;
  --muted: #c4a9ac;
  --line: #f5c3be26;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(ellipse at 28% 44%, #7d18342b, transparent 60%);
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #ffd0bb;
  outline-offset: 5px;
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.page {
  max-width: 1180px;
  padding: 0 56px;
  margin: 0 auto;
}
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 104px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.brand img {
  display: block;
  width: 64px;
  height: 40px;
}
.share-button {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 11px 17px;
  min-height: 44px;
  font-size: 12px;
}
.share-button:hover {
  background: #ffffff0b;
}
.share-button svg {
  width: 17px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding: 72px 0;
  min-height: calc(100svh - 180px);
}
.business-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.3;
  min-width: 0;
  border-radius: 20px;
  color: #ffe3cf;
  background: linear-gradient(135deg, #d34b58 0%, #94152e 42%, #53041e 100%);
  border: 1px solid #fbb7a48c;
  box-shadow:
    inset 0 1px 0 #ffe2caaa,
    inset 0 -1px 0 #f4818350,
    0 25px 75px #0008,
    0 0 64px #bd153629;
}
.business-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      113deg,
      #ffe1ce1c,
      transparent 25%,
      transparent 65%,
      #ffcaad12 65.1%,
      transparent 81%
    ),
    radial-gradient(
      circle at var(--light-x, 15%) var(--light-y, 0%),
      #ffe2c71f,
      transparent 65%
    );
}
.card-inner-border {
  position: absolute;
  z-index: 5;
  inset: 12px;
  border: 1px solid #ffcbb54f;
  border-radius: 12px;
  pointer-events: none;
}
.card-inner-border::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #ffcbb525;
  border-radius: 8px;
}
.card-top {
  position: absolute;
  z-index: 6;
  left: 31px;
  right: 31px;
  top: 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-logo {
  width: 63px;
  height: 40px;
  filter: drop-shadow(0 1px 1px #48072299);
}
.card-initials {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
}
.portrait-window {
  position: absolute;
  overflow: hidden;
  z-index: 2;
  right: 0;
  top: 0;
  height: 100%;
  width: 77%;
  background: #a91c38;
}
.portrait {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 41%;
  filter: grayscale(1) contrast(1.12);
  mix-blend-mode: luminosity;
  opacity: 0.9;
}
.portrait-shade {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #a6233d 0%, #a6233d00 48%),
    linear-gradient(0deg, #57091ff5 0%, #790f2bb0 16%, transparent 57%);
}
.intaglio {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    #ffcaba00 0,
    #ffcaba00 2px,
    #2500122b 2px,
    #2500122b 3px
  );
  opacity: 0.55;
  mix-blend-mode: multiply;
}
.engraving {
  position: absolute;
  z-index: 1;
  width: 70%;
  height: auto;
  pointer-events: none;
  opacity: 0.53;
}
.engraving-one {
  left: -26%;
  top: 1%;
}
.engraving-two {
  right: -32%;
  bottom: -40%;
  z-index: 4;
  opacity: 0.3;
}
.identity {
  position: absolute;
  z-index: 6;
  bottom: 74px;
  left: 34px;
}
h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(45px, 5vw, 65px);
  line-height: 0.93;
  letter-spacing: -1.5px;
  margin: 0;
  text-shadow: 0 2px 18px #510a23;
}
h1 span {
  font-style: italic;
}
.card-bottom {
  position: absolute;
  z-index: 6;
  left: 34px;
  right: 31px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-bottom > span {
  font-size: 9px;
  letter-spacing: 1.3px;
}
.seal {
  width: 44px;
  height: 44px;
  border: 1px solid #ffd5b080;
  border-radius: 50%;
  display: grid;
  place-items: center;
  outline: 1px solid #ffd5b03d;
  outline-offset: 4px;
  background: #d67f6224;
}
.seal img {
  width: 28px;
  height: 18px;
}
.desktop-name {
  font-size: 22px;
  font-weight: 450;
  letter-spacing: -0.7px;
  margin: 0 0 24px;
}
.connections {
  border-top: 1px solid var(--line);
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 83px;
}
.connections > .contact-link,
.email-row {
  border-bottom: 1px solid var(--line);
}
.icon-box {
  color: #e4b9b5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 25px;
}
.icon-box svg {
  width: 20px;
}
.link-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.link-copy strong {
  font-size: 13px;
  font-weight: 500;
}
.link-copy > span {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.link-arrow {
  width: 17px;
  margin-left: auto;
  color: #cda9a9;
  transition: transform 0.2s;
}
.contact-link:hover .link-arrow {
  transform: translate(2px, -2px);
}
.contact-link:hover strong {
  color: #ffab9e;
}
.email-row {
  display: flex;
  align-items: center;
}
.email-row a {
  flex: 1;
  min-width: 0;
}
.copy-email {
  background: none;
  border: 0;
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  margin-right: -10px;
  color: #cda9a9;
}
.copy-email svg {
  width: 17px;
}
.save-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #f39f984f;
  border-radius: 12px;
  background: linear-gradient(130deg, #8c283e70, #4a142f90);
  box-shadow: inset 0 1px 0 #fbbba41a;
  margin-top: 25px;
  height: 48px;
  font-size: 12px;
  position: relative;
}
.save-contact:hover {
  background: #8e304a80;
}
.save-contact svg {
  width: 16px;
}
.save-contact > span {
  position: absolute;
  right: 18px;
  font-size: 20px;
  font-weight: 400;
  color: #dba89e;
}
footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
footer img {
  opacity: 0.6;
}
footer > span {
  color: var(--muted);
  font-size: 9px;
}
.toast {
  position: fixed;
  z-index: 20;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #f9e8e2;
  color: #30161c;
  border: 1px solid #ffffff60;
  border-radius: 24px;
  padding: 13px 22px;
  font-size: 12px;
  max-width: calc(100% - 32px);
  width: max-content;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
.share-dialog {
  width: min(390px, calc(100% - 32px));
  padding: 32px;
  border: 1px solid #925060;
  border-radius: 18px;
  background: #271019;
  color: #ffece5;
}
.share-dialog::backdrop {
  background: #12070bdb;
  backdrop-filter: blur(8px);
}
.dialog-logo {
  width: 48px;
  height: 30px;
}
.share-dialog h2 {
  font-weight: 450;
  letter-spacing: -0.7px;
  font-size: 26px;
  margin: 20px 0;
}
.share-dialog label {
  display: block;
  font-size: 11px;
  margin: 20px 0 8px;
}
.share-dialog input {
  width: 100%;
  border: 1px solid #765155;
  padding: 12px;
  border-radius: 8px;
  background: #12070b;
  color: #fff;
  font-size: 12px;
}
.copy-link,
.native-share {
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid #765155;
  background: transparent;
}
.copy-link {
  background: #ecd0c7;
  color: #30171b;
  border: 0;
}
.close-dialog {
  position: absolute;
  right: 10px;
  top: 8px;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  font-size: 26px;
}

/* Each photograph gets a composition, while the Ruby identity stays fixed. */
body[data-design="2"] .portrait-window {
  width: 60%;
  height: 93%;
  right: 6%;
  top: -3%;
  border-radius: 50%;
  border: 5px double #ffd0b96b;
  box-shadow:
    0 0 0 7px #ffc5a31c,
    0 0 0 9px #ffc5a350;
}
body[data-design="2"] .portrait {
  object-position: 50% 37%;
  opacity: 0.88;
}
body[data-design="2"] .portrait-shade {
  background: linear-gradient(
    0deg,
    #64091ff5 0%,
    #7b0d2780 26%,
    transparent 66%
  );
}
body[data-design="2"] .engraving-one {
  width: 105%;
  left: 4%;
  top: -20%;
  opacity: 0.4;
}
body[data-design="2"] .engraving-two {
  width: 85%;
  left: -46%;
  bottom: -28%;
  opacity: 0.48;
}
body[data-design="3"] .portrait-window {
  width: 100%;
}
body[data-design="3"] .portrait {
  object-position: 48% 45%;
  filter: grayscale(1) contrast(1.23);
  opacity: 0.81;
}
body[data-design="3"] .portrait-shade {
  background:
    linear-gradient(0deg, #69051f 0%, #760922dc 19%, transparent 80%),
    linear-gradient(90deg, #ac2b4570, transparent 60%);
}
body[data-design="3"] .engraving-one {
  z-index: 4;
  opacity: 0.27;
  top: -20%;
  left: -35%;
}
body[data-design="4"] .portrait-window {
  width: 100%;
  height: 100%;
}
body[data-design="4"] .portrait {
  object-position: 35% 50%;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.86;
}
body[data-design="4"] .portrait-shade {
  background: linear-gradient(0deg, #6b071ff5, #7f0a29a3 28%, transparent 76%);
}
body[data-design="4"] .engraving-one {
  z-index: 4;
  width: 95%;
  top: -38%;
  left: 45%;
  opacity: 0.36;
}
body[data-design="4"] .engraving-two {
  left: -40%;
  bottom: -45%;
  width: 100%;
  opacity: 0.35;
}

@media (max-width: 1000px) {
  .page {
    padding: 0 36px;
  }
  main {
    gap: 32px;
  }
  .business-card {
    aspect-ratio: 1.05;
  }
  .card-top {
    left: 28px;
    right: 28px;
  }
  .identity {
    left: 28px;
  }
  .card-bottom {
    left: 28px;
    right: 28px;
  }
  .contact-link {
    gap: 10px;
  }
  .link-copy > span {
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .page {
    padding: 0 24px;
    max-width: 490px;
  }
  .masthead {
    height: 78px;
    border-bottom: 0;
  }
  .brand img {
    width: 52px;
    height: 33px;
  }
  .share-button {
    min-height: 44px;
    font-size: 11px;
    padding: 10px 14px;
  }
  main {
    display: block;
    padding: 13px 0 27px;
    min-height: 0;
  }
  .business-card {
    aspect-ratio: 0.87;
    border-radius: 18px;
  }
  .card-inner-border {
    inset: 10px;
    border-radius: 11px;
  }
  .card-top {
    top: 23px;
    left: 25px;
    right: 25px;
  }
  .card-logo {
    width: 53px;
    height: 34px;
  }
  .card-initials {
    font-size: 8px;
  }
  .portrait-window {
    width: 100%;
  }
  .portrait {
    object-position: 50% 32%;
  }
  .portrait-shade {
    background:
      linear-gradient(0deg, #6a0922 0%, #8b1834c9 22%, transparent 63%),
      linear-gradient(90deg, #a32b4333, transparent 70%);
  }
  .identity {
    left: 27px;
    bottom: 72px;
  }
  h1 {
    font-size: clamp(48px, 13vw, 61px);
  }
  .card-bottom {
    left: 27px;
    right: 27px;
    bottom: 26px;
  }
  .card-bottom > span {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .seal {
    width: 34px;
    height: 34px;
  }
  .seal img {
    width: 23px;
  }
  .engraving-one {
    width: 105%;
    left: -49%;
    top: -11%;
    z-index: 4;
    opacity: 0.22;
  }
  .engraving-two {
    width: 100%;
    right: -54%;
    bottom: -30%;
    opacity: 0.4;
  }
  .desktop-name {
    display: none;
  }
  .contact-panel {
    margin-top: 25px;
  }
  .contact-link {
    min-height: 66px;
    gap: 14px;
  }
  .icon-box {
    width: 26px;
  }
  .link-copy strong {
    font-size: 12px;
  }
  .link-copy > span {
    font-size: 10px;
  }
  .save-contact {
    margin-top: 17px;
    min-height: 46px;
  }
  footer {
    min-height: 62px;
  }
  footer > span {
    font-size: 8px;
  }
  body[data-design="2"] .portrait-window {
    width: 84%;
    height: 80%;
    top: 4%;
    right: 8%;
  }
  body[data-design="2"] .portrait {
    object-position: 50% 25%;
  }
  body[data-design="2"] .portrait-shade {
    background: linear-gradient(
      0deg,
      #760b25 0%,
      #760b25b0 24%,
      transparent 59%
    );
  }
  body[data-design="2"] .engraving-one {
    width: 143%;
    left: -22%;
    top: -14%;
    z-index: 1;
    opacity: 0.48;
  }
  body[data-design="2"] .engraving-two {
    width: 130%;
    left: -55%;
    bottom: -51%;
    opacity: 0.45;
  }
  body[data-design="3"] .portrait {
    object-position: 46% 40%;
  }
  body[data-design="3"] .portrait-shade {
    background: linear-gradient(
      0deg,
      #6b071fff 0%,
      #790923ca 26%,
      transparent 80%
    );
  }
  body[data-design="4"] .portrait {
    object-position: 30% 50%;
  }
  body[data-design="4"] .portrait-shade {
    background: linear-gradient(
      0deg,
      #7b0826 0%,
      #8c10348c 32%,
      transparent 76%
    );
  }
}
@media (max-width: 360px) {
  .page {
    padding: 0 18px;
  }
  .business-card {
    aspect-ratio: 0.84;
  }
  .card-top {
    left: 22px;
    right: 22px;
  }
  .identity {
    left: 24px;
  }
  .card-bottom {
    left: 24px;
    right: 24px;
  }
  h1 {
    font-size: 47px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the portrait's focal point above the name and protect the foil mark. */
.card-top::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -28px -32px -20px;
  background: linear-gradient(#45051980, transparent);
  pointer-events: none;
}
body[data-design="4"] .portrait-window {
  height: 89%;
  top: -6%;
}
@media (max-width: 760px) {
  .identity {
    bottom: 65px;
  }
  h1 {
    font-size: clamp(45px, 12vw, 55px);
  }
  body[data-design="1"] .portrait-window {
    top: -9%;
    height: 100%;
    right: -9%;
  }
  body[data-design="1"] .portrait {
    object-position: 50% 58%;
  }
  body[data-design="4"] .portrait-window {
    height: 84%;
    top: -6%;
  }
}
body[data-design="3"] .portrait {
  filter: grayscale(1) contrast(1.15) brightness(0.72);
}
body[data-design="4"] .portrait-window {
  -webkit-mask-image: linear-gradient(#000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 62%, transparent 100%);
}
