/* ===== Base Reset & Global Styles ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  background-color: #1a1914;
  color: #CBA35C;
  text-align: center;
}

/* Remove link underlines globally */
a, a:visited, a:hover, a:active {
  color: inherit;
  text-decoration: none;
}

/* ===== Presentation Card ===== */
.container {
  position: relative; /* enables share button positioning */
  background-color: #0a0a07;
  color: #CBA35C;
  border-radius: 28px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 96px 50px 90px;
  width: min(94vw, 560px);
  min-height: 100vh;
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* ===== Logo ===== */
.logo {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 22px;
}

/* ===== Title & Subtitle ===== */
.title {
  font-size: 2.3rem;
  font-weight: 600;
  color: #CBA35C;
  margin: 10px 0 14px;
}

.subtitle {
  font-size: 1.05rem;
  color: #F3EED9;
  margin: 0 0 40px;
  line-height: 1.7;
  max-width: 480px;
  width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

/* ===== Social Icons ===== */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 40px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #0a0a07;
  transition: all 0.25s ease;
}

.social-icons img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.social-icons a:hover img {
  filter: brightness(0) saturate(100%) invert(69%) sepia(47%) saturate(356%) hue-rotate(7deg)
          drop-shadow(0 0 8px rgba(203,163,92,0.7));
  transform: scale(1.15);
}

.social-icons a:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px 6px rgba(203,163,92,0.45);
  animation: emberGlow 2.8s ease-in-out infinite;
}

/* ===== Share Button (white at rest, gold on hover) ===== */
.share-btn {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background-color: #0a0a07;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.share-btn img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 1;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.share-btn:hover img {
  filter: brightness(0) saturate(100%) invert(69%) sepia(47%) saturate(356%) hue-rotate(7deg)
          drop-shadow(0 0 10px rgba(203,163,92,0.85));
  transform: scale(1.15);
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px 6px rgba(203,163,92,0.45);
  animation: emberGlow 2.8s ease-in-out infinite;
}

/* ===== Buttons ===== */
.links { width: 100%; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88%;
  max-width: 480px;
  padding: 15px 22px;
  margin: 12px auto;
  background-color: #0a0a07;
  color: #F3EED9;
  font-size: 1.1rem;
  font-weight: 600;
  border: 1px solid #F3EED9;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.button span { color: inherit; }

.button:hover {
  color: #CBA35C;
  border-color: #CBA35C;
  transform: translateY(-3px);
  box-shadow: 0 0 20px 4px rgba(203, 163, 92, 0.45);
}

/* Accessibility focus */
.button:focus-visible,
.share-btn:focus-visible,
.social-icons a:focus-visible {
  outline: 2px solid #CBA35C;
  outline-offset: 4px;
}

.button:focus,
.button:active {
  color: #F3EED9 !important;
  border-color: #F3EED9 !important;
  outline: none;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
  padding-top: 60px;
}

.footer-text {
  font-size: 0.9rem;
  opacity: 0.8;
  color: #CBA35C;
}

/* ===== Animation ===== */
@keyframes emberGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(203, 163, 92, 0); }
  50% { box-shadow: 0 0 25px 6px rgba(203, 163, 92, 0.5); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    padding: 76px 24px 70px;
    border-radius: 0;
    width: 100vw;
    margin: 0 auto;
  }

  .logo { width: 160px; }
  .title { font-size: 2rem; }
  .subtitle { font-size: 1rem; max-width: 92vw; }

  .button {
    width: 94%;
    font-size: 1.05rem;
    max-width: none;
  }

  .social-icons { gap: 20px; margin-bottom: 34px; }
  .social-icons a { width: 48px; height: 48px; }
  .social-icons img { width: 24px; height: 24px; }

  /* Improved share button safe area */
  .share-btn {
    top: calc(26px + env(safe-area-inset-top, 10px));
    right: calc(26px + env(safe-area-inset-right, 10px));
    width: 48px;
    height: 48px;
  }

  .share-btn img {
    width: 24px;
    height: 24px;
  }
}

/* ===== Desktop-only QR code ===== */
.qr-wrapper {
  position: fixed;
  bottom: 26px;
  right: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 99;
}

.qr-text {
  color: #F3EED9;
  font-size: 0.8rem;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  opacity: 0.85;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.qr-desktop {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(203, 163, 92, 0.15); /* faint base glow */
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0.9;
}

/* Soft golden shimmer on hover */
@keyframes qrGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(203, 163, 92, 0.15); }
  50% { box-shadow: 0 0 30px 6px rgba(203, 163, 92, 0.35); }
}

.qr-desktop:hover {
  transform: translateY(-2px);
  opacity: 1;
  animation: qrGlow 3s ease-in-out infinite;
}

/* Hide on mobile/tablet */
@media (max-width: 1024px) {
  .qr-wrapper { display: none; }
}