/* Sanctuary Design System & Animations - Flor Juli Edition */
:root {
  --bg-gradient: linear-gradient(135deg, #fff8f7 0%, #f4dce4 50%, #fff8f7 100%);
  --surface: #fff8f7;
  --surface-glass: rgba(255, 255, 255, 0.65);
  --glass-card-bg: rgba(255, 255, 255, 0.35);
  --glass-card-hover: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(215, 193, 195, 0.7);
  --primary: #8a4853;
  --primary-rgb: 138, 72, 83;
  --rose-gold: #b76e79;
  --on-surface: #1f1a1b;
  --on-surface-variant: #4a3d3f;
  --card-shadow: 0 8px 32px 0 rgba(183, 110, 121, 0.12);
  --modal-bg: rgba(255, 255, 255, 0.92);
  --text-muted: #756364;
}

.dark {
  --bg-gradient: linear-gradient(135deg, #130f10 0%, #25181e 50%, #171113 100%);
  --surface: #130f10;
  --surface-glass: rgba(35, 25, 29, 0.75);
  --glass-card-bg: rgba(45, 33, 38, 0.55);
  --glass-card-hover: rgba(65, 48, 55, 0.8);
  --glass-border: rgba(215, 193, 195, 0.3);
  --primary: #ffb2bc;
  --primary-rgb: 255, 178, 188;
  --rose-gold: #e59ba6;
  --on-surface: #f9eeee;
  --on-surface-variant: #d7c1c8;
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --modal-bg: rgba(25, 18, 21, 0.95);
  --text-muted: #b5a1a3;
}

html {
  background-color: var(--surface);
  transition: background-color 0.5s ease;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--on-surface);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  transition: background 0.5s ease, color 0.3s ease;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

/* Copy URL Button High Contrast Rule */
#copy-url-btn {
  background-color: #f4dce4 !important;
  color: #000000 !important;
  border: 1.5px solid rgba(138, 72, 83, 0.4) !important;
  font-weight: 800 !important;
}

#copy-url-btn,
#copy-url-btn span {
  color: #000000 !important;
}

html.dark #copy-url-btn,
body.dark #copy-url-btn {
  background-color: #8a4853 !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 178, 188, 0.4) !important;
}

html.dark #copy-url-btn,
html.dark #copy-url-btn span,
body.dark #copy-url-btn,
body.dark #copy-url-btn span {
  color: #ffffff !important;
}

/* Header Border Line - Darker & Thicker in Light Mode */
header {
  border-bottom: 2px solid rgba(138, 72, 83, 0.4) !important;
}

html.dark header,
body.dark header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Brand Header Logo Styling - Luxury Minimalist Brand Mark */
.brand-header-logo {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dark .brand-header-logo {
  color: var(--primary);
}

/* Header Tools Buttons Styling (QR & Theme Toggle) */
.qr-header-btn,
.theme-header-btn {
  background: linear-gradient(135deg, #8a4853 0%, #b76e79 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(138, 72, 83, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.dark .qr-header-btn,
.dark .theme-header-btn {
  background: linear-gradient(135deg, #b76e79 0%, #8a4853 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(229, 155, 166, 0.3);
}

.qr-header-btn:hover,
.theme-header-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(138, 72, 83, 0.45);
}

/* Glassmorphism Cards with Specular Highlight */
.glass-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(229, 155, 166, 0.25), transparent 75%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card:hover {
  background: var(--glass-card-hover);
  transform: translateY(-2px) scale(1.015);
  border-color: var(--rose-gold);
  box-shadow: 0 12px 40px rgba(183, 110, 121, 0.22);
}

.glass-card:active {
  transform: scale(0.98);
}

/* Glass Modal */
.glass-modal {
  background: var(--modal-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* Typography elements */
.font-editorial {
  font-family: 'Playfair Display', serif;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--rose-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-col;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--modal-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rose-gold);
  color: var(--on-surface);
  padding: 12px 24px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1), toast-out 0.4s ease forwards 2.6s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Status Pulse Pill */
.status-pulse {
  position: relative;
}

.status-pulse::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.4;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(183, 110, 121, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(183, 110, 121, 0.6);
}

/* Image Protection & Drag Prevention */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
/* Escala general 90% (bio y ubicación mantienen su tamaño de letra) */
html { color-scheme: only dark; }
body { zoom: 0.9; }
.keep-size-bio { font-size: calc(1rem / 0.9); }
@media (min-width: 640px) { .keep-size-bio { font-size: calc(1.125rem / 0.9); } }
.keep-size-loc { font-size: calc(0.875rem / 0.9); }
