/* ==========================================================================
   HERRISE ALLIANCE — STANDALONE DIGITAL BUSINESS CARD (E-NAME CARD)
   Executive Light Canvas Edition (No Dark Colors, Borderless Organic Shapes)
   Calibrated for Standard Mobile Height (~900px Viewport)
   ========================================================================== */

:root {
  /* Brand Light Luxury Palette (Zero Dark Colors) */
  --bg-page: #F8F7F2;          /* Warm sand / cream background */
  --bg-card: #FFFFFF;          /* Pure white luminous card surface */
  --bg-card-subtle: #FAF8F5;   /* Delicate ivory tone */
  --bg-item: #F6F3EC;          /* Soft borderless executive item background */
  --bg-item-hover: #ECE7DC;    /* Gentle hover tint */

  /* Text & Ink (Executive High-Contrast Legibility) */
  --ink: #050B18;              /* Midnight ink primary typography */
  --ink-secondary: #475467;    /* Sophisticated secondary charcoal */
  --ink-muted: #667085;        /* Neutral tertiary */
  --ink-faint: #98A2B3;        /* Subdued captions */

  /* Brushed Champagne Gold */
  --gold: #B8871E;
  --gold-light: #E5BA55;
  --gold-dark: #7D5B08;
  --gold-deep: #5B4204;
  --gold-glow: rgba(229, 186, 85, 0.22);
  --gold-tint: rgba(184, 135, 30, 0.08);
  --gold-tint-hover: rgba(184, 135, 30, 0.14);
  --gold-divider: rgba(184, 135, 30, 0.18);
  --gold-gradient: linear-gradient(135deg, #E6C268 0%, #D4A838 50%, #B8871E 100%);
  --gold-gradient-hover: linear-gradient(135deg, #ECCB77 0%, #DFB445 50%, #C49226 100%);

  /* Brand Accent Colors */
  --green-whatsapp: #0E7B68;
  --green-whatsapp-bg: rgba(14, 123, 104, 0.08);
  --green-whatsapp-hover: #0B6555;
  --blue-linkedin: #0A66C2;

  /* Typography */
  --font-serif: 'Newsreader', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Refined Geometric Radii (Tailored hierarchy per Emil Kowalski) */
  --r-card: 28px;
  --r-item: 12px;
  --r-icon: 10px;
  --r-circle: 50%;

  /* Elevation & Ambient Soft Lighting */
  --shadow-card: 0 24px 64px -12px rgba(184, 135, 30, 0.09), 0 8px 24px -4px rgba(5, 11, 24, 0.04);
  --shadow-qr: 0 10px 30px -6px rgba(184, 135, 30, 0.12), 0 4px 12px -2px rgba(5, 11, 24, 0.03);
  --shadow-button: 0 8px 20px -4px rgba(184, 135, 30, 0.32);
  --shadow-icon: 0 3px 10px rgba(184, 135, 30, 0.08);

  /* Animation */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease);
  --transition-smooth: 0.25s var(--ease);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-page);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

/* Page Canvas Wrapper */
.card-page-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Primary Digital Card Container (Organic, Borderless, Ambient Light) */
.ename-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--r-card);
  border: none;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

/* Header Banner (Light Luxury Canvas — Zero Dark Colors) */
.ename-card__header-banner {
  background: linear-gradient(180deg, #FAF7F0 0%, #FFFFFF 100%);
  padding: 1.35rem 1.5rem 3rem;
  position: relative;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(184, 135, 30, 0.08);
}

/* Top Subtle Gold Accent Bar */
.ename-card__header-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

/* Brand Emblem & Logo (Enlarged 2x to 52px) */
.ename-card__brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.ename-card__brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.ename-card__brand-name {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}

.ename-card__brand-sub {
  color: var(--gold);
  font-weight: 600;
}

.ename-card__tagline {
  font-size: 0.71875rem;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Avatar Showcase overlapping banner */
.ename-card__avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -1.75rem;
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
}

.ename-card__avatar-ring {
  width: 92px;
  height: 92px;
  border-radius: var(--r-circle);
  padding: 3px;
  background: var(--gold-gradient);
  box-shadow: 0 8px 24px rgba(184, 135, 30, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ename-card__avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--r-circle);
  object-fit: cover;
  display: block;
  background-color: var(--bg-card);
  border: 2px solid #FFFFFF;
}

/* Profile Details */
.ename-card__profile-info {
  text-align: center;
  padding: 0.875rem 1.5rem 0.35rem;
}

.ename-card__name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.ename-card__role {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}

.ename-card__company-affiliation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 0.75rem;
}

.ename-card__company-affiliation .dot-sep {
  color: var(--gold);
}

/* Direct Contact Details Stack (Editorial Hairline List — No Full Box Borders) */
.ename-card__details-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1.4rem;
  margin: 0.35rem 0 0.75rem;
  border-top: 1px solid rgba(184, 135, 30, 0.14);
  border-bottom: 1px solid rgba(184, 135, 30, 0.14);
}

.contact-detail-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.58rem 0.25rem;
  min-height: 46px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(184, 135, 30, 0.1);
  border-radius: 0;
  text-decoration: none;
  color: var(--ink);
  box-shadow: none;
  transition: transform 160ms var(--ease), background-color 160ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-detail-row:last-child {
  border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
  .contact-detail-row:hover {
    background: rgba(184, 135, 30, 0.035);
  }

  .contact-detail-row:hover .contact-detail-row__value {
    color: var(--gold-deep);
  }

  .contact-detail-row:hover .contact-detail-row__arrow {
    opacity: 1;
    color: var(--gold-dark);
    transform: translateX(4px);
  }

  .contact-detail-row:hover .contact-detail-row__icon {
    color: var(--gold-dark);
    transform: scale(1.08);
  }
}

.contact-detail-row:active {
  opacity: 0.7;
  transform: translateX(2px);
}

.contact-detail-row__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--gold-dark);
  box-shadow: none;
  transition: transform 160ms var(--ease), color 160ms ease;
}

.contact-detail-row--whatsapp .contact-detail-row__icon {
  color: var(--green-whatsapp);
}

.contact-detail-row--linkedin .contact-detail-row__icon {
  color: var(--blue-linkedin);
}

.contact-detail-row__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
  min-width: 0;
  text-align: left;
}

.contact-detail-row__label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-dark);
  line-height: 1.1;
  margin-bottom: 0.12rem;
}

.contact-detail-row__value {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  transition: color 160ms ease;
}

.contact-detail-row__arrow {
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.35;
  transition: transform 160ms var(--ease), opacity 160ms ease, color 160ms ease;
}

/* Bottom Scannable QR Code Section (Always Visible) */
.ename-card__qr-section {
  padding: 0.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* QR Code Display Frame (Organic Squircle, Soft Ambient Glow) */
.ename-card__qr-frame {
  background: #FFFFFF;
  padding: 0.75rem;
  border-radius: var(--r-squircle);
  border: none;
  box-shadow: var(--shadow-qr);
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.ename-card__qr-frame:hover {
  transform: scale(1.02);
}

#qrcode-canvas {
  width: 255px;
  height: 255px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode-canvas canvas,
#qrcode-canvas img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 6px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: pixelated;
}

.ename-card__qr-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
  opacity: 0.85;
}

/* Card Base Branding Footer (Light Warm Aesthetic) */
.ename-card__footer {
  background: var(--bg-card-subtle);
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(184, 135, 30, 0.1);
  margin-top: auto;
}

.ename-card__footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.ename-card__footer-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ename-card__footer-text {
  font-size: 0.71875rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Dynamic Toast Notification (Refined Luxury Surface) */
.toast-notice {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid rgba(184, 135, 30, 0.15);
  box-shadow: 0 12px 32px rgba(184, 135, 30, 0.14), 0 4px 12px rgba(5, 11, 24, 0.05);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

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

.toast-notice svg {
  color: var(--gold);
}

/* ==========================================================================
   MOBILE VIEWPORT CALIBRATION (~850px – 900px STANDARD MOBILE HEIGHT)
   Full-page balanced rhythm without vertical clipping or awkward empty gaps
   ========================================================================== */
@media (max-width: 600px) {
  body {
    padding: 0.5rem 0.5rem 1rem;
    min-height: 100dvh;
    justify-content: flex-start;
  }

  .card-page-wrapper {
    max-width: 100%;
    min-height: auto;
    justify-content: center;
    gap: 0;
  }

  .ename-card {
    border-radius: 28px;
    box-shadow: 0 16px 40px -8px rgba(184, 135, 30, 0.08);
  }

  .ename-card__header-banner {
    padding: 1.25rem 1.25rem 2.85rem;
  }

  .ename-card__avatar-section {
    margin-top: -1.65rem;
  }

  .ename-card__avatar-ring {
    width: 86px;
    height: 86px;
  }

  .ename-card__profile-info {
    padding: 0.65rem 1rem 0.2rem;
  }

  .ename-card__name {
    font-size: 1.7rem;
  }

  .ename-card__role {
    font-size: 0.875rem;
  }

  .ename-card__details-stack {
    gap: 0;
    padding: 0 1.15rem;
    margin: 0.35rem 0 0.75rem;
  }

  .contact-detail-row {
    min-height: 44px;
    padding: 0.55rem 0.2rem;
  }

  .ename-card__qr-section {
    padding: 0.4rem 1.25rem 0.875rem;
  }

  .ename-card__qr-frame {
    padding: 0.625rem;
    border-radius: 20px;
    margin-bottom: 0.625rem;
  }

  #qrcode-canvas {
    width: 228px;
    height: 228px;
  }

  .ename-card__footer {
    padding: 0.625rem 0.875rem;
  }
}

/* Accessibility: Focus Visible & Reduced Motion */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
