/* ==========================================================================
   RUBÉN OLIVEROS - PERSONAL CONSULTING LANDING & DIGITAL QR CARD
   Optimized for High Project Conversion (CRO) & Mobile-First UX
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens & CSS Variables --- */
:root {
  /* Light Theme (Default) */
  --bg-canvas: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-card-hover: #f8fafc;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-focus: rgba(37, 99, 235, 0.4);

  --text-primary: #090d16;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-glow: rgba(37, 99, 235, 0.25);

  --cta-bg: #2563eb;
  --cta-hover: #1d4ed8;
  --cta-text: #ffffff;
  --cta-shadow: 0 10px 26px rgba(37, 99, 235, 0.32);

  --success-color: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);

  --whatsapp-green: #25d366;
  --linkedin-blue: #0a66c2;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.09);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg-canvas: #090d16;
  --bg-card: #111827;
  --bg-card-subtle: #182234;
  --bg-card-hover: #1f2d44;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(59, 130, 246, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  --accent-primary: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.14);
  --accent-glow: rgba(59, 130, 246, 0.35);

  --cta-bg: #3b82f6;
  --cta-hover: #2563eb;
  --cta-text: #ffffff;
  --cta-shadow: 0 10px 30px rgba(59, 130, 246, 0.38);

  --success-color: #34d399;
  --success-light: rgba(52, 211, 153, 0.14);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, var(--accent-light) 0%, transparent 60%),
              var(--bg-canvas);
  background-repeat: no-repeat;
  background-size: 100% 650px, 100% 100%;
}

/* Background Subtle Tech Texture */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 650px;
  background-image: 
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* --- Container --- */
.page-container {
  width: 100%;
  max-width: 530px;
  margin: 0 auto;
  padding: 16px 18px 48px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* --- Top Utility Bar --- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 2px 2px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.location-icon {
  width: 13px;
  height: 13px;
  fill: var(--accent-primary);
  flex-shrink: 0;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: var(--font-family);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.theme-toggle-btn:hover {
  color: var(--accent-primary);
  border-color: var(--border-strong);
  transform: scale(1.04);
}

.theme-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

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

/* --- 1. HERO SECTION --- */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.avatar-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.avatar-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-primary), rgba(37, 99, 235, 0.2));
  box-shadow: var(--cta-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background-color: var(--bg-card-subtle);
  display: block;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--success-color);
  margin-bottom: 12px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success-color);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.profile-name {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-role-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  display: inline-block;
}

/* Punchy Benefit Headline */
.hero-headline {
  font-size: 1.48rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 440px;
  margin-bottom: 20px;
}

/* --- DOMINANT PRIMARY CTA --- */
.hero-cta-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-dominant-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--cta-bg);
  color: var(--cta-text);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--cta-shadow);
  transition: all var(--transition-fast);
  position: relative;
}

.btn-dominant-cta:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
}

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

.btn-icon-whatsapp {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: block;
}

/* Subtle Secondary Action Strip */
.hero-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.82rem;
}

.btn-subtle-cta {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 4px 6px;
}

.btn-subtle-cta:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.cta-divider {
  color: var(--text-muted);
}

/* Trust Micro-Strip */
.trust-micro-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.trust-item strong {
  color: var(--text-primary);
}

.trust-dot {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* --- SECTION HEADERS --- */
.section-header {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* --- 2. VALUE PROPOSITION: OUTCOMES (NO LOGOS/ICONS) --- */
.outcomes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.outcome-card:hover {
  border-color: var(--border-focus);
  border-left-color: var(--accent-primary);
  transform: translateY(-1px);
}

.outcome-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.35;
}

.outcome-text p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* --- 3. SERVICES SECTION --- */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: flex;
  gap: 14px;
}

.service-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.service-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon-box svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.service-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.service-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* --- 4. CREDENTIALS & IMPACT STATS --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.1;
  margin-bottom: 3px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* --- 5. REPEATED CONVERSION BANNER --- */
.conversion-banner {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.conversion-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), #10b981);
}

.banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
}

.banner-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 420px;
  margin-bottom: 4px;
}

.btn-banner-cta {
  width: 100%;
  max-width: 380px;
  margin-top: 4px;
}

/* --- 6. NETWORKING & QR CODE CARD --- */
.qr-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.qr-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.qr-instruction {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.qr-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#qrImage {
  display: block;
  width: 160px;
  height: 160px;
}

/* Save vCard Button inside Card */
.btn-save-vcard-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 12px;
}

.btn-save-vcard-card:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-save-vcard-card svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Secondary Channel Pills (LinkedIn, Email, Copy) */
.qr-secondary-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.channel-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.channel-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.channel-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.channel-icon-stroke {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* --- 7. FOOTER --- */
.site-footer {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-copy {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* --- TOAST FEEDBACK --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease;
}

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

.toast-icon {
  width: 16px;
  height: 16px;
  fill: #10b981;
}

/* --- MOBILE TWEAKS (<360px) --- */
@media (max-width: 360px) {
  .page-container {
    padding: 12px 12px 36px;
  }
  .profile-name {
    font-size: 1.6rem;
  }
  .hero-headline {
    font-size: 1.28rem;
  }
  .btn-dominant-cta {
    font-size: 0.95rem;
    padding: 14px 16px;
  }
  .qr-secondary-channels {
    grid-template-columns: 1fr;
  }
}
