/* ====================================================
   THEME VARIABLES
   ==================================================== */

/* --- BCK: The Digital Future (black + bold red) --- */
[data-theme="bck"] {
  --bg-base:          #070707;
  --bg-mid:           #160505;
  --orb-a:            rgba(180, 10, 15, 0.22);
  --orb-b:            rgba(140, 5, 10, 0.14);
  --orb-c:            rgba(90,  0,  5, 0.18);
  --accent:           #CC1B20;
  --accent-alt:       #ff4a4a;
  --accent-rgb:       204, 27, 32;
  --accent-glow:      rgba(204, 27, 32, 0.38);
  --accent-subtle:    rgba(204, 27, 32, 0.08);
  --card-bg:          rgba(5, 5, 5, 0.82);
  --card-border:      rgba(204, 27, 32, 0.16);
  --card-shadow:      0 32px 80px rgba(0,0,0,0.72), 0 0 80px rgba(204,27,32,0.05);
  --top-bar:          linear-gradient(90deg, #880a0e 0%, #CC1B20 45%, #ff4a4a 65%, #CC1B20 85%, #880a0e 100%);
  --avatar-ring:      conic-gradient(from 0deg, #880a0e, #CC1B20, #ff6666, #CC1B20, #880a0e);
  --avatar-bg:        linear-gradient(135deg, #160000, #2a0404);
  --text-primary:     #f5f5f5;
  --text-secondary:   #9ca3af;
  --text-muted:       #4b5563;
  --divider:          linear-gradient(90deg, transparent, rgba(204,27,32,0.22), transparent);
  --tag-bg:           rgba(204, 27, 32, 0.07);
  --tag-border:       rgba(204, 27, 32, 0.2);
  --specialty-bg:     rgba(10, 4, 4, 0.65);
  --specialty-border: rgba(180, 20, 20, 0.18);
  --specialty-hover:  rgba(204, 27, 32, 0.12);
  --contact-hover:    rgba(204, 27, 32, 0.07);
  --grid-color:       rgba(204, 27, 32, 0.035);
  --footer-border:    rgba(204, 27, 32, 0.14);
}

/* --- JASCO: Intelligent Technologies (charcoal + steel + red) --- */
[data-theme="jasco"] {
  --bg-base:          #0c0d10;
  --bg-mid:           #13161c;
  --orb-a:            rgba(88, 108, 130, 0.26);
  --orb-b:            rgba(170, 15, 20, 0.13);
  --orb-c:            rgba(65,  85, 110, 0.2);
  --accent:           #8a9bb0;
  --accent-alt:       #CC1B20;
  --accent-rgb:       138, 155, 176;
  --accent-glow:      rgba(138, 155, 176, 0.32);
  --accent-subtle:    rgba(138, 155, 176, 0.08);
  --card-bg:          rgba(8, 10, 13, 0.82);
  --card-border:      rgba(138, 155, 176, 0.13);
  --card-shadow:      0 32px 80px rgba(0,0,0,0.72), 0 0 80px rgba(138,155,176,0.04);
  --top-bar:          linear-gradient(90deg, #3d4d5c 0%, #8a9bb0 40%, #CC1B20 55%, #8a9bb0 70%, #3d4d5c 100%);
  --avatar-ring:      conic-gradient(from 0deg, #3d4d5c, #8a9bb0, #CC1B20, #8a9bb0, #3d4d5c);
  --avatar-bg:        linear-gradient(135deg, #0d1117, #1a2030);
  --text-primary:     #eef0f3;
  --text-secondary:   #9ca3af;
  --text-muted:       #4b5563;
  --divider:          linear-gradient(90deg, transparent, rgba(138,155,176,0.2), transparent);
  --tag-bg:           rgba(138, 155, 176, 0.07);
  --tag-border:       rgba(138, 155, 176, 0.18);
  --specialty-bg:     rgba(8, 10, 14, 0.65);
  --specialty-border: rgba(100, 118, 138, 0.18);
  --specialty-hover:  rgba(138, 155, 176, 0.11);
  --contact-hover:    rgba(138, 155, 176, 0.07);
  --grid-color:       rgba(138, 155, 176, 0.03);
  --footer-border:    rgba(138, 155, 176, 0.12);
}

/* ====================================================
   BASE RESET
   ==================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ====================================================
   BACKGROUND SCENE
   ==================================================== */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 15% 10%, var(--bg-mid) 0%, var(--bg-base) 70%),
    radial-gradient(ellipse 60% 50% at 85% 90%, var(--bg-mid) 0%, var(--bg-base) 70%);
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  will-change: transform;
}

.orb-1 { width: 650px; height: 650px; background: var(--orb-a); top: -220px; left: -180px; animation: floatOrb 30s ease-in-out infinite; }
.orb-2 { width: 500px; height: 500px; background: var(--orb-b); bottom: -160px; right: -120px; animation: floatOrb 24s ease-in-out infinite reverse; animation-delay: -10s; }
.orb-3 { width: 380px; height: 380px; background: var(--orb-c); top: 40%; left: 55%; animation: floatOrb 20s ease-in-out infinite; animation-delay: -16s; }

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -40px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.96); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ====================================================
   CARD
   ==================================================== */
.card-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}

.card-top-bar {
  height: 3px;
  background: var(--top-bar);
}

/* ====================================================
   CARD HEADER — LOGO
   ==================================================== */
.card-header {
  padding: 1.25rem 1.75rem 0.75rem;
}

.logo-link {
  display: inline-flex;
  text-decoration: none;
  border-radius: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo-link:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* White container so logos (both on white bg) show crisply on dark card */
.logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 5px 12px;
  line-height: 0;
}

.company-logo {
  height: 40px;
  width: auto;
  max-width: 144px;
  object-fit: contain;
  display: block;
  /* No filter — keep the image crisp */
}

/* ====================================================
   PROFILE
   ==================================================== */
.profile-section {
  padding: 0.75rem 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

/* ── Avatar: 3D flip ── */
.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.875rem;
  perspective: 700px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--avatar-ring);
  animation: spinRing 12s linear infinite;
}

.avatar-wrapper.has-pic .avatar-ring {
  animation-duration: 5s;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Flip container */
.avatar-flip {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.avatar-flip.flipped {
  transform: rotateY(180deg);
}

/* Shared face styles */
.avatar-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--bg-base);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Front face: initials */
#avatar {
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Back face: photo */
#avatar-back {
  transform: rotateY(180deg);
  background-size: cover;
  background-position: center top;
  background-color: var(--specialty-bg);
}

#avatar-initials {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

/* ── Tap hint ── */
.tap-hint {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.5s ease;
}

.tap-hint.visible {
  opacity: 1;
  pointer-events: auto;
  animation: hintFloat 2s ease-in-out infinite;
}

.tap-hint.hide {
  opacity: 0 !important;
  pointer-events: none;
  animation: none !important;
}

.tap-hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: dotPulse 1.5s ease-in-out infinite;
}

.tap-hint-text {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@keyframes hintFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-4px); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.6); }
}

.employee-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-top: 0.1rem;
}

.employee-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.2rem;
}

.employee-department {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

/* ====================================================
   BIO
   ==================================================== */
.bio-section {
  padding: 0.25rem 2rem 0.875rem;
  text-align: center;
}

.bio-text {
  font-size: 0.83rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.75;
}

.bio-text::before { content: '\201C'; }
.bio-text::after  { content: '\201D'; }

.bio-text::before,
.bio-text::after {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.4;
  font-style: normal;
  line-height: 0;
  vertical-align: -0.45rem;
}
.bio-text::before { margin-right: 0.15rem; }
.bio-text::after  { margin-left:  0.15rem; }

/* ====================================================
   DIVIDER
   ==================================================== */
.divider {
  height: 1px;
  margin: 0.25rem 1.75rem;
  background: var(--divider);
}

/* ====================================================
   SECTION LABEL
   ==================================================== */
.content-section { padding: 0.875rem 1.75rem; }

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-subtle), transparent);
}

/* ====================================================
   TAPPY TECHNOLOGIES SPOTLIGHT
   ==================================================== */
.tappy-section { padding-top: 0.25rem; }

.tappy-card {
  background: var(--specialty-bg);
  border: 1px solid var(--specialty-border);
  border-radius: 16px;
  padding: 1.25rem 1.125rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  text-align: center;
  animation: fadeUp 0.5s ease both;
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow behind the card */
.tappy-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(var(--accent-rgb), 0.06), transparent 70%);
  pointer-events: none;
}

/* Logo */
.tappy-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 6px 16px;
  line-height: 0;
  align-self: center;
  width: fit-content;
  margin: 0 auto;
}

.tappy-logo {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.tappy-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* Tagline */
.tappy-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Description */
.tappy-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

/* 2×2 feature grid */
.tappy-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
}

.tappy-feat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-subtle);
  border: 1px solid var(--tag-border);
  border-radius: 9px;
  padding: 0.45rem 0.625rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tappy-feat span:first-child { font-size: 0.9rem; flex-shrink: 0; }

/* Payment network badges */
.tappy-networks {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tappy-badge {
  padding: 0.2rem 0.625rem;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* CTA button */
.tappy-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease;
}

.tappy-cta:hover {
  background: var(--accent);
  color: var(--bg-base);
}

/* ====================================================
   CONTACT
   ==================================================== */
.contact-section { padding: 0.875rem 1.75rem; }

.contact-list { display: flex; flex-direction: column; gap: 0.2rem; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}

a.contact-item { cursor: pointer; }

.contact-item:hover {
  background: var(--contact-hover);
  padding-left: 1.1rem;
  color: var(--text-primary);
}

.contact-item:hover .contact-icon-wrap {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-icon-wrap {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  background: var(--accent-subtle);
  border: 1px solid var(--tag-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-icon-wrap svg { width: 15px; height: 15px; }

/* ====================================================
   FOOTER
   ==================================================== */
.card-footer { padding: 0.25rem 1.75rem 1.375rem; }

.footer-accent-line {
  height: 1px;
  background: var(--footer-border);
  margin-bottom: 0.75rem;
}

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

.footer-company {
  color: var(--accent);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

.footer-dot { opacity: 0.35; }

/* ====================================================
   ANIMATIONS
   ==================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.specialty-card:nth-child(1) { animation-delay: 0.06s; }
.specialty-card:nth-child(2) { animation-delay: 0.12s; }
.specialty-card:nth-child(3) { animation-delay: 0.18s; }
.specialty-card:nth-child(4) { animation-delay: 0.24s; }
.specialty-card:nth-child(5) { animation-delay: 0.30s; }
.specialty-card:nth-child(6) { animation-delay: 0.36s; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 500px) {
  body { padding: 1rem 0.75rem; align-items: flex-start; }
  .card-wrapper { max-width: 100%; }
  .employee-name { font-size: 1.45rem; }
  .specialties-grid { grid-template-columns: repeat(2, 1fr); }
  .card-header, .profile-section, .content-section,
  .contact-section, .bio-section, .card-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .divider { margin-left: 1.25rem; margin-right: 1.25rem; }
}

/* ====================================================
   UTILITY
   ==================================================== */
.hidden { display: none !important; }
