/* ==========================================================================
   JESSI NARCIA - LUXURY EDITORIAL REAL ESTATE LINKTREE
   Clean, human, high-end aesthetic. No tacky AI glows or generic templates.
   ========================================================================== */

:root {
  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Color Palette - Light Luxury (Default) */
  --bg-page: #F7F5F0;
  --bg-card: #FFFFFF;
  --bg-card-elevated: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --bg-pill: #FFFFFF;
  --bg-pill-hover: #F2EFE8;
  
  --text-main: #14171A;
  --text-body: #454B54;
  --text-muted: #737A86;
  --text-light: #9DA3AF;
  
  --accent-gold: #A58038;
  --accent-gold-tint: rgba(165, 128, 56, 0.09);
  --accent-gold-border: rgba(165, 128, 56, 0.28);
  
  --remax-blue: #003366;
  --remax-red: #DC143C;
  --remax-badge-bg: #0C2340;
  
  --whatsapp-color: #25D366;
  --whatsapp-bg: rgba(37, 211, 102, 0.12);
  --whatsapp-border: rgba(37, 211, 102, 0.3);
  
  --border-subtle: rgba(20, 23, 26, 0.07);
  --border-card: rgba(20, 23, 26, 0.09);
  --border-hover: rgba(20, 23, 26, 0.22);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 2px 6px -1px rgba(12, 18, 28, 0.04), 0 12px 24px -4px rgba(12, 18, 28, 0.06);
  --shadow-hover: 0 8px 24px -4px rgba(12, 18, 28, 0.08), 0 20px 36px -6px rgba(12, 18, 28, 0.10);

  --radius-full: 9999px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-page: #0C0E12;
  --bg-card: #15181E;
  --bg-card-elevated: #1B1F27;
  --bg-card-hover: #1E222B;
  --bg-pill: #1B1F27;
  --bg-pill-hover: #232832;
  
  --text-main: #F4F5F7;
  --text-body: #B0B5C0;
  --text-muted: #7E8594;
  --text-light: #596070;
  
  --accent-gold: #D6B265;
  --accent-gold-tint: rgba(214, 178, 101, 0.12);
  --accent-gold-border: rgba(214, 178, 101, 0.3);

  --remax-badge-bg: #112847;
  
  --whatsapp-bg: rgba(37, 211, 102, 0.14);
  --whatsapp-border: rgba(37, 211, 102, 0.35);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.22);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   RESET & BASE SETUP
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle architectural atmosphere (gentle, warm lighting) */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  transition: opacity var(--transition-smooth);
}

.glow-top {
  width: 420px;
  height: 420px;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(197, 160, 89, 0.16) 0%, rgba(247, 245, 240, 0) 70%);
}

[data-theme="dark"] .glow-top {
  opacity: 0.25;
  background: radial-gradient(circle, rgba(214, 178, 101, 0.18) 0%, rgba(12, 14, 18, 0) 70%);
}

.glow-bottom {
  width: 480px;
  height: 480px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 51, 102, 0.05) 0%, rgba(247, 245, 240, 0) 70%);
}

/* ==========================================================================
   PAGE CONTAINER & LAYOUT
   ========================================================================== */
.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .page-container {
    padding-top: 2.25rem;
    padding-bottom: 4rem;
  }
}

/* ==========================================================================
   TOP BAR / UTILITY NAVIGATION
   ========================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.5rem;
}

.brand-remax {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.remax-badge {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--remax-badge-bg);
  color: #FFFFFF;
  text-transform: uppercase;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.location-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  background: var(--bg-pill-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0);
}

/* Theme icon swap */
.sun-icon { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* ==========================================================================
   HERO / PROFILE IDENTITY
   ========================================================================== */
.profile-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0 0.5rem;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 1.1rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 14%;
  border: 3.5px solid var(--bg-card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09), 0 0 0 1px var(--border-subtle);
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #2D3339, #14171A);
  color: #D4AF37;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.verified-seal {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

/* Status Indicator */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.8rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background-color: #10B981;
  opacity: 0.45;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.status-text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-body);
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.profile-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.profile-title strong {
  color: var(--text-main);
  font-weight: 700;
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 1.35rem;
  line-height: 1.55;
  text-align: center;
}

/* Quick Action Pills */
.quick-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.pill-btn.primary-pill {
  background-color: var(--text-main);
  color: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.pill-btn.primary-pill:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pill-btn.secondary-pill {
  background-color: var(--bg-pill);
  color: var(--text-main);
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

.pill-btn.secondary-pill:hover {
  background-color: var(--bg-pill-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   LINKS SECTION & CARDS
   ========================================================================== */
.links-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.05rem 1.15rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-smooth), 
              box-shadow var(--transition-smooth), 
              border-color var(--transition-smooth),
              background-color var(--transition-fast);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
}

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

.link-left {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex: 1;
  min-width: 0;
}

/* Icon Box */
.link-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-smooth);
}

.link-card:hover .link-icon-box {
  transform: scale(1.05);
}

/* Individual Brand Stylings (Authentic & Refined, NOT cheap AI neon) */
.icon-whatsapp {
  background-color: var(--whatsapp-bg);
  color: #1EA952;
  border: 1px solid var(--whatsapp-border);
}

[data-theme="dark"] .icon-whatsapp {
  color: #25D366;
}

.icon-web {
  background-color: rgba(12, 35, 64, 0.06);
  color: #0C2340;
  border: 1px solid rgba(12, 35, 64, 0.12);
}

[data-theme="dark"] .icon-web {
  background-color: rgba(255, 255, 255, 0.07);
  color: #F0F3F8;
  border-color: rgba(255, 255, 255, 0.14);
}

.icon-instagram {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.12), rgba(245, 96, 64, 0.12));
  color: #D62976;
  border: 1px solid rgba(225, 48, 108, 0.24);
}

.icon-tiktok {
  background-color: rgba(0, 0, 0, 0.06);
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .icon-tiktok {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.15);
}

.icon-facebook {
  background-color: rgba(24, 119, 242, 0.1);
  color: #1877F2;
  border: 1px solid rgba(24, 119, 242, 0.22);
}

/* Metadata */
.link-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.link-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.link-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.link-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.handle-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--border-subtle);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

.link-arrow {
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  transition: transform var(--transition-smooth), color var(--transition-fast);
}

.link-card:hover .link-arrow {
  color: var(--text-main);
  transform: translateX(3px);
}

/* Featured WhatsApp Card Accent */
.link-featured {
  border-color: var(--accent-gold-border);
  background: linear-gradient(to right, var(--bg-card), var(--accent-gold-tint));
}

.featured-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background-color: var(--accent-gold-tint);
  border: 1px solid var(--accent-gold-border);
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   SERVICES / VALUE PROPOSITION CARD
   ========================================================================== */
.services-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-card);
  margin-top: 0.35rem;
}

.services-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.95rem;
  letter-spacing: -0.01em;
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.82rem;
}

.service-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--border-subtle);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.service-item strong {
  display: block;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.84rem;
  margin-bottom: 0.08rem;
}

.service-item span {
  color: var(--text-muted);
  line-height: 1.35;
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.page-footer {
  text-align: center;
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-divider {
  width: 48px;
  height: 2px;
  background-color: var(--border-subtle);
  margin: 0 auto 0.75rem;
  border-radius: var(--radius-full);
}

.footer-brand {
  font-size: 0.85rem;
  color: var(--text-body);
}

.footer-brand strong {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-main);
}

.footer-legal {
  font-size: 0.72rem;
  color: var(--text-light);
  max-width: 380px;
}

.footer-contact-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.footer-contact-info a {
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
}

.footer-contact-info a:hover {
  text-decoration: underline;
  color: var(--accent-gold);
}

/* ==========================================================================
   MODAL (QR & SHARE)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 12, 16, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  background-color: var(--border-subtle);
  color: var(--text-main);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.qr-box {
  width: 190px;
  height: 190px;
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box svg, .qr-box img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-tip {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

.share-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-card);
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.modal-action-btn:hover {
  background-color: var(--bg-pill-hover);
  border-color: var(--border-hover);
}

.modal-action-btn.primary-action {
  background-color: var(--text-main);
  color: var(--bg-card);
  border-color: transparent;
}

.modal-action-btn.primary-action:hover {
  opacity: 0.92;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background-color: var(--text-main);
  color: var(--bg-card);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS & TOUCH OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 480px) {
  .profile-name {
    font-size: 1.85rem;
  }
  .link-desc {
    font-size: 0.74rem;
  }
  .link-card {
    padding: 0.9rem 1rem;
  }
  .link-icon-box {
    width: 42px;
    height: 42px;
  }
  .quick-cta-row {
    flex-direction: column;
    width: 100%;
  }
  .pill-btn {
    width: 100%;
    justify-content: center;
  }
}
