/* =========================================================================
   thequietquilldm — link page
   Recreates the original layout: sepia ancient-library + candlelight
   background, gold-framed avatar, white username, social icons, and
   parchment-gold link buttons with underlined caps.
   All Beacons branding/chrome removed.
   ========================================================================= */

:root {
  --content-width: 480px;

  /* dark-wood button (sampled from the desk in the background image:
     candle-lit highlight ~#79442a, mid ~#392014, shadow ~#1a110b) */
  --btn-top: #4d2d1b;
  --btn-bottom: #271710;
  --btn-text: #f0e2bd;

  --avatar-size: 150px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Fallback base behind the fixed image layers below. */
  background-color: #0c0805;
}

/* Fixed, full-viewport background image — blurred. Lives on its own layer
   so the blur never touches the page content. Drop the original at
   assets/background.jpg; the sepia gradient shows through if it's missing.
   Scaled up slightly so blur() can't fade the image edges into view. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: #100b07;
  background-image:
    url("assets/background.jpg"),
    linear-gradient(180deg, #2c1f12 0%, #1a130b 55%, #0c0805 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(10px);
  transform: scale(1.12);
}

/* Black layer over the blurred image so the centered content stays readable. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------- */
#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------- */
/* Avatar — rounded square, gold radial fill, dark frame, soft glow       */
/* --------------------------------------------------------------------- */
.avatar-frame {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #2a1310;
}

/* Inset shadow lives on a top overlay so it renders OVER the opaque image
   (an inset box-shadow on the <img> itself is painted behind its pixels). */
.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 24px 9px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.username {
  margin-top: 26px;
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------- */
/* Social icon row                                                       */
/* --------------------------------------------------------------------- */
.socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 16px;
}

.social-link {
  display: inline-flex;
  color: #fff;
  opacity: 0.95;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.08);
}

.social-link svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

/* --------------------------------------------------------------------- */
/* Contact row — email + "Copy linktree URL"                             */
/* --------------------------------------------------------------------- */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.email-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f3e6c4;
  opacity: 0.92;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.email:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.email svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  opacity: 0.9;
}

.email-text {
  border-bottom: 1px solid rgba(243, 230, 196, 0.35);
}

/* Small icon-only button sitting to the right of the email address. */
.copy-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 230, 196, 0.4);
  background: rgba(28, 20, 11, 0.5);
  color: #f3e6c4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, border-color 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}

.copy-email:hover {
  transform: translateY(-1px) scale(1.06);
  border-color: rgba(243, 230, 196, 0.8);
  background: rgba(40, 29, 16, 0.7);
}

.copy-email:active {
  transform: translateY(0);
}

.copy-url {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(243, 230, 196, 0.45);
  background: rgba(28, 20, 11, 0.55);
  color: #f3e6c4;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, border-color 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}

.copy-url:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 230, 196, 0.8);
  background: rgba(40, 29, 16, 0.7);
}

.copy-url:active {
  transform: translateY(0);
}

/* Icon stack: copy + check share a cell; we cross-fade between them. */
.copy-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
}

.copy-icon svg {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-icon svg:last-child {
  opacity: 0;
  transform: scale(0.4);
}

/* --- Copied state + success animation (shared by both copy buttons) --- */
.copy-url.copied,
.copy-email.copied {
  border-color: #7ad28a;
  color: #b9f0c2;
  background: rgba(26, 56, 30, 0.7);
  animation: copy-pop 0.4s ease;
}

.copied .copy-icon svg:first-child {
  opacity: 0;
  transform: scale(0.4);
}

.copied .copy-icon svg:last-child {
  opacity: 1;
  transform: scale(1);
  animation: check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes copy-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes check-pop {
  0% {
    transform: scale(0.2) rotate(-20deg);
  }
  60% {
    transform: scale(1.25) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* --------------------------------------------------------------------- */
/* Link buttons — parchment fill, dark frame, underlined caps            */
/* --------------------------------------------------------------------- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}

.link-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, var(--btn-top) 0%, var(--btn-bottom) 100%);
  border: none;
  color: var(--btn-text);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 160, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.link-card:active {
  transform: translateY(0);
}

/* Shimmer: a light sheen sweeps across the button on hover. */
.link-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 209, 148, 0.22),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.link-card:hover::after {
  left: 140%;
}

.link-title {
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

/* Platform @handle under the title — smaller, lighter, slightly muted. */
.link-handle {
  margin-top: 1px;
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.68;
}

/* --------------------------------------------------------------------- */
@media (max-width: 420px) {
  :root {
    --avatar-size: 128px;
  }
  #app {
    padding: 48px 18px 56px;
  }
  .username {
    font-size: 2rem;
  }
  .link-title {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .link-card::after {
    display: none;
  }
}
